Scripted trigger
allows_declaring_war_against_target_trigger
allows_declaring_war_against_target_trigger = { TARGET = … }game/common/scripted_triggers/00_war_and_peace_triggers.txt, line 230 (224 lines). Parameters: $TARGET$.
allows_declaring_war_against_target_trigger is a scripted trigger in Crusader Kings III, written at line 230 of its file. A call passes 1 parameter: TARGET. The game's script calls it in 3 places, among them Beseech a Title (interaction), Declare War (interaction) and Rightful Lands (event hold_court.8210). Its body carries 9 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_triggers/00_war_and_peace_triggers.txt.
What it checks
$TARGET$ = { save_temporary_scope_as = defender_check }- You have sworn to not declare any wars!
- Is not incapable
If
NOT = { has_cb_on = { target = scope:defender_check casus_belli = pam_humiliation_cb } }
Then
can_attack_in_hierarchy = scope:defender_check
- If their government does not have the can start war with raised troops flag: Not: Armies are raised
NOT = { is_allied_in_war = scope:defender_check }is_in_activity = no- Is not imprisoned
scope:defender_check:- … is a Herder and cannot be attacked. To get their lands you can either: Use the Demand Pastureland Interaction · Attack their Suzerain to transfer them as a Tributary
NOT = { is_tributary_of_suzerain_or_above = scope:attacker_check }NOT = { has_strong_hook = scope:attacker_check }- If imprisoned: You cannot declare war on your own Prisoner
If
liege != this
Then
- If they has administrative government mechanic:
If
top_liege = scope:defender_check.top_liege
Then
Otherwise
If
- Their top liege:
has_realm_law_flag = admin_vassal_wars_banned
Then
- Their top liege:
- Otherwise:
If
scope:defender_check:One of these
has_subject_contract_group = tributary_celestialor
has_subject_contract_group = tributary_hegemonic
- Is not an Independent Ruler
Then
None of these
scope:defender_check:is_tributary_of = scope:attacker_check.top_liege
- scope:attacker_check › If has a Adventurer Government: Your Camp is located in … Realm
If
- scope:attacker_check: Is a member of a Confederation
Then
None of these
scope:defender_check:is_member_of_confederation = scope:attacker_check.confederation
• 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 (120 lines of game script)
allows_declaring_war_against_target_trigger = {
save_temporary_scope_as = attacker_check
$TARGET$ = { save_temporary_scope_as = defender_check }
custom_tooltip = {
text = sworn_peace_tt
NOT = { has_character_flag = sworn_peace }
}
is_incapable = no
trigger_if = {
limit = {
NOT = {
has_cb_on = {
target = scope:defender_check
casus_belli = pam_humiliation_cb
}
}
}
can_attack_in_hierarchy = scope:defender_check
}
trigger_if = {
limit = {
NOT = {
government_has_flag = can_start_war_with_raised_troops
}
}
has_raised_armies = no
}
trigger_else = {
custom_description = {
text = army_blocks_defender_army
NOT = {
any_army = {
location.county.holder ?= {
target_is_same_character_or_above = scope:defender_check
}
}
}
}
}
NOT = {
is_allied_in_war = scope:defender_check
}
custom_description = {
text = "is_not_bankrupt"
is_in_debt = no
}
is_in_activity = no
trigger_if = {
limit = {
culture = { has_cultural_parameter = cannot_attack_allies }
}
NOT = {
is_allied_to = scope:defender_check
}
}
trigger_if = {
limit = {
culture = { has_cultural_parameter = cannot_attack_truces }
}
NOT = {
has_truce = scope:defender_check
}
}
is_imprisoned = no
trigger_if = {
limit = {
has_variable_list = subjugation_offer_under_consideration
}
custom_description = {
text = is_not_considering_offer_of_subjugation
NOT = {
is_target_in_variable_list = {
name = subjugation_offer_under_consideration
target = scope:defender_check
}
}
}
}
scope:defender_check = {
custom_tooltip = {
text = is_a_herder_recipient_tt
NOT = { government_has_flag = government_is_herder } # herders can't fight
}
NOT = { is_tributary_of_suzerain_or_above = scope:attacker_check } # can't fight your tributaries or your tributaries' tributaries
NOT = { has_strong_hook = scope:attacker_check }
trigger_if = {
limit = { is_imprisoned = yes }
custom_tooltip = {
text = declare_war_target_is_your_prisoner_tt
imprisoner != scope:attacker_check
}
}
}
trigger_if = {
limit = { liege != this }
trigger_if = {
limit = {
government_has_mechanic = administrative
}
# internal war
trigger_if = {
limit = { top_liege = scope:defender_check.top_liege }
trigger_if = {
limit = {
scope:defender_check = { government_has_mechanic = administrative }
top_liege != scope:defender_check
}
custom_tooltip = {
text = admin_cannot_declare_internal_wars
always = no
}
}
}
trigger_else = {
trigger_if = { # Admin - Laws prevent all vassals from declaring war
limit = {
top_liege = {
has_realm_law_flag = admin_vassal_wars_banned
}
}As written in game/common/scripted_triggers/00_war_and_peace_triggers.txt.
The first 120 of its 224 lines; the rest is in game/common/scripted_triggers/00_war_and_peace_triggers.txt from line 230.
Where it is used
Every place in common/, events/ and history/ that calls allows_declaring_war_against_target_trigger.
Character interactions (2)
Events (1)
- Rightful Lands
hold_court.8210
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.