From 82db99534c0f7b486aea9a9bea8e3f796d335fb4 Mon Sep 17 00:00:00 2001 From: Magpie490 Date: Thu, 20 Feb 2025 11:52:45 +0000 Subject: [PATCH 1/2] admin gov works --- common/character_interactions/00_alliance.txt | 8 +- .../00_courtier_and_guest_interactions.txt | 2 +- .../00_diarch_interactions.txt | 8 +- .../00_faction_interactions.txt | 6 +- common/character_interactions/00_gift.txt | 4 +- .../00_grant_titles_interaction.txt | 8 +- common/character_interactions/00_heir.txt | 8 +- .../00_invite_agent_to_scheme.txt | 8 +- .../00_perk_interactions.txt | 10 +- .../00_prison_interactions.txt | 2 +- .../00_religious_interactions.txt | 8 +- .../00_revoke_title_interaction.txt | 38 +- common/character_interactions/00_war.txt | 12 +- .../06_ep3_scheme_interactions.txt | 34 +- .../06_ep3_test_interactions_.txt | 6 +- common/culture/traditions/NEOW_traditions.txt | 2 +- common/governments/00_government_types.txt | 2 +- common/laws/00_realm_laws.txt | 12 +- common/on_action/game_start.txt | 4 +- common/script_values/00_ai_values.txt | 6 +- common/script_values/00_council_values.txt | 4 +- common/script_values/00_legitimacy_values.txt | 4 +- common/script_values/07_ep3_values.txt | 4 +- common/script_values/99_chancellor_values.txt | 8 +- .../00_available_for_events_triggers.txt | 379 ++++ .../00_interaction_triggers.txt | 411 ++++ .../00_religious_triggers.txt | 1847 +++++++++++++++++ .../00_scripted_triggers.txt | 493 +++++ .../00_secret_type_triggers.txt | 444 ++++ .../00_succession_triggers.txt | 56 + .../00_vassal_stance_triggers.txt | 83 + .../00_war_and_peace_triggers.txt | 869 ++++++++ common/scripted_triggers/07_ep3_triggers.txt | 1619 +++++++++++++++ 33 files changed, 6305 insertions(+), 104 deletions(-) create mode 100644 common/scripted_triggers/00_available_for_events_triggers.txt create mode 100644 common/scripted_triggers/00_interaction_triggers.txt create mode 100644 common/scripted_triggers/00_religious_triggers.txt create mode 100644 common/scripted_triggers/00_scripted_triggers.txt create mode 100644 common/scripted_triggers/00_secret_type_triggers.txt create mode 100644 common/scripted_triggers/00_succession_triggers.txt create mode 100644 common/scripted_triggers/00_vassal_stance_triggers.txt create mode 100644 common/scripted_triggers/00_war_and_peace_triggers.txt create mode 100644 common/scripted_triggers/07_ep3_triggers.txt diff --git a/common/character_interactions/00_alliance.txt b/common/character_interactions/00_alliance.txt index cd303f59..679fb037 100644 --- a/common/character_interactions/00_alliance.txt +++ b/common/character_interactions/00_alliance.txt @@ -1046,11 +1046,11 @@ negotiate_alliance_interaction = { send_option = { is_shown = { scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:recipient = { top_liege = scope:actor.top_liege - government_allows = administrative + has_government = administrative_government } } is_valid = { @@ -2214,11 +2214,11 @@ perk_alliance_interaction = { send_option = { is_shown = { scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:recipient = { top_liege = scope:actor.top_liege - government_allows = administrative + has_government = administrative_government } } is_valid = { diff --git a/common/character_interactions/00_courtier_and_guest_interactions.txt b/common/character_interactions/00_courtier_and_guest_interactions.txt index 3e788ad8..cbd902ab 100644 --- a/common/character_interactions/00_courtier_and_guest_interactions.txt +++ b/common/character_interactions/00_courtier_and_guest_interactions.txt @@ -1144,7 +1144,7 @@ invite_to_court_interaction = { scope:recipient = { is_eunuch_trigger = yes liege = { - government_allows = administrative + has_government = administrative_government primary_title.tier = tier_empire culture = { has_cultural_parameter = can_appoint_chief_eunuch } } diff --git a/common/character_interactions/00_diarch_interactions.txt b/common/character_interactions/00_diarch_interactions.txt index bc35b21f..7fec8d09 100644 --- a/common/character_interactions/00_diarch_interactions.txt +++ b/common/character_interactions/00_diarch_interactions.txt @@ -6140,11 +6140,11 @@ swing_scales_currency_interaction = { OR = { AND = { scope:recipient.liege ?= scope:actor - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } } AND = { scope:actor.liege ?= scope:recipient - scope:recipient = { government_allows = administrative } + scope:recipient = { has_government = administrative_government } } } } @@ -6780,11 +6780,11 @@ diarch_swing_scales_currency_interaction = { OR = { AND = { scope:recipient.liege ?= scope:actor - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } } AND = { scope:actor.liege ?= scope:recipient - scope:recipient = { government_allows = administrative } + scope:recipient = { has_government = administrative_government } } } } diff --git a/common/character_interactions/00_faction_interactions.txt b/common/character_interactions/00_faction_interactions.txt index 7ff4211d..985199b7 100644 --- a/common/character_interactions/00_faction_interactions.txt +++ b/common/character_interactions/00_faction_interactions.txt @@ -24,7 +24,7 @@ force_join_faction_interaction = { is_valid_showing_failures_only = { scope:actor = { trigger_if = { - limit = { government_allows = administrative } + limit = { has_government = administrative_government } custom_tooltip = { text = force_join_faction_admin_requirement_desc OR = { @@ -113,8 +113,8 @@ force_join_faction_interaction = { #Spend influence send_option = { is_shown = { - scope:actor = { government_allows = administrative } - scope:actor.top_liege ?= { government_allows = administrative } + scope:actor = { has_government = administrative_government } + scope:actor.top_liege ?= { has_government = administrative_government } } is_valid = { # Convincing someone with influence is not available if they hate you or love the liege scope:actor ?= { influence >= { value = scope:actor.monumental_influence_value multiply = 2 } } diff --git a/common/character_interactions/00_gift.txt b/common/character_interactions/00_gift.txt index 1fd26d68..ebfa486a 100644 --- a/common/character_interactions/00_gift.txt +++ b/common/character_interactions/00_gift.txt @@ -277,10 +277,10 @@ gift_interaction = { if = { limit = { is_ruler = yes - government_allows = administrative + has_government = administrative_government scope:recipient = { is_ruler = yes - government_allows = administrative + has_government = administrative_government any_held_title = { is_noble_family_title = yes } diff --git a/common/character_interactions/00_grant_titles_interaction.txt b/common/character_interactions/00_grant_titles_interaction.txt index 5aefa2ce..5200c9d9 100644 --- a/common/character_interactions/00_grant_titles_interaction.txt +++ b/common/character_interactions/00_grant_titles_interaction.txt @@ -34,9 +34,9 @@ grant_titles_interaction = { } trigger_if = { limit = { - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } } - scope:recipient = { NOT = { government_allows = administrative } } + scope:recipient = { NOT = { has_government = administrative_government } } } } @@ -1283,7 +1283,7 @@ grant_governorship_interaction = { } } scope:actor = { - government_allows = administrative + has_government = administrative_government highest_held_title_tier >= tier_county } @@ -1352,7 +1352,7 @@ grant_governorship_interaction = { } trigger_if = { limit = { is_landed = yes } - government_allows = administrative + has_government = administrative_government } is_clergy = no # Gallivanters won't accept additional responsibilities. diff --git a/common/character_interactions/00_heir.txt b/common/character_interactions/00_heir.txt index 57edd933..3c832bcc 100644 --- a/common/character_interactions/00_heir.txt +++ b/common/character_interactions/00_heir.txt @@ -15,7 +15,7 @@ designate_heir_interaction = { trigger_if = { limit = { # Admin always has access to this - Recipient just need to be their child scope:actor = { - government_allows = administrative + has_government = administrative_government any_held_title = { is_noble_family_title = yes } @@ -62,7 +62,7 @@ designate_heir_interaction = { if = { limit = { scope:actor = { - government_allows = administrative + has_government = administrative_government any_held_title = { is_noble_family_title = yes } @@ -94,7 +94,7 @@ designate_heir_interaction = { if = { limit = { scope:actor = { - government_allows = administrative + has_government = administrative_government any_held_title = { is_noble_family_title = yes } @@ -126,7 +126,7 @@ designate_heir_interaction = { scope:actor = { trigger_if = { limit = { - government_allows = administrative + has_government = administrative_government any_held_title = { is_noble_family_title = yes } diff --git a/common/character_interactions/00_invite_agent_to_scheme.txt b/common/character_interactions/00_invite_agent_to_scheme.txt index cedb987d..aee64fc6 100644 --- a/common/character_interactions/00_invite_agent_to_scheme.txt +++ b/common/character_interactions/00_invite_agent_to_scheme.txt @@ -489,14 +489,14 @@ invite_agent_to_scheme_interaction = { flag = influence is_shown = { scope:actor.top_liege ?= scope:recipient.top_liege - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } scope:recipient = { OR = { - government_allows = administrative - host = { government_allows = administrative } + has_government = administrative_government + host = { has_government = administrative_government } AND = { highest_held_title_tier = tier_barony - liege = { government_allows = administrative } + liege = { has_government = administrative_government } } } } diff --git a/common/character_interactions/00_perk_interactions.txt b/common/character_interactions/00_perk_interactions.txt index 91d54e07..c6638fdd 100644 --- a/common/character_interactions/00_perk_interactions.txt +++ b/common/character_interactions/00_perk_interactions.txt @@ -940,7 +940,7 @@ buy_claim_interaction = { value = minor_buy_claim_piety_value if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 1.5 } @@ -957,7 +957,7 @@ buy_claim_interaction = { value = medium_buy_claim_piety_value if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 1.5 } @@ -974,7 +974,7 @@ buy_claim_interaction = { value = major_buy_claim_piety_value if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 1.5 } @@ -991,7 +991,7 @@ buy_claim_interaction = { value = massive_buy_claim_piety_value if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 1.5 } @@ -1047,7 +1047,7 @@ buy_claim_interaction = { } if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 1.5 } diff --git a/common/character_interactions/00_prison_interactions.txt b/common/character_interactions/00_prison_interactions.txt index 1bcf63dc..88bc333f 100644 --- a/common/character_interactions/00_prison_interactions.txt +++ b/common/character_interactions/00_prison_interactions.txt @@ -5031,7 +5031,7 @@ release_from_prison_interaction = { localization = "RELEASE_DISFIGURE" is_shown = { scope:actor = { - government_allows = administrative + has_government = administrative_government culture = { has_cultural_tradition = tradition_ep3_palace_politics } # If they're our partner emperor, we should use the maiming interaction instead. liege_should_systematically_maim_co_ruler_trigger = no diff --git a/common/character_interactions/00_religious_interactions.txt b/common/character_interactions/00_religious_interactions.txt index 24a4b979..c7ddc25b 100644 --- a/common/character_interactions/00_religious_interactions.txt +++ b/common/character_interactions/00_religious_interactions.txt @@ -5343,11 +5343,11 @@ hof_ask_for_claim_interaction = { trigger_if = { # Admin can't request claim on other admin titles, only the top liege's primary title is up for grabs limit = { scope:secondary_recipient = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = yes } scope:actor = { - government_allows = administrative + has_government = administrative_government } } scope:target = { @@ -5418,11 +5418,11 @@ hof_ask_for_claim_interaction = { trigger_if = { # Admin can't request claims on other admin titles limit = { scope:secondary_recipient = { - government_allows = administrative + has_government = administrative_government NOT = { is_independent_ruler = yes } } scope:actor = { - government_allows = administrative + has_government = administrative_government } } custom_description = { diff --git a/common/character_interactions/00_revoke_title_interaction.txt b/common/character_interactions/00_revoke_title_interaction.txt index cd124c38..86d4b6b7 100644 --- a/common/character_interactions/00_revoke_title_interaction.txt +++ b/common/character_interactions/00_revoke_title_interaction.txt @@ -9,10 +9,10 @@ triggered_desc = { trigger = { scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:recipient = { - government_allows = administrative + has_government = administrative_government } } desc = revoke_governorship_interaction @@ -26,10 +26,10 @@ triggered_desc = { trigger = { scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:recipient = { - government_allows = administrative + has_government = administrative_government } } desc = revoke_governorship_interaction_desc @@ -41,10 +41,10 @@ icon = { trigger = { scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:recipient = { - government_allows = administrative + has_government = administrative_government } } reference = revoke_governorship @@ -90,7 +90,7 @@ } } trigger_else_if = { - limit = { government_allows = administrative } + limit = { has_government = administrative_government } } trigger_else = { custom_description = { @@ -179,8 +179,8 @@ title_revocation_standard_can_pick_title_trigger = yes trigger_if = { limit = { - scope:actor = { government_allows = administrative } - scope:recipient = { government_allows = administrative } + scope:actor = { has_government = administrative_government } + scope:recipient = { has_government = administrative_government } } custom_description = { text = "admin_revoke_primary_tier_only" @@ -234,7 +234,7 @@ if = { limit = { scope:actor = { - government_allows = administrative + has_government = administrative_government NOT = { has_revoke_title_reason = scope:recipient } } scope:recipient = { @@ -356,7 +356,7 @@ scope:actor = { if = { # Admin has to pay an influence cost unless they have a revocation reason on the recipient limit = { - government_allows = administrative + has_government = administrative_government NOT = { has_revoke_title_reason = scope:recipient } scope:recipient = { highest_held_title_tier >= tier_county @@ -499,7 +499,7 @@ scope:actor = { if = { # Admin has to pay an influence cost unless they have a revocation reason on the recipient limit = { - government_allows = administrative + has_government = administrative_government NOT = { has_revoke_title_reason = scope:recipient } scope:recipient = { highest_held_title_tier >= tier_county @@ -696,9 +696,9 @@ } custom_tooltip = { text = "has_admin_gov" - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } scope:recipient = { - government_allows = administrative + has_government = administrative_government highest_held_title_tier = tier_county is_ai = yes } @@ -817,7 +817,7 @@ } modifier = { #Title is part of vassal's primary title de-jure. Not relevant for Admin. add = -25 - NOT = { scope:recipient = { government_allows = administrative } } + NOT = { scope:recipient = { has_government = administrative_government } } scope:recipient.primary_title.tier > tier_county OR = { scope:recipient.primary_title = { @@ -1236,7 +1236,7 @@ # Slight preference for higher-tier titles modifier = { NOT = { - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } } add = scope:landed_title.tier } @@ -1334,18 +1334,18 @@ # Admin Government: Do not revoke titles from your house unless it's really needed modifier = { - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } scope:actor.house = scope:recipient.house add = -500 } # Admin rulers should be less likely to revoke titles without a revocation reason, as they should prefer to depose governors modifier = { scope:actor = { - government_allows = administrative + has_government = administrative_government NOT = { has_revoke_title_reason = scope:recipient } } scope:recipient = { - government_allows = administrative + has_government = administrative_government highest_held_title_tier >= tier_duchy } factor = { # Honorable AI's will never revoke titles without a reason diff --git a/common/character_interactions/00_war.txt b/common/character_interactions/00_war.txt index 88ca27c5..48d900d8 100644 --- a/common/character_interactions/00_war.txt +++ b/common/character_interactions/00_war.txt @@ -88,7 +88,7 @@ scope:actor = { trigger_if = { limit = { - NOT = { government_allows = administrative } + NOT = { has_government = administrative_government } liege ?= { has_realm_law_flag = vassal_all_wars_banned_permanent NOT = { this = scope:actor } @@ -101,9 +101,9 @@ } trigger_if = { limit = { - government_allows = administrative + has_government = administrative_government top_liege = scope:recipient.top_liege - scope:recipient = { government_allows = administrative } + scope:recipient = { has_government = administrative_government } NOT = { top_liege = scope:recipient } } custom_tooltip = { @@ -113,7 +113,7 @@ } trigger_if = { # Admin - Laws only allow frontier and naval themes to declare war limit = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no top_liege = { this != scope:recipient.top_liege @@ -130,7 +130,7 @@ } trigger_if = { # Admin - Laws only allow frontier and naval themes to declare war IF they have permission limit = { - government_allows = administrative + has_government = administrative_government OR = { vassal_contract_has_flag = admin_theme_frontier vassal_contract_has_flag = admin_theme_naval @@ -148,7 +148,7 @@ } trigger_if = { # Admin - Laws prevent all vassals from declaring war limit = { - government_allows = administrative + has_government = administrative_government OR = { vassal_contract_has_flag = admin_theme_frontier vassal_contract_has_flag = admin_theme_naval diff --git a/common/character_interactions/06_ep3_scheme_interactions.txt b/common/character_interactions/06_ep3_scheme_interactions.txt index 7936e8d7..6d9ad1f0 100644 --- a/common/character_interactions/06_ep3_scheme_interactions.txt +++ b/common/character_interactions/06_ep3_scheme_interactions.txt @@ -22,11 +22,11 @@ start_slander_interaction = { scope:actor = { is_adult = yes is_imprisoned = no - government_allows = administrative + has_government = administrative_government } scope:recipient = { NOT = { this = scope:actor } - government_allows = administrative + has_government = administrative_government top_liege = scope:actor.top_liege } } @@ -323,10 +323,10 @@ start_promote_interaction = { scope:actor = { is_adult = yes is_imprisoned = no - government_allows = administrative + has_government = administrative_government } scope:recipient = { - government_allows = administrative + has_government = administrative_government top_liege = scope:actor.top_liege } } @@ -922,11 +922,11 @@ start_challenge_status_interaction = { is_shown = { scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:recipient != scope:actor scope:recipient = { - government_allows = administrative + has_government = administrative_government top_liege = scope:actor.top_liege } } @@ -1049,7 +1049,7 @@ start_challenge_status_interaction = { is_scheme_category = political } } - government_allows = administrative + has_government = administrative_government } auto_accept = yes @@ -1151,7 +1151,7 @@ start_expand_power_base_interaction = { scope:actor = { is_adult = yes is_imprisoned = no - government_allows = administrative + has_government = administrative_government this = scope:recipient exists = house.house_head house.house_head = { @@ -1304,9 +1304,9 @@ start_depose_interaction = { is_shown = { has_ep3_dlc_trigger = yes - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } scope:recipient = { - government_allows = administrative + has_government = administrative_government primary_title.tier >= tier_empire # Target has to be the emperor this != scope:actor top_liege.primary_title = scope:actor.top_liege.primary_title # This hides the tooltip @@ -1600,7 +1600,7 @@ start_foster_legitimacy_interaction = { scope:actor = { is_adult = yes is_imprisoned = no - government_allows = administrative + has_government = administrative_government } NOT = { @@ -1610,7 +1610,7 @@ start_foster_legitimacy_interaction = { scope:recipient = { this = scope:actor.liege is_adult = yes - government_allows = administrative + has_government = administrative_government } } @@ -1765,7 +1765,7 @@ start_damage_legitimacy_interaction = { scope:actor = { is_adult = yes is_imprisoned = no - government_allows = administrative + has_government = administrative_government } NOT = { @@ -1775,7 +1775,7 @@ start_damage_legitimacy_interaction = { scope:recipient = { this = scope:actor.liege is_adult = yes - government_allows = administrative + has_government = administrative_government } } @@ -2725,12 +2725,12 @@ start_raid_estate_interaction = { is_highlighted = { scope:actor.var:raid_estate_permission ?= scope:recipient.house } is_shown = { - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } scope:recipient.house.house_head ?= { exists = house NOT = { house = scope:actor.house } top_liege = scope:actor.top_liege - government_allows = administrative + has_government = administrative_government any_held_title = { is_noble_family_title = yes } } } @@ -2986,7 +2986,7 @@ start_teach_governor_interaction = { cooldown_against_recipient = { years = 15 } is_shown = { - scope:actor = { government_allows = administrative } + scope:actor = { has_government = administrative_government } scope:recipient != scope:actor scope:recipient = { is_alive = yes diff --git a/common/character_interactions/06_ep3_test_interactions_.txt b/common/character_interactions/06_ep3_test_interactions_.txt index 7e06048a..26719761 100644 --- a/common/character_interactions/06_ep3_test_interactions_.txt +++ b/common/character_interactions/06_ep3_test_interactions_.txt @@ -64,7 +64,7 @@ invest_appointment_interaction = { is_shown = { debug_only = yes scope:recipient = { - government_allows = administrative + has_government = administrative_government liege = scope:actor } } @@ -93,10 +93,10 @@ transfer_title_army_maa_interaction = { is_shown = { debug_only = yes scope:recipient = { - government_allows = administrative + has_government = administrative_government } scope:actor = { - government_allows = administrative + has_government = administrative_government } scope:actor != scope:recipient } diff --git a/common/culture/traditions/NEOW_traditions.txt b/common/culture/traditions/NEOW_traditions.txt index c0ac6fc2..2dcc53bf 100644 --- a/common/culture/traditions/NEOW_traditions.txt +++ b/common/culture/traditions/NEOW_traditions.txt @@ -194,7 +194,7 @@ tradition_british_palace_politics = { if = { limit = { # Admin should be more into this scope:character = { - government_allows = administrative + has_government = administrative_government } } multiply = 2 diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 8ed8534a..c3f45e0a 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -336,7 +336,7 @@ administrative_government = { title_creation_cost_mult = -0.5 } - # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + # Use flags instead of has_government = administrative_government for moddability if possible (i.e., wherever not visible to the player). flag = government_is_administrative # These flags only exist for loc and in-game descriptions diff --git a/common/laws/00_realm_laws.txt b/common/laws/00_realm_laws.txt index b91e218b..4e35528c 100644 --- a/common/laws/00_realm_laws.txt +++ b/common/laws/00_realm_laws.txt @@ -30,7 +30,7 @@ crown_authority = { realm_law_use_crown_authority = yes trigger_if = { limit = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no } liege = { has_realm_law = crown_authority_0 } @@ -61,7 +61,7 @@ crown_authority = { realm_law_use_crown_authority = yes trigger_if = { limit = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no } liege = { has_realm_law = crown_authority_1 } @@ -140,7 +140,7 @@ crown_authority = { realm_law_use_crown_authority = yes trigger_if = { limit = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no } liege = { has_realm_law = crown_authority_2 } @@ -152,7 +152,7 @@ crown_authority = { limit = { NOT = { has_realm_law = crown_authority_3 } NAND = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no } } @@ -222,7 +222,7 @@ crown_authority = { realm_law_use_crown_authority = yes trigger_if = { limit = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no } liege = { has_realm_law = crown_authority_3 } @@ -233,7 +233,7 @@ crown_authority = { trigger_if = { limit = { NAND = { - government_allows = administrative + has_government = administrative_government is_independent_ruler = no } } diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index d7a849b3..a37eb232 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -1418,7 +1418,7 @@ on_game_start = { # Admin - Let's give existing governors the Governor trait on game start every_independent_ruler = { - limit = { government_allows = administrative } + limit = { has_government = administrative_government } every_vassal = { limit = { is_governor = yes @@ -3283,7 +3283,7 @@ on_game_start_after_lobby = { } ### EP3 ADMIN SETUP ### every_independent_ruler = { - limit = { government_allows = administrative } + limit = { has_government = administrative_government } save_scope_as = top_liege ### EP3 NOBLE FAMILIES & DOMICILE SETUP ### random_held_title = { # May be removed once every_noble_family includes liege (TIT-51212) diff --git a/common/script_values/00_ai_values.txt b/common/script_values/00_ai_values.txt index 67ff0bf0..318bf830 100644 --- a/common/script_values/00_ai_values.txt +++ b/common/script_values/00_ai_values.txt @@ -1734,7 +1734,7 @@ ai_men_at_arms_expense_gold_max = { } if = { limit = { - government_allows = administrative + has_government = administrative_government NOT = { vassal_contract_has_flag = admin_theme_civilian } } add = { @@ -1748,7 +1748,7 @@ ai_men_at_arms_expense_gold_max = { if = { limit = { - government_allows = administrative + has_government = administrative_government debt_level <= 2 } value = 3 @@ -2284,7 +2284,7 @@ ai_men_at_arms_chance_landless_ruler = { } if = { # Landless admin focus mostly on Buildings limit = { - government_allows = administrative + has_government = administrative_government } add = -0.3 } diff --git a/common/script_values/00_council_values.txt b/common/script_values/00_council_values.txt index 6a58a027..2c6c1495 100644 --- a/common/script_values/00_council_values.txt +++ b/common/script_values/00_council_values.txt @@ -51,7 +51,7 @@ council_task_fabricate_claim_relative_strength = { council_scaled_by_liege_tier_not_admin = { value = council_scaled_by_liege_tier if = { - limit = { government_allows = administrative } + limit = { has_government = administrative_government } multiply = 0 } } @@ -60,7 +60,7 @@ council_scaled_admin_value = { value = 0 # This value should be 0 for anyone who isn't admin if = { limit = { - government_allows = administrative + has_government = administrative_government } add = 1 if = { diff --git a/common/script_values/00_legitimacy_values.txt b/common/script_values/00_legitimacy_values.txt index f7a921a1..bbd390a6 100644 --- a/common/script_values/00_legitimacy_values.txt +++ b/common/script_values/00_legitimacy_values.txt @@ -187,7 +187,7 @@ base_legitimacy_value = { # Split into separate values for easy debugging/visibi # ADMINISTRATIVE if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 0.75 # To reduce the overall base values add = base_legitimacy_admin_value # And add anything admin specific @@ -244,7 +244,7 @@ succession_legitimacy_value = { # Split into separate values for easy debugging/ # ADMINISTRATIVE if = { limit = { - government_allows = administrative + has_government = administrative_government } multiply = 0.75 # To reduce the overall base values add = base_legitimacy_admin_value # And add anything admin specific diff --git a/common/script_values/07_ep3_values.txt b/common/script_values/07_ep3_values.txt index 346e5c34..43d4ead7 100644 --- a/common/script_values/07_ep3_values.txt +++ b/common/script_values/07_ep3_values.txt @@ -662,7 +662,7 @@ ep3_triumph_gold_cost = { value = 100 if = { limit = { - NOT = { government_allows = administrative } + NOT = { has_government = administrative_government } } add = 100 if = { @@ -680,7 +680,7 @@ ep3_triumph_influence_cost = { value = 0 if = { limit = { - government_allows = administrative + has_government = administrative_government } add = 50 if = { diff --git a/common/script_values/99_chancellor_values.txt b/common/script_values/99_chancellor_values.txt index 3a614597..fe08d012 100644 --- a/common/script_values/99_chancellor_values.txt +++ b/common/script_values/99_chancellor_values.txt @@ -596,7 +596,7 @@ chancellor_integrate_title_contextual_bonuses = { limit = { # Task instigator is admin top liege scope:councillor_liege = { is_independent_ruler = yes - government_allows = administrative + has_government = administrative_government } } add = { @@ -608,16 +608,16 @@ chancellor_integrate_title_contextual_bonuses = { if = { limit = { # Task target is de jure part of an admin empire/kingdom NOT = { - scope:councillor_liege = { government_allows = administrative } + scope:councillor_liege = { has_government = administrative_government } } trigger_if = { limit = { exists = scope:county.empire.holder } - scope:county.empire.holder = { government_allows = administrative } + scope:county.empire.holder = { has_government = administrative_government } } trigger_else = { scope:county.kingdom.holder ?= { is_independent_ruler = yes - government_allows = administrative + has_government = administrative_government } } } diff --git a/common/scripted_triggers/00_available_for_events_triggers.txt b/common/scripted_triggers/00_available_for_events_triggers.txt new file mode 100644 index 00000000..1dfe91bf --- /dev/null +++ b/common/scripted_triggers/00_available_for_events_triggers.txt @@ -0,0 +1,379 @@ +###TRIGGER LIST +#is_busy_in_events_unlocalised - already in an involved event chain +#is_in_pseudo_activity_trigger - character is involved in a pseudo-activity +#has_contagious_deadly_disease_trigger +#is_healthy +#is_available +#is_available_ai +#is_available_adult +#is_available_healthy_adult +#is_available_ai_adult +#is_available_healthy_ai_adult +#is_capable_adult +#is_capable_adult_ai +#liege_is_boss_trigger +#can_select_lifestyle_focus +#can_marry +#can_become_concubine +#is_busy_in_events_localised + +# For flags that will never be seen by the player and thus don't need to be localised. +is_busy_in_events_unlocalised = { + OR = { + has_character_flag = is_in_diplomacy_foreign_special_event + has_character_flag = is_in_diplomacy_family_special_event + has_character_flag = is_in_diplomacy_majesty_special_event + has_character_flag = is_in_martial_special_event + has_character_flag = is_in_stewardship_domain_special_event + has_character_flag = is_in_stewardship_duty_special_event + has_character_flag = is_in_stewardship_wealth_special_event + has_character_flag = is_in_intrigue_special_event + has_character_flag = is_in_learning_special_event + has_character_flag = is_in_task_contract_event_chain + } +} + +# For flags that *may* be seen by the player, and thus need to be cloaked in a custom description to look nice. +is_busy_in_events_localised = { + custom_description = { + text = "yearly_1010_abducted" + NOT = { has_character_flag = yearly_1010_abducted } + } + custom_description = { + text = "yearly_1010_abductor" + NOT = { has_character_flag = yearly_1010_abductor } + } +} + +has_contagious_deadly_disease_trigger = { + OR = { + has_trait = bubonic_plague + has_trait = smallpox + has_trait = typhus + has_trait = consumption + has_trait = measles + has_trait = dysentery + } +} + +is_healthy = { + custom_tooltip = { + text = not_poor_health_tt + health >= fine_health + } + NOR = { + has_trait = infirm + has_trait = incapable + has_trait = wounded_2 + has_trait = wounded_3 + } + has_contagious_deadly_disease_trigger = no +} + +basic_is_available_ai = { + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no +} + +is_available_allow_travelling = { + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = homage_liege_scope + has_character_flag = meditation_character_flag + has_character_flag = petition_liege_character_flag + has_character_flag = holding_court_character_flag + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + NOT = { has_character_flag = planning_an_activity } + } + # Variable set within the adventure inspiration events + NOT = { has_variable = gone_adventuring } +} + +is_available = { + is_travelling = no + is_available_allow_travelling = yes +} + +is_available_travelling = { + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + is_travelling = yes + has_contagious_deadly_disease_trigger = no + NOT = { has_variable = gone_adventuring } + is_busy_in_events_unlocalised = no +} + +is_available_travelling_adult = { + is_adult = yes + is_available_travelling = yes +} + +is_available_travelling_ai_adult = { + is_adult = yes + is_ai = yes + is_available_travelling = yes +} + +is_physically_able = { + is_alive = yes + is_imprisoned = no + is_incapable = no +} + +is_physically_able_ai = { + is_ai = yes + is_alive = yes + is_imprisoned = no + is_incapable = no +} + +is_physically_able_adult = { + is_adult = yes + is_physically_able = yes +} + +is_physically_able_ai_adult = { + is_ai = yes + is_adult = yes + is_physically_able_adult = yes +} + +is_available_ai = { + is_ai = yes + is_available = yes +} + +is_available_child = { + is_adult = no + is_available = yes +} + +is_available_child_allow_travel = { + is_adult = no + is_available_allow_travelling = yes +} + +is_available_ai_child = { + is_adult = no + is_available = yes + is_ai = yes +} + +is_available_healthy_child = { + is_available_child = yes + is_healthy = yes +} + +is_available_healthy_ai_child = { + is_available_healthy_child = yes + is_ai = yes +} + +is_available_adult = { + is_adult = yes + is_available = yes +} + +is_available_ai_adult = { + is_available_adult = yes + is_ai = yes +} + +is_available_healthy_adult = { + is_available_adult = yes + is_healthy = yes +} + +is_available_healthy_ai_adult = { + is_available_healthy_adult = yes + is_ai = yes +} + +is_available_adult_or_is_commanding = { + OR = { + is_commanding_army = yes + is_available_adult = yes + } +} + +is_available_at_peace = { + is_at_war = no + is_available = yes + is_busy_in_events_unlocalised = no +} + +is_available_at_peace_adult = { + is_at_war = no + is_available_adult = yes + is_busy_in_events_unlocalised = no +} + +is_available_at_peace_ai_adult = { + is_available_at_peace_adult = yes + is_ai = yes +} + +is_available_at_peace_adult_lenient = { + is_at_war = no + is_available_adult = yes +} + +# Meaning you may be at war, but you're still located in your capital. +is_available_even_at_war_adult = { + is_available_adult = yes + is_busy_in_events_unlocalised = no +} + +is_capable_adult = { + is_adult = yes + is_incapable = no +} + +is_capable_adult_ai = { + is_ai = yes + is_adult = yes + is_incapable = no +} + +can_select_lifestyle_focus = { + is_capable_adult = yes + is_playable_character = yes +} + +is_not_hostile_towards_root = { + NOR = { + is_a_faction_member = yes + any_scheme = { + hostile_scheme_trigger = yes + scheme_target_character = root + } + is_at_war_with = root + } +} + +player_target_available_for_personal_scheme_ongoing_events_trigger = { + $TARGET$ = { + trigger_if = { + limit = { + is_ai = no + $OWNER$ = { is_ruler = no } + } + is_at_war = no + } + trigger_else = { + always = yes + } + } +} + + +basic_is_valid_for_yearly_events_trigger = { + is_playable_character = yes + is_imprisoned = no + is_incapable = no + NOT = { exists = involved_activity } + OR = { + is_travelling = no + is_landless_adventurer = yes + } + is_busy_in_events_unlocalised = no +} + +is_valid_for_narrow_yearly_events = { + is_at_war = no + is_commanding_army = no + basic_is_valid_for_yearly_events_trigger = yes +} + +is_valid_for_narrow_yearly_events_adult = { + is_adult = yes + is_valid_for_narrow_yearly_events = yes +} + +is_within_diplo_range = { + capital_province ?= { + save_temporary_scope_as = my_capital + $CHARACTER$.capital_province ?= { + squared_distance = { + target = scope:my_capital + value < 200000 + } + } + } +} + +# This trigger checks if a character is a landless adventurer +is_landless_adventurer = { + government_has_flag = government_is_landless_adventurer + is_landed = no + is_ruler = yes +} + +# This trigger checks if a character is a governor in an admin realm (implying they are landed) +is_governor = { + ghas_government = administrative_government + is_landed = yes + is_independent_ruler = no + highest_held_title_tier >= tier_duchy +} + +# Checks if a character is a landless house_head within an admin realm +is_landless_administrative = { + has_government = administrative_government + is_landed = no + is_house_head = yes + has_domicile = yes +} + +# Checks if a character is either landed or an unlanded house head within an admin realm +is_landed_or_landless_administrative = { + OR = { + is_landed = yes + is_landless_administrative = yes + } +} + +# Checks if a character is either landed, a landless house head within an admin realm, or a landless adventurer +is_playable_character = { + OR = { + is_landed = yes + is_landless_administrative = yes + is_landless_adventurer = yes + } +} + +roman_restoration_is_valid_roman_empire_trigger = { + is_ai = no + OR = { + has_title = title:e_byzantium + has_title = title:e_roman_empire + } + OR = { + religion = religion:christianity_religion #Either Christian + religion = religion:hellenism_religion #Or Hellenic + } + NOT = { has_ep3_dlc_trigger = yes } +} + +is_eunuch_trigger = { + OR = { + has_trait = eunuch_1 + has_trait = beardless_eunuch + } +} diff --git a/common/scripted_triggers/00_interaction_triggers.txt b/common/scripted_triggers/00_interaction_triggers.txt new file mode 100644 index 00000000..8bae0231 --- /dev/null +++ b/common/scripted_triggers/00_interaction_triggers.txt @@ -0,0 +1,411 @@ +remove_guardian_interaction_visible_ward_trigger = { + OR = { + #If I am the child + this = scope:actor + #The ward has actor as its liege + AND = { + exists = employer + employer = scope:actor + } + #The guardian is actor + any_relation = { + type = guardian + this = scope:actor + } + #The guardian is actor's courtier + any_relation = { + type = guardian + is_courtier_of = scope:actor + } + } +} + +remove_guardian_interaction_available_ward_trigger = { + is_busy_in_events_localised = yes + #is_imprisoned = no +} + +kick_from_court_validity_trigger = { + is_busy_in_events_localised = yes + NOR = { + is_spouse_of = scope:actor + is_concubine_of = scope:actor + is_close_family_of = scope:actor + has_council_position = councillor_court_chaplain + is_diarch = yes + # Marriage major partners of diarchs. + ## Female. + AND = { + is_married = yes + is_female = yes + matrilinear_marriage = yes + any_consort = { is_diarch = yes } + } + ## Male. + AND = { + is_married = yes + is_male = yes + patrilinear_marriage = yes + any_consort = { is_diarch = yes } + } + } +} + +ask_for_pardon_available_trigger = { + $ACTOR$ = { + is_independent_ruler = no + any_liege_or_above = { + OR = { + has_imprisonment_reason = $ACTOR$ + has_banish_reason = $ACTOR$ + has_execute_reason = $ACTOR$ + has_revoke_title_reason = $ACTOR$ + } + } + } +} + +title_revocation_standard_valid_showing_failures_only_trigger = { + scope:actor = { + NOR = { + is_at_war_with = scope:recipient + has_truce = scope:recipient + } + custom_description = { + text = "character_interactions_revoke_title_from_ally_without_reason" + object = scope:recipient + OR = { + NOT = { + is_allied_to = scope:recipient + } + has_revoke_title_reason = scope:recipient + } + } + } + scope:recipient = { + is_busy_in_events_localised = yes + NOT = { has_strong_hook = scope:actor } + } +} + +title_revocation_standard_can_pick_title_trigger = { + is_contested = no + custom_description = { + text = "revoke_title_not_noble_family_title" + is_noble_family_title = no + } + NOT = { + recent_history = { + type = granted + years = 1 + } + } + custom_description = { + text = "character_interactions_not_rel_head_title" + is_head_of_faith = no + } +} + +diarch_revocation_has_claim_check_trigger = { + custom_description = { + text = diarch_has_claim_on_revokable_title + object = scope:recipient + scope:actor = { + any_claim = { + exists = holder + holder = scope:recipient + } + } + } +} + +title_revocation_is_admin_governor_trigger = { + has_government = administrative_government + is_independent_ruler = yes + save_temporary_scope_as = liege_temp + $VASSAL$ = { + is_landed_or_landless_administrative = yes + target_is_liege_or_above = scope:liege_temp + } +} + +title_revocation_is_tyrannical_trigger = { + NOR = { + exists = scope:administrative_revocation + has_revoke_title_reason = $VASSAL$ + trigger_if = { + limit = { exists = scope:landed_title } + has_claim_on = scope:landed_title + } + title_revocation_is_admin_governor_trigger = { VASSAL = $VASSAL$ } + faith = { + $VASSAL$ = { + NOT = { vassal_contract_has_flag = religiously_protected} + } + OR = { + AND = { + has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced + faith_hostility_level = { + target = $VASSAL$.faith + value = faith_evil_level + } + } + AND = { + has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal + faith_hostility_level = { + target = $VASSAL$.faith + value >= faith_hostile_level + } + } + } + } + } +} + +vassal_revocation_is_tyrannical_trigger = { + NOR = { + exists = scope:administrative_revocation + AND = { + has_government = administrative_government + $VASSAL$ = { + has_government = administrative_government + } + } + has_revoke_title_reason = $VASSAL$ + faith = { + OR = { + AND = { + has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced + faith_hostility_level = { + target = $VASSAL$.faith + value = faith_evil_level + } + } + AND = { + has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal + faith_hostility_level = { + target = $VASSAL$.faith + value >= faith_hostile_level + } + } + } + } + } +} + +vassal_retraction_standard_valid_showing_failures_only_trigger = { + NOT = { + scope:actor = { is_at_war_with = scope:recipient } + } + scope:recipient = { is_busy_in_events_localised = yes } + trigger_if = { + limit = { exists = scope:secondary_recipient } + scope:secondary_recipient = { is_busy_in_events_localised = yes } + } + scope:recipient = { + NOT = { has_strong_hook = scope:actor } + } +} + +diarch_retraction_is_de_jure_liege_trigger = { + custom_description = { + text = "diarch_is_de_jure_liege_of_retractable_vassal" + object = scope:recipient + scope:actor = { + any_held_title = { + any_direct_de_jure_vassal_title = { holder.liege = scope:recipient } + } + } + } +} + +is_de_jure_vassal_of_liege_trigger = { + liege = { + save_temporary_scope_as = my_liege + } + primary_title = { + OR = { + de_jure_liege = { + exists = holder + holder = scope:my_liege + } + trigger_if = { + limit = { + tier = tier_duchy + } + de_jure_liege = { + de_jure_liege = { + exists = holder + holder = scope:my_liege + } + } + } + } + } +} + +send_poem_positive_poem_lock_trigger = { + OR = { + is_ai = no + NOT = { has_relation_rival = scope:recipient } + NOT = { has_relation_nemesis = scope:recipient } + } +} + +send_poem_negative_poem_lock_trigger = { + OR = { + is_ai = no + has_relation_rival = scope:recipient + has_relation_nemesis = scope:recipient + } +} + +can_any_traveling_family_members_travel_trigger = { + NOR = { + this = scope:recipient + is_in_pool_at = scope:actor.capital_province + } + is_ruler = no + trigger_if = { + limit = { + exists = scope:recipient.host + is_child_of = scope:recipient.host + is_adult = no + } + NOT = { dynasty = scope:recipient.host.dynasty } + } +} + +imprison_neutral_is_valid_showing_failures_only_triggers_trigger = { + scope:recipient = { is_busy_in_events_localised = yes } + scope:actor.liege = { + trigger_if = { + limit = { has_realm_law_flag = imprisonment_toggle_enable } + # TIT-43801 + #has_realm_law_flag = imprisonment_toggle_on + NOT = { has_realm_law = tribal_authority_0 } + } + } + scope:actor = { is_imprisoned = no } + custom_description = { + text = cannot_imprison_almohad_leader + subject = scope:recipient + NOT = { + scope:recipient = { has_character_modifier = almohad_leader_modifier } + } + } +} + +grant_title_rivalry_trigger = { + is_ai = yes + is_playable_character = yes + top_liege = scope:actor + faith = scope:actor.faith + reverse_opinion = { + target = top_liege + value > -50 + } + opinion = { + target = top_liege + value > -50 + } + trigger_if = { + limit = { + is_female = yes + faith_dominant_gender_female_or_equal = no + } + scope:recipient = { is_female = yes } + } + trigger_if = { + limit = { + is_male = yes + faith_dominant_gender_male_or_equal = no + } + scope:recipient = { is_male = yes } + } + has_dread_level_towards = { + target = scope:actor + level < 1 + } + is_eunuch_trigger = no + NOR = { + this = scope:actor + this = scope:recipient + has_trait = content + has_trait = humble + has_trait = blind + has_trait = devoted + is_close_family_of = scope:recipient + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:actor } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } + } +} + +should_prioritise_hostile_action_against_due_to_personal_relations_trigger = { + $ACTOR$ = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } + opinion = { + target = $RECIPIENT$ + value <= very_high_negative_opinion + } + } + } +} + +should_avoid_hostile_action_against_due_to_personal_relations_trigger = { + $ACTOR$ = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } + is_allied_to = $RECIPIENT$ + opinion = { + target = $RECIPIENT$ + value >= very_high_positive_opinion + } + # Plus filter out heirs & other family, unless we hate 'em. + AND = { + OR = { + is_close_or_extended_family_of = $RECIPIENT$ + any_spouse = { this = $RECIPIENT$ } + is_heir_of = $RECIPIENT$ + } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } + exposed_cheating_on_spouse_trigger = { SPOUSE = $RECIPIENT$ } + AND = { + is_ai = yes + opinion = { + target = $RECIPIENT$ + value <= low_negative_opinion + } + } + } + } + } + } +} + +should_avoid_hostile_action_against_due_to_liege_relations_trigger = { + $ACTOR$ = { + exists = liege + liege = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } + is_allied_to = $RECIPIENT$ + opinion = { + target = $RECIPIENT$ + value >= very_high_positive_opinion + } + } + } + } +} + +is_asking_for_gold_in_ransom_trigger = { + OR = { + scope:extortionate_gold ?= yes + scope:extortionate_current_gold ?= yes + scope:gold ?= yes + scope:current_gold ?= yes + } +} diff --git a/common/scripted_triggers/00_religious_triggers.txt b/common/scripted_triggers/00_religious_triggers.txt new file mode 100644 index 00000000..360242ff --- /dev/null +++ b/common/scripted_triggers/00_religious_triggers.txt @@ -0,0 +1,1847 @@ + +###TRIGGER LIST + +# has_strong_religious_conviction_trigger +# is_christian_trigger + +###DOCTRINE BASED### +# is_weak_claimant_due_to_gender_trigger +# can_be_combatant_based_on_gender_trigger +# can_be_clergy_due_to_gender_trigger +# faith_is_aniconic_trigger +# relation_with_character_is_incestuous_in_faith_trigger - Relation would be shunned in faith +# relation_with_character_is_incestuous_in_my_faith_trigger - Relation would be shunned in the faith of character you use trigger in +# relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger - Relation would be shunned in the faith of the character you use trigger in or their liege's faith +# faith_allows_marriage_consanguinity_trigger +# relation_with_character_is_sodomy_in_faith_trigger +# relation_with_character_is_sodomy_trigger +# relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger +# trait_is_shunned_in_faith_trigger +# trait_is_criminal_in_faith_trigger +# trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger +# has_negative_attitude_towards_trait_trigger +# secret_is_shunned_in_faith_trigger +# secret_is_criminal_in_faith_trigger +# secret_is_shunned_or_criminal_in_my_or_lieges_faith_trigger +# religion_has_angels_trigger +# highgod_is_passive_trigger +# highgod_is_active_trigger +# is_reincarnation_trigger +# holy_order_1000_request_target_trigger - Is this ruler a valid target for a holy order to request land from? + +###HERESY TRIGGERS### +# is_valid_heresiarch + +###RELIGIOUS INTERACTIONS### +# can_take_religious_vows_trigger + + +# CHECK A NUMBER OF RELIGION-RELATED CONDITIONS TO DETERMINE HOW STRONG OF A BELIEVER THEY SEEM TO BE +has_strong_religious_conviction_trigger = { + NOR = { + has_trait = cynical + has_trait = excommunicated + } + OR = { + has_trait = zealous + has_trait = pilgrim + has_trait = devoted + has_trait = sayyid + has_trait = saoshyant + has_trait = savior + has_trait = divine_blood + has_trait = blood_of_prophet + has_trait = faith_warrior + has_trait = saint + } +} + +is_christian_trigger = { + OR = { + faith = { religion_tag = christianity_religion } + } +} + +# Not-non-XYZ triggers allow us to check for specific historical faiths whilst still defaulting to something positive for variant faiths. +## E.g., looking to see if something would only be of interest to Catholics, but if we're dealing with a player-made heresy, still return true. This way mechanics will default to on rather than off (still likely to result in weird GHWs, but at least less random ones). +not_non_catholic_standard_christian_faith_trigger = { + NOR = { + this = faith:orthodox + this = faith:iconoclast + this = faith:coptic + this = faith:armenian_apostolic + } +} + +not_non_orthodox_standard_christian_faith_trigger = { + NOR = { + this = faith:catholic + this = faith:coptic + this = faith:armenian_apostolic + } +} + +not_non_coptic_standard_christian_faith_trigger = { + NOR = { + this = faith:catholic + this = faith:orthodox + this = faith:iconoclast + this = faith:armenian_apostolic + } +} + +not_non_armenian_standard_christian_faith_trigger = { + NOR = { + this = faith:catholic + this = faith:orthodox + this = faith:iconoclast + this = faith:coptic + } +} + +is_weak_claimant_due_to_gender_trigger = { + OR = { + AND = { + $FAITH$ = { has_doctrine_parameter = female_claims_are_weak } + $CHARACTER$ = { is_female = yes } + } + AND = { + $FAITH$ = { has_doctrine_parameter = male_claims_are_weak } + $CHARACTER$ = { is_male = yes } + } + } +} + +can_be_combatant_based_on_gender_trigger = { + custom_description = { + text = "can_be_combatant_based_on_gender" + object = this + subject = $ARMY_OWNER$ + # Priests only fight if faith has war priests + trigger_if = { + limit = { + OR = { + has_trait = devoted + is_clergy = yes + } + } + OR = { + faith = { has_doctrine_parameter = clergy_can_fight } + culture = { has_cultural_parameter = culture_clergy_can_fight } + AND = { + $ARMY_OWNER$.culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } + prowess >= 10 + } + } + } + OR = { + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { + has_dlc_feature = diverge_culture # Can modify pillars + } + OR = { + $ARMY_OWNER$ = { culture = { has_cultural_parameter = martial_custom_equal_combatant } } + AND = { + $ARMY_OWNER$ = { culture = { has_cultural_parameter = martial_custom_male_only_combatant } } + is_male = yes + } + AND = { + $ARMY_OWNER$ = { culture = { has_cultural_parameter = martial_custom_female_only_combatant } } + is_female = yes + } + } + + } + trigger_else = { # Does not have the Royal Court and thus combatant is governed by faith + OR = { + $ARMY_OWNER$ = { faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } } + AND = { + $ARMY_OWNER$ = { faith = { has_doctrine_parameter = combatant_must_be_male_if_no_roco } } + is_male = yes + } + AND = { + $ARMY_OWNER$ = { faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco } } + is_female = yes + } + } + } + AND = { + $ARMY_OWNER$ = { + culture = { has_cultural_parameter = has_access_to_shieldmaidens } + } + # No need to gender diversify this: if they're a right-gender shieldperson of the culture, then they've already got permission to fight from the previous AND conditions. + has_trait = shieldmaiden + } + # Event-based special exceptions + has_character_modifier = ignores_gender_army_rules + AND = { + $ARMY_OWNER$ = { culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } } + NOT = { $ARMY_OWNER$ = { culture = { has_cultural_parameter = minimum_prowess_for_knights } } } + prowess >= 10 + } + AND = { + $ARMY_OWNER$ = { + culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + has_cultural_parameter = minimum_prowess_for_knights + } + } + prowess >= 12 + } + } + } +} + +can_be_clergy_due_to_gender_trigger = { + OR = { + AND = { + faith = { has_doctrine_parameter = clergy_must_be_female } + is_female = yes + } + AND = { + faith = { has_doctrine_parameter = clergy_must_be_male } + is_male = yes + } + faith = { has_doctrine_parameter = clergy_can_be_either_gender } + } +} + +is_wrong_gender_in_faith_trigger = { + OR = { + AND = { + is_female = yes + $FAITH$ = { has_doctrine_parameter = male_dominated_law } + } + AND = { + is_male = yes + $FAITH$ = { has_doctrine_parameter = female_dominated_law } + } + } +} + +faith_is_aniconic_trigger = { + faith = { + OR = { + religion = religion:islam_religion + has_doctrine = tenet_aniconism + } + } +} + +#Needs CHARACTER and FAITH +relation_with_character_is_incestuous_in_faith_trigger = { + OR = { + #doctrine_consanguinity_restricted; absolutely no family business + AND = { + $FAITH$ = { has_doctrine = doctrine_consanguinity_restricted } + is_close_or_extended_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren, cousins, uncles, aunts, nephews, nieces] + } + #doctrine_consanguinity_cousins; the only acceptable incest is with your cousin + AND = { + $FAITH$ = { has_doctrine = doctrine_consanguinity_cousins } + OR = { + is_close_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren] + is_uncle_or_aunt_of = $CHARACTER$ + is_nibling_of = $CHARACTER$ + } + } + #doctrine_consanguinity_aunt_nephew_and_uncle_niece; extended family is ok + AND = { + $FAITH$ = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } + is_close_family_of = $CHARACTER$ + } + #doctrine_consanguinity_unrestricted; all forms of incest is acceptable + } +} + +#Note: only checks from the viewpoint of current scope. Needs CHARACTER +relation_with_character_is_incestuous_in_my_faith_trigger = { + faith = { save_temporary_scope_as = my_faith } + relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:my_faith } +} + +relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { + OR = { + AND = { + faith = { #My faith doesn't approve + save_temporary_scope_as = check_faith + } + relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + } + AND = { #Liege's faith doesn't approve + exists = liege + liege = { + faith = { + save_temporary_scope_as = check_faith + } + } + relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + } + } +} + +#Needs CHARACTER_1 and CHARACTER_2 +faith_allows_marriage_consanguinity_trigger = { + save_temporary_scope_as = consanguinity_faith + + NOT = { + $CHARACTER_1$ = { + relation_with_character_is_incestuous_in_faith_trigger = { + CHARACTER = $CHARACTER_2$ + FAITH = scope:consanguinity_faith + } + } + } +} +relation_between_characters_is_sodomy_in_my_faith_trigger = { + $CHARACTER_1$ = { is_male = yes } + $CHARACTER_2$ = { is_male = yes } + faith = { + OR = { + has_doctrine_parameter = homosexuality_shunned + has_doctrine_parameter = homosexuality_illegal + } + } +} + +relation_with_character_is_sodomy_in_faith_trigger = { + is_male = yes + $CHARACTER$ = { is_male = yes } + $FAITH$ = { + OR = { + has_doctrine_parameter = homosexuality_shunned + has_doctrine_parameter = homosexuality_illegal + } + } +} + +#Note: only checks from the viewpoint of current scope. Needs CHARACTER +relation_with_character_is_sodomy_trigger = { + faith = { save_temporary_scope_as = my_faith } + relation_with_character_is_sodomy_in_faith_trigger = { + CHARACTER = $CHARACTER$ + FAITH = scope:my_faith + } +} + +relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { + OR = { + AND = { + faith = { #My faith doesn't approve + save_temporary_scope_as = check_faith + } + relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + } + AND = { #Liege's faith doesn't approve + exists = liege + liege = { + faith = { + save_temporary_scope_as = check_faith + } + } + relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + } + } +} + +murdering_character_is_kinslaying_in_faith_trigger = { + OR = { + is_close_or_extended_family_of = $CHARACTER$ + dynasty = $CHARACTER$.dynasty + } + $FAITH$ = { NOT = { has_doctrine = doctrine_kinslaying_accepted } } +} + +murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_faith_trigger = { + save_temporary_scope_as = kinslayer_me + faith = { + save_temporary_scope_as = check_faith + } + trigger_if = { + limit = { + exists = liege + liege = { dynasty = scope:kinslayer_me.dynasty } + } + liege = { + faith = { + save_temporary_scope_as = check_faith_liege + } + } + } + OR = { + murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } #My faith doesn't approve + AND = { #Liege's faith doesn't approve + exists = liege + liege = { dynasty = scope:kinslayer_me.dynasty } + murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith_liege } + } + } +} + + + +trait_is_shunned_in_faith_trigger = { + save_temporary_scope_value_as = { + name = shunned_trait_check + value = flag:$TRAIT$ + } + OR = { + #INCEST + AND = { + scope:shunned_trait_check = flag:incestuous + $FAITH$ = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } + } + #WITCH + AND = { + scope:shunned_trait_check = flag:witch + $FAITH$ = { has_doctrine_parameter = witchcraft_shunned } + } + #SODOMITE + AND = { + scope:shunned_trait_check = flag:sodomite + $FAITH$ = { has_doctrine_parameter = homosexuality_shunned } + } + #DEVIANT + AND = { + scope:shunned_trait_check = flag:deviant + $FAITH$ = { has_doctrine_parameter = deviancy_shunned } + } + #ADULTERER/FORNICATOR + AND = { + OR = { + scope:shunned_trait_check = flag:adulterer + scope:shunned_trait_check = flag:fornicator + } + OR = { + AND = { + $FAITH$ = { has_doctrine_parameter = adultery_female_shunned } + $GENDER_CHARACTER$ = { is_female = yes } + } + AND = { + $FAITH$ = { has_doctrine_parameter = adultery_male_shunned } + $GENDER_CHARACTER$ = { is_male = yes } + } + } + } + #KINSLAYER + AND = { + OR = { + scope:shunned_trait_check = flag:kinslayer_1 + scope:shunned_trait_check = flag:kinslayer_2 + scope:shunned_trait_check = flag:kinslayer_3 + } + $FAITH$ = { has_doctrine_parameter = kinslaying_shunned } + } + } +} + +trait_is_criminal_in_faith_trigger = { + save_temporary_scope_value_as = { + name = criminal_trait_check + value = flag:$TRAIT$ + } + OR = { + #KINSLAYER + AND = { + OR = { + scope:criminal_trait_check = flag:kinslayer_3 + scope:criminal_trait_check = flag:kinslayer_2 + scope:criminal_trait_check = flag:kinslayer_1 + } + $FAITH$ = { has_doctrine_parameter = kinslaying_any_dynasty_member_crime } + } + AND = { + OR = { + scope:criminal_trait_check = flag:kinslayer_3 + scope:criminal_trait_check = flag:kinslayer_2 + } + $FAITH$ = { has_doctrine_parameter = kinslaying_extended_family_crime } + } + AND = { + scope:criminal_trait_check = flag:kinslayer_3 + $FAITH$ = { has_doctrine_parameter = kinslaying_close_kin_crime } + } + #WITCH + AND = { + scope:criminal_trait_check = flag:witch + $FAITH$ = { has_doctrine_parameter = witchcraft_illegal } + } + #CANNIBAL + AND = { + scope:criminal_trait_check = flag:cannibal + NOT = { + $FAITH$ = { has_doctrine_parameter = cannibalism_legal } + } + } + #SODOMITE + AND = { + scope:criminal_trait_check = flag:sodomite + $FAITH$ = { has_doctrine_parameter = homosexuality_illegal } + } + #DEVIANT + AND = { + scope:criminal_trait_check = flag:deviant + $FAITH$ = { has_doctrine_parameter = deviancy_illegal } + } + #INCEST + AND = { + scope:criminal_trait_check = flag:incestuous + $FAITH$ = { NOT = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + } + #ADULTERER/FORNICATOR + AND = { + OR = { + scope:criminal_trait_check = flag:adulterer + scope:criminal_trait_check = flag:fornicator + } + OR = { + AND = { + $FAITH$ = { has_doctrine_parameter = adultery_female_crime } + $GENDER_CHARACTER$ = { is_female = yes } + } + AND = { + $FAITH$ = { has_doctrine_parameter = adultery_male_crime } + $GENDER_CHARACTER$ = { is_male = yes } + } + } + } + } +} + +scoped_trait_is_criminal_in_faith_trigger = { + OR = { + #KINSLAYER + AND = { + OR = { + $TRAIT$ = trait:kinslayer_3 + $TRAIT$ = trait:kinslayer_2 + $TRAIT$ = trait:kinslayer_1 + } + $FAITH$ = { has_doctrine_parameter = kinslaying_any_dynasty_member_crime } + } + AND = { + OR = { + $TRAIT$ = trait:kinslayer_3 + $TRAIT$ = trait:kinslayer_2 + } + $FAITH$ = { has_doctrine_parameter = kinslaying_extended_family_crime } + } + AND = { + $TRAIT$ = trait:kinslayer_3 + $FAITH$ = { has_doctrine_parameter = kinslaying_close_kin_crime } + } + #WITCH + AND = { + $TRAIT$ = trait:witch + $FAITH$ = { has_doctrine_parameter = witchcraft_illegal } + } + #CANNIBAL + AND = { + $TRAIT$ = trait:cannibal + NOT = { + $FAITH$ = { has_doctrine_parameter = cannibalism_legal } + } + } + #SODOMITE + AND = { + $TRAIT$ = trait:sodomite + $FAITH$ = { has_doctrine_parameter = homosexuality_illegal } + } + #DEVIANT + AND = { + $TRAIT$ = trait:deviant + $FAITH$ = { has_doctrine_parameter = deviancy_illegal } + } + #INCEST + AND = { + $TRAIT$ = trait:incestuous + $FAITH$ = { NOT = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + } + #ADULTERER/FORNICATOR + AND = { + OR = { + $TRAIT$ = trait:adulterer + $TRAIT$ = trait:fornicator + } + OR = { + AND = { + $FAITH$ = { has_doctrine_parameter = adultery_female_crime } + $GENDER_CHARACTER$ = { is_female = yes } + } + AND = { + $FAITH$ = { has_doctrine_parameter = adultery_male_crime } + $GENDER_CHARACTER$ = { is_male = yes } + } + } + } + } +} + +trait_is_shunned_or_criminal_in_faith_trigger = { + OR = { + trait_is_shunned_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = $FAITH$ GENDER_CHARACTER = $GENDER_CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = $FAITH$ GENDER_CHARACTER = $GENDER_CHARACTER$ } + } +} + +trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + OR = { + AND = { + faith = { #My faith doesn't approve + save_temporary_scope_as = check_faith + } + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } + } + AND = { #Liege's faith doesn't approve + exists = liege + liege = { + faith = { + save_temporary_scope_as = check_faith + } + } + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } + } + } +} + +has_any_shunned_or_criminal_trait_in_faith_trigger = { + $CHARACTER$ = { + OR = { + #KINSLAYER + AND = { + has_trait = kinslayer_3 + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = kinslayer_2 + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = kinslayer_1 + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #WITCH + AND = { + has_trait = witch + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #CANNIBAL + AND = { + has_trait = cannibal + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #SODOMITE + AND = { + has_trait = sodomite + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #DEVIANT + AND = { + has_trait = deviant + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = incestuous + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #ADULTERER/FORNICATOR + AND = { + has_trait = adulterer + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = fornicator + trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + } + } +} + +has_any_criminal_trait_in_faith_trigger = { + $CHARACTER$ = { + OR = { + #KINSLAYER + AND = { + has_trait = kinslayer_3 + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = kinslayer_2 + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = kinslayer_1 + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #WITCH + AND = { + has_trait = witch + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #CANNIBAL + AND = { + has_trait = cannibal + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #SODOMITE + AND = { + has_trait = sodomite + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #DEVIANT + AND = { + has_trait = deviant + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = incestuous + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + #ADULTERER/FORNICATOR + AND = { + has_trait = adulterer + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + AND = { + has_trait = fornicator + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + } + } + } +} + + +has_negative_attitude_towards_trait_trigger = { + save_temporary_scope_value_as = { + name = negative_status_check + value = flag:$TRAIT$ + } + + NOR = { + has_trait = $TRAIT$ + #INCESTUOUS + AND = { + scope:negative_status_check = flag:incestuous + any_secret = { secret_type = secret_incest } + } + #WITCH + AND = { + scope:negative_status_check = flag:witch + any_secret = { secret_type = secret_witch } + } + #CANNIBAL + AND = { + scope:negative_status_check = flag:cannibal + any_secret = { secret_type = secret_cannibal } + } + #SODOMITE + AND = { + scope:negative_status_check = flag:sodomite + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + any_secret = { + secret_type = secret_homosexual + } + } + #ADULTERER + AND = { + scope:negative_status_check = flag:adulterer + OR = { + has_trait = lustful + AND = { + is_married = yes + any_relation = { type = lover NOT = { is_spouse_of = prev } } + } + any_relation = { + type = lover + is_married = yes + NOT = { is_spouse_of = prev } + } + } + } + #FORNICATOR + AND = { + scope:negative_status_check = flag:fornicator + OR = { + has_trait = lustful + any_relation = { type = lover always = yes } + } + } + } + + faith = { save_temporary_scope_as = my_faith } + OR = { + trait_is_shunned_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:my_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } + trait_is_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:my_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } + } +} + +has_followers_trigger = { + OR = { + num_character_followers >= 1 + num_county_followers >= 1 + } +} + +secret_is_blackmailable_trigger = { + OR = { + secret_is_blackmailable_strong_hook_trigger = { TARGET = $TARGET$ } + secret_is_blackmailable_weak_hook_trigger = { TARGET = $TARGET$ } + } +} + + +################### +# Heresy Triggers # +################### + +is_preferred_heresy = { + is_valid_heresy = { + ORIGIN_FAITH = $ORIGIN_FAITH$ + HERETICAL_FAITH = $HERETICAL_FAITH$ + } + + OR = { + #If we're Chistian, pick a heretical faiths which is in the same regional group as our origin faith (i.e., Lollards for Catholics, Iconoclasts for Orthodox, etc.) + AND = { + religion_tag = christianity_religion + OR = { + faiths_are_in_western_christianity_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } + faiths_are_in_orthodox_christianity_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } + faiths_are_in_eastern_christianity_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } + } + } + + #If we're Muslim, we want to stay within our 'branch' of Islam: + AND = { + religion_tag = islam_religion + OR = { + faiths_are_in_sunni_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} + faiths_are_in_shia_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} + faiths_are_in_muhakkima_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} + } + } + #If we're Zoroastrian, we don't want Sogdian faith in Armenia and vice versa + AND = { + religion_tag = zoroastrianism_religion + OR = { + faiths_are_eastern_zoroastrian = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} + faiths_are_western_zoroastrian = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} + } + } + + #Otherwise, we don't have any special preferences. + AND = { + NOT = { + religion_tag = islam_religion + religion_tag = christianity_religion + religion_tag = zoroastrianism_religion + } + } + } +} + +is_valid_heresy = { + #The origin faith can never be its own heresy. + NOT = { $ORIGIN_FAITH$ = $HERETICAL_FAITH$ } + #Must not be considered invalid + invalid_for_heresy_events = no + # A heretical faith can't be currently locked off via variable. + $HERETICAL_FAITH$ = { + NOR = { + has_variable = block_conversion_till_decision_taken + has_variable = block_conversion_till_nebulous_circumstances + } + } + #Depending on the origin faith's religion/religion group, there may have additional requirements for a heresy to be considered valid. + OR = { + #For Christian Faiths, the origin and heretical faiths must not both be Ecumenical (excepting the faiths which aren't technically ecumenical). + AND = { + religion_tag = christianity_religion + NAND = { + $ORIGIN_FAITH$ = { + has_doctrine = special_doctrine_ecumenical_christian + OR = { + this = faith:insular_celtic + this = faith:bosnian_church + this = faith:mozarabic_church + } + } + $HERETICAL_FAITH$ = { + has_doctrine = special_doctrine_ecumenical_christian + OR = { + this = faith:insular_celtic + this = faith:bosnian_church + this = faith:mozarabic_church + } + } + } + } + AND = { #FP3: for Zoroastrianism, Bedhin faiths are never heresies of each other + religion_tag = zoroastrianism_religion + NAND = { + $ORIGIN_FAITH$ = { + has_doctrine = doctrine_major_branch_behdin + } + $HERETICAL_FAITH$ = { + has_doctrine = doctrine_major_branch_behdin + } + } + } + #No special requirements for Muslims, Jews, or Yazidis + religion_tag = islam_religion + religion_tag = judaism_religion + #Eastern Faiths can shift and spread amongst each other. + AND = { + OR = { + religion_tag = buddhism_religion + religion_tag = hinduism_religion + religion_tag = jainism_religion + religion_tag = dualism_religion + } + } + #No special requirements for Pagan religions. + has_doctrine = pagan_hostility_doctrine + } +} + +is_valid_heresiarch = { + is_landed = yes + faith = root + OR = { + highest_held_title_tier = tier_duchy + highest_held_title_tier = tier_county + } + is_imprisoned = no + is_capable_adult_ai = yes + is_playable_character = yes + is_landless_adventurer = no + primary_title ?= { + is_landless_type_title = no + is_noble_family_title = no + } + exists = capital_county + NOT = { has_trait = heresiarch } + no_heretical_hof_faith_trigger = yes + recently_converted_faith_trigger = no # As amusing as it may be, rulers shouldn't 'flip-flop' between Faiths, so we need to enforce a cooldown on heresy conversions. +} + +no_heretical_hof_faith_trigger = { #Head of Faith shouldn't convert. + OR = { + NOT = { exists = root.religious_head } + AND = { + exists = root.religious_head + NOT = { this = root.religious_head } + } + } +} + +#Christian Heresy Groups +faiths_are_in_western_christianity_group = { + OR = { + $FAITH_1$ = faith:catholic + $FAITH_1$ = faith:cathar + $FAITH_1$ = faith:waldensian + $FAITH_1$ = faith:lollard + AND = { + $FAITH_1$ = faith:insular_celtic + scope:heretic_capital.title_province = { geographical_region = world_europe_west_britannia } + } + AND = { + $FAITH_1$ = faith:mozarabic_church + scope:heretic_capital.title_province = { geographical_region = world_europe_west_iberia } + } + } + OR = { + $FAITH_2$ = faith:catholic + $FAITH_2$ = faith:cathar + $FAITH_2$ = faith:waldensian + $FAITH_2$ = faith:lollard + $FAITH_2$ = faith:priscillianism + AND = { + $FAITH_2$ = faith:insular_celtic + scope:heretic_capital.title_province = { geographical_region = world_europe_west_britannia } + } + AND = { + $FAITH_2$ = faith:mozarabic_church + scope:heretic_capital.title_province = { geographical_region = world_europe_west_iberia } + } + } +} + +faiths_are_in_orthodox_christianity_group = { + OR = { + $FAITH_1$ = faith:orthodox + $FAITH_1$ = faith:iconoclast + $FAITH_1$ = faith:bogomilist + $FAITH_1$ = faith:paulician + AND = { + $FAITH_1$ = faith:bosnian_church + scope:heretic_capital.title_province = { geographical_region = world_europe_south_east } + } + } + OR = { + $FAITH_2$ = faith:orthodox + $FAITH_2$ = faith:iconoclast + $FAITH_2$ = faith:bogomilist + $FAITH_2$ = faith:paulician + $FAITH_2$ = faith:bosnian_church + $FAITH_2$ = faith:cainitism + AND = { + $FAITH_1$ = faith:bosnian_church + scope:heretic_capital.title_province = { geographical_region = world_europe_south_east } + } + } +} + +faiths_are_in_eastern_christianity_group = { + OR = { + $FAITH_1$ = faith:coptic + $FAITH_1$ = faith:armenian_apostolic + $FAITH_1$ = faith:nestorian + $FAITH_1$ = faith:messalian + $FAITH_1$ = faith:paulician + } + OR = { + $FAITH_2$ = faith:coptic + $FAITH_2$ = faith:armenian_apostolic + $FAITH_2$ = faith:nestorian + $FAITH_2$ = faith:messalian + $FAITH_2$ = faith:paulician + $FAITH_2$ = faith:mandeaism + } +} + +faiths_are_shia_zandaqa_sub_group = { + OR = { + this = faith:quranist + this = faith:qarmatian + this = faith:ghulat + this = faith:alawite + this = faith:alevi + this = faith:druze + } +} + +faiths_are_in_sunni_islam_group = { + $FAITH_1$ = { + has_doctrine = muhammad_succession_sunni_doctrine + } + $FAITH_2$ = { + OR = { + has_doctrine = muhammad_succession_sunni_doctrine + has_doctrine = muhammad_succession_muhakkima_doctrine + this = faith:sabianism + this = faith:manichean + this = faith:quranist + } + } +} + +faiths_are_in_shia_islam_group = { + $FAITH_1$ = { + OR = { + has_doctrine = muhammad_succession_shia_doctrine + faiths_are_shia_zandaqa_sub_group = yes + } + } + $FAITH_2$ = { + OR = { + has_doctrine = muhammad_succession_shia_doctrine + has_doctrine = muhammad_succession_muhakkima_doctrine + faiths_are_shia_zandaqa_sub_group = yes + this = faith:valentinianism + this = faith:sabianism + } + } +} + +faiths_are_in_muhakkima_islam_group = { + $FAITH_1$ = { + has_doctrine = muhammad_succession_muhakkima_doctrine + } + $FAITH_2$ = { + OR = { + has_doctrine = muhammad_succession_muhakkima_doctrine + this = faith:manichean + this = faith:valentinianism + } + } +} + +faiths_are_eastern_zoroastrian = { #FP3 update - so that Armenian faith (Arewordik) don't appear as a heresy in Sogdia + OR = { + $FAITH_1$ = faith:mazdayasna + $FAITH_1$ = faith:khurmazta + $FAITH_1$ = faith:gayomarthianism + $FAITH_2$ = faith:zurvanism + $FAITH_2$ = faith:mazdakism + $FAITH_2$ = faith:khurramism + } + OR = { + $FAITH_1$ = faith:mazdayasna + $FAITH_1$ = faith:khurmazta + $FAITH_1$ = faith:gayomarthianism + $FAITH_2$ = faith:zurvanism + $FAITH_2$ = faith:mazdakism + $FAITH_2$ = faith:khurramism + } +} + +faiths_are_western_zoroastrian = { #FP3 update - so that Sogdian faith (Khurmazta) don't appear as a heresy in Armenia + OR = { + $FAITH_1$ = faith:mazdayasna + $FAITH_1$ = faith:gayomarthianism + $FAITH_2$ = faith:zurvanism + $FAITH_2$ = faith:mazdakism + $FAITH_2$ = faith:khurramism + $FAITH_2$ = faith:urartuism + } + OR = { + $FAITH_1$ = faith:mazdayasna + $FAITH_1$ = faith:gayomarthianism + $FAITH_2$ = faith:zurvanism + $FAITH_2$ = faith:mazdakism + $FAITH_2$ = faith:khurramism + $FAITH_2$ = faith:urartuism + } +} + +refusing_conversion_is_crime_trigger = { + faith = { + trigger_if = { # Only apply imprisonment reason if actor's faith is not the state faith + limit = { + $CHARACTER$ = { + top_liege = { government_allows = state_faith } + faith = $CHARACTER$.top_liege.primary_title.state_faith + } + } + always = no + } + OR = { + religion_tag = christianity_religion + religion_tag = islam_religion + religion_tag = judaism_religion + religion_tag = zoroastrianism_religion + } + NOT = { + faith_hostility_level = { + target = $CHARACTER$.faith + value <= faith_astray_level + } + } + } +} + +is_hostile_enough_for_holy_war_trigger = { + faith_hostility_level = { + target = $FAITH$ + value >= religious_cb_enabled_hostility_level + } +} + +barony_is_valid_for_holy_order_lease_trigger = { + title_province = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + } + trigger_if = { + limit = { + holder.primary_title.tier != tier_barony + } + can_be_leased_out = yes + } + trigger_if = { + limit = { + NOT = { holder = $CHARACTER$ } + } + holder.primary_title.tier = tier_barony + } + NOT = { + is_leased_out = yes + } +} + +barony_is_valid_for_holy_order_lease_cancellation_trigger = { + is_under_holy_order_lease = yes + has_revokable_lease = yes + lessee = { + NOT = { + has_strong_hook = prev.holder + } + } +} + +religion_has_angels_trigger = { + OR = { + religion = religion:christianity_religion + religion = religion:islam_religion + religion = religion:zoroastrianism_religion + religion = religion:dualism_religion + religion = religion:judaism_religion + religion = religion:yazidi_religion + } +} + +religion_has_circumcision_trigger = { + OR = { + religion = religion:islam_religion + religion = religion:judaism_religion + } +} + +is_heretic_trigger = { + $WHO$.faith.religion = $TARGET$.faith.religion + $WHO$.faith = { + faith_hostility_level = { + target = $TARGET$.faith + value >= religious_cb_enabled_hostility_level + } + } +} + +is_heathen_trigger = { + NOT = { $WHO$.faith.religion = $TARGET$.faith.religion } + $TARGET$.faith = { + has_doctrine = pagan_hostility_doctrine + } + $WHO$.faith = { + faith_hostility_level = { + target = $TARGET$.faith + value >= religious_cb_enabled_hostility_level + } + } +} + +is_infidel_trigger = { + NOT = { $WHO$.faith.religion = $TARGET$.faith.religion } + $TARGET$.faith = { + NOT = { has_doctrine = pagan_hostility_doctrine } + } + $WHO$.faith = { + faith_hostility_level = { + target = $TARGET$.faith + value >= religious_cb_enabled_hostility_level + } + } +} + +valid_demand_conversion_conditions_trigger = { + scope:recipient = { is_busy_in_events_localised = yes } + scope:recipient = { NOT = { has_strong_hook = scope:actor } } + scope:recipient = { NOT = { has_trait = devoted } } + scope:recipient = { NOT = { has_trait = order_member } } + scope:recipient = { + NOT = { is_imprisoned_by = scope:actor } + } + scope:recipient = { + NOT = { is_at_war_with = scope:actor } + } + scope:actor = { + trigger_if = { + limit = { + government_has_flag = government_is_landless_adventurer + scope:recipient = { is_courtier_of = scope:actor } + } + custom_tooltip = { + text = valid_demand_conversion_conditions_trigger.tt.domicile_requires_shrine + domicile = { has_domicile_parameter = camp_enable_conversion } + } + } + } + + custom_description = { + text = "is_head_of_religion" + subject = scope:recipient + NOT = { scope:recipient.faith.religious_head = scope:recipient } + } + + custom_description = { + text = "is_protected_via_contract" + subject = scope:recipient + NAND = { # Vassal Contract forbids meddling by liege + exists = scope:recipient.liege + scope:recipient.liege = scope:actor + scope:recipient = { + is_ruler = yes + vassal_contract_has_flag = religiously_protected + } + } + } + + trigger_if = { + limit = { + scope:recipient = { + AND = { + has_variable = cannot_be_converted_by_value + var:cannot_be_converted_by_value = scope:actor + } + } + } + custom_tooltip = { + text = promised_to_not_convert_character + scope:recipient = { + NOR = { + has_variable = cannot_be_converted_by_value + var:cannot_be_converted_by_value = scope:actor + } + } + } + } + + custom_tooltip = { + text = cannot_take_overt_hostile_actions_against_diarch.tt + NOT = { scope:recipient ?= scope:actor.diarch } + } +} + +highgod_is_passive_trigger = { + OR = { + religion_tag = buddhism_religion + religion_tag = jainism_religion + religion_tag = taoism_religion + religion_tag = west_african_roog_religion + religion_tag = zunism_religion + } +} + +highgod_is_active_trigger = { + highgod_is_passive_trigger = no +} + + +fertilitygod_is_active_trigger = { + highgod_is_active_trigger = yes +} + + +###REINCARNATION### +can_become_reincarnation_trigger = { + save_temporary_scope_as = reincarnated_child + faith = { + has_doctrine = tenet_reincarnation + } + any_parent = { + is_playable_character = yes + faith = scope:reincarnated_child.faith + } +} + +can_reincarnate_trigger = { + is_alive = no + OR = { + has_trait = temperate + has_trait = greedy + has_trait = generous + has_trait = diligent + has_trait = calm + has_trait = arrogant + has_trait = humble + has_trait = deceitful + has_trait = honest + has_trait = brave + has_trait = gregarious + has_trait = ambitious + has_trait = just + has_trait = zealous + has_trait = compassionate + has_trait = stubborn + has_trait = forgiving + has_trait = lunatic + has_trait = dull + has_trait = intellect_bad + has_trait = shrewd + has_trait = intellect_good + has_trait = strong + has_trait = physique_good + } +} + +is_reincarnation_trigger = { + can_become_reincarnation_trigger = yes + OR = { + AND = { + has_variable = reincarnation_of + + } + + } +} + +# Used in faith scope, COUNT is number of faiths to at least have and CHARACTER is who must own them +num_realm_holy_sites_faithful_holders = { + custom_description = { + text = number_realm_holy_sites_held_by_faithful + subject = $CHARACTER$ + object = this + value = $COUNT$ + any_holy_site = { + count >= $COUNT$ + county = { + is_holy_site_controlled_by = $CHARACTER$ + holder.faith = $CHARACTER$.faith + } + } + } +} + +### Head of Faith +can_create_temporal_head_of_faith_title_trigger = { + num_realm_holy_sites_faithful_holders = { + COUNT = holy_sites_to_create_temporal_head_of_faith + CHARACTER = ROOT + } + root = { piety_level >= high_piety_level } + trigger_if = { + limit = { + root = { is_independent_ruler = no } + } + custom_description = { + text = cannot_create_hof_title_at_or_above_liege_tier + root.liege.primary_title.tier > tier_duchy + } + } +} + +can_create_spiritual_head_of_faith_title_trigger = { + num_realm_holy_sites_faithful_holders = { + COUNT = holy_sites_to_create_spiritual_head_of_faith + CHARACTER = ROOT + } + root = { piety_level >= medium_piety_level } + trigger_if = { + limit = { has_doctrine = special_doctrine_not_allowed_to_hof } + NOT = { has_doctrine = special_doctrine_not_allowed_to_hof } + } +} + +# this = Person trying to create the title +can_afford_create_head_of_faith_title_cost_trigger = { + trigger_if = { + limit = { + faith = { + has_doctrine_parameter = temporal_head_of_faith + OR = { + has_doctrine = muhammad_succession_sunni_doctrine + has_doctrine = muhammad_succession_shia_doctrine + } + } + } + trigger_if = { + limit = { NOT = { has_trait = sayyid } } + piety >= massive_piety_value + } + } + trigger_else_if = { + limit = { + faith = { + has_doctrine_parameter = temporal_head_of_faith + } + } + piety >= major_piety_value + } + trigger_else = { + limit = { + faith = { + has_doctrine_parameter = spiritual_head_of_faith + } + } + gold >= medium_gold_max_value + } +} + +# FAITH = The faith we are trying to make the head of faith title for +# this = Person trying to create the title +can_create_head_of_faith_title_trigger = { + $FAITH$ = { + trigger_if = { + limit = { + has_doctrine_parameter = spiritual_head_of_faith + } + can_create_spiritual_head_of_faith_title_trigger = yes + } + trigger_else_if = { + limit = { + has_doctrine_parameter = temporal_head_of_faith + } + can_create_temporal_head_of_faith_title_trigger = yes + } + trigger_else = { + # We shouldn't hit this point, but if we do use the following as error messages. + has_doctrine_parameter = spiritual_head_of_faith + has_doctrine_parameter = temporal_head_of_faith + } + } + can_afford_create_head_of_faith_title_cost_trigger = yes +} + +can_perform_the_hajj_trigger = { + faith.religion = religion:islam_religion + faith = { has_doctrine_parameter = can_go_on_pilgrimage } +} + +shared_faith_or_hof_trigger = { + OR = { + $ACTOR$.faith = $RECIPIENT$.faith + AND = { + exists = $ACTOR$.faith.religious_head + exists = $RECIPIENT$.faith.religious_head + $ACTOR$.faith.religious_head = $RECIPIENT$.faith.religious_head + } + } +} + + +###RELIGIOUS INTERACTIONS### +#Triggers that applies to both Monastery or Holy Order requirements +can_take_religious_vows_trigger = { + can_take_religious_vows_disregard_marriage_trigger = yes + + #Do they have the "wrong" marriage type? + NOR = { + custom_description = { + text = is_married_matrilineally + subject = scope:recipient + any_spouse = { + is_female = yes + matrilinear_marriage = yes + } + } + custom_description = { + text = is_married_patrilineally + subject = scope:recipient + any_spouse = { + is_male = yes + patrilinear_marriage = yes + } + } + custom_description = { + text = matrilinear_betrothal + subject = scope:recipient + exists = betrothed + betrothed = { + is_female = yes + matrilinear_betrothal = yes + } + } + custom_description = { + text = patrilinear_betrothal + subject = scope:recipient + exists = betrothed + betrothed = { + is_male = yes + patrilinear_betrothal = yes + } + } + } + bp2_valid_for_standard_interactions_trigger = yes +} + +can_take_religious_vows_disregard_marriage_trigger = { + is_available_ai = yes + faith = scope:actor.faith + is_ruler = no + NOT = { has_trait = excommunicated } + NOT = { has_character_flag = holy_order_member_requested_return_home } +} + +does_religion_exist_in_world_region_trigger = { # The most efficient way I could think of to essentially do diplomatic range triggers on religions + trigger_if = { + limit = { location = { geographical_region = world_europe } } # Even though europe has many sub regions, it's overall size is small so no need to sub-divide! + any_county_in_region = { + region = world_europe + faith.religion = $RELIGION$ + } + } + trigger_else_if = { + limit = { location = { geographical_region = world_asia_minor } } # Maybe this should be grouped with both the one above and the one below... + any_county_in_region = { + region = world_asia_minor + faith.religion = $RELIGION$ + } + } + trigger_else_if = { + limit = { location = { geographical_region = world_middle_east } } + any_county_in_region = { + region = world_middle_east + faith.religion = $RELIGION$ + } + } + trigger_else_if = { + limit = { + location = { geographical_region = world_india } } + any_county_in_region = { + region = world_india + faith.religion = $RELIGION$ + } + } + trigger_else_if = { + limit = { location = { geographical_region = world_africa } } + any_county_in_region = { + region = world_africa + faith.religion = $RELIGION$ + } + } + trigger_else_if = { + limit = { location = { geographical_region = world_steppe } } + any_county_in_region = { + region = world_steppe + faith.religion = $RELIGION$ + } + } + trigger_else_if = { # We group two smaller world regions into one + limit = { + location = { + OR = { + geographical_region = world_tibet + geographical_region = world_burma + } + } + } + OR = { + any_county_in_region = { + region = world_tibet + faith.religion = $RELIGION$ + } + any_county_in_region = { + region = world_burma + faith.religion = $RELIGION$ + } + } + } + trigger_else = { always = no } # This should always go at the end of this scripted trigger +} + +### HOLY ORDERS ### +holy_order_1000_holy_order_trigger = { + title = { + NOR = { + has_variable = received_new_land + has_variable = discarded_for_being_too_big + } + } +} + +holy_order_1000_target_barony_trigger = { + tier = tier_barony + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = $CHARACTER$ } + #Don't grab something that's held by a vassal player of the one receiving the event. + trigger_if = { + limit = { + NOT = { holder = $CHARACTER$ } + } + holder = { is_ai = yes } + } +} + +holy_order_1000_request_target_trigger = { + highest_held_title_tier >= tier_duchy + is_landed_or_landless_administrative = yes + faith = root + is_available = yes + NOR = { + has_character_flag = holy_order_recently_requested_land + has_character_flag = holy_order_recently_received_land + } + save_temporary_scope_as = ruler + any_sub_realm_barony = { + holy_order_1000_target_barony_trigger = { CHARACTER = scope:ruler } + } +} + +faith_dominant_gender_male_or_equal = { + faith = { + OR = { + has_doctrine_parameter = male_dominated_law + has_doctrine_parameter = gender_equal_law + } + } +} + +faith_dominant_gender_female_or_equal = { + faith = { + OR = { + has_doctrine_parameter = female_dominated_law + has_doctrine_parameter = gender_equal_law + } + } +} + +is_theological_character_trigger = { + OR = { + has_trait = theologian + has_trait = devoted + has_trait = order_member + AND = { + is_playable_character = yes + government_has_flag = government_is_theocracy + } + + } +} + +would_be_sinful_adulterer_trigger = { + is_married = yes + trigger_if = { + limit = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + trigger_else = { + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } +} + +has_tolerant_faith_or_culture_trigger = { + OR = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + culture = { has_cultural_parameter = less_likely_to_force_conversion } + } +} + +is_mainstream_jewish_faith = { + religion = religion:judaism_religion + NOT = { + this = faith:samaritan + this = faith:haymanot + this = faith:malabarism + this = faith:kabarism + } +} + +is_unprotected_hostile_faith = { # Checks if the faith is at least hostile but not protected by a contract, used in a county scope + faith = { + faith_hostility_level = { + target = prev.holder.top_liege.faith + value >= 2 + } + } + holder = { + NOT = { vassal_contract_has_flag = religiously_protected } + } + trigger_if = { # Does anyone in the hierarchy have religious protection? + limit = { + holder = { + any_liege_or_above = { + faith = prev.faith + } + } + } + holder = { + any_liege_or_above = { + NOT = { vassal_contract_has_flag = religiously_protected } + } + } + } +} + +### SYNCRETIC TRIGGERS ### + +islam_or_syncretic_with_islam_trigger = { + $CHARACTER$ = { + faith = { + OR = { + religion = religion:islam_religion + has_doctrine = tenet_islamic_syncretism + } + } + } +} + +judaism_or_syncretic_with_judaism_trigger = { + $CHARACTER$ = { + faith = { + OR = { + religion = religion:judaism_religion + has_doctrine = tenet_jewish_syncretism + } + } + } +} + +christianity_or_syncretic_with_christianity_trigger = { + $CHARACTER$ = { + faith = { + OR = { + religion = religion:christianity_religion + has_doctrine = tenet_christian_syncretism + } + } + } +} + +unreformed_or_syncretic_with_unreformed_trigger = { + $CHARACTER$ = { + faith = { + OR = { + religion = religion:unreformed_religion + has_doctrine = tenet_unreformed_syncretism + } + } + } +} + +zoroastrian_or_syncretic_with_eastern_trigger = { + $CHARACTER$ = { + faith = { + OR = { + religion = religion:zoroastrianism_religion + has_doctrine = tenet_eastern_syncretism + } + } + } +} + +#Used on faiths +is_dharmic_faith_trigger = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + religion = religion:jainism_religion + } +} + +#Used on provinces +has_holy_building = { + OR = { + has_building_or_higher = holy_site_cathedral_01 + has_building_or_higher = holy_site_mosque_01 + has_building_or_higher = holy_site_pagan_grand_temple_01 + has_building_or_higher = holy_site_indian_grand_temple_01 + has_building_or_higher = holy_site_other_grand_temple_01 + has_building_or_higher = holy_site_cologne_cathedral_01 + has_building_or_higher = holy_site_canterbury_cathedral_01 + has_building_or_higher = temple_of_uppsala_01 + has_building_or_higher = lund_cathedral_01 + has_building_or_higher = notre_dame_01 + has_building_or_higher = holy_site_imam_ali_mosque_01 + has_building_or_higher = holy_site_great_mosque_of_mecca_01 + has_building_or_higher = holy_site_great_mosque_of_cordoba_01 + has_building_or_higher = holy_site_great_mosque_of_djenne_01 + has_building_or_higher = holy_site_great_mosque_of_samarra_01 + has_building_or_higher = holy_site_prophetic_mosque_01 + has_building_or_higher = dome_of_the_rock_01 + has_building_or_higher = temple_in_jerusalem_01 + } +} + +invalid_for_heresy_events = { + OR = { + this = faith:conversos + this = faith:insular_celtic + this = faith:bosnian_church + this = faith:mozarabic_church + this = faith:adamites + this = faith:kabarism + } +} + diff --git a/common/scripted_triggers/00_scripted_triggers.txt b/common/scripted_triggers/00_scripted_triggers.txt new file mode 100644 index 00000000..bbcfd14b --- /dev/null +++ b/common/scripted_triggers/00_scripted_triggers.txt @@ -0,0 +1,493 @@ +# Example: +# +# example_trigger = { +# is_country_type = default +# free_leader_slots > 0 +# } +# +# +# In a script file: +# +# trigger = { +# example_trigger = yes +# } +# + +minor_gold_value_trigger = { + short_term_gold >= minor_gold_value +} + +medium_gold_value_trigger = { + short_term_gold >= medium_gold_value +} + +major_gold_value_trigger = { + short_term_gold >= major_gold_value +} + +has_chosen_murder_execution_type = { + exists = scope:murder_method +} + +seduction_target_is_close_trigger = { + scope:target = { is_in_the_same_court_as = scope:owner } +} + + +scope_is_close_to_root_trigger = { + OR = { + is_in_the_same_court_as = root + is_courtier_of = root + } +} + +#Education triggers +has_education_martial_trigger = { + OR = { + has_trait = education_martial_1 + has_trait = education_martial_2 + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } +} + +has_education_diplomacy_trigger = { + OR = { + has_trait = education_diplomacy_1 + has_trait = education_diplomacy_2 + has_trait = education_diplomacy_3 + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + } +} + +has_education_learning_trigger = { + OR = { + has_trait = education_learning_1 + has_trait = education_learning_2 + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } +} + +has_education_stewardship_trigger = { + OR = { + has_trait = education_stewardship_1 + has_trait = education_stewardship_2 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } +} + +has_education_intrigue_trigger = { + OR = { + has_trait = education_intrigue_1 + has_trait = education_intrigue_2 + has_trait = education_intrigue_3 + has_trait = education_intrigue_4 + has_trait = education_intrigue_5 + } +} + +is_cannibal_trigger = { + OR = { + has_trait = cannibal + any_secret = { + secret_type = secret_cannibal + } + } +} + +is_murderer_trigger = { + OR = { + has_trait = murderer + any_secret = { + secret_type = secret_murder + } + } +} + + +likes_target_trigger = { + opinion = { + target = $CHARACTER$ + value > 10 + } +} + + + +has_any_lifestyle_focus_trigger = { + OR = { + has_lifestyle = diplomacy_lifestyle + has_lifestyle = martial_lifestyle + has_lifestyle = stewardship_lifestyle + has_lifestyle = intrigue_lifestyle + has_lifestyle = learning_lifestyle + } +} + +has_any_lifestyle_trait_trigger = { + OR = { + has_diplomacy_lifestyle_trait_trigger = yes + has_martial_lifestyle_trait_trigger = yes + has_stewardship_lifestyle_trait_trigger = yes + has_intrigue_lifestyle_trait_trigger = yes + has_learning_lifestyle_trait_trigger = yes + } +} + +tier_or_related_liege_tier_equal_trigger = { + OR = { + highest_held_title_tier = $TIER$ + AND = { + exists = liege + liege = { highest_held_title_tier = $TIER$ } + OR = { + is_close_family_of = this.liege + is_spouse_of = this.liege + } + } + } +} + +tier_or_related_liege_tier_greater_or_equal_trigger = { + OR = { + highest_held_title_tier >= $TIER$ + AND = { + exists = liege + liege = { highest_held_title_tier >= $TIER$ } + OR = { + is_close_family_of = this.liege + is_spouse_of = this.liege + } + } + } +} + +torture_secret_trigger = { + NOT = { is_known_by = scope:actor } + OR = { + is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = $PARTICIPANT$ } + secret_is_always_interesting_trigger = yes + } + NAND = { + exists = secret_target + secret_target = scope:recipient + } +} + +has_interesting_portrait_altering_trait_trigger = { + OR = { + has_trait = scarred + has_trait = blind + has_trait = beauty_bad + has_trait = beauty_good + has_trait = hunchbacked + has_trait = dwarf + has_trait = giant + has_trait = spindly + has_trait = scaly + has_trait = albino + has_trait = one_eyed + } +} + +is_dangerous_faction_trigger = { + OR = { + AND = { + exists = faction_leader + faction_leader = { is_ai = no } # For now human factions are always dangerous + } + + AND = { + faction_is_type = peasant_faction + months_until_max_discontent <= 12 + } + AND = { + NOT = { faction_is_type = peasant_faction } + discontent_per_month > 0 + } + } +} + +basic_allowed_to_imprison_character_trigger = { #Only to be used in is_shown for imprison interaction and similar + save_temporary_scope_as = allowed_imprisoner + $CHARACTER$ = { + OR = { + target_is_liege_or_above = scope:allowed_imprisoner + is_foreign_court_or_pool_guest_of = scope:allowed_imprisoner + AND = { + # EP3 EVICTION + is_landless_adventurer = yes + reverse_has_opinion_modifier = { + target = scope:allowed_imprisoner + modifier = eviction_ignored_opinion + } + } + } + NOT = { + is_imprisoned_by = scope:allowed_imprisoner + } + } +} + +advanced_allowed_to_imprison_character_trigger = { + save_temporary_scope_as = allowed_imprisoner + $CHARACTER$ = { + save_temporary_scope_as = allowed_prisoner + is_imprisoned = no + NOT = { is_at_war_with = scope:allowed_imprisoner } + custom_description = { + text = "character_interactions_imprison_recently_ransomed" + object = scope:allowed_prisoner + NOT = { + has_opinion_modifier = { + target = scope:allowed_imprisoner + modifier = ransomed_from_prison + } + } + } + NOT = { has_strong_hook = scope:allowed_imprisoner } + custom_tooltip = { + text = hostage_travelling_tt + NOT = { exists = var:hostage_travelling_to_warden } + } + trigger_if = { + limit = { is_landless_adventurer = yes } + scope:allowed_imprisoner = { is_landed = yes } + reverse_has_opinion_modifier = { + target = scope:allowed_imprisoner + modifier = eviction_ignored_opinion + } + domicile.domicile_location.county ?= { target_is_de_facto_liege_or_above = scope:allowed_imprisoner.primary_title } + } + } + scope:allowed_imprisoner = { + custom_description = { + text = "character_interactions_imprison_ally_without_reason" + object = scope:allowed_prisoner + OR = { + NOT = { is_allied_to = scope:allowed_prisoner } + has_imprisonment_reason = scope:allowed_prisoner + is_spouse_of = scope:allowed_prisoner + } + } + } +} + +allowed_to_imprison_character_trigger = { + # We separate these out so that diarchs can imprison characters they aren't liege over. + advanced_allowed_to_imprison_character_trigger = { CHARACTER = $CHARACTER$ } + basic_allowed_to_imprison_character_trigger = { CHARACTER = $CHARACTER$ } +} + +can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction + save_temporary_scope_as = title_grantee + #Gender check + trigger_if = { + limit = { + is_ruler = no #Rulers can always get additional titles + is_theocratic_lessee = no #Theocratic lessees use other gender checks + NOT = { $RULER$ = { has_government = administrative_government } } + NOT = { + $RULER$.faith = { + has_dominant_ruling_gender = scope:title_grantee + } + } + } + trigger_if = { + limit = { + $RULER$ = { government_allows = state_faith } + } + $RULER$.primary_title.state_faith = { + has_dominant_ruling_gender = scope:title_grantee + } + } + trigger_else = { + $RULER$.faith = { + has_dominant_ruling_gender = scope:title_grantee + } + } + } + trigger_if = { + limit = { + is_ruler = no #Rulers can always get additional titles + is_theocratic_lessee = no #Theocratic lessees use other gender checks + $RULER$ = { + has_government = administrative_government + NOT = { has_realm_law = equal_law } + } + } + trigger_if = { + limit = { + $RULER$ = { has_realm_law = male_only_law } + } + scope:title_grantee = { is_female = no } + } + trigger_if = { + limit = { + $RULER$ = { has_realm_law = female_only_law } + } + scope:title_grantee = { is_female = yes } + } + #trigger_else = { always = yes } + } + trigger_else_if = { + limit = { + is_theocratic_lessee = yes + } + liege = $RULER$ + #If this is ever visible anywhere, we need to write a custom desc "Theocratic lessees cannot only be given titles by their ruler" + } + trigger_else = { + always = yes + } +} + +can_be_granted_theocratic_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction + save_temporary_scope_as = title_grantee + #Gender check + trigger_if = { + limit = { + $RULER$.faith = { has_doctrine = doctrine_clerical_gender_female_only } + } + is_female = yes + } + trigger_else_if = { + limit = { + $RULER$.faith = { has_doctrine = doctrine_clerical_gender_male_only } + } + is_male = yes + } + trigger_else = { always = yes } +} + +activate_disease_data_tracking_trigger = { + always = no #Should be set to no, unless you're gathering data +} + +vassal_contract_can_be_modified_trigger = { + custom_description = { + text = vassal_contract_can_be_modified + vassal_contract_has_modifiable_obligations = yes + vassal_contract_is_blocked_from_modification = no + } +} + +has_changed_contract_obligation_trigger = { + trigger_if = { + limit = { + scope:recipient = { government_has_flag = government_is_feudal } + } + custom_description = { + text = "modify_vassal_contract_select_different_obligation_level" + list_size = { + name = changed_obligations + value > 0 + } + } + } + trigger_else = { + custom_description = { + text = "modify_non_feudal_vassal_contract_select_different_obligation_level" + list_size = { + name = changed_obligations + value > 0 + } + } + } +} + +recently_converted_faith_trigger = { + OR = { + has_character_flag = converted_by_heresy_0011_event + has_character_flag = converted_by_heresy_0010_event + has_character_flag = converted_by_forced_conversion_interaction + } +} + +can_touch_someone_trigger = { + #This is to check if someone is physically capable and not in risk of disease. Remember to always ask for consent! + NOR = { + has_trait = leper + has_trait = scaly #people with eczema and other skin conditions often got the same treatment as lepers + has_trait = smallpox + has_trait = bubonic_plague + has_trait = measles #people with eczema and other skin conditions often got the same treatment as lepers + + #circumstancial + has_trait = incapable + has_trait = wounded + has_trait = maimed + has_trait = typhus + + # gout happens mostly in the foot, but as someone with inflammatory arthritis, I hate handshakes when my fingers are aching + has_trait = gout_ridden + } +} + +is_spouse_or_romantic_partner_of_root = { + OR = { + has_relation_lover = root + is_consort_of = root + has_relation_soulmate = root + } +} +terrible_sum_of_all_skills_trigger = { + sum_of_all_skills_value <= sum_of_all_skills_threshold_terrible +} +poor_sum_of_all_skills_trigger = { + sum_of_all_skills_value <= sum_of_all_skills_threshold_poor +} +average_sum_of_all_skills_trigger = { + sum_of_all_skills_value <= sum_of_all_skills_threshold_average +} +good_sum_of_all_skills_trigger = { + sum_of_all_skills_value <= sum_of_all_skills_threshold_good +} +excellent_sum_of_all_skills_trigger = { + sum_of_all_skills_value <= sum_of_all_skills_threshold_excellent +} + +scarred_trait_activation_1 = { + has_trait_xp = { + trait = scarred + track = scarred + value < 50 + } +} + +scarred_trait_activation_2 = { + AND = { + has_trait_xp = { + trait = scarred + track = scarred + value >= 50 + } + has_trait_xp = { + trait = scarred + track = scarred + value < 100 + } + } +} + +scarred_trait_activation_3 = { + has_trait_xp = { + trait = scarred + track = scarred + value > 99 + } +} + +has_purchased_truce_with_char = { + has_variable_list = bought_truce_list + any_in_list = { + variable = bought_truce_list + this = $TARGET$ + } +} diff --git a/common/scripted_triggers/00_secret_type_triggers.txt b/common/scripted_triggers/00_secret_type_triggers.txt new file mode 100644 index 00000000..91aa58b1 --- /dev/null +++ b/common/scripted_triggers/00_secret_type_triggers.txt @@ -0,0 +1,444 @@ + +#Triggers for Shunned and Criminal Secret Types + + +# SECRET DEVIANT +secret_deviant_is_valid_trigger = { + $OWNER$ = { + NOT = { + has_trait = deviant + } + } +} + +secret_deviant_is_shunned_trigger = { + $OWNER$ = { + OR = { + faith = { has_doctrine_parameter = deviancy_shunned } + any_liege_or_above = { faith = { has_doctrine_parameter = deviancy_shunned } } + } + } +} + +secret_deviant_is_criminal_trigger = { + $OWNER$ = { + OR = { + faith = { has_doctrine_parameter = deviancy_illegal } + any_liege_or_above = { faith = { has_doctrine_parameter = deviancy_illegal } } + } + } +} +# SECRET DEVIANT - END + +# SECRET HOMOSEXUAL +secret_homosexual_is_valid_trigger = { + $OWNER$ = { + NOT = { + has_trait = sodomite + } + is_male = yes #Only for men since it is localized as Sodomite and also because female homosexuality historically hasn't been "a big deal" in most cultures + } +} + +secret_homosexual_is_shunned_trigger = { + $OWNER$ = { + OR = { + faith = { has_doctrine_parameter = homosexuality_shunned } + any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_shunned } } + } + } +} + +secret_homosexual_is_criminal_trigger = { + $OWNER$ = { + OR = { + faith = { has_doctrine_parameter = homosexuality_illegal } + any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_illegal } } + } + } +} +# SECRET HOMOSEXUAL - END + +# SECRET MURDER ATTEMPT +secret_murder_attempt_is_valid_trigger = { + NOT = { $OWNER$ = $TARGET$ } # Murder requires two people + + trigger_if = { # If the target is dead, check that the killer isn't the owner since then the attempt isn't really an attempt... + limit = { + $TARGET$ = { is_alive = no } + exists = $TARGET$.killer + } + NOT = { + $TARGET$.killer = $OWNER$ + } + } +} + +secret_murder_attempt_is_shunned_trigger = { + $TARGET$ = { + save_temporary_scope_as = attempted_murder_target + } + $OWNER$ = { + OR = { + NOT = { exists = liege } + any_liege_or_above = { + NOR = { + this = scope:attempted_murder_target + is_spouse_of = scope:attempted_murder_target + is_close_family_of = scope:attempted_murder_target + } + } + #You are your own liege (independent) or have no liege (pool) + liege = this + } + } +} + +secret_murder_attempt_is_criminal_trigger = { + $TARGET$ = { + save_temporary_scope_as = attempted_murder_target + } + $OWNER$ = { + any_liege_or_above = { + NOR = { + this = scope:attempted_murder_target + is_spouse_of = scope:attempted_murder_target + is_close_family_of = scope:attempted_murder_target + } + } + } +} +#SECRET MURDER ATTEMPT - END + +# SECRET CANNIBAL +secret_cannibal_is_valid_trigger = { + $OWNER$ = { + NOT = { has_trait = cannibal } + } +} + +secret_cannibal_is_shunned_trigger = { + $OWNER$ = { always = no } +} + +secret_cannibal_is_criminal_trigger = { + $OWNER$ = { + OR = { + faith = { + NOT = { has_doctrine_parameter = cannibalism_legal } + } + any_liege_or_above = { + faith = { + NOT = { has_doctrine_parameter = cannibalism_legal } + } + } + } + } +} +# SECRET CANNIBAL - END + +# SECRET LOVER +secret_lover_is_valid_trigger = { + $TARGET$ = { + save_temporary_scope_as = target + } + $OWNER$ = { + has_relation_lover = scope:target + NOT = { is_consort_of = scope:target } + } +} + +#Placed ahead of the Shunned trigger, so that the shunned trigger can refer back to this +secret_lover_is_criminal_trigger = { + $TARGET$ = { save_temporary_scope_as = criminal_partner } #Different name to the scope in the shunned trigger, to prevent issues + $OWNER$ = { + OR = { + #Female adultery criminal + AND = { + is_female = yes + OR = { + faith = { has_doctrine_parameter = adultery_female_crime } + any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_crime } } + } + } + #Male adultery criminal + AND = { + is_male = yes + OR = { + faith = { has_doctrine_parameter = adultery_male_crime } + any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_crime } } + } + } + #Sodomy criminal + AND = { + is_male = yes + scope:criminal_partner = { is_male = yes } + OR = { + faith = { has_doctrine_parameter = homosexuality_illegal } + any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_illegal } } + } + } + } + } +} + +secret_lover_is_shunned_trigger = { + $TARGET$ = { save_temporary_scope_as = partner } + $OWNER$ = { + save_temporary_scope_as = lover_owner + OR = { + #Female adultery shunned + AND = { + is_female = yes + OR = { + faith = { has_doctrine_parameter = adultery_female_shunned } + any_liege_or_above = { faith = { has_doctrine_parameter = adultery_female_shunned } } + } + } + #Male adultery shunned + AND = { + is_male = yes + OR = { + faith = { has_doctrine_parameter = adultery_male_shunned } + any_liege_or_above = { faith = { has_doctrine_parameter = adultery_male_shunned } } + } + } + #Sodomy shunned + AND = { + is_male = yes + scope:partner = { is_male = yes } + OR = { + faith = { has_doctrine_parameter = homosexuality_shunned } + any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_shunned } } + } + } + #Incest is shunned + relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:partner FAITH = scope:lover_owner.faith } + any_liege_or_above = { + save_temporary_scope_as = liege_or_above + scope:lover_owner = { + relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:partner FAITH = scope:liege_or_above.faith } + } + } + } + #And it doesn't fulfill the criminal conditions + NOT = { + secret_lover_is_criminal_trigger = { + OWNER = scope:lover_owner + TARGET = scope:partner + } + } + } +} +# SECRET LOVER - END + +# SECRET MURDER +secret_murder_is_trivial_trigger = { + #Is the murderer important enough to get away with it? + $OWNER$ = { highest_held_title_tier >= tier_county } + #Is it a murder that people might care about? + OR = { + #Independent rulers have little fear in terms of legal consequences for their actions. + $OWNER$ = { is_independent_ruler = yes } + #Otherwise, certain victims are just not worth a strong hook. + $TARGET$ = { + NOR = { + #If landless or a baron, must have no important landed family. + AND = { + OR = { + is_ruler = no + highest_held_title_tier = tier_barony + } + any_close_or_extended_family_member = { highest_held_title_tier >= $OWNER$.primary_title.tier } + } + #Otherwise, characters who are two tiers lower than you arguably aren't nearly as much of a concern (again, providing they lack important family). + AND = { + tier_difference = { + target = $OWNER$ + value >= -1 + } + #Be a bit harsher with this, as these characters are the most likely to be relatives of the $OWNER$'s piers. + any_close_or_extended_family_member = { + tier_difference = { + target = $OWNER$ + value >= -1 + } + } + } + } + } + } +} + +secret_murder_is_valid_trigger = { + $TARGET$ = { + is_alive = no + killer = $OWNER$ + } +} + +#Murder attempts again unimportant characters are considered less serious. +secret_murder_is_shunned_trigger = { + $OWNER$ = { + secret_murder_is_trivial_trigger = { + OWNER = $OWNER$ + TARGET = $TARGET$ + } + } +} + +#If any of the get-out-if-imprisonment free clauses don't apply, then the murder is criminal +secret_murder_is_criminal_trigger = { + $OWNER$ = { + NOT = { + $OWNER$ = { + secret_murder_is_trivial_trigger = { + OWNER = $OWNER$ + TARGET = $TARGET$ + } + } + } + } +} +# SECRET MURDER - END + +# SECRET NON-BELIEVER +secret_non_believer_is_valid_trigger = { + $OWNER$ = { + NOT = { + has_character_modifier = known_non_believer + } + } +} + +secret_non_believer_is_shunned_trigger = { + $OWNER$ = { is_clergy = no } +} + +secret_non_believer_is_criminal_trigger = { + $OWNER$ = { is_clergy = yes } +} +# SECRET NON-BELIEVER - END + +# SECRET INCEST +secret_incest_is_valid_trigger = { + $OWNER$ = { + NOT = { + has_trait = incestuous + } + } +} + +secret_incest_is_shunned_trigger = { + $OWNER$ = { + OR = { + faith = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } + any_liege_or_above = { faith = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } } + } + } +} + +secret_incest_is_criminal_trigger = { + $OWNER$ = { always = no } +} +# SECRET INCEST - END + +# SECRET WITCH +secret_witch_is_valid_trigger = { + $OWNER$ = { + NOT = { + has_trait = witch + } + } +} + +secret_witch_is_shunned_trigger = { + $OWNER$ = { + OR = { + faith = { has_doctrine_parameter = witchcraft_shunned } + any_liege_or_above = { faith = { has_doctrine_parameter = witchcraft_shunned } } + } + } +} + +secret_witch_is_criminal_trigger = { + $OWNER$ = { + OR = { + faith = { has_doctrine_parameter = witchcraft_illegal } + any_liege_or_above = { faith = { has_doctrine_parameter = witchcraft_illegal } } + } + } +} +# SECRET WITCH - END + +# SECRET CRYPTO-RELIGIONIST +# Don't add the crypto-religionist trait if they practice that faith in the open +secret_crypto_religionist_is_valid_trigger = { + $OWNER$ = { + AND = { + exists = secret_faith + NOT = { secret_faith = $OWNER$.faith } + } + } +} + +# Same as secret non-believer +secret_crypto_religionist_is_shunned_trigger = { + $OWNER$ = { is_clergy = no } +} + +secret_crypto_religionist_is_criminal_trigger = { + $OWNER$ = { is_clergy = yes } +} +# SECRET CRYPTO-RELIGIONIST - END + +# SECRET EMBEZZLER +secret_embezzler_is_valid_trigger = { + # Can't embezzle from yourself. + ## Well, you can. + ### That's honestly even a fairly common white collar crime. + #### You just can't in-game. + ##### One rule for the wealthy, another for the rest of us [sigh]. + NOT = { $OWNER$ = $TARGET$ } +} + +# Embezzler is only criminal if the target is your liege _and_ the amount is very high. + +secret_embezzler_is_criminal_trigger = { + $OWNER$ = { + any_secret = { + secret_type = secret_embezzler + secret_target ?= $OWNER$.liege + var:embezzlement_stake >= { + value = $OWNER$.monumental_gold_value + multiply = 1.5 + } + } + } + +} +# SECRET EMBEZZLER - END + +# SECRET COUP_LEADER +secret_coup_plotter_is_valid_trigger = { + # Can't coup yourself + NOT = { $OWNER$ = $TARGET$ } + # Both of y'all must still be admin + $OWNER$ = { has_government = administrative_government } + $TARGET$ = { has_government = administrative_government } +} + +secret_coup_plotter_is_criminal_trigger = { + always = yes +} +# SECRET COUP_LEADER - END + +secret_raid_estate_is_valid_trigger = { + NOT = { $OWNER$ = $TARGET$ } +} + +secret_raid_estate_is_criminal_trigger = { + NOT = { + $OWNER$.var:raid_estate_permission ?= $TARGET$.house + } +} diff --git a/common/scripted_triggers/00_succession_triggers.txt b/common/scripted_triggers/00_succession_triggers.txt new file mode 100644 index 00000000..4cbd75c9 --- /dev/null +++ b/common/scripted_triggers/00_succession_triggers.txt @@ -0,0 +1,56 @@ +#Special succession types +#If adding new types to the decision, use a trigger, otherwise they may break if the culture is split. + +special_succession_witengamot_trigger = { + culture = { has_cultural_parameter = witenagemot_succession_enabled } +} + +special_succession_thing_trigger = { + culture = { has_cultural_parameter = scandinavian_elective_enabled } +} + +special_succession_tanistry_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_brythonic + has_cultural_pillar = heritage_goidelic + } + } +} + +special_succession_jirga_trigger = { + culture = { has_cultural_parameter = tribal_elective_enabled } +} + +historical_succession_access_single_heir_succession_law_trigger = { + OR = { + has_title = title:k_austria + has_title = title:e_roman_empire + has_title = title:e_byzantium + AND = { + has_title = title:e_france + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_reformed_carolingian_empire + } + } + #Add any subsequent exceptions here. + } + NOT = { has_government = administrative_government } +} + +historical_succession_access_single_heir_succession_law_youngest_trigger = { + NOT = { has_government = administrative_government } + OR = { + #has_title = title:e_byzantium + #Add any subsequent exceptions here. + } +} + +historical_succession_access_single_heir_dynasty_house_trigger = { + NOT = { has_government = administrative_government } + AND = { + has_title = title:d_bohemia + culture = { has_innovation = innovation_table_of_princes } + } +} diff --git a/common/scripted_triggers/00_vassal_stance_triggers.txt b/common/scripted_triggers/00_vassal_stance_triggers.txt new file mode 100644 index 00000000..fd18afa4 --- /dev/null +++ b/common/scripted_triggers/00_vassal_stance_triggers.txt @@ -0,0 +1,83 @@ + +### Vassal stance trigger list + +# has_same_vassal_stance_as_trigger + +has_same_vassal_stance_as_trigger = { + is_independent_ruler = no + save_temporary_scope_as = vassal_temp + $COMPARE$ = { + is_independent_ruler = no + save_temporary_scope_as = compare_temp + } + scope:compare_temp = { + switch = { + trigger = has_vassal_stance + courtly = { scope:vassal_temp = { has_vassal_stance = courtly } } + glory_hound = { scope:vassal_temp = { has_vassal_stance = glory_hound } } + parochial = { scope:vassal_temp = { has_vassal_stance = parochial } } + zealot = { scope:vassal_temp = { has_vassal_stance = zealot } } + minority = { scope:vassal_temp = { has_vassal_stance = minority } } + barons_and_minor_landholders = { scope:vassal_temp = { has_vassal_stance = barons_and_minor_landholders } } + } + } +} + +vassal_is_valid_and_follows_directive_trigger = { + is_independent_ruler = no + is_landed = yes + highest_held_title_tier >= tier_county + is_ai = yes + vassal_follows_directive_valid_trigger = { VASSAL = $VASSAL$ LIEGE = $LIEGE$ } + vassal_follows_directive_trigger = { VASSAL = $VASSAL$ LIEGE = $LIEGE$ } +} + +vassal_follows_directive_valid_trigger = { + $VASSAL$ = { save_temporary_scope_as = directive_vassal } + $LIEGE$ = { save_temporary_scope_as = directive_liege } + scope:directive_vassal = { + trigger_if = { + limit = { + scope:directive_liege = { has_government = administrative_government } + } + is_vassal_of = scope:directive_liege + } + trigger_else = { + is_vassal_of = scope:directive_liege + } + NOT = { has_relation_rival = scope:directive_liege } + NOT = { is_at_war_with = scope:directive_liege } + NOT = { has_trait = disloyal } + } +} + +vassal_follows_directive_trigger = { + $VASSAL$ = { save_temporary_scope_as = directive_vassal } + $LIEGE$ = { save_temporary_scope_as = directive_liege } + scope:directive_vassal = { + OR = { + trigger_if = { + limit = { + has_dlc_feature = roads_to_power + } + custom_tooltip = { + text = has_admin_gov + has_government = administrative_government + } + } + opinion = { + value >= 50 + target = scope:directive_liege + } + has_trait = trusting + has_trait = loyal + scope:directive_liege = { has_relation_friend = scope:directive_vassal } + scope:directive_liege = { has_relation_lover = scope:directive_vassal } + scope:directive_liege = { has_strong_hook = scope:directive_vassal } + scope:directive_liege = { has_perk = absolute_control_perk } + scope:directive_liege = { has_perk = honored_to_serve_perk } + scope:directive_liege = { has_realm_law = crown_authority_3 } + scope:directive_liege = { legitimacy_level = 5 } + } + } +} diff --git a/common/scripted_triggers/00_war_and_peace_triggers.txt b/common/scripted_triggers/00_war_and_peace_triggers.txt new file mode 100644 index 00000000..95d698e4 --- /dev/null +++ b/common/scripted_triggers/00_war_and_peace_triggers.txt @@ -0,0 +1,869 @@ + +###TRIGGER LIST +#prisoner_gives_warscore_for_trigger - takes WAR and CHARACTER (primary enemy or one of their top 3 player heirs) + +at_war_with_any_coreligionist_trigger = { + any_character_war = { + casus_belli = { + OR = { + primary_attacker = { + is_at_war_with = root + faith = root.faith + } + primary_defender = { + is_at_war_with = root + faith = root.faith + } + } + } + } +} + +at_war_with_any_non_coreligionist_trigger = { + any_character_war = { + casus_belli = { + OR = { + primary_attacker = { + is_at_war_with = root + NOT = { faith = root.faith } + } + primary_defender = { + is_at_war_with = root + NOT = { faith = root.faith } + } + } + } + } +} + +at_war_only_with_coreligionists_trigger = { + is_at_war = yes + NOT = { + any_character_war = { + casus_belli = { + OR = { + primary_attacker = { + is_at_war_with = root + NOT = { faith = root.faith } + } + primary_defender = { + is_at_war_with = root + NOT = { faith = root.faith } + } + } + } + } + } +} + +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 = { + NOT = { 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 = { + NOT = { 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 + } + } + } + } + } + } +} + +can_potentially_call_ally_trigger = { + # Can never call vassals to your own wars (their obligations are met via taxes and levies!) + custom_description = { + text = cannot_call_vassal_to_war + $JOINER$ = { + trigger_if = { + limit = { + # Diarchs can join against other vassals. + NOT = { this ?= $WARRIOR$.diarch } + } + NOT = { + target_is_liege_or_above = $WARRIOR$ + } + } + } + } + + # Can never call your liege to your own wars (they protect you only from foreign invaders, by being the war target instead of you) + custom_description = { + text = cannot_call_liege_to_war + $JOINER$ = { + NOT = { + target_is_vassal_or_below = $WARRIOR$ + } + } + } +} + +war_declarer_needs_hook_on_liege = { + scope:actor = { + trigger_if = { + limit = { + is_independent_ruler = no + liege = scope:recipient.liege + NOT = { liege = scope:recipient } + NAND = { + has_government = administrative_government + liege = { has_government = administrative_government } + } + liege = { has_realm_law_flag = vassal_internal_wars_banned } + NOT = { + vassal_contract_has_flag = vassal_contract_war_override + } + } + always = yes + } + trigger_else_if = { + limit = { + is_independent_ruler = no + NOT = { liege = scope:recipient } + NAND = { + has_government = administrative_government + liege = { has_government = administrative_government } + } + liege = { has_realm_law_flag = vassal_all_wars_banned } + NOT = { + vassal_contract_has_flag = vassal_contract_war_override + } + } + always = yes + } + trigger_else = { + always = no + } + } +} + +any_liege_or_above_is_participant_trigger = { + save_temporary_scope_as = trigger_war + + $CHARACTER$ = { + any_liege_or_above = { + scope:trigger_war = { is_participant = prev } + } + } +} + +can_use_conquest_cbs_trigger = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_clan + faith = { has_doctrine_parameter = conquest_cb_enabled } + culture = { has_cultural_parameter = can_use_conquest_cbs } + } +} + +can_be_warrior_trigger = { + is_adult = yes + is_imprisoned = no + NOT = { has_trait = incapable } + OR = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ } + AND = { + $ARMY_OWNER$.culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } + prowess >= 10 + } + } +} + +can_be_knight_trigger = { + is_hostage = no + trigger_if = { # Admin governors cannot be knights + limit = { + $ARMY_OWNER$ = { has_government = administrative_government } + is_courtier = no + } + primary_title ?= { + tier < tier_duchy + trigger_if = { + limit = { is_noble_family_title = yes } + always = no + } + } + } + trigger_if = { + limit = { + $ARMY_OWNER$.culture = { + has_cultural_parameter = minimum_prowess_for_knights + } + } + prowess >= 12 + } + can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ } + trigger_if = { + limit = { + OR = { + has_trait = devoted + is_clergy = yes + } + } + OR = { + faith = { has_doctrine_parameter = clergy_can_fight } + culture = { has_cultural_parameter = culture_clergy_can_fight } + AND = { + $ARMY_OWNER$.culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } + prowess >= 10 + } + } + } + OR = { + AND = { + $ARMY_OWNER$.culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } + prowess >= 10 + } + has_trait = order_member # Order Members will fight for their faith even if their faith says no + NOR = { + has_trait = blind + has_court_position = master_assassin_court_position #FP3 addition + } + } + trigger_if = { + limit = { + exists = liege.diarch + } + NOT = { this = liege.diarch } + } + is_ai = yes +} + +can_be_commander_basic_trigger = { + is_alive = yes + is_adult = yes + is_hostage = no + NOR = { + has_trait = incapable + AND = { + OR = { + has_trait = devoted + 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$ + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ } + } + + trigger_if = { + limit = { $ARMY_OWNER$ = { is_ai = yes } } + is_ai = yes + } +} + +can_be_commander_now_trigger = { + can_be_commander_basic_trigger = { ARMY_OWNER = $ARMY_OWNER$ } + is_imprisoned = no + custom_description = { + text = ALREADY_IN_ACTIVITY + NOR = { + exists = involved_activity + has_variable = homage_liege_scope + has_character_flag = meditation_character_flag + has_character_flag = petition_liege_character_flag + has_character_flag = holding_court_character_flag + is_being_visited_on_tour_strict = yes + } + } + # Must not be currently coming from or going somewhere + is_travelling = no +} + +get_valid_commander_list_trigger = { + any_vassal = { + add_to_temporary_list = temp$LIST$ + } + any_courtier = { + 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$ + } +} + +prisoner_gives_warscore_for_trigger = { + save_temporary_scope_as = war_prisoner + #Character getting war score is primary defender + trigger_if = { + limit = { $WAR$.primary_defender = $CHARACTER$ } + $WAR$.primary_attacker = { + OR = { + this = scope:war_prisoner + #player_heir_position = { + #target = scope:war_prisoner + #value <= 3 + #} + } + } + } + #Character getting war score is primary attacker + trigger_else_if = { + limit = { $WAR$ = { primary_attacker = $CHARACTER$ } } + $WAR$.primary_defender = { + OR = { + this = scope:war_prisoner + #player_heir_position = { + #target = scope:war_prisoner + #value <= 3 + #} + } + } + } + trigger_else = { + always = no + } +} + +using_non_ghw_holy_war_cb_trigger = { + OR = { + using_cb = minor_religious_war + using_cb = religious_war + using_cb = major_religious_war + } +} + +using_holy_war_cb_trigger = { + OR = { + using_non_ghw_holy_war_cb_trigger = yes + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } +} + +using_de_jure_cb_trigger = { + OR = { + using_cb = claim_cb + using_cb = de_jure_cb + using_cb = individual_county_de_jure_cb + using_cb = individual_duchy_de_jure_cb + using_cb = imperial_reconquest_cb + using_cb = dismantle_holy_pretender_cb + using_cb = dismantle_byz_pretender_cb + using_cb = norman_conquest_cb + using_cb = norwegian_invasion_cb + } +} + +using_conquest_cb_trigger = { + OR = { + using_cb = county_conquest_cb + using_cb = duchy_conquest_cb + using_cb = ducal_conquest_cb + using_cb = ireland_laudabiliter_conquest_cb + using_cb = mongol_invasion_war + } +} + +using_hierarchical_cb_trigger = { + OR = { + using_cb = tribal_subjugation_cb + using_cb = vassalization_cb + } +} + +# In case is_civil_war is causing issues. +using_civil_war_cb_trigger = { + OR = { + using_cb = independence_faction_war + using_cb = liberty_faction_war + using_cb = populist_war + using_cb = claimant_faction_war + using_cb = depose_war + using_cb = refused_liege_demand_war + using_cb = nation_fracturing_faction_war + using_cb = peasant_war + } +} + +special_invasion_cb_seize_land_in_region_trigger = { + OR = { + AND = { # For Duchies + tier = tier_duchy + OR = { + # Title is in the specified region + capital_vassal = { + title_province = { + geographical_region = $TARGET_REGION$ + } + } + # Title is owned by the current holder of the invasion's target kingdom + AND = { + exists = holder + holder = $TARGET_KINGDOM$.holder + kingdom = $TARGET_KINGDOM$ + } + } + } + AND = { # For Counties + tier = tier_county + OR = { + # Title is in the specified region + title_province = { + geographical_region = $TARGET_REGION$ + } + AND = { + exists = holder + holder = $TARGET_KINGDOM$.holder + kingdom = $TARGET_KINGDOM$ + } + } + trigger_if = { + # If our de jure liege is an existing duchy that would have been siezed in the duchy step, do not transfer the county (it has already been transferred). + limit = { + exists = de_jure_liege + de_jure_liege = { + exists = holder + OR = { + capital_vassal = { + title_province = { + geographical_region = $TARGET_REGION$ + } + } + AND = { + exists = holder + holder = $TARGET_KINGDOM$.holder + kingdom = $TARGET_KINGDOM$ + } + } + } + } + always = no + } + } + } +} + +can_join_war_liege_vassal_check_trigger = { + custom_description = { + text = "basic_ally_can_join_because_liege_or_vassals" + subject = $JOINER$ + + # actor is defender, attackers do not include recipient's liege or vassals + trigger_if = { + limit = { + $WARRIOR$ = { is_defender_in_war = scope:target } + } + $JOINER$ = { + trigger_if = { + limit = { + # Diarchs can join against other vassals. + NOT = { this ?= $WARRIOR$.diarch } + } + NOR = { + any_liege_or_above = { + is_attacker_in_war = scope:target + } + any_vassal_or_below = { + is_attacker_in_war = scope:target + } + } + } + } + } + + # actor is attacker, defenders do not include recipient's liege or vassals + trigger_else_if = { + limit = { + $WARRIOR$ = { is_attacker_in_war = scope:target } + } + $JOINER$ = { + NOR = { + any_liege_or_above = { + is_defender_in_war = scope:target + } + any_vassal_or_below = { + is_defender_in_war = scope:target + } + } + } + } + + # it's fine, whatever + trigger_else = { + always = yes + } + } +} + +pressing_claim_of_character_trigger = { + custom_description = { + subject = this + object = $CHARACTER$ + text = pressing_claim_of_character_trigger_text + save_temporary_scope_as = claim_presser + any_character_war = { + primary_attacker = scope:claim_presser + exists = claimant + claimant = $CHARACTER$ + } + } +} + +is_religious_war = { + OR = { + using_cb = minor_religious_war + using_cb = religious_war + using_cb = major_religious_war + using_cb = excommunication_war + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } +} + +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_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. + any_sub_realm_county = { + count = all + target_is_de_jure_liege_or_above = scope:target_title + } + } +} + +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. + 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 + } + } +} + +desirable_for_capture_trigger = { + OR = { + is_playable_character = yes + any_parent = { always = yes } + any_spouse = { is_playable_character = yes } + any_close_family_member = { is_playable_character = yes } + diplomacy >= very_high_skill_rating + martial >= very_high_skill_rating + stewardship >= very_high_skill_rating + intrigue >= very_high_skill_rating + learning >= very_high_skill_rating + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } +} + +can_use_viking_invasion_cbs_trigger = { + OR = { + # Vanilla behaviour. + AND = { + has_fp1_dlc_trigger = no + can_use_viking_invasion_cbs_dlc_trigger = yes + } + # DLC behaviour.. + AND = { + has_fp1_dlc_trigger = yes + OR = { + #Players are under no restrictions. + AND = { + is_ai = no + can_use_viking_invasion_cbs_dlc_trigger = yes + } + #If the host has fp1, then we want Scandis to beat each other up and export the losers overseas, not form huge overseas empires themselves. + AND = { + can_use_viking_invasion_cbs_dlc_trigger = yes + top_liege = { + any_realm_county = { + count = all + title_province = { + NOT = { geographical_region = world_europe_north } + } + } + } + } + } + } + } +} + +can_use_viking_invasion_cbs_dlc_trigger = { + faith = { has_doctrine = tenet_warmonger } + culture = { has_innovation = innovation_longboats } + any_sub_realm_county = { is_coastal_county = yes } + trigger_if = { + limit = { is_ai = yes } + prestige >= 75 + OR = { + is_independent_ruler = yes + primary_title.tier >= tier_kingdom + } + NOT = { + any_liege_or_above = { + NOT = { + faith = { has_doctrine = tenet_warmonger } + } + } + } + } +} + +coastal_or_neighboring_county_trigger = { + OR = { + is_coastal_county = yes + any_neighboring_county = { + holder = { + target_is_same_character_or_above = $CHARACTER$ + } + } + } +} + +# Non-vikings will for the AI just assert it's legal, as the target titles should already have fallen back to only allowing land and sea borders +neighboring_county_or_viking_conquest_trigger = { + OR = { + trigger_if = { + limit = { + $CHARACTER$ = { + can_use_viking_invasion_cbs_trigger = yes + } + } + is_coastal_county = yes + OR = { + $CHARACTER$ = { is_ai = no } + is_neighbor_to_realm = $CHARACTER$ + $CHARACTER$ = { + NOT = { + any_sub_realm_title = { + tier = tier_county + NOT = { + is_connected_to = { + target = $CHARACTER$.capital_province.county + } + } + } + } + } + } + } + trigger_else = { + $CHARACTER$ = { is_ai = no } + } + any_neighboring_county = { + holder = { + target_is_same_character_or_above = $CHARACTER$ + } + } + } +} + +valid_struggle_cb_target_trigger = { + any_neighboring_county = { + holder = { target_is_same_character_or_above = $CHARACTER$ } + } +} + +prisoners_of_war_trigger = { + OR = { + scope:defender = { + any_prisoner = { + OR = { + this = scope:war.primary_attacker + scope:war.primary_attacker.primary_title = { + place_in_line_of_succession = { + target = prev + value <= 3 + } + } + } + } + } + #Prisoners of attackers + scope:attacker = { + any_prisoner = { + OR = { + this = scope:war.primary_defender + scope:war.primary_defender.primary_title = { + place_in_line_of_succession = { + target = prev + value <= 3 + } + } + } + } + } + } +} + +# Used for checking if a captured combatant is worth war-score. +character_is_potential_valuable_prisoner = { + OR = { + this = scope:primary_siege_attacker + this = scope:primary_siege_defender + is_heir_of = scope:primary_siege_attacker + is_heir_of = scope:primary_siege_defender + } +} + +religious_war_vassals_constraints = { + trigger_if = { + limit = { + scope:attacker = { is_independent_ruler = no } + } + scope:attacker = { + NOT = { character_is_land_realm_neighbor = scope:defender } + } + scope:defender = { is_independent_ruler = yes } + } + trigger_else = { + always = no + } +} + +feudal_clan_tribal_conquest_constraints = { + OR = { + AND = { + tier = tier_county + any_county_province = { + has_holding_type = tribal_holding + } + } + AND = { + tier > tier_county + any_in_de_jure_hierarchy = { + tier = tier_county + any_county_province = { + has_holding_type = tribal_holding + } + } + } + } + scope:attacker = { + NOT = { government_has_flag = government_is_tribal } + gold < 200 + any_sub_realm_county = { + any_county_province = { + has_holding_type = tribal_holding + } + } + } +} diff --git a/common/scripted_triggers/07_ep3_triggers.txt b/common/scripted_triggers/07_ep3_triggers.txt new file mode 100644 index 00000000..fc4fc6d8 --- /dev/null +++ b/common/scripted_triggers/07_ep3_triggers.txt @@ -0,0 +1,1619 @@ +ep3_should_use_byzantine_graphics_trigger = { + culture = { has_building_gfx = byzantine_building_gfx } +} + +valid_for_byz_emperor_content_trigger = { + has_ep3_dlc_trigger = yes + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + } + } + OR = { + primary_title = title:e_byzantium + primary_title = title:e_roman_empire + AND = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } + } + highest_held_title_tier >= tier_empire + } + } +} + +valid_for_byz_governor_content_trigger = { + has_ep3_dlc_trigger = yes + is_governor = yes + top_liege.culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + } + } + top_liege = { + OR = { + primary_title = title:e_byzantium + primary_title = title:e_roman_empire + AND = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } + } + highest_held_title_tier >= tier_empire + } + } + } +} + +has_any_charioteer_trait = { + OR = { + has_trait = charioteer_blue + has_trait = charioteer_green + has_trait = charioteer_white + has_trait = charioteer_red + } +} + +available_charioteers_spots_trigger = { + scope:activity = { + any_guest_subset = { + name = charioteers + has_trait = charioteer_$TEAM$ + count < scope:activity.var:num_$TEAM$s + } + } +} + +ep3_varangian_trigger = { + OR = { + culture = { + OR = { + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_hird + has_cultural_tradition = tradition_fp1_performative_honour + has_cultural_pillar = heritage_north_germanic + has_cultural_pillar = heritage_west_germanic + } + } + has_trait = varangian + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_physically_able_adult = yes +} + +is_competing_for_same_title_as = { + has_government = administrative_government + any_heir_title = { + exists = this + is_noble_family_title = no + save_temporary_scope_as = temp_title + } + $CHARACTER$ = { + has_government = administrative_government + } + scope:temp_title = { + any_title_heir = { + this = $CHARACTER$ + } + } +} + +is_winning_competing_for_same_title_as = { + $CHARACTER$ = { save_temporary_scope_as = target_char } + is_competing_for_same_title_as = { CHARACTER = $CHARACTER$ } + save_temporary_scope_as = root_scope + any_heir_title = { + exists = this + is_noble_family_title = no + save_temporary_scope_as = temp_title + } + scope:temp_title = { + "place_in_line_of_succession(scope:root_scope)" > "place_in_line_of_succession(scope:target_char)" + } +} + +restore_greece_decision_county_trigger = { + trigger_if = { + limit = { + holder.top_liege = root + has_county_modifier = backwater_county_modifier + } + development_level >= 50 + } +} + +any_valid_title_to_grant_trigger = { + $CANDIDATE$ ?= { + save_temporary_scope_as = candidate_temp + custom_tooltip = { + text = support_candidacy_can_appoint_for_title_tt + $TOP_LIEGE$.primary_title = { + any_in_de_jure_hierarchy = { + continue = { + tier > tier_duchy + } + + save_temporary_scope_as = title_temp + scope:candidate_temp = { can_appoint_for_title = scope:title_temp } + } + } + } + } +} + +any_valid_candidacy_trigger = { + $CANDIDATE$ = { + custom_tooltip = { + text = any_valid_candidacy_tt + trigger_if = { + limit = { + $TOP_LIEGE$ = { + OR = { + has_realm_law = acclamation_succession_law + has_realm_law = appointment_succession_law + primary_title = { + OR = { + has_title_law = acclamation_succession_law + has_title_law = appointment_succession_law + } + } + } + } + appointment_candidate_score = { + title = $TOP_LIEGE$.primary_title + value > 0 + } + } + always = yes + } + trigger_else = { + $TOP_LIEGE$.primary_title ?= { + any_in_de_jure_hierarchy = { + exists = holder + tier >= tier_duchy + OR = { + has_title_law = acclamation_succession_law + has_title_law = appointment_succession_law + holder = { + OR = { + has_realm_law = acclamation_succession_law + has_realm_law = appointment_succession_law + } + } + } + save_temporary_scope_as = title_temp + trigger_if = { + limit = { exists = scope:title_temp } + $CANDIDATE$ = { + appointment_candidate_score = { + title = scope:title_temp + value > 0 + } + } + } + } + } + } + } + } +} + +is_candidate_for_title_trigger = { + $CANDIDATE$ = { + custom_tooltip = { + text = is_candidate_for_title_tt + $TITLE$ = { + OR = { + has_title_law = acclamation_succession_law + has_title_law = appointment_succession_law + holder ?= { + OR = { + has_realm_law = acclamation_succession_law + has_realm_law = appointment_succession_law + } + } + } + holder = { + NOT = { this = $CANDIDATE$ } + } + } + appointment_candidate_score = { + title = $TITLE$ + value > 0 + } + } + } +} + +valid_governor_contract_trigger = { + has_government = administrative_government + is_alive = yes + is_adult = yes + is_incapable = no +} + +valid_governor_contract_basic_trigger = { + task_contract_taker = { + #you have to be a governor + is_governor = yes + #and the location has to be in your realm + custom_tooltip = { + text = task_contract_location_not_in_realm + any_sub_realm_county = { + any_county_province = { + this = root.task_contract_location + } + } + } + } +} + +governor_contract_invalidated_message_trigger = { + task_contract_employer ?= { + NOT = { root.task_contract_taker ?= this } + OR = { + is_incapable = yes + is_imprisoned = yes + is_alive = no + } + } +} + +################################################## +### CHARIOT RACE TRIGGERS +################################################## + +chariot_race_0201_sitting_in_kathisma_trigger = { + OR = { + AND = { + exists = scope:activity.special_guest:chariot_race_honorary_guest + this = scope:activity.special_guest:chariot_race_honorary_guest + } + is_close_family_of = scope:host + is_consort_of = scope:host + } +} + +chariot_race_0201_negative_crowd_reaction_trigger = { + OR = { + scope:activity.var:emperor_speech_topic = flag:increase_legitimacy_fail + scope:activity.var:emperor_speech_topic = flag:discredit_claimant_fail + AND = { + scope:host.capital_county = { + county_opinion <= -30 + } + NOT = { scope:activity.var:emperor_speech_topic = flag:appease_populace } + } + AND = { + scope:host = { + legitimacy_level < 2 + } + NOR = { + scope:activity.var:emperor_speech_topic = flag:increase_legitimacy_success + scope:activity.var:emperor_speech_topic = flag:appease_populace + } + } + } +} + +cares_about_charioteer_trigger = { + OR = { + $CHARIOTEER$ = { + trigger_if = { + limit = { has_court_position = charioteer_court_position } + is_court_position_employer = { + court_position = charioteer_court_position + who = prev + } + } + trigger_else = { always = no } + } + is_close_family_of = $CHARIOTEER$ + trigger_if = { + limit = { has_variable = wager_target } + OR = { + var:wager_target = $CHARIOTEER$ + trigger_if = { + limit = { var:wager_target = root } + trigger_if = { + limit = { $CHARIOTEER$ = { has_trait = charioteer_blue } } + var:wager_team = flag:blues + } + trigger_if = { + limit = { $CHARIOTEER$ = { has_trait = charioteer_green } } + var:wager_team = flag:greens + } + trigger_if = { + limit = { $CHARIOTEER$ = { has_trait = charioteer_white } } + var:wager_team = flag:whites + } + trigger_if = { + limit = { $CHARIOTEER$ = { has_trait = charioteer_red } } + var:wager_team = flag:reds + } + } + trigger_else = { always = no } + } + } + trigger_else = { always = no } + } +} + +supports_chariot_team_trigger = { + trigger_if = { + limit = { $TEAM$ = flag:blues } + OR = { + AND = { + has_variable = wager_team + var:wager_team = flag:blues + } + AND = { + employs_court_position = charioteer_court_position + court_position:charioteer_court_position = { has_trait = charioteer_blue } + } + } + } + trigger_else_if = { + limit = { $TEAM$ = flag:greens } + OR = { + AND = { + has_variable = wager_team + var:wager_team = flag:greens + } + AND = { + employs_court_position = charioteer_court_position + court_position:charioteer_court_position = { has_trait = charioteer_green } + } + } + } + trigger_else_if = { + limit = { $TEAM$ = flag:whites } + OR = { + AND = { + has_variable = wager_team + var:wager_team = flag:whites + } + AND = { + employs_court_position = charioteer_court_position + court_position:charioteer_court_position = { has_trait = charioteer_white } + } + } + } + trigger_else_if = { + limit = { $TEAM$ = flag:reds } + OR = { + AND = { + has_variable = wager_team + var:wager_team = flag:reds + } + AND = { + employs_court_position = charioteer_court_position + court_position:charioteer_court_position = { has_trait = charioteer_red } + } + } + } + trigger_else = { + always = no + } +} + +has_same_chariot_team_as = { + trigger_if = { + limit = { has_trait = charioteer_blue } + $TARGET$ = { has_trait = charioteer_blue } + } + trigger_else_if = { + limit = { has_trait = charioteer_green } + $TARGET$ = { has_trait = charioteer_green } + } + trigger_else_if = { + limit = { has_trait = charioteer_white } + $TARGET$ = { has_trait = charioteer_white } + } + trigger_else_if = { + limit = { has_trait = charioteer_red } + $TARGET$ = { has_trait = charioteer_red } + } + trigger_else = { always = no } +} + +chariot_racer_valid_trigger = { + save_temporary_scope_as = chariot_racer + is_alive = yes + exists = var:current_place_in_race + is_in_guest_subset = { name = charioteers } +} + +chariot_race_anyone_ahead_of_racer_trigger = { + scope:activity ?= { + any_guest_subset = { + name = charioteers + chariot_racer_valid_trigger = yes + NOT = { this = $RACER$ } + var:current_place_in_race < $RACER$.var:current_place_in_race + } + } +} + +chariot_race_anyone_behind_racer_trigger = { + scope:activity ?= { + any_guest_subset = { + name = charioteers + chariot_racer_valid_trigger = yes + NOT = { this = $RACER$ } + var:current_place_in_race > $RACER$.var:current_place_in_race + } + } +} + +flag_matches_charioteer_team_trigger = { + trigger_if = { + limit = { $VAR$ = flag:blues } + has_trait = charioteer_blue + } + trigger_else_if = { + limit = { $VAR$ = flag:greens } + has_trait = charioteer_green + } + trigger_else_if = { + limit = { $VAR$ = flag:whites } + has_trait = charioteer_white + } + trigger_else_if = { + limit = { $VAR$ = flag:reds } + has_trait = charioteer_red + } + trigger_else = { always = no } +} + +stands_to_win_chariot_wager_trigger = { + save_temporary_scope_as = gambler + exists = scope:activity + exists = var:wager_type + # Specific Charioteer + trigger_if = { + limit = { + exists = var:wager_target + NOT = { this = var:wager_target } + } + var:wager_target ?= { + chariot_racer_valid_trigger = yes + save_temporary_scope_as = wager_target_temp + } + OR = { + # All bets gain by first place + scope:wager_target_temp.var:current_place_in_race = 1 + # Place & Show gain by second place + trigger_if = { + limit = { + OR = { + var:wager_type = flag:place + var:wager_type = flag:show + } + } + scope:wager_target_temp.var:current_place_in_race <= 2 + } + trigger_else = { always = no } + # Show gains by third place + trigger_if = { + limit = { var:wager_type = flag:show } + scope:wager_target_temp.var:current_place_in_race <= 3 + } + trigger_else = { always = no } + # Fallback no one is ahead of wager + NOT = { + chariot_race_anyone_ahead_of_racer_trigger = { RACER = scope:wager_target_temp } + } + } + } + # Team + trigger_else = { + scope:activity ?= { + any_guest_subset = { + name = charioteers + chariot_racer_valid_trigger = yes + flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } + } + OR = { + # All bets gain by first place + any_guest_subset = { + name = charioteers + flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } + var:current_place_in_race = 1 + } + # Place & Show gain by second place + trigger_if = { + limit = { + OR = { + scope:gambler.var:wager_type = flag:place + scope:gambler.var:wager_type = flag:show + } + } + any_guest_subset = { + name = charioteers + flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } + var:current_place_in_race <= 2 + } + } + trigger_else = { always = no } + # Show gains by third place + trigger_if = { + limit = { scope:gambler.var:wager_type = flag:show } + any_guest_subset = { + name = charioteers + flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } + var:current_place_in_race <= 3 + } + } + trigger_else = { always = no } + # Fallback no one is ahead of wager + AND = { + any_guest_subset = { + name = charioteers + flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } + save_temporary_scope_as = racer + } + NOT = { + chariot_race_anyone_ahead_of_racer_trigger = { RACER = scope:racer } + } + } + } + } + } +} + +novice_charioteer_trigger = { + OR = { + has_trait_xp = { + trait = charioteer_blue + value < 40 + } + has_trait_xp = { + trait = charioteer_green + value < 40 + } + has_trait_xp = { + trait = charioteer_white + value < 40 + } + has_trait_xp = { + trait = charioteer_red + value < 40 + } + NOR = { + has_trait = charioteer_blue + has_trait = charioteer_green + has_trait = charioteer_white + has_trait = charioteer_red + } + } +} + +middling_charioteer_trigger = { + OR = { + has_trait_xp = { + trait = charioteer_blue + value >= 40 + } + has_trait_xp = { + trait = charioteer_green + value >= 40 + } + has_trait_xp = { + trait = charioteer_white + value >= 40 + } + has_trait_xp = { + trait = charioteer_red + value >= 40 + } + } +} + +experienced_charioteer_trigger = { + OR = { + has_trait_xp = { + trait = charioteer_blue + value >= 90 + } + has_trait_xp = { + trait = charioteer_green + value >= 90 + } + has_trait_xp = { + trait = charioteer_white + value >= 90 + } + has_trait_xp = { + trait = charioteer_red + value >= 90 + } + } +} + +ep3_ideal_castration_candidate_trigger = { + is_ai = yes + is_male = yes + is_adult = no + is_close_family_of = scope:actor + is_eunuch_trigger = no + is_available = yes + is_betrothed = no + age < 10 +} + +ep3_castration_male_family_trigger = { + any_close_family_member = { + count >= 2 + is_male = yes + house ?= scope:actor.house + is_eunuch_trigger = no + NOR = { + has_trait = celibate + has_trait = devoted + has_trait = order_member + has_trait = bastard + } + OR = { + #Is an old adult with a kid + AND = { + age >= 40 + any_child = { + is_male = yes + } + } + #Is a young adult or child + age < 40 + } + } +} + +ep3_castration_interest_trigger = { + OR = { + is_landless_ruler = yes + is_lowborn = yes + highest_held_title_tier <= tier_county + AND = { + is_landed = yes + highest_held_title_tier <= tier_duchy + influence_level <= 1 + } + highest_held_title_tier >= tier_empire + } +} + +ep3_ai_castration_target_trigger = { + age < 12 + is_male = yes + OR = { + AND = { + exists = liege + liege.culture = { has_cultural_parameter = family_castration } + } + AND = { + NOT = { exists = liege } + culture = { has_cultural_parameter = family_castration } + } + } + is_available = yes + is_landed = no + is_betrothed = no + NOR = { + #Should not be close family of a player + any_close_family_member = { + is_ai = no + } + #Should not be close family of a character who can use the interaction + any_close_family_member = { + highest_held_title_tier >= tier_county + } + #Should not be the child of a playable title heir + any_parent = { + any_heir_title = { + tier >= tier_county + } + } + #Should not be the grandchild of a playable title heir, if their parent is the eldest son + any_parent = { + any_parent = { + highest_held_title_tier >= tier_county + } + any_sibling = { + count <= 0 + is_male = yes + age > prev.age + house ?= prev.house + } + } + } + #Not already a eunuch + is_eunuch_trigger = no + NOR = { + #Doesn't have a positive trait being a eunuch would ruin + has_trait = physique_good_1 + has_trait = physique_good_2 + has_trait = physique_good_3 + has_trait = fecund + has_trait = strong + has_trait = sayyid + has_trait = giant + } + OR = { + is_lowborn = yes + has_trait = bastard + #Sons of barons are valid if they have an elder male sibling + any_sibling = { + count >= 1 + is_male = yes + age > prev.age + house ?= prev.house + } + } +} + +valid_for_pagan_conversion_trigger = { + faith.religion = { is_in_family = rf_pagan } + faith = { has_doctrine_parameter = unreformed } + is_at_war = no + NOR = { + has_character_flag = do_not_disturb_preachers + primary_title = { has_variable = do_not_disturb_preachers } + } +} + +ep3_story_cycle_admin_eunuch_valid_story_trigger = { + any_owned_story = { + story_type = story_cycle_admin_eunuch + save_temporary_scope_as = story_temp + var:eunuch ?= { + is_alive = yes + save_temporary_scope_as = eunuch_temp + } + trigger_if = { + limit = { exists = var:protege } + var:protege = { save_temporary_scope_as = protege_temp } + } + trigger_if = { + limit = { exists = var:student } + var:student = { save_temporary_scope_as = student_temp } + } + trigger_if = { + limit = { exists = var:rival } + var:rival = { save_temporary_scope_as = rival_temp } + } + trigger_if = { + limit = { exists = var:seducer } + var:seducer = { save_temporary_scope_as = seducer_temp } + } + trigger_if = { + limit = { exists = var:spouse } + var:spouse = { save_temporary_scope_as = spouse_temp } + } + trigger_if = { + limit = { exists = var:puppet } + var:puppet = { save_temporary_scope_as = puppet_temp } + } + } +} + +ep3_story_cycle_admin_eunuch_involved_character = { + employer.top_liege = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + OR = { + scope:eunuch_temp ?= this + scope:protege_temp ?= this + scope:student_temp ?= this + scope:seducer_temp ?= this + scope:spouse_temp ?= this + scope:puppet_temp ?= this + } + } +} + +is_appointment_valid_trigger = { + $CANDIDATE$ = { + trigger_if = { + limit = { # We check independence, not tier, to allow for admin kingdoms + exists = $TITLE$ + NOT = { $CANDIDATE$.top_liege.highest_held_title_tier = $TITLE$.tier } + } + $CANDIDATE$ = { is_adult = yes } + } + trigger_if = { + limit = { + exists = $TITLE$ + $CANDIDATE$ = { + any_held_title = { count >= 1 } + } + } + custom_tooltip = { # Only one province of highest rank + text = only_one_province_of_highest_rank_tt + NOT = { + $CANDIDATE$ = { + any_held_title = { + tier = $TITLE$.tier + is_landless_type_title = no + is_noble_family_title = no + } + } + } + } + custom_tooltip = { + text = promote_candidate_interaction_existing_holder_tt + this != $TITLE$.holder + } + } + custom_tooltip = { + text = can_be_appointed_interaction_tt + OR = { + can_be_granted_titles_by = { RULER = $TOP_LIEGE$ } + can_be_granted_theocratic_titles_by = { RULER = $TOP_LIEGE$ } + AND = { + is_diarch_of_target = $TOP_LIEGE$ + $TOP_LIEGE$ = { has_diarchy_active_parameter = diarchy_is_co_rulership } + } + } + } + custom_tooltip = { # Only administrative + text = only_administrative_tt + trigger_if = { + limit = { is_landed = yes } + has_government = administrative_government + } + } + is_clergy = no + } +} + +ep3_adventurer_ai_logic_valid_trigger = { + is_alive = yes + is_ai = yes + government_has_flag = government_is_landless_adventurer + domicile ?= { is_domicile_type = camp } +} + +ep3_laamp_diplo_range_trigger = { + custom_description = { + text = ep3_laamp_diplo_range_trigger_tt + subject = scope:actor + object = scope:recipient + trigger_if = { + limit = { exists = $LAAMP$.domicile.domicile_location } + trigger_if = { + limit = { + NOT = { exists = $TARGET$.capital_province } + exists = $TARGET$.host.capital_province + } + $TARGET$.host.capital_province ?= { + squared_distance = { + target = $LAAMP$.domicile.domicile_location + value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION + } + } + } + trigger_else_if = { + limit = { + NOT = { exists = $TARGET$.capital_province } + exists = $TARGET$.location + } + $TARGET$.location ?= { + squared_distance = { + target = $LAAMP$.domicile.domicile_location + value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION + } + } + } + trigger_else = { + $TARGET$.capital_province ?= { + squared_distance = { + target = $LAAMP$.domicile.domicile_location + value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION + } + } + } + } + trigger_else = { always = no } + } +} + +can_recruit_archer_cavalry_trigger = { + custom_tooltip = { + text = can_recruit_archer_cavalry_trigger_desc + OR = { + can_create_maa = horse_archers + can_create_maa = asawira + can_create_maa = accolade_maa_horse_archers + } + } +} + +ep3_transport_contract_trigger = { + OR = { + has_task_contract_type = laamp_transport_vip + has_task_contract_type = laamp_transport_artifact + has_task_contract_type = laamp_transport_gold + has_task_contract_type = laamp_transport_ward + has_task_contract_type = laamp_transport_explorer + has_task_contract_type = laamp_transport_animal + has_task_contract_type = laamp_construction_contract + } +} + +ep3_vassal_will_become_admin = { + #This trigger picks out vassals that automatically convert to Admin. + #We convert vassals that are: + #Clan or Feudal + #De Jure part of the Empire + #Have the State Faith + #Aren't rivals of the admin liege + #Dukes and above must like the main liege at least a little. + + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + NOR = { #We convert only clan and feudal vassals in this decision + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + } + faith = scope:administrative_liege.faith #The future state faith +} + +ep3_kings_will_convert_trigger = { + primary_title.tier >= tier_kingdom + NOR = { + opinion = { + target = liege + value < -50 + } + has_relation_rival = liege + } +} + +ep3_is_clan_inclined_trigger = { + OR = { + faith.religion = religion:islam_religion + culture ?= { + OR = { + has_cultural_pillar = heritage_arabic + has_cultural_pillar = heritage_iranian + has_cultural_pillar = heritage_turkic + } + } + } +} + +cid_story_cycle_start_trigger = { + is_alive = yes + is_playable_character = yes + has_ep3_dlc_trigger = yes + NOR = { + has_variable = ongoing_cid_story_cycle + has_variable = had_cid_story_cycle + } + is_landless_adventurer = yes + exists = top_liege + top_liege = { + any_courtier = { is_available_healthy_ai_adult = yes } + } +} + +ep3_can_have_legitimists_camp_purpose_trigger = { + custom_tooltip = { + text = ep3_can_have_legitimists_camp_purpose_trigger.tt.explanation + any_claim = { + explicit = yes + tier >= tier_kingdom + } + } +} + +has_any_gallowsbait_xp_trigger = { + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 1 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 1 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 1 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 1 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 1 + } + } +} + +ep3_restored_rome_hard_mode_trigger = { + this = title:e_roman_empire.holder + any_owned_story = { story_type = ep3_story_cycle_restoring_rome } +} + +faith_is_interesting_heresy_to_state_faith_trigger = { + religion = root.top_liege.primary_title.state_faith.religion + NOT = { this = root.top_liege.primary_title.state_faith } + num_county_followers >= 3 + save_temporary_scope_as = temp_heresy + root.top_liege.primary_title.state_faith = { + faith_hostility_level = { + target = scope:temp_heresy + value >= faith_hostile_level + } + } +} + +ep3_boundary_dispute_county_trigger = { + tier = tier_county + custom_tooltip = { + text = dispute_border_county_neighbour_tt + county_held_or_vassal_to_target_trigger = { TARGET = $TARGET$ } + OR = { + any_neighboring_county = { + county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } + } + AND = { + de_jure_liege.holder ?= $OWNER$ + any_title_to_title_neighboring_and_across_water_county = { + county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } + } + } + } + } +} + +ep3_subsume_province_duchy_trigger = { + tier = tier_duchy + exists = holder + holder = $TARGET$ + is_noble_family_title = no + is_landless_type_title = no + trigger_if = { + limit = { tier = tier_duchy } + custom_tooltip = { + text = subsume_province_must_neighbor_tt + any_de_jure_county = { + county_held_or_vassal_to_target_trigger = { TARGET = $TARGET$ } + any_neighboring_county = { + county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } + } + } + } + custom_tooltip = { + text = subsume_province_more_than_half_tt + any_de_jure_county = { + percent < 0.5 + county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } + } + } + } +} + +ep3_interesting_courtier_to_ask_trigger = { + is_councillor = no + has_any_court_position = no + OR = { + diplomacy >= high_skill_rating + martial >= high_skill_rating + stewardship >= high_skill_rating + intrigue >= high_skill_rating + learning >= high_skill_rating + prowess >= high_skill_rating + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = education_martial_4 + has_trait = education_martial_5 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = education_intrigue_4 + has_trait = education_intrigue_5 + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait_xp = { trait = lifestyle_physician value >= 20 } + has_trait_xp = { trait = lifestyle_traveler track = travel value >= 20 } + has_trait_xp = { trait = lifestyle_traveler track = danger value >= 20 } + has_trait_xp = { trait = lifestyle_hunter track = hunter value >= 20 } + has_trait_xp = { trait = lifestyle_hunter track = falconer value >= 20 } + has_trait_xp = { trait = charioteer_blue value >= 20 } + has_trait_xp = { trait = charioteer_green value >= 20 } + has_trait_xp = { trait = charioteer_red value >= 20 } + has_trait_xp = { trait = charioteer_white value >= 20 } + has_trait_xp = { trait = governor value >= 20 } + } +} + +ep3_admin_faction_trigger = { + trigger_if = { # Enabled for all admin realms with EP3 + limit = { has_ep3_dlc_trigger = yes } + $FACTION_TARGET$ = { has_government = administrative_government } + } + trigger_else = { # Enabled for Byzantium without EP3 + $FACTION_TARGET$ = { has_title = title:e_byzantium } + } +} + +ep3_switch_faction_war_sides_war_trigger = { + # Recipient involved in war + is_participant = scope:recipient + # Is a Faction war + save_temporary_scope_as = faction_war_temp + primary_attacker.joined_faction.faction_war ?= scope:faction_war_temp + # Actor and recipient on opposing sides + trigger_if = { + limit = { is_defender = scope:recipient } + is_attacker = scope:actor + # Recipient must not be an ally of the opposing war leader + NOT = { + primary_defender = { is_allied_to = scope:recipient } + } + } + trigger_else = { + is_defender = scope:actor + # Recipient must not be an ally of the opposing war leader + NOT = { + primary_attacker = { is_allied_to = scope:recipient } + } + } + # Recipient must not be a war leader + NOT = { is_war_leader = scope:recipient } + # Recipient must not be the claimant + NOT = { primary_attacker.joined_faction.special_character = scope:recipient } +} + +ep3_raid_insight_trigger = { + scope:owner = { + NOT = { has_character_modifier = raid_insight_$TYPE$ } + } + scope:target_domicile = { has_domicile_building_or_higher = $TYPE$_01 } +} + +ep3_adventurer_ai_valid_war_target_trigger = { + is_landed = yes + reverse_opinion = { + target = $ADVENTURER$ + value <= 0 + } + in_diplomatic_range = $ADVENTURER$ + NOR = { + is_at_war_with = $ADVENTURER$ + is_allied_to = $ADVENTURER$ + } + current_strength_with_allies_value < $ADVENTURER$.current_strength_with_allies_seventy_five_percent_value + save_temporary_scope_as = war_target_temp + trigger_if = { + limit = { government_has_flag = government_is_tribal } + OR = { + $ADVENTURER$.culture.culture_head ?= { government_has_flag = government_is_tribal } + capital_county.culture = { + any_parent_culture_or_above = { this = $ADVENTURER$.culture } + } + $ADVENTURER$.culture = { + any_parent_culture_or_above = { this = scope:war_target_temp.capital_county.culture } + } + } + } + $ADVENTURER$ = { + trigger_if = { + limit = { has_realm_law = camp_purpose_legitimists } + any_claim = { + tier >= tier_kingdom + holder = scope:war_target_temp + save_temporary_scope_as = claim_temp + } + can_declare_war = { + defender = scope:war_target_temp + casus_belli = claim_cb + claimant = $ADVENTURER$ + target_titles = { scope:claim_temp } + } + } + trigger_else = { + OR = { + AND = { + scope:war_target_temp = { + any_held_title = { + count >= 1 + tier = tier_empire + save_temporary_scope_as = war_target_title_temp + } + } + can_declare_war = { + defender = scope:war_target_temp + casus_belli = ep3_laamp_adventurer_empire_invasion + target_titles = { scope:war_target_title_temp } + } + } + AND = { + scope:war_target_temp = { + any_held_title = { + count >= 1 + tier = tier_kingdom + save_temporary_scope_as = war_target_title_temp + } + } + can_declare_war = { + defender = scope:war_target_temp + casus_belli = ep3_laamp_adventurer_kingdom_invasion + target_titles = { scope:war_target_title_temp } + } + } + AND = { + scope:war_target_temp = { + any_held_title = { + count >= 1 + tier = tier_duchy + save_temporary_scope_as = war_target_title_temp + } + } + can_declare_war = { + defender = scope:war_target_temp + casus_belli = ep3_laamp_adventurer_duchy_invasion + target_titles = { scope:war_target_title_temp } + } + } + AND = { + scope:war_target_temp = { + any_held_title = { + count >= 1 + tier = tier_county + save_temporary_scope_as = war_target_title_temp + } + } + can_declare_war = { + defender = scope:war_target_temp + casus_belli = ep3_laamp_adventurer_county_invasion + target_titles = { scope:war_target_title_temp } + } + } + } + } + } +} + +ep3_adventurer_ai_valid_legitimist_target_trigger = { + is_landed = yes + NOR = { + has_relation_friend = $ADVENTURER$ + is_at_war_with = $ADVENTURER$ + is_allied_to = $ADVENTURER$ + } + save_temporary_scope_as = target_temp + current_strength_with_allies_value < $ADVENTURER$.current_strength_with_allies_seventy_five_percent_value + any_held_title = { + tier >= tier_kingdom + any_claimant = { this = $ADVENTURER$ } + save_temporary_scope_as = claim_temp + } + $ADVENTURER$ = { + can_declare_war = { + defender = scope:target_temp + casus_belli = claim_cb + claimant = $ADVENTURER$ + target_titles = { scope:claim_temp } + } + } +} + +ep3_adventurer_might_attack_target_trigger = { + is_landless_adventurer = yes + # Army at least half the size + current_strength_with_allies_value > $TARGET$.current_strength_with_allies_fifty_percent_value + # Not allies + NOT = { is_allied_to = $TARGET$ } + OR = { + # Has a claim on a title in subrealm + any_claim = { + holder ?= { + OR = { + this = $TARGET$ + target_is_liege_or_above = $TARGET$ + } + } + } + # Opinion + opinion = { + target = $TARGET$ + value < -25 + } + } +} + +ep3_adventurer_mercenary_war_trigger = { + is_war_leader = $EMPLOYER$ + OR = { + using_civil_war_cb_trigger = yes + using_non_ghw_holy_war_cb_trigger = yes + using_de_jure_cb_trigger = yes + using_conquest_cb_trigger = yes + } + NOT = { is_participant = $LAAMP$ } +} + +ep3_adventurer_ai_valid_contract_trigger = { + $LAAMP$ = { + OR = { + # DIPLOMACY + can_create_task_contract = { type_name = laamp_base_0001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_0011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_0021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_0031 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_0011 employer = $EMPLOYER$ } + # MARTIAL + can_create_task_contract = { type_name = laamp_base_1001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_1011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_1021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_1031 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_1041 employer = $EMPLOYER$ } + # STEWARDSHIP + can_create_task_contract = { type_name = laamp_base_2001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_2011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_2021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_2031 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_2041 employer = $EMPLOYER$ } + # INTRIGUE + can_create_task_contract = { type_name = laamp_base_3001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_3011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_3021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_3031 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_3041 employer = $EMPLOYER$ } + # LEARNING + can_create_task_contract = { type_name = laamp_base_4001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_4011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_4021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_4031 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_4041 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_4100 employer = $EMPLOYER$ } + # PROWESS + can_create_task_contract = { type_name = laamp_base_5001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_5011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_5021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_5031 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_5041 employer = $EMPLOYER$ } + # JUSTICAR + can_create_task_contract = { type_name = laamp_base_6001 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_6011 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_6021 employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_base_6031 employer = $EMPLOYER$ } + # EXTRA + can_create_task_contract = { type_name = laamp_boost_legitimacy_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_rid_councillor_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_gain_wanderer_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_find_secret_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_eliminate_heir_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_steal_artifact_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_construction_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_cultural_minority_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_religious_minority_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_prison_break_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_join_faction_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_help_faith_conversion_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_fight_faith_conversion_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_help_find_secrets_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_help_fabricate_claim_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_help_increase_control_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_help_find_secrets_contract employer = $EMPLOYER$ } + } + AND = { + has_realm_law = camp_purpose_mercenaries + OR = { + can_create_task_contract = { type_name = laamp_raid_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_join_war_contract employer = $EMPLOYER$ } + can_create_task_contract = { type_name = laamp_help_claimant_contract employer = $EMPLOYER$ } + } + } + } +} + +hasan_evangelize_province_trigger = { + save_temporary_scope_as = county + AND = { + NOT = { faith = root.faith } + #faith.religion = root.faith.religion # QA thinks its more fun without this! + scope:county = { + any_county_province = { + barony = { + NOT = { is_holy_site_of = scope:county.faith } + } + } + } + development_level <= 25 + custom_tooltip = { + text = has_tougher_to_convert_tt + NOT = { has_county_modifier = tougher_to_convert } + } + custom_tooltip = { + text = 0_or_below_county_opinion_tt + county_opinion <= 0 + } + } +} + +hasan_camp_in_foes_realm_trigger = { + trigger_if = { + limit = { + any_owned_story = { + var:ultimate_foe ?= { + save_temporary_scope_as = ultimate_foe + } + } + } + custom_description = { + text = hasan_stroy_cycle_camp_at_foe_realm + object = scope:ultimate_foe + domicile.domicile_location.county.holder = { + OR = { + any_liege_or_above = { + this = scope:ultimate_foe + } + this = scope:ultimate_foe + } + } + } + } + trigger_else = { + character:3096 = { + save_temporary_scope_as = caliph + } + save_temporary_scope_as = hasan + any_owned_story = { + trigger_if = { + limit = { exists = var:radical_points } + save_temporary_scope_value_as = { + name = radical_points + value = var:radical_points + } + } + trigger_else = { + save_temporary_scope_value_as = { + name = radical_points + value = 0 + } + } + } + custom_tooltip = { + text = hasan_stroy_cycle_ultimate_foe + any_owned_story = { + story_type = story_hasan + exists = var:ultimate_foe + exists = var:radical_points + var:radical_points >= 15 + } + } + } +} + +estate_can_construct_market_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_market_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_market_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_market_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} + +estate_can_construct_garden_leisure_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_garden_leisure_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_garden_leisure_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} +estate_can_construct_garden_fruit_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_garden_fruit_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_garden_fruit_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} + +estate_can_construct_guardhouse_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_guardhouse_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} + +estate_can_construct_workshop_carpenter_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_workshop_carpenter_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_workshop_carpenter_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_workshop_carpenter_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} +estate_can_construct_workshop_mason_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_workshop_mason_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_workshop_mason_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_workshop_mason_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} +estate_can_construct_workshop_textile_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_workshop_textile_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_workshop_textile_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_workshop_textile_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} + +estate_can_construct_barracks_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_barracks_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_barracks_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_barracks_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} + +estate_can_construct_vineyard_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_vineyard_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_vineyard_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_vineyard_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} + +estate_can_construct_olive_03_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_02 } +} +estate_can_construct_olive_04_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_03 } +} +estate_can_construct_olive_05_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_04 } +} +estate_can_construct_olive_06_trigger = { + domicile ?= { has_domicile_building_or_higher = estate_main_05 } +} From 68b6081d386b00bff4fa7cd9cdd583b6e09aee10 Mon Sep 17 00:00:00 2001 From: Magpie490 Date: Thu, 20 Feb 2025 11:54:14 +0000 Subject: [PATCH 2/2] Update NEOW_special_titles.txt --- common/landed_titles/NEOW_special_titles.txt | 272 ------------------- 1 file changed, 272 deletions(-) diff --git a/common/landed_titles/NEOW_special_titles.txt b/common/landed_titles/NEOW_special_titles.txt index 20426d39..eb52a135 100644 --- a/common/landed_titles/NEOW_special_titles.txt +++ b/common/landed_titles/NEOW_special_titles.txt @@ -18,275 +18,3 @@ k_sevillian_papacy = { male_names = { Alexander Anastasius Benedictus Caelestinus Callistus Clemens Eugenius Leo Gregorius Hadrianus Honorius Innocentius Ioannes Lucius Marinus Martinus Nicolaus Sergius Silvester Stephanus Urbanus Victor } } - -# NOBLE FAMILIES - -d_nf_spatstony = { # Spatstony - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_cyflymarhyan = { # Cyflymarhyan (Quicksilver) - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_said = { # Al-Said - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_starr = { # Starr - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_giray = { # Giray - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_flamank = { # Flamank - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_tudorh = { # Tudorh - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_elgarh = { # Elgarh - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_wall = { # wall - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_rholls_rhoycy = { # Rholls Rhoycy - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_nelson = { # Nelson - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_solomonid = { # Solomonid - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_windsor = { # Windsor - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_gibb = { # Gibb - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_newton = { # Newton - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_hendderswn = { # Newton - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_jacob = { # Newton - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -} - -d_nf_squyrhys = { # Newton - color = { 100 100 100 } - capital = c_london - - definite_form = yes - landless = yes - ruler_uses_title_name = no - always_follows_primary_heir = yes - no_automatic_claims = yes - noble_family = yes - destroy_if_invalid_heir = yes - - ai_primary_priority = { add = @never_primary_score } -}