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

Scripted trigger

joiner_not_already_in_another_war_with_any_target_war_participants_trigger

joiner_not_already_in_another_war_with_any_target_war_participants_trigger = { JOINER = … WARRIOR = … }

game/common/scripted_triggers/00_war_and_peace_triggers.txt, line 59 (106 lines). Parameters: $JOINER$, $WARRIOR$.

joiner_not_already_in_another_war_with_any_target_war_participants_trigger is a scripted trigger in Crusader Kings III, written at line 59 of its file. A call passes 2 parameters: JOINER and WARRIOR. The game's script calls it in 6 places, among them Bargain Fealty (interaction), Call Dynasty Member To War (interaction) and Call Follower to War (interaction). Patch 1.20.1.2, from game/common/scripted_triggers/00_war_and_peace_triggers.txt.

What it checks

  • If

    • scope:target:
      • primary_attacker = $WARRIOR$

    Then

    • scope:target:
      • primary_defender = { save_temporary_scope_as = primary_enemy }

    Otherwise

    • scope:target:
      • primary_attacker = { save_temporary_scope_as = primary_enemy }
  • $JOINER$ = { … }

• 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 (106 lines of game script)
joiner_not_already_in_another_war_with_any_target_war_participants_trigger = {
	###Triggers to make sure the recipient doesn't end up in a war with someone they already have a war with###

	# $WARRIOR$ — the already-warring character, actor in call / recipient in offer
	# $JOINER$ — the ally, recipient in call / actor in offer

	#Set the primary enemy
	trigger_if = {
		limit = { scope:target = { primary_attacker = $WARRIOR$ } }
		scope:target = { primary_defender = { save_temporary_scope_as = primary_enemy } }
	}
	trigger_else = {
		scope:target = { primary_attacker = { save_temporary_scope_as = primary_enemy } }
	}

	$JOINER$ = {
		#recipient can't already be at war with the primary_enemy
		custom_description = {
			text = "is_already_war_enemy_of_primary_enemy"
			subject = $JOINER$
			object = scope:primary_enemy
			NOT = {
				any_war_enemy = { this = scope:primary_enemy }
			}
		}
		#recipient can't already be at war with another enemy in target war
		custom_description = {
			text = "is_war_enemy_with_another_target_war_enemy"
			subject = $JOINER$
			NOT = {
				any_war_enemy = {
					this != scope:primary_enemy #Already handled above
					OR = {
						AND = {
							scope:target = { primary_defender = scope:primary_enemy }
							is_defender_in_war = scope:target
						}
						AND = {
							scope:target = { primary_attacker = scope:primary_enemy }
							is_attacker_in_war = scope:target
						}
					}
				}
			}
		}
		#recipient can't have a war enemy who is on actor's side in this war
		custom_description = {
			text = "is_war_enemy_with_my_war_ally"
			subject = $JOINER$
			NOT = {
				any_war_enemy = {
					OR = {
						AND = {
							scope:target = { primary_defender = $WARRIOR$ }
							is_defender_in_war = scope:target
						}
						AND = {
							scope:target = { primary_attacker = $WARRIOR$ }
							is_attacker_in_war = scope:target
						}
					}
				}
			}
		}
		#recipient can't be on the same side in another war with primary_enemy
		custom_description = {
			text = "is_war_ally_of_primary_enemy"
			subject = $JOINER$
			object = scope:primary_enemy
			NOT = {
				any_character_war = {
					OR = {
						AND = {
							is_defender = $JOINER$
							any_war_defender = { this = scope:primary_enemy }
						}
						AND = {
							is_attacker = $JOINER$
							any_war_attacker = { this = scope:primary_enemy }
						}
					}
				}
			}
		}
		#recipient can't be on the same side in another war with another enemy in the target war
		custom_description = {
			text = "is_war_ally_of_another_target_enemy"
			subject = $JOINER$
			NOT = {
				any_war_ally = {
					this != scope:primary_enemy #Already handled above
					OR = {
						AND = {
							scope:target = { primary_defender = scope:primary_enemy }
							is_defender_in_war = scope:target
						}
						AND = {
							scope:target = { primary_attacker = scope:primary_enemy }
							is_attacker_in_war = scope:target
						}
					}
				}
			}
		}
	}
}

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

Where it is used

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

Source: game/common/scripted_triggers/00_war_and_peace_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?