scripted_triggers updated files
This commit is contained in:
parent
37045a17ee
commit
072e45c086
36 changed files with 4934 additions and 1754 deletions
|
|
@ -220,29 +220,255 @@ can_potentially_call_ally_trigger = {
|
|||
}
|
||||
}
|
||||
|
||||
war_declarer_needs_hook_on_liege = {
|
||||
scope:actor = {
|
||||
top_liege != this
|
||||
liege != scope:recipient
|
||||
NAND = {
|
||||
government_allows = administrative
|
||||
liege = { government_allows = administrative }
|
||||
admin_governor_allows_declaring_war_trigger = {
|
||||
OR = {
|
||||
vassal_contract_has_flag = admin_theme_frontier
|
||||
vassal_contract_has_flag = admin_theme_naval
|
||||
}
|
||||
}
|
||||
|
||||
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 = {
|
||||
vassal_contract_has_flag = vassal_contract_war_override
|
||||
is_allied_to = scope:defender_check
|
||||
}
|
||||
OR = {
|
||||
AND = {
|
||||
liege = scope:recipient.liege
|
||||
liege = { has_realm_law_flag = vassal_internal_wars_banned }
|
||||
}
|
||||
liege = { has_realm_law_flag = vassal_all_wars_banned }
|
||||
AND = {
|
||||
has_realm_law = japanese_bureaucracy_2
|
||||
NOT = { government_allows = administrative }
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = admin_all_vassal_wars_banned
|
||||
always = no
|
||||
}
|
||||
}
|
||||
trigger_else = {
|
||||
trigger_if = { # Admin - Laws only allow frontier and naval themes to declare war
|
||||
limit = {
|
||||
top_liege = {
|
||||
has_realm_law_flag = admin_vassal_wars_restricted
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = admin_all_vassal_wars_banned
|
||||
admin_governor_allows_declaring_war_trigger = yes
|
||||
}
|
||||
}
|
||||
trigger_if = { # Admin - Laws only allow frontier and naval themes to declare war IF they have permission
|
||||
limit = {
|
||||
top_liege = {
|
||||
has_realm_law_flag = admin_vassal_wars_permission_only
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = admin_vassal_wars_permission_only_desc
|
||||
has_variable = admin_permission_to_declare_war
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_else = {
|
||||
trigger_if = {
|
||||
limit = {
|
||||
liege ?= {
|
||||
has_realm_law_flag = vassal_all_wars_banned_permanent
|
||||
}
|
||||
NOT = {
|
||||
top_participant_group:dynastic_cycle ?= {
|
||||
has_participant_group_parameter = dynastic_cycle_vassal_internal_wars_allowed
|
||||
}
|
||||
}
|
||||
}
|
||||
custom_tooltip = {
|
||||
text = admin_all_vassal_wars_banned
|
||||
government_has_mechanic = administrative
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_if = {
|
||||
limit = {
|
||||
trigger_if = {
|
||||
limit = { NOT = { exists = scope:recipient } }
|
||||
scope:defender_check = {
|
||||
save_temporary_scope_as = recipient
|
||||
}
|
||||
}
|
||||
war_declarer_needs_hook_on_liege = yes
|
||||
}
|
||||
has_usable_hook = liege
|
||||
}
|
||||
}
|
||||
trigger_if = {
|
||||
limit = {
|
||||
scope:defender_check = {
|
||||
OR = {
|
||||
has_subject_contract_group = tributary_celestial
|
||||
has_subject_contract_group = tributary_hegemonic
|
||||
}
|
||||
}
|
||||
is_independent_ruler = no # to avoid duplicating tooltips already applying to the top_liege
|
||||
}
|
||||
NOT = {
|
||||
scope:defender_check = {
|
||||
is_tributary_of = scope:attacker_check.top_liege
|
||||
}
|
||||
}
|
||||
}
|
||||
scope:attacker_check = {
|
||||
trigger_if = {
|
||||
limit = { has_government = landless_adventurer_government }
|
||||
custom_tooltip = {
|
||||
text = camp_located_in_defender_realm.tt
|
||||
domicile.domicile_location.county.holder = {
|
||||
NOT = {
|
||||
target_is_same_character_or_above = scope:defender_check
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
trigger_if = {
|
||||
limit = {
|
||||
scope:attacker_check = {
|
||||
is_confederation_member = yes
|
||||
}
|
||||
}
|
||||
NOT = {
|
||||
scope:defender_check = {
|
||||
is_member_of_confederation = scope:attacker_check.confederation
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
war_declarer_needs_hook_on_liege = {
|
||||
top_liege != this
|
||||
liege != scope:recipient
|
||||
NAND = {
|
||||
government_has_mechanic = administrative
|
||||
liege = { government_has_mechanic = administrative }
|
||||
}
|
||||
NOT = {
|
||||
vassal_contract_has_flag = vassal_contract_war_override
|
||||
}
|
||||
OR = {
|
||||
AND = {
|
||||
liege = scope:recipient.liege
|
||||
liege = { has_realm_law_flag = vassal_internal_wars_banned }
|
||||
}
|
||||
liege = { has_realm_law_flag = vassal_all_wars_banned }
|
||||
}
|
||||
}
|
||||
|
||||
any_liege_or_above_is_participant_trigger = {
|
||||
|
|
@ -261,7 +487,7 @@ can_use_conquest_cbs_trigger = {
|
|||
government_has_flag = government_is_clan
|
||||
government_has_flag = government_is_nomadic
|
||||
government_has_flag = government_is_steppe_admin
|
||||
faith = { has_doctrine_parameter = conquest_cb_enabled }
|
||||
rite = { rite_has_parameter = conquest_cb_enabled }
|
||||
culture = { has_cultural_parameter = can_use_conquest_cbs }
|
||||
AND = {
|
||||
government_has_flag = government_is_japan_feudal
|
||||
|
|
@ -289,7 +515,7 @@ can_be_warrior_trigger = {
|
|||
#not for admin
|
||||
$ARMY_OWNER$ = {
|
||||
NOT = {
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
}
|
||||
culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
|
||||
}
|
||||
|
|
@ -318,7 +544,8 @@ can_be_knight_trigger = {
|
|||
can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
|
||||
trigger_if = { # Admin governors cannot be knights
|
||||
limit = {
|
||||
government_allows = administrative
|
||||
$ARMY_OWNER$ = { government_has_mechanic = administrative }
|
||||
is_courtier = no
|
||||
exists = primary_title
|
||||
}
|
||||
primary_title = {
|
||||
|
|
@ -342,7 +569,13 @@ can_be_knight_trigger = {
|
|||
is_clergy = yes
|
||||
}
|
||||
OR = {
|
||||
faith = { has_doctrine_parameter = clergy_can_fight }
|
||||
rite = { rite_has_parameter = clergy_can_fight }
|
||||
AND = {
|
||||
has_personal_tenet_flag = clergy_can_fight_personal
|
||||
NOT = {
|
||||
rite = { rite_has_parameter = pacifist }
|
||||
}
|
||||
}
|
||||
culture = { has_cultural_parameter = culture_clergy_can_fight }
|
||||
AND = {
|
||||
$ARMY_OWNER$.culture = {
|
||||
|
|
@ -390,14 +623,6 @@ can_be_commander_basic_trigger = {
|
|||
incapable = no
|
||||
hostage = no
|
||||
}
|
||||
NAND = {
|
||||
is_clergy = yes
|
||||
NOR = {
|
||||
has_trait = order_member # Order Members will fight for their faith even if their faith says no
|
||||
faith = { has_doctrine_parameter = clergy_can_fight }
|
||||
culture = { has_cultural_parameter = culture_clergy_can_fight }
|
||||
}
|
||||
}
|
||||
|
||||
OR = { # You can always lead your own armies
|
||||
this = $ARMY_OWNER$
|
||||
|
|
@ -438,6 +663,7 @@ can_be_commander_now_trigger = {
|
|||
has_character_flag = meditation_character_flag
|
||||
has_character_flag = local_shrine_rite
|
||||
has_character_flag = petition_liege_character_flag
|
||||
has_variable = petition_head_of_faith_petitioner
|
||||
has_character_flag = holding_court_character_flag
|
||||
is_being_visited_on_tour_strict = yes
|
||||
}
|
||||
|
|
@ -446,18 +672,23 @@ can_be_commander_now_trigger = {
|
|||
|
||||
get_valid_commander_list_trigger = {
|
||||
any_vassal = {
|
||||
count = all
|
||||
add_to_temporary_list = temp$LIST$
|
||||
}
|
||||
any_courtier = {
|
||||
count = all
|
||||
add_to_temporary_list = temp$LIST$
|
||||
}
|
||||
|
||||
any_in_list = {
|
||||
list = temp$LIST$
|
||||
count = all
|
||||
can_be_commander_now_trigger = { ARMY_OWNER = scope:army_owner }
|
||||
|
||||
add_to_temporary_list = $LIST$
|
||||
trigger_if = {
|
||||
limit = {
|
||||
can_be_commander_now_trigger = { ARMY_OWNER = scope:army_owner }
|
||||
}
|
||||
add_to_temporary_list = $LIST$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -686,13 +917,25 @@ is_religious_war = {
|
|||
}
|
||||
}
|
||||
|
||||
# scope:attacker and scope:defender come from holy war defensive joining
|
||||
same_faith_clergy_war_trigger = {
|
||||
scope:attacker.faith = scope:defender.faith
|
||||
scope:attacker = { government_has_flag = government_uses_church_authority }
|
||||
scope:defender = {
|
||||
OR = {
|
||||
government_has_flag = government_is_theocracy
|
||||
government_has_flag = government_is_holy_order
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
conquest_cb_holder_under_target_can_be_vassalized = {
|
||||
# If there is no holder they can't be vassalized!
|
||||
holder ?= {
|
||||
# We can only vassalize characters of a lower tier than us.
|
||||
highest_held_title_tier < scope:attacker.highest_held_title_tier
|
||||
# We can't vassalize Governors
|
||||
NOT = { government_has_flag = government_is_special_administrative }
|
||||
NOT = { government_has_mechanic = administrative }
|
||||
# Only (sub)vassals of the defender can be considered for transfer (no poaching vassals from 3rd parties without fighting them!)
|
||||
target_is_liege_or_above = scope:defender
|
||||
# *All* of a character's subrealm must be within the target area. If we're attacking for Jerusalem, we don't want to also be stealing parts of Egypt, Syria, etc.
|
||||
|
|
@ -707,17 +950,17 @@ religious_cb_holder_under_target_can_be_vassalized = {
|
|||
conquest_cb_holder_under_target_can_be_vassalized = yes
|
||||
|
||||
# Religious Tolerance Check
|
||||
scope:attacker.faith = {
|
||||
OR = {
|
||||
# For all Faiths, if the attacker views this vassal's faith more favorably than the defender does, they are 'liberated' and become vassals under the attacker.
|
||||
# For example, if Catholics are crusading against Ash'aris(viewed as Evil), any Messalian vassals (viewed as Hostile) will become vassals under the Catholic attacker.
|
||||
OR = {
|
||||
# For all Faiths, if the attacker views this vassal's faith more favorably than the defender does, they are 'liberated' and become vassals under the attacker.
|
||||
# For example, if Catholics are crusading against Ash'aris(viewed as Evil), any Messalian vassals (viewed as Hostile) will become vassals under the Catholic attacker.
|
||||
scope:attacker.faith = {
|
||||
faith_hostility_level_comparison = {
|
||||
prev.holder.faith < scope:defender.faith
|
||||
}
|
||||
|
||||
# Pluralist faiths always attempt to preserve vassals if possible, even if the vassal follows an Evil faith.
|
||||
has_doctrine_parameter = pluralism_pluralistic_holy_wars_preserve_vassals
|
||||
}
|
||||
|
||||
# Pluralist faiths always attempt to preserve vassals if possible, even if the vassal follows an Evil faith.
|
||||
scope:attacker.rite = { rite_has_parameter = pluralism_pluralistic_holy_wars_preserve_vassals }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -767,7 +1010,7 @@ can_use_viking_invasion_cbs_trigger = {
|
|||
|
||||
can_use_viking_invasion_cbs_dlc_trigger = {
|
||||
culture = { has_innovation = innovation_longboats }
|
||||
faith = { has_doctrine = tenet_warmonger }
|
||||
rite = { rite_has_tenet = tenet_warmonger }
|
||||
any_sub_realm_county = { is_coastal_county = yes }
|
||||
trigger_if = {
|
||||
limit = { is_ai = yes }
|
||||
|
|
@ -779,7 +1022,7 @@ can_use_viking_invasion_cbs_dlc_trigger = {
|
|||
NOT = {
|
||||
any_liege_or_above = {
|
||||
NOT = {
|
||||
faith = { has_doctrine = tenet_warmonger }
|
||||
rite = { rite_has_tenet = tenet_warmonger }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -906,7 +1149,7 @@ herders_and_tributary_constraints = {
|
|||
NOR = {
|
||||
custom_tooltip = {
|
||||
text = is_a_herder_defender_tt # herders can't fight
|
||||
government_has_flag = government_is_true_herder
|
||||
government_has_flag = government_is_herder
|
||||
}
|
||||
is_tributary_of_suzerain_or_above = scope:attacker # can't fight your tributaries or your tributaries' tributaries
|
||||
}
|
||||
|
|
@ -985,7 +1228,7 @@ feudal_clan_tribal_conquest_constraints = {
|
|||
short_term_gold < 200
|
||||
OR = {
|
||||
AND = {
|
||||
government_has_flag = government_is_special_administrative
|
||||
government_has_mechanic = administrative
|
||||
short_term_gold < 700
|
||||
this != top_liege
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue