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

Scripted trigger

diarch_coup_attempt_is_valid_trigger

diarch_coup_attempt_is_valid_trigger = { LIEGE = … }

game/common/scripted_triggers/00_diarchy_scripted_triggers.txt, line 740 (43 lines). Parameters: $LIEGE$.

diarch_coup_attempt_is_valid_trigger is a scripted trigger in Crusader Kings III, written at line 740 of its file. A call passes 1 parameter: LIEGE. The game's script calls it in 2 places, among them Attempt to Overthrow Liege (decision) and diarchy.9032 (event). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_triggers/00_diarchy_scripted_triggers.txt.

What it checks

  • is_diarch = yes
  • $LIEGE$ = { has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges }
  • $LIEGE$ = { … }
  • You currently have … eligible Powerful Vassal supporters (including yourself) in your conspiracy, out of a required …
  • One of these

    • Years as diarch at least 8
    • or

      All of these

      • Years as diarch at least 4
      • $LIEGE$ = { years_in_diarchy >= 10 }
    • or

      You have already laid the groundwork for such an attempt
  • $LIEGE$.sub_realm_size >= minor_realm_size

• 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 (43 lines of game script)
diarch_coup_attempt_is_valid_trigger = {
	# Diarchy checks.
	is_diarch = yes
	$LIEGE$ = { has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges }
	## Liege must be physically present to overthrow. You can't coup them whilst they're abroad.
	$LIEGE$ = {
		is_imprisoned = no
		is_travelling = no
		is_at_war = no
		is_in_activity = no
		age >= 5
	}
	# Support checks.
	## Have you gathered enough support from the realm's powerful vassals and/or councillors?
	custom_tooltip = {
		text = diarch_attempt_to_overthrow_liege.tt.majority_powerful_vassal_support
		subject = root
		has_variable_list = coup_pv_supporters_list
		any_in_list = {
			variable = coup_pv_supporters_list
			count >= pv_overthrow_threshold_value
			# Double check they're still valid.
			diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = $LIEGE$ }
		}
	}
	# As a speed-bump, we check how long this diarchy has been on for.
	OR = {
		# Either, you've been a diarch for a good long ways.
		years_as_diarch >= 8
		# Or, you haven't been but everyone is kinda used to the concept of a diarch.
		AND = {
			years_as_diarch >= 4
			$LIEGE$ = { years_in_diarchy >= 10 }
		}
		# OR, you've laid the groundwork for such a coup already
		custom_tooltip = {
			text = diarch_attempt_to_overthrow_liege_bypass
			has_character_flag = laid_coup_groundwork_flag
		}
	}
	# And finally, for ease of sanity, your liege must be of a certain size.
	$LIEGE$.sub_realm_size >= minor_realm_size
}

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 diarch_coup_attempt_is_valid_trigger.

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?