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

Scripted trigger · All Under Heaven files

tgp_celestial_military_governor_can_join_war_trigger

tgp_celestial_military_governor_can_join_war_trigger = { MINISTER_OF_WAR = … TARGET_GOVERNOR = … }

game/common/scripted_triggers/10_tgp_triggers.txt, line 339 (26 lines). Parameters: $MINISTER_OF_WAR$, $TARGET_GOVERNOR$.

tgp_celestial_military_governor_can_join_war_trigger is a scripted trigger in Crusader Kings III, in the All Under Heaven files, written at line 339 of its file. A call passes 2 parameters: MINISTER_OF_WAR and TARGET_GOVERNOR. The game's script calls it in 2 places, among them Have Military Governor Join War (interaction) and Request Military Aid (interaction). Patch 1.20.1.2, from game/common/scripted_triggers/10_tgp_triggers.txt.

The comment above it in the file

Trigger if scoped character is able to join the war(s) of the target character
$TARGET_GOVERNOR$ - Target governor in need of troops
$MINISTER_OF_WAR$ - The Minister of War

What it checks

  • One of these

    • vassal_contract_has_flag = celestial_military_appointment
    • or

      vassal_contract_has_flag = meritocratic_military_appointment
    • or

      Holds Commission
  • NOT = { scope:joining_governor = $TARGET_GOVERNOR$ }
  • NOT = { scope:joining_governor = $MINISTER_OF_WAR$ }
  • No war ally:
  • NOT = { is_at_war_with = $TARGET_GOVERNOR$ }
  • NOT = { is_at_war_with = $MINISTER_OF_WAR$ }
  • NOT = { $TARGET_GOVERNOR$ = { … } }

• 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 (26 lines of game script)
tgp_celestial_military_governor_can_join_war_trigger = {
	save_temporary_scope_as = joining_governor
	OR = {
		vassal_contract_has_flag = celestial_military_appointment
		vassal_contract_has_flag = meritocratic_military_appointment
		has_title = title:e_minister_grand_marshal
	}
	NOR = {
		scope:joining_governor = $TARGET_GOVERNOR$
		scope:joining_governor = $MINISTER_OF_WAR$
		any_war_ally = { this = $TARGET_GOVERNOR$ }
		is_at_war_with = $TARGET_GOVERNOR$
		is_at_war_with = $MINISTER_OF_WAR$
		$TARGET_GOVERNOR$ = {
			any_war_enemy = {
				OR = {
					is_vassal_of = scope:joining_governor
					is_liege_or_above_of = scope:joining_governor
					is_allied_to = scope:joining_governor
					is_tributary_of = scope:joining_governor
					is_at_war_with = scope:joining_governor
				}
			}
		}
	}
}

As written in game/common/scripted_triggers/10_tgp_triggers.txt.

Where it is used

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

Source: game/common/scripted_triggers/10_tgp_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?