CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted trigger

is_diarch_valid_trigger

is_diarch_valid_trigger = yes

game/common/scripted_triggers/00_diarchy_scripted_triggers.txt, line 23 (81 lines). No parameters.

is_diarch_valid_trigger is a scripted trigger in Crusader Kings III, written at line 23 of its file. It takes no parameters: is_diarch_valid_trigger = yes (or no). The game's script calls it in 5 places, among them Declare me Regent (interaction), Overthrow Regent (interaction) and Overthrow Regent (scheme). Patch 1.20.1.2, from game/common/scripted_triggers/00_diarchy_scripted_triggers.txt.

The comment above it in the file

This is hooked up to the is_diarch_valid rule, invalidating them if it returns false, referenced by Code.

What it checks

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.

The script as written (81 lines of game script)
is_diarch_valid_trigger = {
	# Basics.
	is_alive = yes
	OR = {
		# We always want adults...
		is_adult = yes
		# ... _unless_ this is junior emperor, they're always children.
		liege ?= { has_diarchy_parameter = diarchy_type_is_junior_emperorship }
	}
	# Event blocks.
	OR = {
		is_ai = no
		NOT = { has_character_flag = cannot_be_diarch }
	}
	trigger_if = {
		limit = {
			exists = liege
		}
		# Being in a diarchy yourself will disable you, outside of co-rulerships.
		trigger_if = {
			limit = {
				NOT = {
					liege = { has_diarchy_active_parameter = diarchy_is_co_rulership }
				}
			}
			# If you're in an entrenched regency for some reason, you can't manage a regency yourself.
			NOT = { has_diarchy_parameter = diarchy_type_is_entrenched_regency }
			# You need to be mentally & physically sound, to some degree.
			regency_for_personal_reasons_trigger = no
		}
		# Diarchy-specific checks.
		## Viziers.
		trigger_if = {
			limit = {
				liege = {
					has_diarchy_parameter = diarchy_is_vizierate
					NOT = { government_has_flag = government_is_celestial }
				}
			}
			# Must match their liege's gender preference.
			diarch_matches_liege_faith_gender_preference_trigger = yes
			# Viziers aren't big land-owners.
			## Not in this way, at least.
			highest_held_title_tier <= tier_barony
		}
		# If you have somehow managed to get invited to/start an activity outside of your realm (e.g., you're the spouse in a grand wedding), then yeah, you forfeit your position.
		## ... unless you're a co-ruler.
		trigger_if = {
			limit = {
				NOT = {
					liege = { has_diarchy_active_parameter = diarchy_is_co_rulership }
				}
			}
			# We cannot be at war with our liege.
			NOT = { is_at_war_with = liege }
			NAND = {
				# Is it redundant to check twice?
				## Yes.
				### Do the machine spirits demand this thoroughness of us?
				#### Also yes.
				##### Do not ask why the God-Machine commands it, merely be glad that it commanded it of you.
				is_travelling = yes
				exists = current_travel_plan
				# We check your liege so that you can attend business within the realm easily.
				## Schemes are their own special lil guys so we take care of them separately.
				trigger_if = {
					limit = {
						exists = scope:owner
						exists = scope:target
					}
					travel_would_cause_regency_trigger = { REALM_HOLDER = scope:owner.liege }
				}
				## Else, we're an ordinary, gods-fearing root scope, so use that.
				trigger_else = {
					travel_would_cause_regency_trigger = { REALM_HOLDER = liege }
				}
			}
		}
	}
	tgp_is_ceremonial_liege_trigger = no
}

As written in game/common/scripted_triggers/00_diarchy_scripted_triggers.txt.

Where it is used

Every place in common/, events/ and history/ that calls is_diarch_valid_trigger.

Character interactions (2)

Schemes (1)

  • Overthrow Regent

Scripted rules (1)

  • is_diarch_valid

Source: game/common/scripted_triggers/00_diarchy_scripted_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?