diff --git a/common/scripted_triggers/00_available_for_events_triggers.txt b/common/scripted_triggers/00_available_for_events_triggers.txt index 37f6e792b..c7d702204 100644 --- a/common/scripted_triggers/00_available_for_events_triggers.txt +++ b/common/scripted_triggers/00_available_for_events_triggers.txt @@ -39,6 +39,37 @@ basic_is_available_ai = { has_contagious_deadly_disease_trigger = no } +is_in_activity = { + OR = { + custom_description = { + text = ALREADY_IN_ACTIVITY + OR = { + exists = involved_activity + has_variable = { + name = homage_liege_scope + name = meditation_character_flag + name = local_shrine_rite + name = petition_liege_character_flag + name = petition_head_of_faith_petitioner + name = holding_court_character_flag + name = gone_adventuring + name = merchant_var # only added here since they should always be travelling + } + is_being_visited_on_tour_strict = yes + } + } + custom_description = { + text = ALREADY_PLANNING_ACTIVITY + has_character_flag = planning_an_activity + } + # Variable set on Mandala succession + custom_tooltip = { + text = busy_in_mandala_succession + has_variable = busy_in_mandala_succession + } + } +} + is_available_allow_travelling = { is_available_quick = { alive = yes @@ -56,7 +87,10 @@ is_available_allow_travelling = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring + name = merchant_var # only added here since they should always be travelling } is_being_visited_on_tour_strict = yes } @@ -65,8 +99,6 @@ is_available_allow_travelling = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } # Variable set on Mandala succession custom_tooltip = { text = busy_in_mandala_succession @@ -93,7 +125,9 @@ is_available = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -102,8 +136,6 @@ is_available = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } # Variable set on Mandala succession custom_tooltip = { text = busy_in_mandala_succession @@ -121,9 +153,10 @@ is_available_travelling = { travel = yes } has_contagious_deadly_disease_trigger = no - NOR = { - has_character_flag = is_in_task_contract_event_chain - has_variable = gone_adventuring + has_none_of_variables = { + name = is_in_task_contract_event_chain + name = gone_adventuring + name = merchant_var } } @@ -138,9 +171,10 @@ is_available_travelling_adult = { incapable = no } has_contagious_deadly_disease_trigger = no - NOR = { - has_character_flag = is_in_task_contract_event_chain - has_variable = gone_adventuring + has_none_of_variables = { + name = is_in_task_contract_event_chain + name = gone_adventuring + name = merchant_var } } @@ -156,9 +190,10 @@ is_available_travelling_ai_adult = { incapable = no } has_contagious_deadly_disease_trigger = no - NOR = { - has_character_flag = is_in_task_contract_event_chain - has_variable = gone_adventuring + has_none_of_variables = { + name = is_in_task_contract_event_chain + name = gone_adventuring + name = merchant_var } } @@ -222,7 +257,9 @@ is_available_ai = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -231,8 +268,6 @@ is_available_ai = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -256,7 +291,9 @@ is_available_child = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -265,8 +302,6 @@ is_available_child = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -289,7 +324,9 @@ is_available_child_allow_travel = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -298,8 +335,6 @@ is_available_child_allow_travel = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -323,7 +358,9 @@ is_available_ai_child = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -332,8 +369,6 @@ is_available_ai_child = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -356,7 +391,9 @@ is_available_healthy_child = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -365,8 +402,6 @@ is_available_healthy_child = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -390,7 +425,9 @@ is_available_healthy_ai_child = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -399,8 +436,6 @@ is_available_healthy_ai_child = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -423,7 +458,9 @@ is_available_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -432,8 +469,6 @@ is_available_adult = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -457,7 +492,9 @@ is_available_ai_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -466,8 +503,6 @@ is_available_ai_adult = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -490,7 +525,9 @@ is_available_healthy_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -499,8 +536,6 @@ is_available_healthy_adult = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -524,7 +559,9 @@ is_available_healthy_ai_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -533,8 +570,6 @@ is_available_healthy_ai_adult = { 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_adult_or_is_commanding = { @@ -564,7 +599,9 @@ is_available_at_peace = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -573,8 +610,6 @@ is_available_at_peace = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -598,7 +633,9 @@ is_available_at_peace_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -607,8 +644,6 @@ is_available_at_peace_adult = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -634,7 +669,9 @@ is_available_at_peace_ai_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -643,8 +680,6 @@ is_available_at_peace_ai_adult = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -669,7 +704,9 @@ is_available_at_peace_adult_lenient = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -678,8 +715,6 @@ is_available_at_peace_adult_lenient = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } # If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. @@ -704,7 +739,9 @@ is_available_even_at_war_adult = { name = meditation_character_flag name = local_shrine_rite name = petition_liege_character_flag + name = petition_head_of_faith_petitioner name = holding_court_character_flag + name = gone_adventuring } is_being_visited_on_tour_strict = yes } @@ -713,8 +750,6 @@ is_available_even_at_war_adult = { text = ALREADY_PLANNING_ACTIVITY NOT = { has_character_flag = planning_an_activity } } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } } is_capable_adult = { @@ -863,26 +898,38 @@ is_landless_adventurer = { # This trigger checks if a character is a governor in an admin realm (implying they are landed) is_governor = { - government_allows = administrative - is_landed = yes - top_liege != this - OR = { - highest_held_title_tier >= main_administrative_tier - highest_held_title_tier >= min_title_maa_tier + custom_description = { + text = is_governor + subject = this + government_has_mechanic = administrative + is_landed = yes + top_liege != this + OR = { + highest_held_title_tier >= main_administrative_tier + highest_held_title_tier >= min_title_maa_tier + } + tgp_is_ceremonial_liege_trigger = no } - tgp_is_ceremonial_liege_trigger = no } is_governor_or_admin_count = { - government_allows = administrative + government_has_mechanic = administrative is_landed = yes top_liege != this highest_held_title_tier >= tier_county tgp_is_ceremonial_liege_trigger = no } +is_governor_or_landless_admin = { + OR = { + is_governor = yes + is_landless_administrative = yes + tgp_is_any_minister = yes + } +} + # Checks if a character is a landless house_head within an admin realm is_landless_administrative = { - government_allows = administrative + government_has_mechanic = administrative is_landed = no is_house_head = yes has_domicile = yes @@ -901,20 +948,38 @@ is_landed_or_landless_administrative = { OR = { is_landed = yes is_landless_administrative = yes + tgp_is_any_minister = yes # ministers should receive admin events and activity even if they are not house head + } +} +is_landed_or_landless_administrative_or_theocratic = { + OR = { + is_landed = yes + is_landless_administrative = yes + tgp_is_any_minister = yes # ministers should receive admin events and activity even if they are not house head + AND = { + is_ruler = yes + government_has_flag = government_is_theocracy + } } } # Checks if a character is either landed, a landless house head within an admin realm, a landless nomad, a landless adventurer, a landless soryo, or a minister is_playable_character = { + is_ruler = yes OR = { - government_has_flag = government_is_prepublic - government_has_flag = government_is_urepublic - is_landed = yes - is_landless_administrative = yes - is_landless_adventurer = yes - is_landless_nomad = yes - is_landless_soryo = yes - tgp_is_any_minister = yes # To keep ministers playable, regardless of having a nobel family title or not + exists = domicile + # exclude barons + trigger_if = { + limit = { + OR = { + is_landed = yes + government_has_flag = government_is_theocracy + } + } + highest_held_title_tier > tier_barony + } + tgp_is_any_minister = yes # To keep ministers playable, regardless of having a noble family title or not + has_variable = laamp_transition } } @@ -937,3 +1002,13 @@ is_eunuch_trigger = { has_trait = beardless_eunuch } } + +should_in_default_location_trigger = { + is_available_quick = { + alive = yes + travel = no + in_army = no + imprisoned = no + } + NOT = { exists = involved_activity } +} diff --git a/common/scripted_triggers/00_building_requirement_triggers.txt b/common/scripted_triggers/00_building_requirement_triggers.txt index 8223467c0..8503574f4 100644 --- a/common/scripted_triggers/00_building_requirement_triggers.txt +++ b/common/scripted_triggers/00_building_requirement_triggers.txt @@ -46,7 +46,7 @@ building_requirement_nomad_holding_in_county = { building_requirement_herder = { scope:holder ?= { - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder } } @@ -60,6 +60,46 @@ building_requirement_herder_holding_in_county = { } } +holding_is_tribal = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } +} + +holding_is_nomad = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } +} + +holding_is_castle = { + OR = { + has_holding_type = castle_holding + has_holding_type = temple_citadel_holding + } +} +holding_is_church = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } +} +holding_is_city = { + has_holding_type = city_holding +} + +holding_is_feudalized = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } +} + ###################################################################### # Holding Level ###################################################################### @@ -175,15 +215,6 @@ building_pastures_requirement_terrain = { terrain = jungle NOT = { geographical_region = world_innovation_elephants } } - AND = { - OR = { - terrain = taiga - terrain = wetlands - } - culture = { - has_cultural_parameter = taiga_wetland_pastures_allowed - } - } } } @@ -285,8 +316,17 @@ building_paddy_fields_requirement_terrain = { text = building_paddy_fields_requirement_terrain_tt OR = { terrain = terraced_hills - terrain = floodplains - terrain = wetlands + AND = { + terrain = floodplains + OR = { + geographical_region = graphical_east_asia + geographical_region = custom_viet_lands + } + } + AND = { + terrain = wetlands + county.culture = { has_cultural_parameter = champa_rice_wet_land_paddies } + } AND = { OR = { terrain = hills @@ -566,6 +606,7 @@ building_hospices_requirement_terrain = { has_any_special_mine_trigger = { has_building_with_flag = special_mine #OR = { + # has_building_or_higher = rammelsberg_mines_01 # has_building_or_higher = kutna_hora_mines_01 # has_building_or_higher = kremnica_mines_01 # has_building_or_higher = falun_mines_01 @@ -861,7 +902,6 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin has_building = holy_site_chinese_temple_01 has_building = holy_site_se_asia_pagan_temple_01 has_building = izumo_taisha_01 - has_building = bone_temple_melar_01 } } AND = { # Islamic @@ -906,7 +946,7 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin building_monastic_schools_holding_level_requirement_trigger = { trigger_if = { - limit = { scope:holder.faith = { has_doctrine_parameter = monastic_schools_allowed_in_every_holding_type } } + limit = { scope:holder.rite = { rite_has_parameter = monastic_schools_allowed_in_every_holding_type } } OR = { has_building_or_higher = castle_$LEVEL$ has_building_or_higher = city_$LEVEL$ @@ -950,7 +990,6 @@ building_spice_plantation_requirement_terrain = { geographical_region = world_asia_sulawesi_maluku geographical_region = world_asia_indonesia geographical_region = world_india - geographical_region = world_burma } OR = { terrain = jungle diff --git a/common/scripted_triggers/00_clothing_triggers.txt b/common/scripted_triggers/00_clothing_triggers.txt index 00cfe50ca..e63185ba8 100644 --- a/common/scripted_triggers/00_clothing_triggers.txt +++ b/common/scripted_triggers/00_clothing_triggers.txt @@ -5,12 +5,13 @@ # Character must have a valid reasion to be naked. OR = { has_character_modifier = diplomacy_majesty_4090_no_raiment_modifier # Lunatic event where character goes naked instead of buying new clothes. + has_character_modifier = natural_primitivism_court_naturism_modifier has_character_flag = is_naked # Special flag used in certain events. -# faith = { has_doctrine_parameter = naked_adherents_active } + rite = { rite_has_parameter = naked_adherents_active } culture = { has_cultural_parameter = naked_culture_active } trigger_if = { limit = { - faith = { has_doctrine_parameter = naked_priests_active } + rite = { rite_has_parameter = naked_priests_active } } OR = { government_has_flag = government_is_theocracy @@ -23,6 +24,25 @@ } } +natural_primitivism_supports_naturism_trigger = { + exists = this + OR = { + should_be_naked_trigger = yes + rite = { rite_has_parameter = naked_adherents_active } + rite = { rite_has_parameter = naked_priests_active } + culture = { has_cultural_parameter = naked_culture_active } + has_personal_tenet_flag = tenet_natural_primitivism_promote_naturism_decision + } +} + +natural_primitivism_fulfillment_trigger = { + exists = this + OR = { + rite = { rite_has_parameter = naked_adherents_active } + has_personal_tenet_flag = tenet_natural_primitivism_promote_naturism_decision + } +} + # Can only be checked in the interface since the setting isn't synced should_be_fully_naked_portrait_trigger = { should_show_nudity = yes @@ -120,12 +140,12 @@ portrait_wear_armor_trigger = { is_in_army = yes } OR = { - # Mercenaries, Holy Orders, Adventurers + # Mercenaries, Military Orders, Adventurers AND = { is_ruler = yes OR = { government_has_flag = government_is_mercenary - government_has_flag = government_is_holy_order + government_has_flag = government_is_military_holy_order has_realm_law = camp_purpose_mercenaries has_realm_law = camp_purpose_brigands } @@ -137,7 +157,7 @@ portrait_wear_armor_trigger = { exists = knight_army AND = { OR = { - is_landed_or_landless_administrative = no + is_landed_or_landless_administrative_or_theocratic = no liege = { is_at_war = yes } } is_councillor = no @@ -176,7 +196,7 @@ portrait_wear_armor_trigger = { AND = { has_council_position = councillor_marshal OR = { - is_landed_or_landless_administrative = no + is_landed_or_landless_administrative_or_theocratic = no primary_title.tier < tier_kingdom } } @@ -184,22 +204,16 @@ portrait_wear_armor_trigger = { trigger_if = { limit = { is_independent_ruler = no - OR = { - has_government = celestial_government - has_government = meritocratic_government - has_government = steppe_admin_government - } + government_allows = merit } OR = { - vassal_contract_has_flag = celestial_province_protectorate - vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = meritocratic_province_military - has_title = title:e_minister_grand_marshal + vassal_contract_has_flag = province_military + vassal_contract_has_flag = celestial_grand_marshal_obligation } is_adult = yes trigger_if = { limit = { has_trait = devoted } - faith = { has_doctrine_parameter = clergy_can_fight } + rite = { rite_has_parameter = clergy_can_fight } } save_temporary_scope_as = fighter_temp can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:fighter_temp } @@ -262,7 +276,7 @@ portrait_accoladed_knight_trigger = { } AND = { liege ?= { - highest_held_title_tier = tier_empire + highest_held_title_tier >= tier_empire } } } @@ -294,17 +308,24 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and government_has_flag = government_is_landless_adventurer has_realm_law = camp_purpose_mercenaries } - # Holy Orders + # Military Orders + # Rank-and-file military order members only wear helmets when actively fighting + # (commanding an army or riding out as a knight). Otherwise they're shown in their + # tonsured monastic form. Mirrors the commanding-army / knight_army logic used for + # regular knights & marshals below. NOTE: portrait_wear_armor_trigger still lets + # them wear their armor at all times, per the military-order aesthetic. AND = { - is_ruler = yes - government_has_flag = government_is_holy_order + has_trait = order_member + OR = { + is_commanding_army = yes + exists = knight_army + } } - has_trait = order_member # Commanding and lower than a King or uncrowned AND = { is_commanding_army = yes OR = { - is_landed_or_landless_administrative = no + is_landed_or_landless_administrative_or_theocratic = no AND = { exists = primary_title OR = { @@ -321,7 +342,7 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and is_knight = yes is_councillor = no OR = { - is_landed_or_landless_administrative = no + is_landed_or_landless_administrative_or_theocratic = no AND = { exists = primary_title primary_title.tier < tier_kingdom @@ -341,7 +362,7 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and AND = { has_council_position = councillor_marshal OR = { - is_landed_or_landless_administrative = no + is_landed_or_landless_administrative_or_theocratic = no primary_title.tier < tier_duchy } } @@ -359,21 +380,27 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and # Military style governor AND = { is_independent_ruler = no + government_allows = merit OR = { - has_government = celestial_government - has_government = meritocratic_government - has_government = steppe_admin_government - } - OR = { - vassal_contract_has_flag = celestial_province_protectorate - vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = meritocratic_province_military - has_title = title:e_minister_grand_marshal + vassal_contract_has_flag = province_military + vassal_contract_has_flag = celestial_grand_marshal_obligation + AND = { + has_council_position = councillor_marshal + liege = { + OR = { + AND = { + is_independent_ruler = yes + highest_held_title_tier >= tier_kingdom + } + tgp_is_ceremonial_liege_trigger = yes + } + } + } } is_adult = yes trigger_if = { limit = { has_trait = devoted } - faith = { has_doctrine_parameter = clergy_can_fight } + rite = { rite_has_parameter = clergy_can_fight } } save_temporary_scope_as = fighter_temp can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:fighter_temp } @@ -391,7 +418,7 @@ portrait_wear_helmet_trigger = { # Different from Armor, as (crowned) Kings and is_leading_faction_type = peasant_faction AND = { is_ruler = yes - is_landed_or_landless_administrative = no + is_landed_or_landless_administrative_or_theocratic = no OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan @@ -434,27 +461,27 @@ portrait_wear_no_crown_trigger = { # Rulers should be coronated to wear a crown } } -portrait_wear_christian_holy_order_trigger = { # Christian holy order members/vassals should wear different armor +portrait_wear_christian_holy_order_trigger = { # Christian Military Order members/vassals should wear different armor OR = { - AND = { # Is a Christian holy order member - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } - government_has_flag = government_is_holy_order + AND = { # Is a Christian Military Order member + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion } - AND = { # Is a Christian holy order vassal - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + government_has_flag = government_is_military_holy_order + } + AND = { # Is a Christian Military Order vassal + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } is_playable_character = no portrait_wear_armor_trigger = yes - liege ?= { government_has_flag = government_is_holy_order } + liege ?= { government_has_flag = government_is_military_holy_order } } } } @@ -733,12 +760,12 @@ portrait_fp2_iberian_christian_clothing_trigger = { trigger_if = { limit = { exists = this } AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } capital_province ?= { geographical_region = world_europe_west_iberia } @@ -755,12 +782,12 @@ portrait_fp2_iberian_christian_clothing_spouse_trigger = { CULTURE_FLAG = iberian_christian } AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } capital_province ?= { geographical_region = world_europe_west_iberia } @@ -2628,34 +2655,34 @@ portrait_war_nobles_helmet_trigger = { portrait_$CULTURE_INPUT$_clothing_trigger = yes NOR = { AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } - government_has_flag = government_is_holy_order + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } + government_has_flag = government_is_military_holy_order } AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } is_playable_character = no portrait_wear_armor_trigger = yes liege ?= { - government_has_flag = government_is_holy_order + government_has_flag = government_is_military_holy_order } } AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } portrait_wear_armor_trigger = yes OR = { any_character_war = { @@ -2704,34 +2731,34 @@ portrait_western_crusades_trigger = { exists = this OR = { AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } - government_has_flag = government_is_holy_order + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } + government_has_flag = government_is_military_holy_order } AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } is_playable_character = no portrait_wear_armor_trigger = yes liege ?= { - government_has_flag = government_is_holy_order + government_has_flag = government_is_military_holy_order } } AND = { - OR = { - religion = religion:eastern_orthodox_religion - religion = religion:catholic_religion - religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion - } + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } portrait_wear_armor_trigger = yes OR = { any_character_war = { @@ -2754,6 +2781,25 @@ portrait_western_crusades_trigger = { } } } + #Add culture triggers because this is only western armor... so why are we applying it elsewhere...? + portrait_era3_armor_trigger = yes + + OR = { + faith = faith:roman_catholic + portrait_commoner_armor_trigger = { + CULTURE_INPUT = western + } + portrait_low_nobles_armor_trigger = { + CULTURE_INPUT = western + } + portrait_high_nobles_armor_trigger = { + CULTURE_INPUT = western + } + portrait_royalty_armor_trigger = { + CULTURE_INPUT = western + } + } + } @@ -2815,6 +2861,19 @@ portrait_prisoner_trigger = { } +# Saints count as beautified even if Beautify Deceased is off, but de-aging still needs the setting +portrait_beautified_trigger = { + exists = this + OR = { + AND = { + is_alive = no + should_limit_age_for_dead_portraits = yes + } + has_trait = saint + } +} + + portrait_sickness_trigger = { exists = this OR = { @@ -2859,20 +2918,31 @@ portrait_religious_devoted_trigger = { OR = { AND = { has_character_flag = need_priest_outfit - faith = { - has_doctrine_parameter = vows_of_poverty_active + rite = { + rite_has_parameter = vows_of_poverty_active } } portrait_has_trait_trigger = { TRAIT = devoted } + # Clerics with a poverty rite take the habit, because portrait_religious_high bars the priestly look AND = { - faith = { - has_doctrine_parameter = vows_of_poverty_active + portrait_has_trait_trigger = { TRAIT = cleric } + rite = { + rite_has_parameter = vows_of_poverty_active + } + OR = { + is_ruler = no + pam_is_clergy_ruler_trigger = yes + } + } + AND = { + rite = { + rite_has_parameter = vows_of_poverty_active } OR = { AND = { has_council_position = councillor_court_chaplain - faith = { - has_doctrine = doctrine_theocracy_lay_clergy + rite = { + rite_has_doctrine = doctrine_theocracy_lay_clergy } } is_theocratic_lessee = yes @@ -2885,13 +2955,100 @@ portrait_religious_devoted_trigger = { } } +# Historical Latin monastic orders grouped by habit color (PAM art), in landed title scope +# Dynamic orders have no static title key and fall back to the mixed devoted pool +portrait_pam_black_habit_order_title_trigger = { + OR = { + this = title:d_benedictine_order + this = title:d_cluniacs + this = title:d_iberian_cluniacs + this = title:d_eastern_cluniacs + this = title:d_fleurians + this = title:d_columban_benedictines + this = title:d_sankt_gallen_benedictines + this = title:d_maurian_benedictines + this = title:d_ottonian_benedictines + this = title:d_guntherian_benedictines + this = title:d_hirsau_benedictines + this = title:d_princely_benedictines + this = title:d_ripollese_benedictines + this = title:d_anianian_benedictines + this = title:d_st_denis_benedictines + this = title:d_corbine_benedictines + this = title:d_gurloesian_benedictines + this = title:d_gallic_benedictines + this = title:d_latin_benedictines + this = title:d_ugo_benedictines + this = title:d_glagolitic_benedictines + this = title:d_martinian_benedictines + this = title:d_edgaric_benedictines + this = title:d_pastoral_benedictines + this = title:d_norman_benedictines + this = title:d_augustinian_canons + this = title:d_fontevraud_order + this = title:d_dominicans # Blackfriars: the black template includes the black-and-white habits + } +} + +portrait_pam_white_habit_order_title_trigger = { + OR = { + this = title:d_carthusians + this = title:d_premonstratensians + this = title:d_cistercians + this = title:d_norman_cistercians + this = title:d_baltic_cistercians + this = title:d_iberian_cistercians + this = title:d_eastern_cistercians + this = title:d_eremetic_benedictines # Romualdine hermits, precursors of the white-clad Camaldolese + } +} + +portrait_pam_gray_habit_order_title_trigger = { + this = title:d_tironensians # The Grey Monks of Tiron +} + +portrait_pam_brown_habit_order_title_trigger = { + OR = { + this = title:d_vallombrosans + this = title:d_franciscans + this = title:d_carmelites + # Insular abbeys: undyed wool habits + this = title:d_ulaid_monasteries + this = title:d_midlands_monasteries + this = title:d_gaelic_columbans + this = title:d_brythonic_abbeys + this = title:d_gaelic_abbeys + } +} + +portrait_pam_camaldolese_order_title_trigger = { + this = title:d_camaldolese +} + +# Ruler of a historical monastic order, or a monk/nun in its court. +portrait_pam_monastic_order_member_trigger = { + OR = { + AND = { + government_has_flag = government_is_monastic_holy_order + primary_title ?= { $ORDER_TITLE_TRIGGER$ = yes } + } + AND = { + employer ?= { + government_has_flag = government_is_monastic_holy_order + primary_title ?= { $ORDER_TITLE_TRIGGER$ = yes } + } + portrait_religious_devoted_trigger = yes + } + } +} + portrait_religious_high_trigger = { exists = this OR = { has_character_flag = need_priest_outfit is_theocratic_lessee = yes AND = { - is_ruler = yes + exists = primary_title # Check exists = primary_title instead of is_ruler, as dead characters aren't rulers government_has_flag = government_is_theocracy } AND = { @@ -2903,10 +3060,97 @@ portrait_religious_high_trigger = { } } } + # Ordained clerics dress as priests, unless they rise to lay rule + AND = { + portrait_has_trait_trigger = { TRAIT = cleric } + OR = { + is_ruler = no + pam_is_clergy_ruler_trigger = yes + } + } } NOT = { - faith = { - has_doctrine_parameter = vows_of_poverty_active + rite = { + rite_has_parameter = vows_of_poverty_active + } + } +} + +portrait_is_archbishop_trigger = { + exists = this + exists = primary_title # Check exists = primary_title instead of is_ruler, as dead characters aren't rulers + government_has_flag = government_is_theocracy + OR = { + any_held_title = { + has_clerical_region = yes + } + primary_title = { + has_clerical_region = yes + } + } +} + +portrait_is_prince_bishop_trigger = { + exists = this + is_landed = yes + government_has_flag = government_is_theocracy + any_held_title = { + tier = tier_county + } + portrait_is_archbishop_trigger = no +} + +portrait_is_kingdom_bishop_trigger = { + exists = this + highest_held_title_tier < tier_county + has_council_position = councillor_court_chaplain + liege ?= { + highest_held_title_tier >= tier_kingdom + } +} + +portrait_is_cardinal_trigger = { + exists = this + has_pam_dlc_trigger = yes + exists = clerical_elector_title + portrait_religious_head_no_poverty_trigger = no + NOT = { + rite = { + rite_has_parameter = vows_of_poverty_active + } + } +} + +# Shared with the no_cloak weight cut in 06_cloaks_special.txt +portrait_pam_prelate_cope_trigger = { + exists = this + has_pam_dlc_trigger = yes + is_female = no # The cope has no female variant + portrait_religious_western_christian_trigger = yes + portrait_is_cardinal_trigger = no + NOT = { + rite = { + rite_has_parameter = vows_of_poverty_active + } + } + OR = { + portrait_religious_head_popes_trigger = yes + AND = { + portrait_religious_high_trigger = yes + OR = { + portrait_is_archbishop_trigger = yes + portrait_is_prince_bishop_trigger = yes + portrait_is_kingdom_bishop_trigger = yes + } + } + } + NOR = { + has_character_modifier = vow_of_poverty_modifier + should_be_naked_trigger = yes + portrait_wear_armor_trigger = yes + AND = { + portrait_sickness_trigger = yes + portrait_beautified_trigger = no } } } @@ -2914,7 +3158,7 @@ portrait_religious_high_trigger = { portrait_iconoclast_high_trigger = { exists = this AND = { - faith = { has_doctrine = tenet_aniconism } + rite = { rite_has_tenet = tenet_aniconism } faith = { OR = { religion_tag = eastern_orthodox_religion religion_tag = catholic_religion religion_tag = protestant_religion religion_tag = oriental_orthodox_religion } } } OR = { @@ -2927,8 +3171,8 @@ portrait_iconoclast_high_trigger = { has_council_position = councillor_court_chaplain } NOT = { - faith = { - has_doctrine_parameter = vows_of_poverty_active + rite = { + rite_has_parameter = vows_of_poverty_active } } } @@ -2973,33 +3217,41 @@ portrait_religious_high_headgear_trigger = { } } NOT = { - faith = { - has_doctrine_parameter = vows_of_poverty_active + rite = { + rite_has_parameter = vows_of_poverty_active } } } +# Includes Challenger HoFs portrait_religious_head_trigger = { exists = this - primary_title ?= { - is_head_of_faith = yes + OR = { + primary_title ?= { + is_head_of_faith = yes + } + has_character_flag = antipope_flag } NOT = { - faith = { - has_doctrine_parameter = vows_of_poverty_active + rite = { + rite_has_parameter = vows_of_poverty_active } } } portrait_religious_head_no_poverty_trigger = { exists = this - primary_title ?= { - is_head_of_faith = yes + OR = { + primary_title ?= { + is_head_of_faith = yes + } + has_character_flag = antipope_flag } } portrait_religious_head_popes_trigger = { exists = this + # Every held-title check is paired with a primary_title one, as dead characters hold no titles OR = { AND = { OR = { @@ -3007,13 +3259,20 @@ portrait_religious_head_popes_trigger = { faith = faith:roman_catholic } is_adult = yes - primary_title ?= { - is_head_of_faith = yes + OR = { + any_held_title ?= { + is_head_of_faith = yes + } + primary_title ?= { + is_head_of_faith = yes + } } } any_equipped_character_artifact = { has_variable = pope_hat } + has_title = title:k_papal_state + primary_title ?= title:k_papal_state } } @@ -3024,8 +3283,8 @@ portrait_religious_head_ruler_trigger = { } is_ruler = yes NOT = { - faith = { - has_doctrine_parameter = vows_of_poverty_active + rite = { + rite_has_parameter = vows_of_poverty_active } } } @@ -3051,23 +3310,68 @@ portrait_religious_faith_or_foundational_trigger = { portrait_religious_christian_trigger = { OR = { - religion = religion:catholic_religion religion = religion:eastern_orthodox_religion + religion = religion:catholic_religion religion = religion:protestant_religion religion = religion:oriental_orthodox_religion } } portrait_religious_catholic_trigger = { - religion = religion:catholic_religion + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:roman_catholic } + } } +# Eastern Christian: Orthodox, Miaphysite, Church of the East, Iconoclast, Bogomilist, Paulician, Messalian, etc. +# Rite doctrine, not faith: Chalcedonian christian_faith has rites of both traditions portrait_religious_orthodox_trigger = { OR = { - faith = faith:chaldean - faith = faith:greek_catholic - religion = religion:eastern_orthodox_religion - religion = religion:oriental_orthodox_religion + rite = { + rite_has_doctrine = special_doctrine_is_eastern_christian_faith + } + portrait_christian_faith_orthodox_trigger = yes + } +} + +# Western Christian: Catholic, Cathar, Waldensian, Lollard, Adamites, Bosnian Church, Adoptionist, Conversos, etc. +# Rite doctrine, not faith, with a culture fallback for the doctrine-less Chalcedonian faith +portrait_religious_western_christian_trigger = { + OR = { + rite = { + rite_has_doctrine = special_doctrine_is_western_christian_faith + } + AND = { + portrait_religious_christian_trigger = yes + NOT = { portrait_religious_orthodox_trigger = yes } + } + } +} + +portrait_christian_faith_orthodox_trigger = { + AND = { # Fallback for the generic Chalcedonian christian_faith (no Western/Eastern doctrine). + faith = faith:christian_faith + OR = { # 867 start date + culture = culture:greek + culture = culture:bulgarian + } + } +} + +portrait_religious_orthodox_landed_clergy_trigger = { + exists = this + portrait_religious_orthodox_trigger = yes + OR = { + is_ruler = yes + AND = { # Vassal of a king+ ruler + liege != root + liege.highest_held_title_tier >= tier_empire + is_clergy = yes + } + } + OR = { + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy } } @@ -3083,6 +3387,33 @@ portrait_religious_muslim_trigger = { religion = religion:islam_religion } +portrait_western_christian_clean_shaven_clergy_trigger = { + exists = this + portrait_religious_western_christian_trigger = yes + OR = { + portrait_religious_devoted_trigger = yes + portrait_religious_high_trigger = yes + portrait_religious_high_no_poverty_trigger = yes + } + NOT = { has_trait = order_member } +} + +# Used by the +200 weight entries in 01_beards_base.txt +should_always_have_beard_trigger = { + OR = { + scope:faith.religion = religion:islam_religion + is_culture_or_descended_from_trigger = { CULTURE = culture:emishi } + AND = { + portrait_religious_orthodox_trigger = yes + OR = { + portrait_religious_devoted_trigger = yes + portrait_religious_high_trigger = yes + portrait_religious_high_no_poverty_trigger = yes + } + } + } +} + portrait_religious_norse_trigger = { religion = religion:folkgerman_religion } @@ -3106,8 +3437,7 @@ portrait_religious_sami_trigger = { portrait_religious_emishi_trigger = { has_cp7_dlc_trigger = yes - always = no -# religion = religion:kamuyism_religion + religion = religion:kamuyism_religion } portrait_religious_shamanism_trigger = { # technically this just makes it so shamanists wear vanilla steppe religious clothing so probably doesn't need a dlc check @@ -3129,7 +3459,7 @@ portrait_religious_steppe_trigger = { # religion = religion:tani_religion religion = religion:mediterranean_religion # faith = { -# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:old_bon } +# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:bon_faith } # } } } @@ -3138,7 +3468,7 @@ portrait_religious_buddhist_trigger = { OR = { religion = religion:buddhism_religion # faith = { -# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:bon } +# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:bon_faith } # } } } @@ -3161,7 +3491,7 @@ portrait_religious_zoroastrian_trigger = { # religion = religion:yazidi_religion # religion = religion:zunism_religion # faith = { -# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mandeaism } +# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mandaean_faith } # } # religion = religion:dualism_religion # religion = religion:basque_religion @@ -3362,6 +3692,39 @@ use_longsword_default_trigger = { culture = { has_cultural_pillar = heritage_japonic } } +royal_councillor_or_regent_trigger = { + OR = { + AND = { + is_councillor = yes + liege = { + OR = { + AND = { + is_independent_ruler = yes + highest_held_title_tier >= tier_kingdom + } + tgp_is_ceremonial_liege_trigger = yes + } + } + } + tgp_is_ceremonial_regent_trigger = yes + } +} + +korea_high_rank_trigger = { + merit_level >= 5 +} + +korea_mid_rank_trigger = { + OR = { + merit_level = 4 + merit_level = 3 + } +} + +korea_low_rank_trigger = { + merit_level <= 2 +} + ### N3OW triggers ### artifact_visual_after_death_trigger = { diff --git a/common/scripted_triggers/00_coa_triggers.txt b/common/scripted_triggers/00_coa_triggers.txt index 9224646ad..0bdbaa2bb 100644 --- a/common/scripted_triggers/00_coa_triggers.txt +++ b/common/scripted_triggers/00_coa_triggers.txt @@ -75,14 +75,18 @@ coa_castilian_trigger = { coa_coptic_trigger = { always = no # OR = { -# scope:faith = faith:coptic +# scope:faith.main_rite ?= rite:coptic_rite +# AND = { +# exists = root +# rite ?= rite:coptic_rite +# } # } } coa_cross_trigger = { scope:faith = { OR = { religion = religion:catholic_religion religion = religion:eastern_orthodox_religion religion = religion:protestant_religion religion = religion:oriental_orthodox_religion } - NOT = { has_doctrine = tenet_aniconism } + NOT = { main_rite = { rite_has_tenet = tenet_aniconism } } } } @@ -347,198 +351,198 @@ has_recognizable_chinese_seal = { limit = { exists = scope:title } scope:title = { is_noble_family_title = yes } } - house ?= { + dynasty ?= { OR = { ### CHINESE ### - has_base_name = "dynn_Bai_767D" - has_base_name = "dynn_Cai_8521" - has_base_name = "dynn_Cao_66F9" - has_base_name = "dynn_Chen_9673" - has_base_name = "dynn_Cheng_7A0B" - has_base_name = "dynn_Cui_5D14" - has_base_name = "dynn_Da_5927" - has_base_name = "dynn_Dai_6234" - has_base_name = "dynn_Deng_9127" - has_base_name = "dynn_Ding_4E01" - has_base_name = "dynn_Dong_8463" - has_base_name = "dynn_Du_675C" - has_base_name = "dynn_Duan_6BB5" - has_base_name = "dynn_Fan_8303" - has_base_name = "dynn_Fang_65B9" - has_base_name = "dynn_Feng_99AE" - has_base_name = "dynn_Fu_5085" - has_base_name = "dynn_Gao_9AD8" - has_base_name = "dynn_Gong_9F94" - has_base_name = "dynn_Gu_9867" - has_base_name = "dynn_Guo_90ED" - has_base_name = "dynn_Han_97D3" - has_base_name = "dynn_Hao_90DD" - has_base_name = "dynn_He_4F55" - has_base_name = "dynn_He_8CC0" - has_base_name = "dynn_Hou_4FAF" - has_base_name = "dynn_Hu_80E1" - has_base_name = "dynn_Huang_9EC3" - has_base_name = "dynn_Jia_8CC8" - has_base_name = "dynn_Jiang_59DC" - has_base_name = "dynn_Jiang_6C5F" - has_base_name = "dynn_Jiang_8523" - has_base_name = "dynn_Jin_91D1" - has_base_name = "dynn_Kong_5B54" - has_base_name = "dynn_Lei_96F7" - has_base_name = "dynn_Li_674E" - has_base_name = "dynn_Li_9ECE" - has_base_name = "dynn_Liang_6881" - has_base_name = "dynn_Liao_5ED6" - has_base_name = "dynn_Liao_907C" - has_base_name = "dynn_Lin_6797" - has_base_name = "dynn_Liu_5289" - has_base_name = "dynn_Long_9F8D" - has_base_name = "dynn_Lu_5442" - has_base_name = "dynn_Lu_76E7" - has_base_name = "dynn_Lu_9678" - has_base_name = "dynn_Luo_7F85" - has_base_name = "dynn_Ma_99AC" - has_base_name = "dynn_Mao_6BDB" - has_base_name = "dynn_Meng_5B5F" - has_base_name = "dynn_Meng_8499" - has_base_name = "dynn_Mo_83AB" - has_base_name = "dynn_Nan_5357" - has_base_name = "dynn_Nangong_5357" - has_base_name = "dynn_Ou_6B50" - has_base_name = "dynn_Pan_6F58" - has_base_name = "dynn_Peng_5F6D" - has_base_name = "dynn_Po_6734" - has_base_name = "dynn_Qian_9322" - has_base_name = "dynn_Qin_79E6" - has_base_name = "dynn_Qiu_90B1" - has_base_name = "dynn_Quan_6B0A" - has_base_name = "dynn_Ren_4EFB" - has_base_name = "dynn_Shan_55AE" - has_base_name = "dynn_Shao_90B5" - has_base_name = "dynn_Shen_6C88" - has_base_name = "dynn_Shi_53F2" - has_base_name = "dynn_Shi_77F3" - has_base_name = "dynn_Situ_53F8_5F92" - has_base_name = "dynn_Song_5B8B" - has_base_name = "dynn_Su_8607" - has_base_name = "dynn_Sun_5B6B" - has_base_name = "dynn_Tan_8983" - has_base_name = "dynn_Tan_8B5A" - has_base_name = "dynn_Tang_5510" - has_base_name = "dynn_Tao_9676" - has_base_name = "dynn_Tian_7530" - has_base_name = "dynn_Wan_842C" - has_base_name = "dynn_Wang_6C6A" - has_base_name = "dynn_Wang_738B" - has_base_name = "dynn_Wei_97CB" - has_base_name = "dynn_Wei_9B4F" - has_base_name = "dynn_Wen_6587" - has_base_name = "dynn_Wu_5433" - has_base_name = "dynn_Wu_6B66" - has_base_name = "dynn_Xia_590F" - has_base_name = "dynn_Xiang_5411" - has_base_name = "dynn_Xiao_856D" - has_base_name = "dynn_Xie_8B1D" - has_base_name = "dynn_Xie_90aa" - has_base_name = "dynn_Xi_897F" - has_base_name = "dynn_Xin_8F9B" - has_base_name = "dynn_Xiong_718A" - has_base_name = "dynn_Xu_5F90" - has_base_name = "dynn_Xu_8A31" - has_base_name = "dynn_Xue_859B" - has_base_name = "dynn_Yan_56B4" - has_base_name = "dynn_Yan_95BB" - has_base_name = "dynn_Yang_694A" - has_base_name = "dynn_Yao_59DA" - has_base_name = "dynn_Ye_8449" - has_base_name = "dynn_Yin_5C39" - has_base_name = "dynn_Yu_4E8E" - has_base_name = "dynn_Yu_4F59" - has_base_name = "dynn_Yuan_8881" - has_base_name = "dynn_Yue_8D8A" - has_base_name = "dynn_Zeng_66FE" - has_base_name = "dynn_Zhang_5F35" - has_base_name = "dynn_Zhao_8A54" - has_base_name = "dynn_Zhao_8D99" - has_base_name = "dynn_Zheng_912D" - has_base_name = "dynn_Zhong_937E" - has_base_name = "dynn_Zhou_5468" - has_base_name = "dynn_Zhu_6731" - has_base_name = "dynn_Zou_9112" + dynasty_has_base_name = "dynn_Bai_767D" + dynasty_has_base_name = "dynn_Cai_8521" + dynasty_has_base_name = "dynn_Cao_66F9" + dynasty_has_base_name = "dynn_Chen_9673" + dynasty_has_base_name = "dynn_Cheng_7A0B" + dynasty_has_base_name = "dynn_Cui_5D14" + dynasty_has_base_name = "dynn_Da_5927" + dynasty_has_base_name = "dynn_Dai_6234" + dynasty_has_base_name = "dynn_Deng_9127" + dynasty_has_base_name = "dynn_Ding_4E01" + dynasty_has_base_name = "dynn_Dong_8463" + dynasty_has_base_name = "dynn_Du_675C" + dynasty_has_base_name = "dynn_Duan_6BB5" + dynasty_has_base_name = "dynn_Fan_8303" + dynasty_has_base_name = "dynn_Fang_65B9" + dynasty_has_base_name = "dynn_Feng_99AE" + dynasty_has_base_name = "dynn_Fu_5085" + dynasty_has_base_name = "dynn_Gao_9AD8" + dynasty_has_base_name = "dynn_Gong_9F94" + dynasty_has_base_name = "dynn_Gu_9867" + dynasty_has_base_name = "dynn_Guo_90ED" + dynasty_has_base_name = "dynn_Han_97D3" + dynasty_has_base_name = "dynn_Hao_90DD" + dynasty_has_base_name = "dynn_He_4F55" + dynasty_has_base_name = "dynn_He_8CC0" + dynasty_has_base_name = "dynn_Hou_4FAF" + dynasty_has_base_name = "dynn_Hu_80E1" + dynasty_has_base_name = "dynn_Huang_9EC3" + dynasty_has_base_name = "dynn_Jia_8CC8" + dynasty_has_base_name = "dynn_Jiang_59DC" + dynasty_has_base_name = "dynn_Jiang_6C5F" + dynasty_has_base_name = "dynn_Jiang_8523" + dynasty_has_base_name = "dynn_Jin_91D1" + dynasty_has_base_name = "dynn_Kong_5B54" + dynasty_has_base_name = "dynn_Lei_96F7" + dynasty_has_base_name = "dynn_Li_674E" + dynasty_has_base_name = "dynn_Li_9ECE" + dynasty_has_base_name = "dynn_Liang_6881" + dynasty_has_base_name = "dynn_Liao_5ED6" + dynasty_has_base_name = "dynn_Liao_907C" + dynasty_has_base_name = "dynn_Lin_6797" + dynasty_has_base_name = "dynn_Liu_5289" + dynasty_has_base_name = "dynn_Long_9F8D" + dynasty_has_base_name = "dynn_Lu_5442" + dynasty_has_base_name = "dynn_Lu_76E7" + dynasty_has_base_name = "dynn_Lu_9678" + dynasty_has_base_name = "dynn_Luo_7F85" + dynasty_has_base_name = "dynn_Ma_99AC" + dynasty_has_base_name = "dynn_Mao_6BDB" + dynasty_has_base_name = "dynn_Meng_5B5F" + dynasty_has_base_name = "dynn_Meng_8499" + dynasty_has_base_name = "dynn_Mo_83AB" + dynasty_has_base_name = "dynn_Nan_5357" + dynasty_has_base_name = "dynn_Nangong_5357" + dynasty_has_base_name = "dynn_Ou_6B50" + dynasty_has_base_name = "dynn_Pan_6F58" + dynasty_has_base_name = "dynn_Peng_5F6D" + dynasty_has_base_name = "dynn_Po_6734" + dynasty_has_base_name = "dynn_Qian_9322" + dynasty_has_base_name = "dynn_Qin_79E6" + dynasty_has_base_name = "dynn_Qiu_90B1" + dynasty_has_base_name = "dynn_Quan_6B0A" + dynasty_has_base_name = "dynn_Ren_4EFB" + dynasty_has_base_name = "dynn_Shan_55AE" + dynasty_has_base_name = "dynn_Shao_90B5" + dynasty_has_base_name = "dynn_Shen_6C88" + dynasty_has_base_name = "dynn_Shi_53F2" + dynasty_has_base_name = "dynn_Shi_77F3" + dynasty_has_base_name = "dynn_Situ_53F8_5F92" + dynasty_has_base_name = "dynn_Song_5B8B" + dynasty_has_base_name = "dynn_Su_8607" + dynasty_has_base_name = "dynn_Sun_5B6B" + dynasty_has_base_name = "dynn_Tan_8983" + dynasty_has_base_name = "dynn_Tan_8B5A" + dynasty_has_base_name = "dynn_Tang_5510" + dynasty_has_base_name = "dynn_Tao_9676" + dynasty_has_base_name = "dynn_Tian_7530" + dynasty_has_base_name = "dynn_Wan_842C" + dynasty_has_base_name = "dynn_Wang_6C6A" + dynasty_has_base_name = "dynn_Wang_738B" + dynasty_has_base_name = "dynn_Wei_97CB" + dynasty_has_base_name = "dynn_Wei_9B4F" + dynasty_has_base_name = "dynn_Wen_6587" + dynasty_has_base_name = "dynn_Wu_5433" + dynasty_has_base_name = "dynn_Wu_6B66" + dynasty_has_base_name = "dynn_Xia_590F" + dynasty_has_base_name = "dynn_Xiang_5411" + dynasty_has_base_name = "dynn_Xiao_856D" + dynasty_has_base_name = "dynn_Xie_8B1D" + dynasty_has_base_name = "dynn_Xie_90aa" + dynasty_has_base_name = "dynn_Xi_897F" + dynasty_has_base_name = "dynn_Xin_8F9B" + dynasty_has_base_name = "dynn_Xiong_718A" + dynasty_has_base_name = "dynn_Xu_5F90" + dynasty_has_base_name = "dynn_Xu_8A31" + dynasty_has_base_name = "dynn_Xue_859B" + dynasty_has_base_name = "dynn_Yan_56B4" + dynasty_has_base_name = "dynn_Yan_95BB" + dynasty_has_base_name = "dynn_Yang_694A" + dynasty_has_base_name = "dynn_Yao_59DA" + dynasty_has_base_name = "dynn_Ye_8449" + dynasty_has_base_name = "dynn_Yin_5C39" + dynasty_has_base_name = "dynn_Yu_4E8E" + dynasty_has_base_name = "dynn_Yu_4F59" + dynasty_has_base_name = "dynn_Yuan_8881" + dynasty_has_base_name = "dynn_Yue_8D8A" + dynasty_has_base_name = "dynn_Zeng_66FE" + dynasty_has_base_name = "dynn_Zhang_5F35" + dynasty_has_base_name = "dynn_Zhao_8A54" + dynasty_has_base_name = "dynn_Zhao_8D99" + dynasty_has_base_name = "dynn_Zheng_912D" + dynasty_has_base_name = "dynn_Zhong_937E" + dynasty_has_base_name = "dynn_Zhou_5468" + dynasty_has_base_name = "dynn_Zhu_6731" + dynasty_has_base_name = "dynn_Zou_9112" ### KOREAN/BALHAE ### - has_base_name = "dynn_An_694A" - has_base_name = "dynn_Baek_767D" - has_base_name = "dynn_Bak_6734" - has_base_name = "dynn_Chae_8521" - has_base_name = "dynn_Choe_5D14" - has_base_name = "dynn_Dae_5927" - has_base_name = "dynn_Du_675C_KO" - has_base_name = "dynn_Gang_59DC" - has_base_name = "dynn_Gim_91D1" - has_base_name = "dynn_Go_9AD8" - has_base_name = "dynn_Gwak_90ED" - has_base_name = "dynn_Gwon_6B0A" - has_base_name = "dynn_Ha_590F" - has_base_name = "dynn_Ha_8CC0" - has_base_name = "dynn_Han_97D3_KO" - has_base_name = "dynn_I_674E" - has_base_name = "dynn_Im_4EFB" - has_base_name = "dynn_Jang_5F35" - has_base_name = "dynn_Jeong_912D" - has_base_name = "dynn_Jo_8D99" - has_base_name = "dynn_Ju_5468" - has_base_name = "dynn_Ju_6731" - has_base_name = "dynn_Ma_99AC_KO" - has_base_name = "dynn_Mun_6587" - has_base_name = "dynn_O_5433" - has_base_name = "dynn_Pung_99AE" - has_base_name = "dynn_Ra_7F85" - has_base_name = "dynn_Rim_6797" - has_base_name = "dynn_Sa_53F2" - has_base_name = "dynn_Seo_5F90" - has_base_name = "dynn_Sin_8F9B" - has_base_name = "dynn_Song_5B8B_KO" - has_base_name = "dynn_Wang_738B_KO" - has_base_name = "dynn_Yang_6881" - has_base_name = "dynn_Yang_694A_KO" - has_base_name = "dynn_Yeo_5442" - has_base_name = "dynn_Yu_5289" - has_base_name = "dynn_Yun_5C39" + dynasty_has_base_name = "dynn_An_694A" + dynasty_has_base_name = "dynn_Baek_767D" + dynasty_has_base_name = "dynn_Bak_6734" + dynasty_has_base_name = "dynn_Chae_8521" + dynasty_has_base_name = "dynn_Choe_5D14" + dynasty_has_base_name = "dynn_Dae_5927" + dynasty_has_base_name = "dynn_Du_675C_KO" + dynasty_has_base_name = "dynn_Gang_59DC" + dynasty_has_base_name = "dynn_Gim_91D1" + dynasty_has_base_name = "dynn_Go_9AD8" + dynasty_has_base_name = "dynn_Gwak_90ED" + dynasty_has_base_name = "dynn_Gwon_6B0A" + dynasty_has_base_name = "dynn_Ha_590F" + dynasty_has_base_name = "dynn_Ha_8CC0" + dynasty_has_base_name = "dynn_Han_97D3_KO" + dynasty_has_base_name = "dynn_I_674E" + dynasty_has_base_name = "dynn_Im_4EFB" + dynasty_has_base_name = "dynn_Jang_5F35" + dynasty_has_base_name = "dynn_Jeong_912D" + dynasty_has_base_name = "dynn_Jo_8D99" + dynasty_has_base_name = "dynn_Ju_5468" + dynasty_has_base_name = "dynn_Ju_6731" + dynasty_has_base_name = "dynn_Ma_99AC_KO" + dynasty_has_base_name = "dynn_Mun_6587" + dynasty_has_base_name = "dynn_O_5433" + dynasty_has_base_name = "dynn_Pung_99AE" + dynasty_has_base_name = "dynn_Ra_7F85" + dynasty_has_base_name = "dynn_Rim_6797" + dynasty_has_base_name = "dynn_Sa_53F2" + dynasty_has_base_name = "dynn_Seo_5F90" + dynasty_has_base_name = "dynn_Sin_8F9B" + dynasty_has_base_name = "dynn_Song_5B8B_KO" + dynasty_has_base_name = "dynn_Wang_738B_KO" + dynasty_has_base_name = "dynn_Yang_6881" + dynasty_has_base_name = "dynn_Yang_694A_KO" + dynasty_has_base_name = "dynn_Yeo_5442" + dynasty_has_base_name = "dynn_Yu_5289" + dynasty_has_base_name = "dynn_Yun_5C39" ### VIET ### - has_base_name = "dynn_Bach_767D" - has_base_name = "dynn_Cao_9AD8" - has_base_name = "dynn_Chu_6731" - has_base_name = "dynn_Dao_9676" - has_base_name = "dynn_Dinh_4E01" - has_base_name = "dynn_Doan_6BB5" - has_base_name = "dynn_Dong_8463_VN" - has_base_name = "dynn_Duong_694A" - has_base_name = "dynn_Ha_4F55" - has_base_name = "dynn_Ho_80E1" - has_base_name = "dynn_Hoang_9EC3" - has_base_name = "dynn_Lam_6797" - has_base_name = "dynn_Le_9ECE" - has_base_name = "dynn_Loi_96F7" - has_base_name = "dynn_Luu_5289" - has_base_name = "dynn_Ly_674E" - has_base_name = "dynn_Mac_83AB" - has_base_name = "dynn_Ngo_5433" - has_base_name = "dynn_Phan_6F58" - has_base_name = "dynn_Pham_8303" - has_base_name = "dynn_Phung_99AE" - has_base_name = "dynn_Quach_90ED" - has_base_name = "dynn_Quyen_6B0A" - has_base_name = "dynn_Ta_8B1D" - has_base_name = "dynn_To_8607" - has_base_name = "dynn_Ton_5B6B" - has_base_name = "dynn_Tong_5B8B" - has_base_name = "dynn_Tran_9673" - has_base_name = "dynn_Trieu_8D99" - has_base_name = "dynn_Trinh_912D" - has_base_name = "dynn_Truong_5F35" - has_base_name = "dynn_Van_6587" - has_base_name = "dynn_Vu_6B66" - has_base_name = "dynn_Vuong_738B" + dynasty_has_base_name = "dynn_Bach_767D" + dynasty_has_base_name = "dynn_Cao_9AD8" + dynasty_has_base_name = "dynn_Chu_6731" + dynasty_has_base_name = "dynn_Dao_9676" + dynasty_has_base_name = "dynn_Dinh_4E01" + dynasty_has_base_name = "dynn_Doan_6BB5" + dynasty_has_base_name = "dynn_Dong_8463_VN" + dynasty_has_base_name = "dynn_Duong_694A" + dynasty_has_base_name = "dynn_Ha_4F55" + dynasty_has_base_name = "dynn_Ho_80E1" + dynasty_has_base_name = "dynn_Hoang_9EC3" + dynasty_has_base_name = "dynn_Lam_6797" + dynasty_has_base_name = "dynn_Le_9ECE" + dynasty_has_base_name = "dynn_Loi_96F7" + dynasty_has_base_name = "dynn_Luu_5289" + dynasty_has_base_name = "dynn_Ly_674E" + dynasty_has_base_name = "dynn_Mac_83AB" + dynasty_has_base_name = "dynn_Ngo_5433" + dynasty_has_base_name = "dynn_Phan_6F58" + dynasty_has_base_name = "dynn_Pham_8303" + dynasty_has_base_name = "dynn_Phung_99AE" + dynasty_has_base_name = "dynn_Quach_90ED" + dynasty_has_base_name = "dynn_Quyen_6B0A" + dynasty_has_base_name = "dynn_Ta_8B1D" + dynasty_has_base_name = "dynn_To_8607" + dynasty_has_base_name = "dynn_Ton_5B6B" + dynasty_has_base_name = "dynn_Tong_5B8B" + dynasty_has_base_name = "dynn_Tran_9673" + dynasty_has_base_name = "dynn_Trieu_8D99" + dynasty_has_base_name = "dynn_Trinh_912D" + dynasty_has_base_name = "dynn_Truong_5F35" + dynasty_has_base_name = "dynn_Van_6587" + dynasty_has_base_name = "dynn_Vu_6B66" + dynasty_has_base_name = "dynn_Vuong_738B" } } } diff --git a/common/scripted_triggers/00_councillor_triggers.txt b/common/scripted_triggers/00_councillor_triggers.txt index ab66629f5..500d609ac 100644 --- a/common/scripted_triggers/00_councillor_triggers.txt +++ b/common/scripted_triggers/00_councillor_triggers.txt @@ -33,11 +33,17 @@ can_be_councillor_gender_trigger = { has_variable = can_be_councillor_override AND = { is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } + } + AND = { + is_female = yes + $COURT_OWNER$ = { + has_personal_tenet_flag = tenet_hyperdulia_women_can_be_councillors + } } AND = { is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } } } } @@ -49,7 +55,7 @@ can_be_chancellor_trigger = { } NAND = { has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } + rite = { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -68,7 +74,7 @@ can_be_steward_trigger = { } NAND = { has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } + rite = { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -88,7 +94,7 @@ can_be_marshal_trigger = { is_hostage = no NAND = { has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } + rite = { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -110,7 +116,7 @@ can_be_spymaster_trigger = { can_be_councillor_basics_trigger = yes NAND = { has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } + rite = { rite_has_parameter = clerical_appointment_fixed } } NOR = { has_council_position = councillor_spouse @@ -135,11 +141,11 @@ can_be_court_chaplain_trigger = { liege = { has_diarchy_active_parameter = diarchy_is_vizierate } } } - $COURT_OWNER$.faith = { has_allowed_gender_for_clergy = scope:court_chaplain_check } - faith = $COURT_OWNER$.faith + $COURT_OWNER$.rite = { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check } + rite = $COURT_OWNER$.rite trigger_if = { limit = { - faith = { has_doctrine = doctrine_theocracy_temporal } + rite = { rite_has_doctrine = doctrine_theocracy_temporal } } OR = { is_ruler = no @@ -158,6 +164,48 @@ can_be_court_chaplain_trigger = { } NOT = { has_trait = excommunicated } } + trigger_if = { # Married characters are excluded if the doctrine is not there + limit = { + rite = { + NOT = { rite_has_parameter = clergy_can_marry } + } + } + is_married = no + } +} + +# Shared with the chaplain position's can_fire, can_reassign and can_change_once +can_appoint_own_court_chaplain_trigger = { + OR = { + religious_head_or_challenger ?= this # The appointment authority itself has no one to request a chaplain from + rite = { + NOT = { rite_has_parameter = clerical_appointment_fixed } + } + tgp_has_access_to_ministry_trigger = yes + } +} + +# Whether this character is a suitable landed Realm Priest for $COURT_OWNER$. +can_be_landed_realm_priest_trigger = { + is_vassal_of = $COURT_OWNER$ # liege resolves to self for independent rulers, so don't compare lieges here + is_physically_able_adult = yes + government_has_flag = government_is_theocracy + rite = $COURT_OWNER$.rite + can_be_court_chaplain_trigger = { COURT_OWNER = $COURT_OWNER$ } +} + +court_chaplain_endorse_override_trigger = { + trigger_if = { + limit = { exists = scope:ruler } + OR = { + scope:ruler = { has_strong_hook = scope:lessee } + puppeteer ?= scope:ruler + } + } + trigger_else = { + liege = { has_strong_hook = prev } + puppeteer ?= liege + } } can_be_spouse_councillor_trigger = { @@ -218,11 +266,11 @@ can_be_kurultai_trigger = { is_ruler = yes AND = { is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } } AND = { is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } } AND = { has_trait = shieldmaiden @@ -265,11 +313,11 @@ can_be_any_kurultai_trigger = { is_ruler = yes AND = { is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } } } AND = { is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } + $COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } } } AND = { has_trait = shieldmaiden @@ -388,10 +436,10 @@ can_be_fired_from_council_trigger = { has_council_position = councillor_court_chaplain liege = { tgp_has_access_to_ministry_trigger = no } } - faith = { + rite = { OR = { - has_doctrine = doctrine_clerical_succession_temporal_appointment - has_doctrine = doctrine_clerical_succession_spiritual_appointment + rite_has_doctrine = doctrine_clerical_succession_temporal_appointment + rite_has_doctrine = doctrine_clerical_succession_spiritual_appointment } } } @@ -709,7 +757,7 @@ spouse_learning_tier_1_trigger = { OR = { has_character_modifier = councillor_spouse_learning_2_modifier has_character_modifier = councillor_spouse_learning_1_modifier - has_trait = scholar + has_trait = erudite learning >= spouse_skill_rating_1 is_performing_council_task = task_patronage } @@ -724,7 +772,7 @@ spouse_learning_tier_2_trigger = { } OR = { has_character_modifier = councillor_spouse_learning_2_modifier - has_trait = scholar + has_trait = erudite learning >= spouse_skill_rating_3 AND = { is_performing_council_task = task_patronage @@ -732,7 +780,7 @@ spouse_learning_tier_2_trigger = { learning >= spouse_skill_rating_2 has_character_modifier = councillor_spouse_learning_2_modifier has_character_modifier = councillor_spouse_learning_1_modifier - has_trait = scholar + has_trait = erudite } } } @@ -746,14 +794,14 @@ spouse_learning_tier_3_trigger = { value > 50 } OR = { - has_trait = scholar + has_trait = erudite learning >= spouse_skill_rating_4 AND = { is_performing_council_task = task_patronage OR = { learning >= spouse_skill_rating_2 has_character_modifier = councillor_spouse_learning_2_modifier - has_trait = scholar + has_trait = erudite } } } @@ -967,6 +1015,305 @@ steward_task_county_corruption_county_trigger = { } } +# expect scope:councillor_liege, scope:councillor +task_conversion_valid_county_trigger = { + is_landless_type_title = no + save_temporary_scope_as = county_check + # Liege rite when the county will convert into the liege's faith + trigger_if = { + limit = { + OR = { + scope:councillor_liege = { + tgp_has_access_to_ministry_trigger = yes + } + faith = scope:councillor_liege.faith + scope:councillor.faith = scope:councillor_liege.faith + } + } + custom_tooltip = { + text = task_conversion.tt.county_rite_already_matches_liege + rite != scope:councillor_liege.rite + } + } + trigger_else = { + custom_tooltip = { + text = task_conversion.tt.county_rite_already_matches_chaplain + rite != scope:councillor.rite + } + } + + trigger_if = { + limit = { + scope:councillor_liege = { + is_alive = yes + has_variable = hold_court_8120_religion_block + } + } + custom_tooltip = { + text = hold_court_8120_conversion_tt + faith != scope:councillor_liege.var:hold_court_8120_religion_block + } + } + custom_description = { # Vassal Contract forbids meddling by liege + text = "is_protected_via_contract_self_or_liege" + subject = holder + # don't "protect" same faith in edge cases + trigger_if = { + limit = { + scope:county_check.holder = { is_vassal_or_below_of = scope:councillor_liege } + scope:councillor_liege.faith != scope:county_check.holder.faith + } + holder = { + NOR = { + vassal_contract_has_flag = religiously_protected + any_liege_or_above = { + is_vassal_or_below_of = scope:councillor_liege + vassal_contract_has_flag = religiously_protected + } + } + } + } + } + trigger_if = { + limit = { + var:cannot_be_converted_by_value ?= scope:councillor_liege + } + custom_tooltip = { + text = promised_to_not_convert_county + NOT = { + var:cannot_be_converted_by_value ?= scope:councillor_liege + } + } + } + trigger_if = { + limit = { + scope:councillor_liege = { is_ai = yes } + OR = { + faith = scope:councillor_liege.faith + faith = scope:councillor.faith + } + } + NOT = { + rite = { has_variable = pam_rite_grace_period } + } + } + trigger_if = { + limit = { scope:councillor_liege = { is_ai = yes } } + # Unreformed Pagans do not tend to even try conversion of non-unreformed faiths unless zealous + trigger_if = { + limit = { + scope:councillor_liege = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 50 } + scope:county_check.faith = { has_doctrine_parameter = unreformed } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } + # Do not convert Righteous faiths, unless disturbingly zealous + trigger_if = { + limit = { + scope:councillor_liege = { + faith = { + faith_hostility_level = { + target = scope:county_check.faith + value <= faith_fully_accepted_level + } + } + } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { + ai_zeal >= 100 + ai_rationality <= -50 + } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } + # Converting Astray faiths only happens during certain circumstances + trigger_if = { + limit = { + scope:councillor_liege = { + faith = { + faith_hostility_level = { + target = scope:county_check.faith + value <= faith_astray_level + } + } + } + } + trigger_if = { + limit = { + scope:councillor_liege = { + has_tolerant_faith_or_culture_trigger = yes + } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 100 } + scope:county_check = { county_opinion <= -25 } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } + trigger_else_if = { + limit = { + scope:councillor_liege = { + rite = { rite_has_doctrine = doctrine_pluralism_fundamentalist } + } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 0 } + scope:county_check = { county_opinion <= -10 } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } + trigger_else = { + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 25 } + scope:county_check = { county_opinion <= -15 } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } + } + # Ash'ari in Spain tend to not convert Muwhalladi often + trigger_if = { + limit = { + scope:councillor_liege = { + faith = faith:sunni + capital_province ?= { geographical_region = world_europe_west_iberia } + scope:county_check.rite = rite:maliki + } + scope:county_check = { + title_province = { geographical_region = world_europe_west_iberia } + } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 50 } + scope:county_check = { county_opinion <= -20 } + scope:county_check = { # Always convert holy sites + any_county_province = { + barony = { + is_holy_site_of = scope:councillor_liege.faith + } + } + } + } + } + # If a ruler has Jizya tax, they'll only convert the same *religious family* when ai_zeal is really high, they're converting unreformed pagans, counties in a kingdom with a Holy Site, or others of the same religion + trigger_if = { + limit = { + scope:councillor_liege = { + OR = { + rite = { rite_has_tenet = tenet_tax_nonbelievers } + faith = { has_doctrine = special_doctrine_jizya } + } + } + scope:councillor_liege.faith = { faith_is_in_same_rf = { FAITH = scope:county_check.faith } } + } + OR = { + scope:councillor_liege = { + has_character_flag = vassal_directive_convert_faith + vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } + } + scope:councillor_liege = { ai_zeal >= 50 } + scope:county_check.faith = { has_doctrine_parameter = unreformed } + scope:councillor_liege.faith = { + any_holy_site_barony = { + kingdom = scope:county_check.kingdom + } + } + #scope:county_check.religion = scope:councillor_liege.religion # Excluded, as tax nonbelievers actually works for different faiths within the same religion + AND = { # Islamic heartlands, to help fend off encroaching faiths + scope:councillor_liege.religion = religion:islam_religion + scope:county_check.title_province = { + geographical_region = islamic_heartlands + } + } + } + } + } + # Struggle phases may sometimes restrict targets for involved characters. + trigger_if = { + # Give an exception for pre-existing conversions: these can take a while and it's not fair to lose years or decades of progress to a phase change. + limit = { + NOT = { + scope:county_check = { is_target_of_council_task = task_conversion } + } + } + NOT = { + scope:councillor_liege = { + custom_tooltip = { + text = task_conversion.tt.forbidden.due_to_struggle_phase + any_character_struggle = { + involvement = involved + is_struggle_parameter_active_secondary_county_trigger = { + PARAMETER = county_conversion_disabled_for_involved_faiths_within_region + COUNTY = scope:county_check + } + } + } + } + } + } +} + councillor_spouse_learning_2603_valid_councillor_trigger = { is_available_ai_adult = yes this != scope:councillor @@ -1085,25 +1432,8 @@ can_be_trained_as_knight_now_light_trigger = { can_be_knight_now_light_trigger = yes is_in_army = no has_contagious_deadly_disease_trigger = no - NOT = { has_trait = incapable } - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = homage_liege_scope - has_character_flag = meditation_character_flag - has_character_flag = local_shrine_rite - 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_incapable = no + is_in_activity = yes } teacher_has_trait_that_student_does_not_trigger = { diff --git a/common/scripted_triggers/00_courtier_guest_management_triggers.txt b/common/scripted_triggers/00_courtier_guest_management_triggers.txt index 645f67127..e8a8b167d 100644 --- a/common/scripted_triggers/00_courtier_guest_management_triggers.txt +++ b/common/scripted_triggers/00_courtier_guest_management_triggers.txt @@ -320,11 +320,14 @@ guest_allowed_to_arrive_trigger = { #Isn't too good for host NAND = { OR = { - any_claim = { tier = tier_empire } - any_close_family_member = { highest_held_title_tier = tier_empire } + any_claim = { tier >= tier_empire } + any_close_family_member = { highest_held_title_tier >= tier_empire } } $HOST$ = { highest_held_title_tier <= tier_county } } + + # Prevent paiza merchants from arriving as guests + NOT = { has_variable = merchant_var } } #Note: this trigger used to contain opinion triggers but then some awful rulers could never get guests because everyone hates them @@ -558,6 +561,13 @@ can_recruit_character_to_court_trigger = { } } } + custom_description = { + text = "is_paiza_merchant" + subject = scope:recruitee + scope:recruitee = { + has_variable = merchant_var + } + } } } } @@ -587,7 +597,7 @@ useful_courtier_or_guest_claim_trigger = { #The higher tier the ruler has, the longer distance is acceptable #We prefer to measure against the title's province, but if there is none, check its holder trigger_if = { - limit = { $RULER$ = { highest_held_title_tier = tier_empire } } + limit = { $RULER$ = { highest_held_title_tier >= tier_empire } } trigger_if = { limit = { exists = title_province } title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive } } @@ -791,6 +801,7 @@ pool_character_is_pruneable_trigger = { is_ai = no } has_character_flag = easteregg + has_variable = merchant_var } trigger_if = { limit = { @@ -837,14 +848,14 @@ is_courtier_or_knight_of_root = { } guest_herder_candidate_trigger = { - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder has_trait = lifestyle_seasoned_pastor trigger_if = { - limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + limit = { root.rite = { rite_has_doctrine = doctrine_gender_male_dominated } } is_male = yes } trigger_if = { - limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + limit = { root.rite = { rite_has_doctrine = doctrine_gender_female_dominated } } is_female = yes } age < 45 diff --git a/common/scripted_triggers/00_cultural_triggers.txt b/common/scripted_triggers/00_cultural_triggers.txt index c78916325..be202300c 100644 --- a/common/scripted_triggers/00_cultural_triggers.txt +++ b/common/scripted_triggers/00_cultural_triggers.txt @@ -599,7 +599,7 @@ cultures_share_relevant_region_trigger = { AND = { culture_overlaps_geographical_region = world_asia_china scope:culture = { - culture_overlaps_geographical_region = world_asia_southeast + culture_overlaps_geographical_region = world_asia_southeast_mainland } } AND = { @@ -627,7 +627,7 @@ faith_is_vegetarian_trigger = { religion = religion:jainism_religion # religion = religion:bon_religion # this = faith:mazdakism -# this = faith:manichean +# this = faith:manichaean_faith } } } @@ -648,3 +648,14 @@ culture_is_or_has_ancestor_trigger = { any_parent_culture_or_above = { this = $CULTURE$ } } } + +culture_is_historically_admin_trigger = { + OR = { + culture_is_or_has_ancestor_trigger = { CULTURE = culture:moldavian } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:banatian } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:translyvanian } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:wallachian } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:NEOW_gagauz } + culture_is_or_has_ancestor_trigger = { CULTURE = culture:NEOW_pannonisch } + } +} diff --git a/common/scripted_triggers/00_diarchy_scripted_triggers.txt b/common/scripted_triggers/00_diarchy_scripted_triggers.txt index 6a385b116..9cb8abb7f 100644 --- a/common/scripted_triggers/00_diarchy_scripted_triggers.txt +++ b/common/scripted_triggers/00_diarchy_scripted_triggers.txt @@ -111,26 +111,26 @@ is_diarch_able_trigger = { regency_for_personal_reasons_trigger = no # You'd clearly be preoccupied. trigger_if = { - limit = { exists = involved_activity } + limit = { + exists = involved_activity + # An independent candidate has no liege whose realm could clash with the activity + exists = liege + } save_temporary_scope_as = diarch_temp involved_activity.activity_location.county.holder = { - NOR = { - this = scope:diarch_temp.liege - NOT = { - any_liege_or_above = { this = scope:diarch_temp.liege } - } - } + target_is_same_character_or_above = scope:diarch_temp.liege } } + # allow diarchy of diarchy of diarchy anyway, otherwise grand secretary get broken. # If you're in a diarchy for any other reason, you need to chill. - NOT = { has_active_diarchy = yes } + # NOT = { has_active_diarchy = yes } } # And *this* needs to be added to guest activity intents to keep diarchs from showing up to the same parties as their liege. - bannable_serving_diarch_trigger = { +bannable_serving_diarch_trigger = { liege ?= { NOR = { - is_landless_adventurer = yes + is_landless_adventurer = yes has_diarchy_type = grand_secretariat } } @@ -169,15 +169,15 @@ diarch_matches_liege_faith_gender_preference_trigger = { # Female preference. AND = { is_female = yes - liege.faith = { has_doctrine = doctrine_gender_female_dominated } + liege.rite = { rite_has_doctrine = doctrine_gender_female_dominated } } # Male preference. AND = { is_male = yes - liege.faith = { has_doctrine = doctrine_gender_male_dominated } + liege.rite = { rite_has_doctrine = doctrine_gender_male_dominated } } # Equality. - liege.faith = { has_doctrine = doctrine_gender_equal } + liege.rite = { rite_has_doctrine = doctrine_gender_equal } } } @@ -186,7 +186,7 @@ diarch_matches_liege_faith_gender_preference_trigger = { basic_eligible_for_diarchy_trigger = { highest_held_title_tier >= tier_county - is_landed_or_landless_administrative = yes + is_landed_or_landless_administrative_or_theocratic = yes has_active_diarchy = no NOT = { government_has_flag = government_is_landless_adventurer } # Laamps don't use diarchs } @@ -198,7 +198,7 @@ regency_for_personal_reasons_trigger = { AND = { is_adult = no NOT = { - liege = { has_diarchy_parameter = diarchy_type_is_junior_emperorship } + liege ?= { has_diarchy_parameter = diarchy_type_is_junior_emperorship } } } is_incapable = yes @@ -326,17 +326,17 @@ diarch_swing_scales_valid_shared_hof_trigger = { # You must share a HoF to be able to petition one. custom_tooltip = { text = swing_scales_currency_interaction.tt.no_shared_hof - exists = scope:actor.faith.religious_head - exists = scope:recipient.faith.religious_head - scope:actor.faith.religious_head = scope:recipient.faith.religious_head + exists = scope:actor.religious_head_or_challenger + exists = scope:recipient.religious_head_or_challenger + scope:actor.religious_head_or_challenger = scope:recipient.religious_head_or_challenger } # And opinions've gotta line up. trigger_if = { - limit = { exists = scope:actor.faith.religious_head } + limit = { exists = scope:actor.religious_head_or_challenger } # They must like you. custom_tooltip = { text = swing_scales_currency_interaction.tt.hof_needs_to_like_you_more - scope:actor.faith.religious_head = { + scope:actor.religious_head_or_challenger = { opinion = { target = scope:actor value >= high_positive_opinion @@ -346,7 +346,7 @@ diarch_swing_scales_valid_shared_hof_trigger = { # And not like scope:recipient too much. custom_tooltip = { text = swing_scales_currency_interaction.tt.hof_needs_to_like_them_less - scope:actor.faith.religious_head = { + scope:actor.religious_head_or_challenger = { opinion = { target = scope:recipient value <= medium_positive_opinion @@ -357,7 +357,7 @@ diarch_swing_scales_valid_shared_hof_trigger = { custom_tooltip = { text = swing_scales_currency_interaction.tt.hof_refuses_to_cross_recipient NOT = { - scope:recipient = { has_strong_hook = scope:actor.faith.religious_head } + scope:recipient = { has_strong_hook = scope:actor.religious_head_or_challenger } } } } @@ -547,7 +547,7 @@ governor_can_be_called_as_ally_in_expedition_war_basic_trigger = { scope:recipient = { liege ?= scope:actor.liege # Must be a governor. - government_has_flag = government_is_special_administrative + government_has_mechanic = administrative } } @@ -572,6 +572,10 @@ liege_should_systematically_maim_co_ruler_trigger = { liege_can_maim_co_ruler_without_killing_them_trigger = yes is_diarch_of_target = scope:recipient } + AND = { + has_diarchy_active_parameter = diarchy_type_is_co_monarchy + diarch ?= scope:recipient + } } } @@ -755,10 +759,7 @@ diarch_coup_attempt_is_valid_trigger = { is_imprisoned = no is_travelling = no is_at_war = no - custom_tooltip = { - text = custom.not_attending_activity - NOT = { exists = involved_activity } - } + is_in_activity = no age >= 5 } # Support checks. @@ -801,7 +802,7 @@ diarch_coup_attempt_is_valid_showing_failure_only_trigger = { # Filter this out in advance, else we risk trying to enter a duel later, only to find we're already engaged in one. custom_description = { text = ENGAGED_IN_SINGLE_COMBAT - NOT = { exists = var:engaged_in_single_combat } + NOT = { exists = var:engaged_in_single_combat } } # Liege must have _something_ at the highest tier that isn't a HoF title. custom_tooltip = { @@ -873,6 +874,19 @@ diarch_wants_to_engage_with_mandates_trigger = { } } +is_powerful_vassal_or_house_head_trigger = { + custom_tooltip = { + text = custom_description.tt.is_power_vassal_or_family + OR = { + AND = { + house ?= { is_powerful_family = yes } + is_house_head = yes + } + is_powerful_vassal = yes + } + } +} + ################################################## # Events diff --git a/common/scripted_triggers/00_elective_triggers.txt b/common/scripted_triggers/00_elective_triggers.txt index 2a57a888d..d31e1bf74 100644 --- a/common/scripted_triggers/00_elective_triggers.txt +++ b/common/scripted_triggers/00_elective_triggers.txt @@ -30,6 +30,7 @@ has_unelectable_trait_trigger = { has_unelectable_government_trigger = { OR = { + government_has_flag = government_is_republic government_has_flag = government_is_theocracy government_has_flag = government_is_mercenary government_has_flag = government_is_holy_order @@ -37,22 +38,22 @@ has_unelectable_government_trigger = { } this_is_martial_society_trigger = { - faith = { + rite = { NOR = { - has_doctrine = tenet_pacifism - has_doctrine = tenet_dharmic_pacifism + rite_has_tenet = tenet_pacifism + rite_has_tenet = tenet_dharmic_pacifism } } OR = { government_has_flag = government_is_clan government_has_flag = government_is_tribal government_has_flag = government_is_mercenary - government_has_flag = government_is_holy_order - faith = { + government_has_flag = government_is_military_holy_order + rite = { OR = { - has_doctrine_parameter = great_holy_wars_active - has_doctrine_parameter = great_holy_wars_active_if_reformed - has_doctrine_parameter = cheaper_holy_wars_active + rite_has_parameter = great_holy_wars_active + rite_has_parameter = great_holy_wars_active_if_reformed + rite_has_parameter = cheaper_holy_wars_active } } culture = { @@ -68,28 +69,32 @@ this_is_diplomatic_society_trigger = { government_has_flag = government_is_theocracy } OR = { - faith = { has_doctrine = tenet_communal_identity } - faith = { has_doctrine = tenet_alexandrian_catechism } - faith = { has_doctrine = tenet_legalism } + rite = { rite_has_tenet = tenet_communal_identity } + rite = { rite_has_tenet = tenet_alexandrian_catechism } + rite = { rite_has_tenet = tenet_legalism } } } this_is_spiritual_society_trigger = { - faith = { + rite = { NOR = { - has_doctrine = tenet_false_conversion_sanction - has_doctrine = tenet_hedonistic - has_doctrine = tenet_carnal_exaltation - has_doctrine = tenet_exaltation_of_pain - has_doctrine = tenet_pursuit_of_power + rite_has_tenet = tenet_false_conversion_sanction + rite_has_tenet = tenet_hedonistic + rite_has_tenet = tenet_carnal_exaltation + rite_has_tenet = tenet_exaltation_of_pain + rite_has_tenet = tenet_pursuit_of_power } - OR = { - has_doctrine = tenet_inner_journey - has_doctrine = tenet_asceticism - has_doctrine = tenet_literalism - has_doctrine = tenet_esotericism - has_doctrine = tenet_astrology - has_doctrine = tenet_monasticism + } + OR = { + rite = { + OR = { + rite_has_tenet = tenet_inner_journey + rite_has_tenet = tenet_asceticism + rite_has_tenet = tenet_literalism + rite_has_tenet = tenet_esotericism + rite_has_tenet = tenet_astrology + } } + faith = { faith_has_monasticism_trigger = yes } } } @@ -152,7 +157,11 @@ parent_for_elective_succession_trigger = { #This trigger is used to prevent gran feudal_elective_potential_landed_candidate_trigger = { save_temporary_scope_as = potential_candidate - has_same_government = scope:holder + # Same-government matching empties the pool when the holder has an unelectable government, so fall back to electable candidates. + OR = { + has_same_government = scope:holder + scope:holder = { has_unelectable_government_trigger = yes } + } #Either the candidate is in the realm, or the title is independent, or the realm of the title does NOT have protected inheritance. OR = { any_liege_or_above = { @@ -275,12 +284,12 @@ feudal_elective_potential_landless_dynastic_candidate_trigger = { exists = mother exists = father mother = { - relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = prev.father } + relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger = { CHARACTER = prev.father } } } #Let's make the incredibly bold assumption that if incest is completely allowed we'll just default to check the child instead of parents - scope:holder.faith = { - has_doctrine_parameter = consanguinity_unrestricted_incest + scope:holder.rite = { + rite_has_parameter = consanguinity_unrestricted_incest } } } diff --git a/common/scripted_triggers/00_game_rule_triggers.txt b/common/scripted_triggers/00_game_rule_triggers.txt index ff0259f9f..175415120 100644 --- a/common/scripted_triggers/00_game_rule_triggers.txt +++ b/common/scripted_triggers/00_game_rule_triggers.txt @@ -16,7 +16,7 @@ #hungarian_migration_valid_pannonian_target_trigger = { # NOR = { # culture = culture:mogyer -# any_liege_or_above = {sre = culture:mogyer } +# any_liege_or_above = { culture = culture:mogyer } # } # is_ai = yes # any_realm_county = { @@ -53,22 +53,21 @@ exclave_independence_trigger = { # Sometimes we disable these events for specific characters. harm_game_rule_enablement_trigger = { # Disable entirely if harm_safe. - trigger_if = { - limit = { has_game_rule = harm_safe } - always = no + switch = { + trigger = has_game_rule + harm_safe = { + always = no + } + harm_target_player_only = { + is_ai = no + } + harm_target_ai_only = { + is_ai = yes + } + fallback = { + always = yes + } } - # harm_target_player_only - trigger_else_if = { - limit = { has_game_rule = harm_target_player_only } - is_ai = no - } - # harm_target_ai_only - trigger_else_if = { - limit = { has_game_rule = harm_target_ai_only } - is_ai = yes - } - # harm_target_all - trigger_else = { always = yes } # Never just kill the player if it'd utterly game-over them. trigger_if = { limit = { is_ai = no } @@ -118,132 +117,30 @@ rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = rule_title_creation_imperial_power_projection_title_creation_trigger = { trigger_if = { limit = { - has_game_rule = title_creation_imperial_power_projection_any_power_advantage - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom + empire_faith_gate_enabled_trigger = yes } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_advantage - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - trigger_else = { always = yes } - } + can_create_empire_faith_gate_trigger = yes + empire_creation_hof_requirements_trigger = yes + trigger_if = { + limit = { is_ai = yes } + ai_only_check_stronger_same_faith_empire_exists_trigger = no } } - trigger_else_if = { + + trigger_if = { limit = { - has_game_rule = title_creation_imperial_power_projection_hard_power_only rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes highest_held_title_tier <= tier_kingdom } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - trigger_else = { always = yes } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_soft_power_only - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.soft_power_only - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - } - } - trigger_else = { always = yes } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_hard_power_only_strict - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only_strict.neighbours - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - trigger_else = { always = yes } - } - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only_strict.de_jure_sharers - any_sub_realm_county = { - count = all - empire = { - OR = { - is_title_created = no - holder = { - save_temporary_scope_as = char_temp - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_any_power_strict - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_strict.neighbours - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - trigger_else = { always = yes } - } - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_strict.de_jure_sharers - any_sub_realm_county = { - count = all - empire = { - OR = { - is_title_created = no - holder = { + switch = { + trigger = has_game_rule + title_creation_imperial_power_projection_any_power_advantage = { + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_advantage + any_neighboring_top_liege_realm_owner = { + count = all + trigger_if = { + limit = { highest_held_title_tier >= tier_empire } save_temporary_scope_as = char_temp OR = { any_close_family_member = { is_spouse_of = root } @@ -254,9 +151,103 @@ rule_title_creation_imperial_power_projection_title_creation_trigger = { } } } + title_creation_imperial_power_projection_hard_power_only = { + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only + any_neighboring_top_liege_realm_owner = { + count = all + trigger_if = { + limit = { highest_held_title_tier >= tier_empire } + save_temporary_scope_as = char_temp + root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength + } + } + } + } + title_creation_imperial_power_projection_soft_power_only = { + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.soft_power_only + any_neighboring_top_liege_realm_owner = { + count = all + trigger_if = { + limit = { highest_held_title_tier >= tier_empire } + save_temporary_scope_as = char_temp + OR = { + any_close_family_member = { is_spouse_of = root } + root = { has_strong_hook = scope:char_temp } + } + } + } + } + } + title_creation_imperial_power_projection_hard_power_only_strict = { + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only_strict.neighbours + any_neighboring_top_liege_realm_owner = { + count = all + trigger_if = { + limit = { highest_held_title_tier >= tier_empire } + save_temporary_scope_as = char_temp + root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength + } + } + } + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only_strict.de_jure_sharers + any_sub_realm_county = { + count = all + empire = { + OR = { + is_title_created = no + holder = { + save_temporary_scope_as = char_temp + root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength + } + } + } + } + } + } + title_creation_imperial_power_projection_any_power_strict = { + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_strict.neighbours + any_neighboring_top_liege_realm_owner = { + count = all + trigger_if = { + limit = { highest_held_title_tier >= tier_empire } + save_temporary_scope_as = char_temp + OR = { + any_close_family_member = { is_spouse_of = root } + root = { has_strong_hook = scope:char_temp } + root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength + } + } + trigger_else = { always = yes } + } + } + custom_tooltip = { + text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_strict.de_jure_sharers + any_sub_realm_county = { + count = all + empire = { + OR = { + is_title_created = no + holder = { + save_temporary_scope_as = char_temp + OR = { + any_close_family_member = { is_spouse_of = root } + root = { has_strong_hook = scope:char_temp } + root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength + } + } + } + } + } + } + } + fallback = { always = yes } } } - trigger_else = { always = yes } } game_rule_rig_norman_conquest_for_hereward_trigger = { diff --git a/common/scripted_triggers/00_government_triggers.txt b/common/scripted_triggers/00_government_triggers.txt index 042613f9e..e37af3802 100644 --- a/common/scripted_triggers/00_government_triggers.txt +++ b/common/scripted_triggers/00_government_triggers.txt @@ -65,7 +65,6 @@ should_use_temple_character_background_trigger = { } trigger_else = { OR = { - has_trait = order_member has_council_position = councillor_court_chaplain government_has_flag = government_is_theocracy is_clergy = yes @@ -81,11 +80,11 @@ has_mandala_culture_trigger = { } has_mandala_faith_trigger = { - custom_description = { - text = "hof_interaction_unreformed_faith" + custom_tooltip = { + text = HOF_INTERACTION_UNREFORMED_FAITH NOT = { faith = { has_doctrine_parameter = unreformed } } } - faith = { has_doctrine = doctrine_polytheist } + rite = { rite_has_doctrine = doctrine_polytheist } } diff --git a/common/scripted_triggers/00_illustration_triggers.txt b/common/scripted_triggers/00_illustration_triggers.txt index 5a02f869c..843e10605 100644 --- a/common/scripted_triggers/00_illustration_triggers.txt +++ b/common/scripted_triggers/00_illustration_triggers.txt @@ -202,7 +202,7 @@ has_graphical_india_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = graphical_india @@ -245,7 +245,7 @@ has_graphical_east_asia_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { OR = { @@ -295,7 +295,7 @@ has_graphical_mediterranean_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = graphical_mediterranean @@ -349,7 +349,7 @@ has_graphical_mena_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { OR = { @@ -428,7 +428,7 @@ has_graphical_scandinavia_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = world_europe_north @@ -478,7 +478,7 @@ has_graphical_western_region_trigger = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { NOR = { @@ -543,7 +543,7 @@ has_graphical_iberia_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = world_europe_west_iberia @@ -588,7 +588,7 @@ has_graphical_iran_region_trigger = { limit = { NOT = { exists = capital_province } } - trigger_if = { + trigger_if = { limit = { exists = host.capital_province } host.capital_province = { OR = { @@ -650,7 +650,7 @@ steppe_building_gfx_use_mena_trigger = { } } } - } + } } steppe_building_gfx_use_indian_trigger = { AND = { @@ -658,11 +658,10 @@ steppe_building_gfx_use_indian_trigger = { OR = { #western steppe should only be mena if you are clan geographical_region = world_india - geographical_region = world_burma geographical_region = world_tibet geographical_region = world_asia_southeast } - } + } } steppe_building_gfx_use_mediterranean_trigger = { @@ -674,7 +673,7 @@ steppe_building_gfx_use_mediterranean_trigger = { geographical_region = world_europe_west_iberia geographical_region = world_asia_minor } - } + } } steppe_building_gfx_use_iranian_trigger = { AND = { @@ -753,7 +752,7 @@ high_tier_throne_room_spouse_trigger = { byzantine_governor_trigger = { is_landed = yes - government_allows = administrative + government_has_mechanic = administrative liege ?= { OR = { # is_roman_emperor_primary_title_trigger = yes @@ -772,11 +771,11 @@ byzantine_governor_trigger = { byzantine_governor_close_family_trigger = { location = prev.location is_landed = yes - government_has_flag = government_is_special_administrative + government_has_mechanic = administrative exists = top_liege top_liege = { OR = { -# is_roman_emperor_primary_title_trigger = yes + is_roman_emperor_primary_title_trigger = yes AND = { culture = { OR = { @@ -791,7 +790,7 @@ byzantine_governor_close_family_trigger = { east_asian_governor_trigger = { is_landed = yes - government_allows = administrative + government_has_mechanic = administrative top_liege ?= { OR = { primary_title = title:h_china @@ -807,7 +806,7 @@ east_asian_governor_trigger = { east_asian_governor_close_family_trigger = { location = prev.location is_landed = yes - government_has_flag = government_is_special_administrative + government_has_mechanic = administrative top_liege ?= { OR = { primary_title = title:h_china @@ -825,7 +824,7 @@ has_graphical_chinese_region_trigger = { limit = { exists = capital_province } capital_province = { geographical_region = world_asia_china } } - trigger_else_if = { + trigger_else_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = world_asia_china } } @@ -845,7 +844,7 @@ has_graphical_japanese_region_trigger = { limit = { exists = capital_province } capital_province = { geographical_region = world_asia_japan } } - trigger_else_if = { + trigger_else_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = world_asia_japan } } @@ -865,7 +864,7 @@ has_graphical_korean_region_trigger = { limit = { exists = capital_province } capital_province = { geographical_region = world_asia_korea } } - trigger_else_if = { + trigger_else_if = { limit = { exists = host.capital_province } host.capital_province = { geographical_region = world_asia_korea } } diff --git a/common/scripted_triggers/00_interaction_triggers.txt b/common/scripted_triggers/00_interaction_triggers.txt index 2d1ce71f7..ee50c3ba5 100644 --- a/common/scripted_triggers/00_interaction_triggers.txt +++ b/common/scripted_triggers/00_interaction_triggers.txt @@ -69,7 +69,7 @@ has_extra_criminal_reason_against_trigger = { } title_revocation_standard_valid_showing_failures_only_trigger = { - scope:actor = { + scope:puppet_or_actor = { NOR = { is_at_war_with = scope:recipient has_truce = scope:recipient @@ -86,7 +86,7 @@ title_revocation_standard_valid_showing_failures_only_trigger = { } } scope:recipient = { - NOT = { has_strong_hook = scope:actor } + NOT = { has_strong_hook = scope:puppet_or_actor } } } @@ -106,6 +106,25 @@ title_revocation_standard_can_pick_title_trigger = { text = "character_interactions_not_rel_head_title" is_head_of_faith = no } + custom_description = { + text = "character_interactions_not_clerical_region_title" + has_clerical_region = no + } + custom_description = { + text = "character_interactions_not_clerical_elector_title" + pam_title_is_clerical_elector_trigger = no + } + custom_description = { + text = "character_interactions_not_antipope_office_title" + pam_title_is_antipope_office_trigger = no + } + custom_tooltip = { + text = special_title_cannot_be_revoked.tt + NOR = { + this = title:k_papal_state + this = title:k_orthodox + } + } } diarch_revocation_has_claim_check_trigger = { @@ -121,11 +140,11 @@ diarch_revocation_has_claim_check_trigger = { } title_revocation_is_admin_governor_trigger = { - government_allows = administrative + government_has_mechanic = administrative top_liege = this save_temporary_scope_as = liege_temp $VASSAL$ = { - is_landed_or_landless_administrative = yes + government_has_mechanic = administrative target_is_liege_or_above = scope:liege_temp } } @@ -139,23 +158,36 @@ title_revocation_is_tyrannical_trigger = { has_claim_on = scope:landed_title } title_revocation_is_admin_governor_trigger = { VASSAL = $VASSAL$ } - faith = { + AND = { + rite = { rite_has_parameter = tenet_legalism_sinful_revocation } $VASSAL$ = { - NOT = { vassal_contract_has_flag = religiously_protected} + num_sinful_traits = { + value > 0 + target = prev.rite + } + } + } + AND = { + $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 + rite = { rite_has_parameter = pluralism_righteous_revocation_tyranny_reduced } + faith = { + 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 + rite = { rite_has_parameter = pluralism_fundamentalist_revocation_tyranny_minimal } + faith = { + faith_hostility_level = { + target = $VASSAL$.faith + value >= faith_hostile_level + } } } } @@ -163,27 +195,39 @@ title_revocation_is_tyrannical_trigger = { } } +# The liege is root, and $VASSAL$ is the target +# Sets liege_temp and rebel_temp for revoke_refusal_war_rising_strength_value +revoke_refusal_war_would_be_massive_trigger = { + NOT = { has_revoke_title_reason = $VASSAL$ } + NOT = { government_has_flag = no_powerful_vassals } + save_temporary_scope_as = liege_temp + $VASSAL$ = { save_temporary_scope_as = rebel_temp } + current_military_strength < revoke_refusal_war_rising_strength_value +} + vassal_revocation_is_tyrannical_trigger = { NOR = { exists = scope:administrative_revocation AND = { - government_allows = administrative + government_has_mechanic = administrative $VASSAL$ = { - government_allows = administrative + government_has_mechanic = administrative } } has_revoke_title_reason = $VASSAL$ - faith = { - OR = { - AND = { - has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced + OR = { + AND = { + rite = { rite_has_parameter = pluralism_righteous_revocation_tyranny_reduced } + faith = { faith_hostility_level = { target = $VASSAL$.faith value = faith_evil_level } } - AND = { - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal + } + AND = { + rite = { rite_has_parameter = pluralism_fundamentalist_revocation_tyranny_minimal } + faith = { faith_hostility_level = { target = $VASSAL$.faith value >= faith_hostile_level @@ -196,10 +240,10 @@ vassal_revocation_is_tyrannical_trigger = { vassal_retraction_standard_valid_showing_failures_only_trigger = { NOT = { - scope:actor = { is_at_war_with = scope:recipient } + scope:puppet_or_actor = { is_at_war_with = scope:recipient } } scope:recipient = { - NOT = { has_strong_hook = scope:actor } + NOT = { has_strong_hook = scope:puppet_or_actor } } } @@ -271,7 +315,7 @@ can_any_traveling_family_members_travel_trigger = { } imprison_neutral_is_valid_showing_failures_only_triggers_trigger = { - scope:actor.liege = { + scope:puppet_or_actor.liege = { trigger_if = { limit = { has_realm_law_flag = imprisonment_toggle_enable } # TIT-43801 @@ -279,7 +323,7 @@ imprison_neutral_is_valid_showing_failures_only_triggers_trigger = { NOT = { has_realm_law = tribal_authority_0 } } } - scope:actor = { is_imprisoned = no } + scope:puppet_or_actor = { is_imprisoned = no } custom_description = { text = cannot_imprison_almohad_leader subject = scope:recipient diff --git a/common/scripted_triggers/00_laamp_triggers.txt b/common/scripted_triggers/00_laamp_triggers.txt index 70bec4e98..d4bf7d765 100644 --- a/common/scripted_triggers/00_laamp_triggers.txt +++ b/common/scripted_triggers/00_laamp_triggers.txt @@ -29,7 +29,7 @@ maa_regiments_valid_to_refill_trigger = { scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } is_unit_type = elephant_cavalry } - scope:actor.domicile ?= { has_domicile_parameter = camp_reinforce_elephant_regiments_anywhere } + regiment_owner.domicile ?= { has_domicile_parameter = camp_reinforce_elephant_regiments_anywhere } } } @@ -54,7 +54,7 @@ any_laamp_portion_at_sea_trigger = { } } } -# + #character_is_valid_for_harrying_of_the_north_trigger = { # title:k_england.holder ?= { owns_story_of_type = story_cycle_harrying_of_the_north } # trigger_if = { @@ -115,7 +115,7 @@ any_laamp_portion_at_sea_trigger = { # limit = { scope:recipient = character:90028 } # custom_tooltip = { # text = owns_a_story_trigger -# scope:actor = { +# scope:puppet_or_actor = { # NOR = { # owns_story_of_type = story_cycle_harrying_of_the_north # any_liege_or_above = { owns_story_of_type = story_cycle_harrying_of_the_north } @@ -124,7 +124,7 @@ any_laamp_portion_at_sea_trigger = { # } # } #} -# + #disable_interaction_for_hasan_trigger = { # trigger_if = { # limit = { scope:recipient = character:41702 } @@ -160,7 +160,7 @@ is_valid_for_laampdom = { limit = { NAND = { is_ai = no - government_allows = administrative + government_has_mechanic = administrative top_liege = this is_landed = no } @@ -294,7 +294,7 @@ ep3_negotiate_settlement_valid_county_trigger = { holder = scope:actor trigger_if = { limit = { - scope:actor = { government_has_flag = government_is_special_administrative } + scope:actor = { government_has_mechanic = administrative } } holder = { target_is_liege_or_above = scope:actor } } @@ -412,7 +412,7 @@ valid_laamp_basic_trigger = { # Plus some standard stuff. is_alive = yes is_adult = yes - NOT = { government_has_flag = government_is_true_herder } + NOT = { government_has_flag = government_is_herder } } $EMPLOYER$ = { is_incapable = no } # Laamps shouldn't offer contracts in their local area, ever. @@ -482,11 +482,18 @@ employer_has_treasury_to_offer_job_trigger = { limit = { is_ai = no } scope:employer = { OR = { - treasury_or_gold >= 50 + treasury_or_gold >= { + value = 50 + multiply = task_contract_employer_tier_gold_multiplier_value + } trigger_if = { limit = { government_allows = barter } - # no define:NBarter|BARTER_GOODS_TO_LOOT_MULT here. wanua rulers start as lower than 100 barter goods - barter_goods >= 50 + barter_goods >= { + value = 50 + multiply = task_contract_employer_tier_gold_multiplier_value + # wanua rulers start with lower than 100 barter goods + # divide = define:NBarter|BARTER_GOODS_TO_LOOT_MULT + } } } } @@ -507,7 +514,7 @@ valid_laamp_sensible_start_trigger = { limit = { any_character_task_contract = { count >= 1 - task_contract_employer = scope:employer + task_contract_employer ?= scope:employer } } always = no @@ -665,7 +672,7 @@ council_task_contract_valid_employer_trigger = { EMPLOYER = scope:employer.cp:$COUNCILLOR_TYPE$ LAAMP = scope:laamp } - } + } AND = { is_performing_council_task = $COUNCIL_TASK_TYPE$ valid_laamp_basic_trigger = { @@ -682,7 +689,8 @@ council_task_contract_valid_employer_trigger = { # Travel Triggers is_laamp_exiled_from_province_trigger = { - $PROVINCE$.county.holder = { + # Sea provinces have no county and a county can sit unheld; nobody there can have exiled us + $PROVINCE$.county.holder ?= { is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = $LAAMP$ } } } diff --git a/common/scripted_triggers/00_law_triggers.txt b/common/scripted_triggers/00_law_triggers.txt index 32cc512b1..8f62afce6 100644 --- a/common/scripted_triggers/00_law_triggers.txt +++ b/common/scripted_triggers/00_law_triggers.txt @@ -61,12 +61,136 @@ has_partition_succession_realm_law_trigger = { } } +can_increase_government_authority = { + realm_law_authority_level_max = no + realm_law_use_government_authority = yes + trigger_if = { + limit = { + has_realm_law_flag = has_requirement_for_authority_level + } + trigger_if = { + limit = { + realm_law_use_church_authority = yes + } + switch = { + trigger = has_realm_law_flag + authority_level_2 = { can_pass_law_church_authority_3_trigger = yes } + authority_level_1 = { can_pass_law_church_authority_2_trigger = yes } + authority_level_0 = { can_pass_law_church_authority_1_trigger = yes } + fallback = { always = no } + } + } + trigger_else = { + switch = { + trigger = has_realm_law_flag + authority_level_2 = { can_pass_law_ca3_trigger = yes } + authority_level_1 = { can_pass_law_ca2_trigger = yes } + authority_level_0 = { can_pass_law_ca1_trigger = yes } + fallback = { always = no } + } + } + } +} + +realm_law_use_government_authority = { + custom_description = { + text = use_government_authority + has_realm_law_flag = authority_level_0 + } +} + +realm_law_authority_level_0 = { + has_realm_law_flag = authority_level_0 + NOT = { has_realm_law_flag = authority_level_1 } +} + +realm_law_authority_level_1 = { + has_realm_law_flag = authority_level_1 + NOT = { has_realm_law_flag = authority_level_2 } +} + +realm_law_authority_level_2 = { + has_realm_law_flag = authority_level_2 + NOT = { has_realm_law_flag = authority_level_3 } +} + +realm_law_authority_level_3 = { + has_realm_law_flag = authority_level_3 + NOT = { has_realm_law_flag = authority_level_4 } +} + +realm_law_authority_level_max = { + has_realm_law_flag = max_authority_level +} + +should_synchronize_liege_law = { + top_liege != this + OR = { + trigger_if = { + limit = { realm_law_use_japanese_bureaucracy = yes } + liege = { realm_law_use_japanese_bureaucracy = yes } + } + trigger_else = { + government_has_mechanic = administrative + top_liege = { + government_has_mechanic = administrative + } + } + } + use_same_authority_with_liege = yes +} + +use_same_authority_with_liege = { + OR = { + government_type = liege.government_type + trigger_if = { + limit = { realm_law_use_crown_authority = yes } + liege = { realm_law_use_crown_authority = yes } + } + trigger_else_if = { + limit = { realm_law_use_tribal_authority = yes } + liege = { realm_law_use_tribal_authority = yes } + } + trigger_else_if = { + limit = { realm_law_use_imperial_bureaucracy = yes } + liege = { realm_law_use_imperial_bureaucracy = yes } + } + trigger_else_if = { + limit = { realm_law_use_nomadic_authority = yes } + liege = { realm_law_use_nomadic_authority = yes } + } + trigger_else_if = { + limit = { realm_law_use_celestial_bureaucracy = yes } + liege = { realm_law_use_celestial_bureaucracy = yes } + } + trigger_else_if = { + limit = { realm_law_use_meritocratic_bureaucracy = yes } + liege = { realm_law_use_meritocratic_bureaucracy = yes } + } + trigger_else_if = { + limit = { realm_law_use_japanese_bureaucracy = yes } + liege = { realm_law_use_japanese_bureaucracy = yes } + } + trigger_else_if = { + limit = { realm_law_use_church_authority = yes } + liege = { realm_law_use_church_authority = yes } + } + trigger_else = { + always = no + } + } +} + realm_law_use_crown_authority = { government_has_flag = government_uses_crown_authority } +realm_law_use_church_authority = { + government_has_flag = government_uses_church_authority +} + realm_law_use_tribal_authority = { - government_has_flag = government_is_tribal + government_has_flag = government_uses_tribal_authority } realm_law_use_camp_purpose = { @@ -74,13 +198,7 @@ realm_law_use_camp_purpose = { } realm_law_use_imperial_bureaucracy = { - government_allows = administrative - NOR = { - government_has_flag = government_is_celestial - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - government_has_flag = government_is_japan_administrative - } + government_has_flag = government_uses_imperial_bureaucracy } realm_law_use_nomadic_authority = { @@ -88,7 +206,7 @@ realm_law_use_nomadic_authority = { } realm_law_use_celestial_bureaucracy = { - government_has_flag = government_is_celestial + government_has_flag = government_uses_celestial_bureaucracy } realm_law_is_mandala = { @@ -96,10 +214,7 @@ realm_law_is_mandala = { } realm_law_use_meritocratic_bureaucracy = { - OR = { - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - } + government_has_flag = government_uses_meritocratic_bureaucracy } realm_uses_treasury_laws_trigger = { @@ -107,7 +222,7 @@ realm_uses_treasury_laws_trigger = { } realm_law_use_japanese_bureaucracy = { - government_is_japanese_trigger = yes + government_has_flag = government_uses_japanese_bureaucracy } can_have_confederate_partition_succession_law_trigger = { @@ -189,13 +304,13 @@ can_keep_high_partition_succession_law_trigger = { # has_title = title:e_omnod_dalai_khanate } } - NOT = { government_has_flag = government_is_clan} + NOT = { government_has_flag = government_is_clan } } can_have_high_partition_succession_law_trigger = { trigger_if = { limit = { - NOT = { + NOT = { culture = { has_cultural_parameter = can_enact_high_partition_succession_law } } } @@ -264,7 +379,7 @@ can_have_single_heir_succession_law_trigger = { OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan - government_allows = administrative + government_has_mechanic = administrative government_has_flag = government_is_japan_feudal tgp_has_ceremonial_liege_title_trigger = yes } @@ -284,7 +399,7 @@ can_have_single_heir_succession_law_trigger = { } # Admin rules trigger_if = { - limit = { government_allows = administrative } + limit = { government_has_mechanic = administrative } trigger_if = { limit = { tgp_realm_has_ceremonial_liege_trigger = yes } tgp_has_ceremonial_liege_title_trigger = yes @@ -320,7 +435,7 @@ can_have_single_heir_youngest_succession_law_trigger = { OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan - government_allows = administrative + government_has_mechanic = administrative government_has_flag = government_is_japan_feudal } } @@ -337,7 +452,7 @@ can_have_single_heir_youngest_succession_law_trigger = { } trigger_if = { limit = { - government_allows = administrative + government_has_mechanic = administrative } is_independent_ruler = yes } @@ -385,7 +500,7 @@ can_have_single_heir_dynasty_house_trigger = { government_has_flag = government_is_japan_feudal } } - NOT = { government_allows = administrative } + NOT = { government_has_mechanic = administrative } } can_have_bishop_theocratic_succession_law_trigger = { @@ -395,6 +510,25 @@ can_have_bishop_theocratic_succession_law_trigger = { } } +should_use_theocratic_elective_succession_law_trigger = { + faith = { + has_doctrine_parameter = has_clerical_electors + trigger_if = { + limit = { exists = religious_head_title } + religious_head ?= prev + } + trigger_else = { + prev = { has_title = title:k_papal_state } + } + } +} + +should_use_clerical_appointment_law_trigger = { + government_has_mechanic = theocracy + highest_held_title_tier >= tier_county + should_use_theocratic_elective_succession_law_trigger = no +} + is_temporal_head_of_faith_trigger = { is_head_of_faith = yes holder.faith = { has_doctrine = doctrine_temporal_head } @@ -404,13 +538,43 @@ can_title_have_law_general_trigger = { tier >= tier_duchy is_temporal_head_of_faith_trigger = no } -can_title_have_law_county_trigger = { - tier >= tier_county - is_temporal_head_of_faith_trigger = no -} can_have_holy_order_succession_law_trigger = { - government_has_flag = government_is_holy_order + government_has_flag = government_is_military_holy_order + NOT = { + primary_title ?= { + has_variable = order_heritage + } + } +} +can_have_cultural_holy_order_succession_law_trigger = { + government_has_flag = government_is_military_holy_order + primary_title ?= { + has_variable = order_heritage + } +} +can_have_monastic_holy_order_succession_law_trigger = { + government_has_flag = government_is_monastic_holy_order + NOR = { + primary_title ?= { + has_variable = female_order + } + primary_title ?= { + has_variable = male_order + } + } +} +can_have_female_monastic_holy_order_succession_law_trigger = { + government_has_flag = government_is_monastic_holy_order + primary_title ?= { + has_variable = female_order + } +} +can_have_male_monastic_holy_order_succession_law_trigger = { + government_has_flag = government_is_monastic_holy_order + primary_title ?= { + has_variable = male_order + } } can_have_mercenary_succession_law_trigger = { @@ -422,7 +586,7 @@ can_have_city_succession_law_trigger = { } can_have_herder_succession_law_trigger = { - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder } title_can_reduce_partition_law_trigger = { @@ -454,15 +618,28 @@ can_pass_law_ca3_trigger = { culture = { has_innovation = innovation_royal_prerogative } } +can_pass_law_church_authority_1_trigger = { + can_pass_law_ca1_trigger = yes + piety_level >= low_piety_level +} + +can_pass_law_church_authority_2_trigger = { + culture = { has_innovation = innovation_chronicle_writing } + piety_level >= medium_piety_level +} + +can_pass_law_church_authority_3_trigger = { + culture = { has_innovation = innovation_divine_right } + piety_level >= high_piety_level +} + can_have_acclamation_succession_law_trigger = { has_ep3_dlc_trigger = yes top_liege = this - government_allows = administrative + government_has_mechanic = administrative NOR = { - government_has_flag = government_is_celestial + government_has_flag = government_has_merit government_has_flag = government_is_japan_administrative - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin } } @@ -482,11 +659,10 @@ can_change_acclamation_succession_law_trigger = { can_have_appointment_succession_law_trigger = { has_ep3_dlc_trigger = yes - government_allows = administrative + government_has_mechanic = administrative NOR = { - government_has_flag = government_is_celestial + government_has_flag = government_has_merit government_has_flag = government_is_japan_administrative - government_has_flag = government_is_meritocratic } is_independent_ruler = no } @@ -495,7 +671,7 @@ can_keep_appointment_succession_law_trigger = { has_ep3_dlc_trigger = yes trigger_if = { limit = { - has_realm_law = appointment_succession_law + has_realm_law = appointment_succession_law } can_have_appointment_succession_law_trigger = yes } @@ -504,3 +680,35 @@ can_keep_appointment_succession_law_trigger = { can_change_appointment_succession_law_trigger = { has_ep3_dlc_trigger = yes } + +# Scope's $AUTHORITY$ authority law level is at least $CHARACTER$'s +has_higher_or_equal_authority_trigger = { + OR = { + has_realm_law = $AUTHORITY$_authority_3 + AND = { + has_realm_law = $AUTHORITY$_authority_2 + $CHARACTER$ = { + OR = { + has_realm_law = $AUTHORITY$_authority_0 + has_realm_law = $AUTHORITY$_authority_1 + has_realm_law = $AUTHORITY$_authority_2 + } + } + } + AND = { + has_realm_law = $AUTHORITY$_authority_1 + $CHARACTER$ = { + OR = { + has_realm_law = $AUTHORITY$_authority_0 + has_realm_law = $AUTHORITY$_authority_1 + } + } + } + AND = { + has_realm_law = $AUTHORITY$_authority_0 + $CHARACTER$ = { + has_realm_law = $AUTHORITY$_authority_0 + } + } + } +} diff --git a/common/scripted_triggers/00_legal_triggers.txt b/common/scripted_triggers/00_legal_triggers.txt index 71f34e863..5d81ba2b4 100644 --- a/common/scripted_triggers/00_legal_triggers.txt +++ b/common/scripted_triggers/00_legal_triggers.txt @@ -31,9 +31,16 @@ can_change_succession_laws_realm_flag_trigger = { has_realm_law_flag = can_change_succession_laws } } + trigger_else_if = { + limit = { government_has_flag = government_is_japan_feudal } + custom_description = { + text = has_crown_law_allowing_succession_law_change_japanese_feudal + has_realm_law_flag = can_change_succession_laws + } + } trigger_else = { custom_description = { - text = "has_crown_law_allowing_succession_law_change" + text = "has_crown_law_allowing_succession_law_change_feudal" has_realm_law_flag = can_change_succession_laws } } @@ -96,7 +103,7 @@ can_change_to_equal_succession_law_trigger = { } OR = { culture = { has_cultural_parameter = gender_equal_inheritance } - faith = { has_doctrine = doctrine_gender_equal } + rite = { rite_has_doctrine = doctrine_gender_equal } } } trigger_else = { @@ -115,7 +122,7 @@ can_change_to_equal_succession_law_trigger = { can_change_partition_succession_law_trigger = { custom_description = { - text = "has_law_allowing_partition_succession_law_change" + text = "has_law_allowing_partition_succession_law_change" OR = { has_realm_law_flag = can_change_partition_succession_laws has_realm_law_flag = can_change_succession_laws @@ -143,14 +150,7 @@ can_change_partition_succession_law_trigger = { can_designate_heir_trigger = { trigger_if = { # Admin always has access to this - limit = { government_allows = administrative } - - custom_description = { - text = "has_admin_allowing_designate_heir" - any_held_title = { - is_noble_family_title = yes - } - } + limit = { government_has_mechanic = administrative } } trigger_else_if = { # Feudal and clan can get this by increasing crown authority diff --git a/common/scripted_triggers/00_major_decision_triggers.txt b/common/scripted_triggers/00_major_decision_triggers.txt index 94fb6085e..332f9e133 100644 --- a/common/scripted_triggers/00_major_decision_triggers.txt +++ b/common/scripted_triggers/00_major_decision_triggers.txt @@ -170,7 +170,7 @@ launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { #favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = { # num_virtuous_traits = { # value >= favour_the_countryside_basques_decision_basque_pagan_virtues_tally_value -# target = faith:basque_pagan +# target = faith:basque_pagan.main_rite # } #} # @@ -192,9 +192,9 @@ launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { # } #} # -################################################## -# Rebuke Roman Revanchism Triggers - +################################################### +## Rebuke Roman Revanchism Triggers +# #rebuke_roman_revanchism_counties_controlled_trigger = { # holder = { # OR = { @@ -243,4 +243,24 @@ launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { # } # } #} +# +#hre_valid_prince_elector_trigger = { +# is_landed = yes +# faith = root.faith +# OR = { # must be de-jure vassal of empire +# AND = { +# capital_province.kingdom.holder ?= root +# capital_province.empire != title:e_italy +# } +# capital_province.empire.holder ?= root +# } +# NOT = { # not already selected +# any_held_title = { +# is_target_in_global_variable_list = { +# name = hre_elector_list +# target = this +# } +# } +# } +#} # \ No newline at end of file diff --git a/common/scripted_triggers/00_marriage_triggers.txt b/common/scripted_triggers/00_marriage_triggers.txt index bbb4f6e98..8111194d3 100644 --- a/common/scripted_triggers/00_marriage_triggers.txt +++ b/common/scripted_triggers/00_marriage_triggers.txt @@ -31,18 +31,14 @@ can_marry_common_trigger = { } is_leading_faction_type = peasant_faction is_leading_faction_type = populist_faction - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder } } # Clergy cannot marry if their faith disallows it trigger_if = { - limit = { - is_clergy = yes - } - faith = { - has_doctrine_parameter = clergy_can_marry - } + limit = { is_clergy = yes } + marriage_clergy_can_marry_trigger = yes } trigger_if = { limit = { @@ -62,11 +58,8 @@ can_marry_trigger = { allowed_to_marry_same_sex_trigger = { has_game_rule = accepted_same_sex_marriage - faith = { - NOR = { - has_doctrine_parameter = homosexuality_shunned - has_doctrine_parameter = homosexuality_illegal - } + rite = { + rite_has_parameter = homosexuality_accepted } } @@ -106,8 +99,8 @@ could_marry_character_trigger = { #Faith hostility & consanguinity trigger_if = { limit = { NOT = { is_courtier_of = $CHARACTER$ } } #If you're someone's courtier, your liege can marry you anyway - faith = { - faith_allows_marriage_consanguinity_trigger = { + rite = { + rite_allows_marriage_consanguinity_trigger = { CHARACTER_1 = scope:can_marry_check CHARACTER_2 = $CHARACTER$ } @@ -119,8 +112,8 @@ could_marry_character_trigger = { } trigger_if = { limit = { $CHARACTER$ = { NOT = { is_courtier_of = scope:can_marry_check } } } #If you're someone's courtier, your liege can marry you anyway - $CHARACTER$.faith = { - faith_allows_marriage_consanguinity_trigger = { + $CHARACTER$.rite = { + rite_allows_marriage_consanguinity_trigger = { CHARACTER_1 = scope:can_marry_check CHARACTER_2 = $CHARACTER$ } @@ -151,8 +144,8 @@ can_take_as_concubine_character_trigger = { #Faith hostility & consanguinity trigger_if = { limit = { NOT = { is_courtier_of = $CHARACTER$ } } #If you're someone's courtier, your liege can marry you anyway - faith = { - faith_allows_marriage_consanguinity_trigger = { + rite = { + rite_allows_marriage_consanguinity_trigger = { CHARACTER_1 = scope:can_marry_check CHARACTER_2 = $CHARACTER$ } @@ -164,8 +157,8 @@ can_take_as_concubine_character_trigger = { } trigger_if = { limit = { $CHARACTER$ = { NOT = { is_courtier_of = scope:can_marry_check } } } #If you're someone's courtier, your liege can marry you anyway - $CHARACTER$.faith = { - faith_allows_marriage_consanguinity_trigger = { + $CHARACTER$.rite = { + rite_allows_marriage_consanguinity_trigger = { CHARACTER_1 = scope:can_marry_check CHARACTER_2 = $CHARACTER$ } @@ -359,46 +352,47 @@ marriage_interaction_can_be_picked_trigger = { } } +marriage_clergy_can_marry_trigger = { + #Monks can never marry + NOR = { + has_trait = devoted + has_trait = order_member + } + OR = { + rite = { rite_has_parameter = clergy_can_marry } +# AND = { +# is_ruler = yes +# top_participant_group:the_christian_church ?= { has_participant_group_parameter = clergy_can_marry } +# trigger_if = { +# limit = { is_ai = yes } +# saeculum_obscurum_clergy_would_marry_trigger = yes +# } +# } + } +} + marriage_interaction_valid_target_trigger = { # Clergy cannot marry if their faith doesn't allow it trigger_if = { limit = { - scope:secondary_actor = { - is_clergy = yes - NOT = { - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - } + scope:secondary_actor = { is_clergy = yes } } custom_description = { text = character_is_clergy_and_cannot_marry subject = scope:secondary_actor object = scope:secondary_recipient - scope:secondary_actor = { - is_clergy = no - } + scope:secondary_actor = { marriage_clergy_can_marry_trigger = yes } } } trigger_else_if = { limit = { - scope:secondary_recipient = { - is_clergy = yes - NOT = { - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - } + scope:secondary_recipient = { is_clergy = yes } } custom_description = { text = character_is_clergy_and_cannot_marry subject = scope:secondary_recipient object = scope:secondary_actor - scope:secondary_recipient = { - is_clergy = no - } + scope:secondary_recipient = { marriage_clergy_can_marry_trigger = yes } } } #Marriage @@ -468,9 +462,9 @@ marriage_interaction_auto_accept_trigger = { #Strong hook = 100% accept (unless marrying 1st or 2nd player heir or the ruler and asking for matrilineal/partrilineal resulting in no dynasty children for them) custom_description = { text = "spending_hook" - subject = scope:actor + subject = scope:puppet_or_actor object = scope:recipient - scope:actor = { has_strong_hook = scope:recipient } + scope:puppet_or_actor = { has_strong_hook = scope:recipient } scope:recipient = { NAND = { #Secondary recipient can't be recipient or 1st/2nd heir... @@ -502,16 +496,16 @@ marriage_interaction_auto_accept_trigger = { } make_concubine_is_shown_trigger = { - scope:actor = { + scope:puppet_or_actor = { allowed_concubines = yes is_adult = yes } scope:recipient = { OR = { - is_courtier_of = scope:actor - is_imprisoned_by = scope:actor + is_courtier_of = scope:puppet_or_actor + is_imprisoned_by = scope:puppet_or_actor } - can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:actor } + can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:puppet_or_actor } } } @@ -519,7 +513,7 @@ make_concubine_is_valid_trigger = { custom_description = { text = take_concubine_allowed_more object = scope:recipient - scope:actor = { + scope:puppet_or_actor = { allowed_more_concubines = yes } } @@ -529,13 +523,13 @@ make_concubine_is_valid_trigger = { NOT = { has_opinion_modifier = { modifier = divorced_me_opinion - target = scope:actor + target = scope:puppet_or_actor } } } OR = { AND = { - is_imprisoned_by = scope:actor + is_imprisoned_by = scope:puppet_or_actor is_married = yes } is_married = no @@ -648,25 +642,25 @@ cost_prestige_for_break_betrothal_trigger = { OR = { scope:rejected_betrothed = { OR = { - is_close_family_of = scope:actor + is_close_family_of = scope:puppet_or_actor AND = { exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty + exists = scope:puppet_or_actor.dynasty + dynasty = scope:puppet_or_actor.dynasty } } } scope:rejecting_betrothed = { OR = { - is_close_family_of = scope:actor + is_close_family_of = scope:puppet_or_actor AND = { exists = dynasty - exists = scope:actor.dynasty - dynasty = scope:actor.dynasty + exists = scope:puppet_or_actor.dynasty + dynasty = scope:puppet_or_actor.dynasty } } } - scope:actor = { + scope:puppet_or_actor = { yields_alliance = { candidate = scope:rejecting_betrothed target = scope:rejected_betrothal_owner diff --git a/common/scripted_triggers/00_relation_triggers.txt b/common/scripted_triggers/00_relation_triggers.txt index 2844f2117..d0f4c0ada 100644 --- a/common/scripted_triggers/00_relation_triggers.txt +++ b/common/scripted_triggers/00_relation_triggers.txt @@ -44,11 +44,10 @@ can_set_relation_lover_trigger = { this = $CHARACTER$ has_relation_lover = $CHARACTER$ } - is_attracted_to_gender_of = $CHARACTER$ $CHARACTER$ = { is_adult = yes - is_attracted_to_gender_of = prev } + matching_gender_and_sexuality_with_trigger = { CHARACTER = $CHARACTER$ } } can_set_relation_soulmate_trigger = { @@ -291,7 +290,10 @@ upgrade_ready_rival_to_nemesis_trigger = { is_below_ai_friend_soft_cap_trigger = { trigger_if = { - limit = { is_ai = yes } + limit = { + is_ai = yes + NOT = { puppeteer ?= { is_ai = no } } + } trigger_if = { limit = { @@ -313,7 +315,10 @@ is_below_ai_friend_soft_cap_trigger = { is_below_ai_lover_soft_cap_trigger = { trigger_if = { - limit = { is_ai = yes } + limit = { + is_ai = yes + NOT = { puppeteer ?= { is_ai = no } } + } trigger_if = { limit = { @@ -589,7 +594,7 @@ is_of_major_interest_trigger = { exists = $CHARACTER$.faith.religious_head this = $CHARACTER$.faith.religious_head } - + # Powerful vassals (including fellow) trigger_if = { limit = { top_liege = this @@ -598,7 +603,7 @@ is_of_major_interest_trigger = { this = $CHARACTER$ } } - #House Head + # House Head trigger_if = { limit = { exists = $CHARACTER$.house.house_head @@ -613,6 +618,10 @@ is_of_major_interest_trigger = { } intent_target = $CHARACTER$ } + # Relations + has_relation_nemesis = $CHARACTER$ + has_relation_soulmate = $CHARACTER$ + has_relation_best_friend = $CHARACTER$ } } @@ -758,7 +767,7 @@ major_interest_liege_trigger = { #Support trigger major_interest_realm_priest_trigger = { - faith = { has_doctrine = doctrine_theocracy_temporal } + rite = { rite_has_doctrine = doctrine_theocracy_temporal } exists = cp:councillor_court_chaplain NOT = { cp:councillor_court_chaplain = { is_in_list = $LISTNAME$ } @@ -1160,6 +1169,10 @@ has_RelationToMe_relation = { $CHARACTER$ = { top_liege != this } liege = $CHARACTER$.liege } + AND = { + faith = $CHARACTER$.faith + $CHARACTER$.capital_county.clerical_region_title.holder ?= scope:relation_check + } has_relation_crush = $CHARACTER$ has_relation_ward = $CHARACTER$ has_relation_guardian = $CHARACTER$ @@ -1212,6 +1225,10 @@ has_RelationToMe_relation = { $CHARACTER$ = { host ?= scope:relation_check } + superior ?= $CHARACTER$ + $CHARACTER$ = { + superior ?= scope:relation_check + } is_knight_of = $CHARACTER$ AND = { is_female = yes diff --git a/common/scripted_triggers/00_religious_triggers.txt b/common/scripted_triggers/00_religious_triggers.txt index 35e87f7b1..2d068dfdf 100644 --- a/common/scripted_triggers/00_religious_triggers.txt +++ b/common/scripted_triggers/00_religious_triggers.txt @@ -9,16 +9,16 @@ # 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 +# relation_with_character_is_incestuous_in_rite_trigger - Relation would be shunned under the rite +# relation_with_character_is_incestuous_in_my_rite_trigger - Relation would be shunned under the rite of character you use trigger in +# relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger - Relation would be shunned under the rite of the character you use trigger in or their liege's rite +# rite_allows_marriage_consanguinity_trigger +# relation_with_character_is_sodomy_in_rite_trigger +# relation_with_character_is_sodomy_by_my_rite_trigger +# relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger +# trait_is_shunned_in_rite_trigger +# trait_is_criminal_in_rite_trigger +# trait_is_shunned_or_criminal_in_my_or_lieges_rite_trigger # has_negative_attitude_towards_trait_trigger # secret_is_shunned_in_faith_trigger # secret_is_criminal_in_faith_trigger @@ -27,7 +27,7 @@ # 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? +# holy_order_1000_request_target_trigger - Is this ruler a valid target for a Military Order to request land from? ###HERESY TRIGGERS### # is_valid_heresiarch @@ -53,6 +53,7 @@ has_strong_religious_conviction_trigger = { has_trait = blood_of_prophet has_trait = faith_warrior has_trait = saint + has_trait = herald } } @@ -91,11 +92,14 @@ not_non_armenian_standard_christian_faith_trigger = { is_weak_claimant_due_to_gender_trigger = { OR = { AND = { - $FAITH$ = { has_doctrine_parameter = female_claims_are_weak } + $RITE$ = { rite_has_parameter = female_claims_are_weak } $CHARACTER$ = { is_female = yes } + NOT = { + $RITE$ = { rite_has_parameter = tenet_hyperdulia_female_claims_are_strong } + } } AND = { - $FAITH$ = { has_doctrine_parameter = male_claims_are_weak } + $RITE$ = { rite_has_parameter = male_claims_are_weak } $CHARACTER$ = { is_male = yes } } } @@ -106,22 +110,6 @@ can_be_combatant_based_on_gender_trigger = { text = "can_be_combatant_based_on_gender" object = this subject = $ARMY_OWNER$ - # Priests only fight if faith has war priests - trigger_if = { - limit = { - 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 = { @@ -143,13 +131,13 @@ can_be_combatant_based_on_gender_trigger = { } 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 } + $ARMY_OWNER$.rite = { rite_has_parameter = combatant_can_be_either_gender_if_no_roco } AND = { - $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_must_be_male_if_no_roco } + $ARMY_OWNER$.rite = { rite_has_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 } + $ARMY_OWNER$.rite = { rite_has_parameter = combatant_must_be_female_if_no_roco } is_female = yes } } @@ -180,63 +168,102 @@ can_be_combatant_based_on_gender_trigger = { } } } + # Separate custom_description so barred clergy get a clergy-specific reason, not the gender tooltip + trigger_if = { + limit = { + is_clergy = yes + } + custom_description = { + text = "clergy_can_be_combatant" + object = this + subject = $ARMY_OWNER$ + OR = { + rite = { rite_has_parameter = clergy_can_fight } + AND = { + has_personal_tenet_flag = clergy_can_fight_personal + NOT = { + rite = { rite_has_parameter = pacifist } + } + } + culture = { has_cultural_parameter = culture_clergy_can_fight } + AND = { + $ARMY_OWNER$.culture = { + has_cultural_parameter = high_prowess_ignores_knight_restrictions + } + prowess >= 10 + } + } + } + } +} + +clergy_can_fight_check_trigger = { + trigger_if = { + limit = { is_clergy = yes } + OR = { + rite = { rite_has_parameter = clergy_can_fight } + AND = { + has_personal_tenet_flag = clergy_can_fight_personal + NOT = { + rite = { rite_has_parameter = pacifist } + } + } + culture = { has_cultural_parameter = culture_clergy_can_fight } + } + } } can_be_clergy_due_to_gender_trigger = { OR = { AND = { - faith = { has_doctrine_parameter = clergy_must_be_female } + rite = { rite_has_parameter = clergy_must_be_female } is_female = yes } AND = { - faith = { has_doctrine_parameter = clergy_must_be_male } + rite = { rite_has_parameter = clergy_must_be_male } is_male = yes } - faith = { has_doctrine_parameter = clergy_can_be_either_gender } + rite = { rite_has_parameter = clergy_can_be_either_gender } } } -is_wrong_gender_in_faith_trigger = { +is_wrong_gender_in_rite_trigger = { OR = { AND = { is_female = yes - $FAITH$ = { has_doctrine_parameter = male_dominated_law } + $RITE$ = { rite_has_parameter = male_dominated_law } } AND = { is_male = yes - $FAITH$ = { has_doctrine_parameter = female_dominated_law } + $RITE$ = { rite_has_parameter = female_dominated_law } } } } faith_is_aniconic_trigger = { - faith = { - OR = { - religion = religion:islam_religion - has_doctrine = tenet_aniconism - } + OR = { + faith.religion = religion:islam_religion + rite = { rite_has_tenet = tenet_aniconism } } } -#Needs CHARACTER and FAITH -relation_with_character_is_incestuous_in_faith_trigger = { +#Needs CHARACTER and RITE +relation_with_character_is_incestuous_in_rite_trigger = { OR = { # doctrine_consanguinity_dynastic; not within the same descent group AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_dynastic } - OR = { - is_close_or_extended_family_of = $CHARACTER$ - dynasty = $CHARACTER$.dynasty - } + $RITE$ = { rite_has_parameter = consanguinity_restricted_dynastic_marriage } + is_lowborn = no + $CHARACTER$.dynasty ?= dynasty } #doctrine_consanguinity_restricted; absolutely no family business AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_restricted } + $RITE$ = { rite_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 } + $RITE$ = { rite_has_parameter = consanguinity_cousins_marriage } OR = { is_close_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren] is_uncle_or_aunt_of = $CHARACTER$ @@ -245,7 +272,7 @@ relation_with_character_is_incestuous_in_faith_trigger = { } #doctrine_consanguinity_aunt_nephew_and_uncle_niece; extended family is ok AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } + $RITE$ = { rite_has_parameter = consanguinity_aunt_nephew_and_uncle_niece_marriage } is_close_family_of = $CHARACTER$ } #doctrine_consanguinity_unrestricted; all forms of incest is acceptable @@ -254,125 +281,124 @@ relation_with_character_is_incestuous_in_faith_trigger = { #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 } + faith.main_rite = { save_temporary_scope_as = my_rite } + relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:my_rite } } -relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { +relation_with_character_is_incestuous_in_my_rite_trigger = { + rite = { save_temporary_scope_as = my_rite } + relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:my_rite } +} + +relation_with_character_is_incestuous_in_my_or_lieges_rite_trigger = { OR = { AND = { - faith = { #My faith doesn't approve - save_temporary_scope_as = check_faith + rite = { #My rite doesn't approve + save_temporary_scope_as = check_rite } - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } } - AND = { #Liege's faith doesn't approve + AND = { #Liege's rite doesn't approve liege ?= { - faith = { - save_temporary_scope_as = check_faith + rite = { + save_temporary_scope_as = check_rite } } - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } } } } #Needs CHARACTER_1 and CHARACTER_2 -faith_allows_marriage_consanguinity_trigger = { - save_temporary_scope_as = consanguinity_faith +rite_allows_marriage_consanguinity_trigger = { + save_temporary_scope_as = consanguinity_rite NOT = { $CHARACTER_1$ = { - relation_with_character_is_incestuous_in_faith_trigger = { + relation_with_character_is_incestuous_in_rite_trigger = { CHARACTER = $CHARACTER_2$ - FAITH = scope:consanguinity_faith + RITE = scope:consanguinity_rite } } } } -relation_between_characters_is_sodomy_in_my_faith_trigger = { +relation_between_characters_is_sodomy_in_my_rite_trigger = { $CHARACTER_1$ = { is_male = yes } $CHARACTER_2$ = { is_male = yes } - faith = { - OR = { - has_doctrine_parameter = homosexuality_shunned - has_doctrine_parameter = homosexuality_illegal - } + rite = { + NOT = { rite_has_parameter = homosexuality_accepted } } } -relation_with_character_is_sodomy_in_faith_trigger = { +relation_with_character_is_sodomy_in_rite_trigger = { is_male = yes $CHARACTER$ = { is_male = yes } - $FAITH$ = { - OR = { - has_doctrine_parameter = homosexuality_shunned - has_doctrine_parameter = homosexuality_illegal - } + $RITE$ = { + NOT = { rite_has_parameter = homosexuality_accepted } } } #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 = { +relation_with_character_is_sodomy_by_my_rite_trigger = { + rite = { save_temporary_scope_as = my_rite } + relation_with_character_is_sodomy_in_rite_trigger = { CHARACTER = $CHARACTER$ - FAITH = scope:my_faith + RITE = scope:my_rite } } -relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { +relation_with_character_is_sodomy_in_my_or_lieges_rite_trigger = { OR = { AND = { - faith = { #My faith doesn't approve - save_temporary_scope_as = check_faith + rite = { #My rite doesn't approve + save_temporary_scope_as = check_rite } - relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + relation_with_character_is_sodomy_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } } - AND = { #Liege's faith doesn't approve + AND = { #Liege's rite doesn't approve liege ?= { - faith = { - save_temporary_scope_as = check_faith + rite = { + save_temporary_scope_as = check_rite } } - relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } + relation_with_character_is_sodomy_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } } } } -murdering_character_is_kinslaying_in_faith_trigger = { +murdering_character_is_kinslaying_in_rite_trigger = { OR = { is_close_or_extended_family_of = $CHARACTER$ dynasty = $CHARACTER$.dynasty } - $FAITH$ = { NOT = { has_doctrine = doctrine_kinslaying_accepted } } + $RITE$ = { NOT = { rite_has_parameter = kinslaying_accepted } } } -murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_faith_trigger = { +murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_rite_trigger = { save_temporary_scope_as = kinslayer_me - faith = { - save_temporary_scope_as = check_faith + rite = { + save_temporary_scope_as = check_rite } trigger_if = { limit = { liege ?= { dynasty = scope:kinslayer_me.dynasty } } liege = { - faith = { - save_temporary_scope_as = check_faith_liege + rite = { + save_temporary_scope_as = check_rite_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 + murdering_character_is_kinslaying_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite } #My rite doesn't approve + AND = { #Liege's rite doesn't approve liege ?= { dynasty = scope:kinslayer_me.dynasty } - murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith_liege } + murdering_character_is_kinslaying_in_rite_trigger = { CHARACTER = $CHARACTER$ RITE = scope:check_rite_liege } } } } -trait_is_criminal_in_faith_trigger = { +trait_is_criminal_in_rite_trigger = { OR = { #KINSLAYER AND = { @@ -381,45 +407,47 @@ trait_is_criminal_in_faith_trigger = { $TRAIT$ = trait:kinslayer_2 $TRAIT$ = trait:kinslayer_1 } - $FAITH$ = { has_doctrine_parameter = kinslaying_any_dynasty_member_crime } + $RITE$ = { rite_has_parameter = kinslaying_any_dynasty_member_crime } } AND = { OR = { $TRAIT$ = trait:kinslayer_3 $TRAIT$ = trait:kinslayer_2 } - $FAITH$ = { has_doctrine_parameter = kinslaying_extended_family_crime } + $RITE$ = { rite_has_parameter = kinslaying_extended_family_crime } } AND = { $TRAIT$ = trait:kinslayer_3 - $FAITH$ = { has_doctrine_parameter = kinslaying_close_kin_crime } + $RITE$ = { rite_has_parameter = kinslaying_close_kin_crime } } #WITCH AND = { $TRAIT$ = trait:witch - $FAITH$ = { has_doctrine_parameter = witchcraft_illegal } + $RITE$ = { rite_has_parameter = witchcraft_illegal } } #CANNIBAL AND = { $TRAIT$ = trait:cannibal NOT = { - $FAITH$ = { has_doctrine_parameter = cannibalism_legal } + $RITE$ = { rite_has_parameter = cannibalism_legal } } } #SODOMITE AND = { $TRAIT$ = trait:sodomite - $FAITH$ = { has_doctrine_parameter = homosexuality_illegal } + $RITE$ = { rite_has_parameter = homosexuality_illegal } } #DEVIANT AND = { $TRAIT$ = trait:deviant - $FAITH$ = { has_doctrine_parameter = deviancy_illegal } + $RITE$ = { rite_has_parameter = deviancy_illegal } } #INCEST AND = { $TRAIT$ = trait:incestuous - $FAITH$ = { NOT = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + NOT = { + $RITE$ = { rite_has_parameter = allows_unrestricted_marriage } + } } #ADULTERER/FORNICATOR AND = { @@ -429,19 +457,24 @@ trait_is_criminal_in_faith_trigger = { } OR = { AND = { - $FAITH$ = { has_doctrine_parameter = adultery_female_crime } + $RITE$ = { rite_has_parameter = adultery_female_crime } $GENDER_CHARACTER$ = { is_female = yes } } AND = { - $FAITH$ = { has_doctrine_parameter = adultery_male_crime } + $RITE$ = { rite_has_parameter = adultery_male_crime } $GENDER_CHARACTER$ = { is_male = yes } } } } + # Devoted is criminal when monasticism is forbidden + AND = { + $TRAIT$ = trait:devoted + $RITE$ = { rite_has_parameter = devoted_trait_criminal } + } } } -trait_is_shunned_in_faith_trigger = { +trait_is_shunned_in_rite_trigger = { OR = { #KINSLAYER AND = { @@ -450,28 +483,28 @@ trait_is_shunned_in_faith_trigger = { $TRAIT$ = trait:kinslayer_2 $TRAIT$ = trait:kinslayer_1 } - $FAITH$ = { has_doctrine = doctrine_kinslaying_shunned } + $RITE$ = { rite_has_parameter = kinslaying_shunned } } #WITCH AND = { $TRAIT$ = trait:witch - $FAITH$ = { has_doctrine_parameter = witchcraft_shunned } + $RITE$ = { rite_has_parameter = witchcraft_shunned } } #SODOMITE AND = { $TRAIT$ = trait:sodomite - $FAITH$ = { has_doctrine_parameter = homosexuality_shunned } + $RITE$ = { rite_has_parameter = homosexuality_shunned } } #DEVIANT AND = { $TRAIT$ = trait:deviant - $FAITH$ = { has_doctrine_parameter = deviancy_shunned } + $RITE$ = { rite_has_parameter = deviancy_shunned } } #INCEST AND = { $TRAIT$ = trait:incestuous - secret_incest_is_shunned_trigger = { - OWNER = $GENDER_CHARACTER$ + NOT = { + $RITE$ = { rite_has_parameter = allows_unrestricted_marriage } } } #ADULTERER/FORNICATOR @@ -482,11 +515,11 @@ trait_is_shunned_in_faith_trigger = { } OR = { AND = { - $FAITH$ = { has_doctrine_parameter = adultery_female_shunned } + $RITE$ = { rite_has_parameter = adultery_female_shunned } $GENDER_CHARACTER$ = { is_female = yes } } AND = { - $FAITH$ = { has_doctrine_parameter = adultery_male_shunned } + $RITE$ = { rite_has_parameter = adultery_male_shunned } $GENDER_CHARACTER$ = { is_male = yes } } } @@ -494,186 +527,196 @@ trait_is_shunned_in_faith_trigger = { } } -trait_is_shunned_or_criminal_in_faith_trigger = { +trait_is_shunned_or_criminal_in_rite_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_in_rite_trigger = { TRAIT = $TRAIT$ RITE = $RITE$ GENDER_CHARACTER = $GENDER_CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = $RITE$ GENDER_CHARACTER = $GENDER_CHARACTER$ } } } -trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { +trait_is_shunned_or_criminal_in_my_or_lieges_rite_trigger = { OR = { AND = { - faith = { #My faith doesn't approve - save_temporary_scope_as = check_faith + rite = { #My rite doesn't approve + save_temporary_scope_as = check_rite } - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:check_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } } - AND = { #Liege's faith doesn't approve + AND = { #Liege's rite doesn't approve liege ?= { - faith = { - save_temporary_scope_as = check_faith + rite = { + save_temporary_scope_as = check_rite } } - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:check_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } } } } -has_any_shunned_or_criminal_trait_in_faith_trigger = { +has_any_shunned_or_criminal_trait_in_rite_trigger = { $CHARACTER$ = { OR = { #KINSLAYER AND = { has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:kinslayer_3 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:kinslayer_2 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:kinslayer_1 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #WITCH AND = { has_trait = witch - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:witch RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #CANNIBAL AND = { has_trait = cannibal - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:cannibal RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #SODOMITE AND = { has_trait = sodomite - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:sodomite RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #DEVIANT AND = { has_trait = deviant - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:deviant RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = incestuous - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:incestuous RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #ADULTERER/FORNICATOR AND = { has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:adulterer RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_or_criminal_in_rite_trigger = { TRAIT = trait:fornicator RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } + } + # Devoted is criminal when monasticism is forbidden + AND = { + has_trait = devoted + $RITE$ = { rite_has_parameter = devoted_trait_criminal } } } } } -has_any_criminal_trait_in_faith_trigger = { +has_any_criminal_trait_in_rite_trigger = { $CHARACTER$ = { OR = { #KINSLAYER AND = { has_trait = kinslayer_3 - trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:kinslayer_3 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = kinslayer_2 - trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:kinslayer_2 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = kinslayer_1 - trait_is_criminal_in_faith_trigger = { TRAIT = trait:kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:kinslayer_1 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #WITCH AND = { has_trait = witch - trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:witch RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #CANNIBAL AND = { has_trait = cannibal - trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:cannibal RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #SODOMITE AND = { has_trait = sodomite - trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:sodomite RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #DEVIANT AND = { has_trait = deviant - trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:deviant RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = incestuous - trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:incestuous RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #ADULTERER/FORNICATOR AND = { has_trait = adulterer - trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:adulterer RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = fornicator - trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = trait:fornicator RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } + } + # Devoted is criminal when monasticism is forbidden + AND = { + has_trait = devoted + $RITE$ = { rite_has_parameter = devoted_trait_criminal } } } } } -has_any_shunned_trait_in_faith_trigger = { +has_any_shunned_trait_in_rite_trigger = { $CHARACTER$ = { OR = { #KINSLAYER AND = { has_trait = kinslayer_3 - trait_is_shunned_in_faith_trigger = { TRAIT = trait:kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:kinslayer_3 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = kinslayer_2 - trait_is_shunned_in_faith_trigger = { TRAIT = trait:kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:kinslayer_2 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = kinslayer_1 - trait_is_shunned_in_faith_trigger = { TRAIT = trait:kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:kinslayer_1 RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #WITCH AND = { has_trait = witch - trait_is_shunned_in_faith_trigger = { TRAIT = trait:witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:witch RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #CANNIBAL AND = { has_trait = cannibal - trait_is_shunned_in_faith_trigger = { TRAIT = trait:cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:cannibal RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #SODOMITE AND = { has_trait = sodomite - trait_is_shunned_in_faith_trigger = { TRAIT = trait:sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:sodomite RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #DEVIANT AND = { has_trait = deviant - trait_is_shunned_in_faith_trigger = { TRAIT = trait:deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:deviant RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = incestuous - trait_is_shunned_in_faith_trigger = { TRAIT = trait:incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:incestuous RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } #ADULTERER/FORNICATOR AND = { has_trait = adulterer - trait_is_shunned_in_faith_trigger = { TRAIT = trait:adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:adulterer RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } AND = { has_trait = fornicator - trait_is_shunned_in_faith_trigger = { TRAIT = trait:fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } + trait_is_shunned_in_rite_trigger = { TRAIT = trait:fornicator RITE = $RITE$ GENDER_CHARACTER = $CHARACTER$ } } } } @@ -735,10 +778,10 @@ has_negative_attitude_towards_trait_trigger = { } } - faith = { save_temporary_scope_as = my_faith } + rite = { save_temporary_scope_as = my_rite } 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$ } + trait_is_shunned_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:my_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } + trait_is_criminal_in_rite_trigger = { TRAIT = $TRAIT$ RITE = scope:my_rite GENDER_CHARACTER = $GENDER_CHARACTER$ } } } @@ -761,269 +804,116 @@ secret_is_blackmailable_trigger = { # 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 - AND = { - $ORIGIN_FAITH$ = { - OR = { - religion_tag = eastern_orthodox_religion - religion_tag = catholic_religion - religion_tag = protestant_religion - religion_tag = oriental_orthodox_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 are British - AND = { - $ORIGIN_FAITH$ = { - OR = { - religion_tag = thelema_religion - religion_tag = britannic_religion - religion_tag = wicca_religion - religion_tag = druidic_religion - this = faith:celtic - this = faith:presbyterian - this = faith:anglican_faith - } - } - OR = { - faiths_are_in_british_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } - } - } - - #Otherwise, we don't have any special preferences. - NOR = { - religion_tag = islam_religion - religion_tag = eastern_orthodox_religion - religion_tag = oriental_orthodox_religion - religion_tag = catholic_religion - religion_tag = protestant_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 = { - #Roman rites are identical, just split for gameplay reasons until BGA - AND = { - religion_tag = catholic_religion - NAND = { - $ORIGIN_FAITH$ = { - has_doctrine = special_doctrine_roman_rite - } - $HERETICAL_FAITH$ = { - has_doctrine = special_doctrine_roman_rite - } - } - } - religion_tag = eastern_orthodox_religion - religion_tag = oriental_orthodox_religion - religion_tag = protestant_religion - religion_tag = islam_religion - religion_tag = judaism_religion - #Eastern Faiths can shift and spread amongst each other. - 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 - this != root.religious_head - } - } -} - -#British Heresies - -faiths_are_in_british_group = { # Britannic religion, Thelema religion, Wicca religion, Druidic, Anglican, Presbyterian, Celtic Church - OR = { - $FAITH_1$.religion = religion:thelema_religion - $FAITH_1$.religion = religion:britannic_religion - $FAITH_1$.religion = religion:wicca_religion - $FAITH_1$.religion = religion:druidic_religion - $FAITH_1$ = faith:anglican_faith - $FAITH_1$ = faith:presbyterian - $FAITH_1$ = faith:celtic - } - OR = { # these are all heresies of each other - $FAITH_2$.religion = religion:thelema_religion - $FAITH_2$.religion = religion:britannic_religion - $FAITH_2$.religion = religion:wicca_religion - $FAITH_2$.religion = religion:druidic_religion - $FAITH_2$ = faith:anglican_faith - $FAITH_2$ = faith:presbyterian - $FAITH_2$ = faith:celtic - } -} - -faiths_are_in_french_group = { # Novelist religion, Pantheonic religion - OR = { - $FAITH_1$.religion = religion:thelema_religion - $FAITH_1$.religion = religion:britannic_religion - $FAITH_1$.religion = religion:wicca_religion - $FAITH_1$.religion = religion:druidic_religion - $FAITH_1$ = faith:anglican_faith - $FAITH_1$ = faith:presbyterian - $FAITH_1$ = faith:celtic - } - OR = { # these are all heresies of each other - $FAITH_2$.religion = religion:thelema_religion - $FAITH_2$.religion = religion:britannic_religion - $FAITH_2$.religion = religion:wicca_religion - $FAITH_2$.religion = religion:druidic_religion - $FAITH_2$ = faith:anglican_faith - $FAITH_2$ = faith:presbyterian - $FAITH_2$ = faith:celtic - } -} - ##Christian Heresy Groups #faiths_are_in_western_christianity_group = { # OR = { -# $FAITH_1$.religion = religion:catholic_religion +# $FAITH_1$ = faith:catholic +# $FAITH_1$ = faith:cathar +# $FAITH_1$ = faith:waldensian +# $FAITH_1$ = faith:lollard # } # OR = { -# $FAITH_2$.religion = religion:catholic_religion +# $FAITH_2$ = faith:catholic +# $FAITH_2$ = faith:cathar +# $FAITH_2$ = faith:waldensian +# $FAITH_2$ = faith:lollard +# $FAITH_2$ = faith:gnostic_faith # } #} # #faiths_are_in_orthodox_christianity_group = { # OR = { -# $FAITH_1$.religion = religion:orthodox_religion +# $FAITH_1$ = faith:orthodox +# $FAITH_1$ = faith:iconoclast +# $FAITH_1$ = faith:bogomilist +# $FAITH_1$ = faith:paulician # } # OR = { -# $FAITH_2$.religion = religion:orthodox_religion +# $FAITH_2$ = faith:orthodox +# $FAITH_2$ = faith:iconoclast +# $FAITH_2$ = faith:bogomilist +# $FAITH_2$ = faith:paulician +# $FAITH_2$ = faith:bosnian_church +# $FAITH_2$ = faith:gnostic_faith # } #} # #faiths_are_in_eastern_christianity_group = { # OR = { -# $FAITH_1$ = faith:coptic +# $FAITH_1$ = faith:miaphysitism # $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:miaphysitism # $FAITH_2$ = faith:armenian_apostolic # $FAITH_2$ = faith:nestorian # $FAITH_2$ = faith:messalian # $FAITH_2$ = faith:paulician -# $FAITH_2$ = faith:mandeaism +# $FAITH_2$ = faith:mandaean_faith +# } +#} +# +#is_non_chalcedonianism_christian_faith = { +# OR = { +# this = faith:nestorian +# this = faith:miaphysitism +# this = faith:armenian_apostolic # } #} # #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 +# $FAITH$ = faith:quranist +# $FAITH$ = faith:druze # } #} # #faiths_are_in_sunni_islam_group = { -# $FAITH_1$ = { -# has_doctrine = muhammad_succession_sunni_doctrine +# $RITE_1$ = { +# rite_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 +# OR = { +# $RITE_2$ = { +# OR = { +# rite_has_doctrine = muhammad_succession_sunni_doctrine +# rite_has_doctrine = muhammad_succession_muhakkima_doctrine +# } # } +# $FAITH_2$ = faith:mandaean_faith +# $FAITH_2$ = faith:manichaean_faith +# $FAITH_2$ = faith:quranist # } #} # #faiths_are_in_shia_islam_group = { -# $FAITH_1$ = { -# OR = { -# has_doctrine = muhammad_succession_shia_doctrine -# faiths_are_shia_zandaqa_sub_group = yes -# } +# OR = { +# $RITE_1$ = { rite_has_doctrine = muhammad_succession_shia_doctrine } +# faiths_are_shia_zandaqa_sub_group = { FAITH = $FAITH_1$ } # } -# $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 +# OR = { +# $RITE_2$ = { +# OR = { +# rite_has_doctrine = muhammad_succession_shia_doctrine +# rite_has_doctrine = muhammad_succession_muhakkima_doctrine +# } # } +# faiths_are_shia_zandaqa_sub_group = { FAITH = $FAITH_2$ } +# $FAITH_2$ = faith:gnostic_faith +# $FAITH_2$ = faith:mandaean_faith # } #} # #faiths_are_in_muhakkima_islam_group = { -# $FAITH_1$ = { -# has_doctrine = muhammad_succession_muhakkima_doctrine +# $RITE_1$ = { +# rite_has_doctrine = muhammad_succession_muhakkima_doctrine # } -# $FAITH_2$ = { -# OR = { -# has_doctrine = muhammad_succession_muhakkima_doctrine -# this = faith:manichean -# this = faith:valentinianism -# } +# OR = { +# $RITE_2$ = { rite_has_doctrine = muhammad_succession_muhakkima_doctrine } +# $FAITH_2$ = faith:manichaean_faith +# $FAITH_2$ = faith:gnostic_faith # } #} # @@ -1066,38 +956,75 @@ faiths_are_in_french_group = { # Novelist religion, Pantheonic religion #} 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 + OR = { +# has_title = title:e_minister_of_rites + rite = { + trigger_if = { # Only apply imprisonment reason if actor's rite is not the state rite + limit = { + $CHARACTER$ = { + top_liege = { government_allows = state_faith } + rite = $CHARACTER$.top_liege.primary_title.state_rite + } } + always = no } - always = no - } - OR = { - OR = { religion_tag = eastern_orthodox_religion religion_tag = catholic_religion religion_tag = protestant_religion religion_tag = oriental_orthodox_religion } - religion_tag = islam_religion - religion_tag = judaism_religion - religion_tag = zoroastrianism_religion - } - NOT = { - faith_hostility_level = { - target = $CHARACTER$.faith - value <= faith_astray_level + OR = { + rite_religion_tag = oriental_orthodox_religion + rite_religion_tag = eastern_orthodox_religion + rite_religion_tag = catholic_religion + rite_religion_tag = protestant_religion + rite_religion_tag = islam_religion + rite_religion_tag = judaism_religion + rite_religion_tag = zoroastrianism_religion + } + NOT = { + rite_hostility_level = { + target = $CHARACTER$.rite + value <= faith_astray_level + } } } } } +character_can_create_holy_order_basic_trigger = { + NOR = { + faith = { + has_doctrine_parameter = immaterial_harmony_no_holy_orders + } + faith = { + any_faith_holy_order = { + #Can be monastic patron and found military order + leader ?= { + government_has_flag = government_is_military_holy_order + } + holy_order_patron = root + save_temporary_scope_as = order + } + } + } +} + +# Rite scope: is this rite hostile enough towards RITE to holy war against it? is_hostile_enough_for_holy_war_trigger = { - faith_hostility_level = { - target = $FAITH$ + rite_hostility_level = { + target = $RITE$ value >= religious_cb_enabled_hostility_level } } +# Character scope: may this attacker press a religious war against TARGET? +is_valid_religious_war_target_trigger = { + OR = { + rite = { is_hostile_enough_for_holy_war_trigger = { RITE = $TARGET$.rite } } + AND = { + rite = { rite_has_parameter = literalism_holy_war_cb_active } + religion = $TARGET$.religion + NOT = { $TARGET$.rite = { rite_has_tenet = tenet_literalism } } + } + } +} + barony_is_valid_for_holy_order_lease_trigger = { title_province = { OR = { @@ -1121,6 +1048,34 @@ barony_is_valid_for_holy_order_lease_trigger = { is_leased_out = yes } } +barony_is_valid_for_monastic_order_lease_trigger = { + title_province = { + has_holding_type = church_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 + } + OR = { + NOT = { + is_leased_out = yes + } + #Theocratic lessee + lessee = { + NOT = { + government_has_flag = government_is_monastic_holy_order + } + } + } +} barony_is_valid_for_holy_order_lease_cancellation_trigger = { is_under_holy_order_lease = yes @@ -1137,6 +1092,9 @@ barony_is_valid_for_holy_order_lease_cancellation_trigger = { holder = { NOT = { any_liege_or_above = { + NOT = { + this = $ACTOR$ + } is_vassal_or_below_of = $ACTOR$ faith = scope:valid_baron.lessee.faith vassal_contract_has_flag = religiously_protected @@ -1146,6 +1104,37 @@ barony_is_valid_for_holy_order_lease_cancellation_trigger = { } } +barony_is_valid_for_monastic_lease_trigger = { + county = { + any_county_province = { + has_holding = no + has_ongoing_construction = no + } + holder = $CHARACTER$ + } +} +county_is_valid_for_monastic_lease_trigger = { + any_county_province = { + has_holding = no + has_ongoing_construction = no + } + holder = $CHARACTER$ +} + +barony_is_valid_to_be_transferred_by_monastic_movement_trigger = { + is_under_holy_order_lease = yes + lessee ?= { + faith = $CHARACTER$.faith + government_has_flag = government_is_monastic_holy_order + holy_order ?= { + NOT = { holy_order_patron ?= root } + } + } + NOT = { + county = lessee.capital_county + } +} + religion_has_angels_trigger = { OR = { religion = religion:oriental_orthodox_religion @@ -1212,27 +1201,30 @@ is_infidel_trigger = { valid_demand_conversion_conditions_trigger = { scope:recipient = { NOR = { - has_strong_hook = scope:actor + has_strong_hook = scope:puppet_or_actor has_trait = devoted has_trait = order_member - is_imprisoned_by = scope:actor - is_at_war_with = scope:actor + is_imprisoned_by = scope:puppet_or_actor + is_at_war_with = scope:puppet_or_actor } } - scope:actor = { + scope:puppet_or_actor = { trigger_if = { limit = { government_has_flag = government_is_landless_adventurer - scope:recipient = { is_courtier_of = scope:actor } + scope:recipient = { is_courtier_of = scope:puppet_or_actor } } custom_tooltip = { text = valid_demand_conversion_conditions_trigger.tt.domicile_requires_shrine domicile = { has_domicile_parameter = camp_enable_conversion } } } - NAND = { - has_trait = nomadic_philosophy - has_trait = zealous + custom_tooltip = { + text = demand_conversion_nomadic_zealous_tt + NAND = { + has_trait = nomadic_philosophy + has_trait = zealous + } } } @@ -1247,7 +1239,7 @@ valid_demand_conversion_conditions_trigger = { # Vassal Contract forbids meddling by liege NAND = { exists = scope:recipient.liege - scope:recipient.liege = scope:actor + scope:recipient.liege = scope:puppet_or_actor scope:recipient = { is_ruler = yes vassal_contract_has_flag = religiously_protected @@ -1259,7 +1251,7 @@ valid_demand_conversion_conditions_trigger = { scope:recipient = { AND = { has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor + var:cannot_be_converted_by_value = scope:puppet_or_actor } } } @@ -1268,14 +1260,14 @@ valid_demand_conversion_conditions_trigger = { scope:recipient = { NOR = { has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor + var:cannot_be_converted_by_value = scope:puppet_or_actor } } } } custom_tooltip = { text = cannot_take_overt_hostile_actions_against_diarch.tt - NOT = { scope:recipient ?= scope:actor.diarch } + NOT = { scope:recipient ?= scope:puppet_or_actor.diarch } } } @@ -1300,8 +1292,8 @@ valid_ask_for_conversion_conditions_trigger = { # Deliberate variant of the abov domicile = { has_domicile_parameter = camp_enable_conversion } } } - NAND = { - has_trait = nomadic_philosophy + trigger_if = { + limit = { has_trait = nomadic_philosophy } has_trait = zealous } } @@ -1368,8 +1360,8 @@ fertilitygod_is_active_trigger = { ###REINCARNATION### can_become_reincarnation_trigger = { save_temporary_scope_as = reincarnated_child - faith = { - has_doctrine = tenet_reincarnation + rite = { + rite_has_tenet = tenet_reincarnation } any_parent = { is_playable_character = yes @@ -1424,7 +1416,7 @@ num_realm_holy_sites_faithful_holders = { subject = $CHARACTER$ object = this value = 1 - any_holy_site = { + any_holy_site_barony = { county = { save_temporary_scope_as = current_holy_site is_holy_site_controlled_by = $CHARACTER$ @@ -1438,7 +1430,7 @@ num_realm_holy_sites_faithful_holders = { subject = $CHARACTER$ object = this value = $COUNT$ - any_holy_site = { + any_holy_site_barony = { count >= $COUNT$ county = { save_temporary_scope_as = current_holy_site @@ -1461,74 +1453,80 @@ num_realm_holy_sites_faithful_holders = { ### Head of Faith can_create_temporal_head_of_faith_title_trigger = { +# trigger_if = { +# limit = { +# this = faith:christian_faith +# exists = situation:the_christian_church +# } +# custom_tooltip = { +# text = pam_great_schism_decision_taken +# has_global_variable = pam_great_schism_decision_taken +# } +# } num_realm_holy_sites_faithful_holders = { COUNT = holy_sites_to_create_temporal_head_of_faith - CHARACTER = ROOT + CHARACTER = root } - root = { piety_level >= high_piety_level } + root.piety_level >= high_piety_level trigger_if = { - limit = { - root = { top_liege != this } - } + limit = { root = { top_liege != this } } custom_description = { text = cannot_create_hof_title_at_or_above_liege_tier root.liege.primary_title.tier > tier_duchy } } - trigger_if = { - limit = { has_doctrine = special_doctrine_not_allowed_to_hof } - NOT = { has_doctrine = special_doctrine_not_allowed_to_hof } - } -} - -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 } - } - NAND = { - exists = religious_head - has_doctrine_parameter = maintains_head_of_faith_on_creation - } -} - -# 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 + root = { + trigger_if = { + limit = { faith.religious_head ?= this } + NOT = { + custom_tooltip = { + text = empire_faith_gate_hof_temporal_is_hof + faith.religious_head ?= this } } } - trigger_if = { - limit = { NOT = { has_trait = sayyid } } - piety >= massive_piety_value - } } - trigger_else_if = { +} + +can_create_spiritual_head_of_faith_title_trigger = { +# trigger_if = { +# limit = { +# this = faith:christian_faith +# exists = situation:the_christian_church +# } +# custom_tooltip = { +# text = pam_great_schism_decision_taken +# has_global_variable = pam_great_schism_decision_taken +# } +# } + num_realm_holy_sites_faithful_holders = { + COUNT = holy_sites_to_create_spiritual_head_of_faith + CHARACTER = root + } + # Non-mainline rites need one more level of devotion than the mainline rite + trigger_if = { limit = { - faith = { - has_doctrine_parameter = temporal_head_of_faith - } + root = { NOT = { rite = faith.main_rite } } } - piety >= major_piety_value + root.piety_level >= high_piety_level } trigger_else = { - limit = { - faith = { - has_doctrine_parameter = spiritual_head_of_faith + root.piety_level >= medium_piety_level + } + trigger_if = { + limit = { has_doctrine_parameter = block_from_create_hof_parameter } + NOT = { has_doctrine_parameter = block_from_create_hof_parameter } + } + root = { + trigger_if = { + limit = { faith.religious_head ?= this } + NOT = { + custom_tooltip = { + text = can_create_spiritual_hof_title_trigger_is_hof_tt + faith.religious_head ?= this + } } } - gold >= medium_gold_max_value } } @@ -1554,12 +1552,11 @@ can_create_head_of_faith_title_trigger = { 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 } + rite = { rite_has_parameter = can_go_on_pilgrimage } } shared_faith_or_hof_trigger = { @@ -1575,7 +1572,7 @@ shared_faith_or_hof_trigger = { ###RELIGIOUS INTERACTIONS### -#Triggers that applies to both Monastery or Holy Order requirements +#Triggers that applies to both Monastery or Military Order requirements can_take_religious_vows_trigger = { can_take_religious_vows_disregard_marriage_trigger = yes @@ -1619,7 +1616,7 @@ can_take_religious_vows_trigger = { can_take_religious_vows_disregard_marriage_trigger = { is_available_ai = yes - faith = scope:actor.faith + faith = scope:puppet_or_actor.faith is_ruler = no NOT = { has_trait = excommunicated } NOT = { has_character_flag = holy_order_member_requested_return_home } @@ -1648,8 +1645,7 @@ does_religion_exist_in_world_region_trigger = { # The most efficient way I could } } trigger_else_if = { - limit = { - location = { geographical_region = world_india } } + limit = { location = { geographical_region = world_india } } any_county_in_region = { region = world_india faith.religion = $RELIGION$ @@ -1676,36 +1672,40 @@ does_religion_exist_in_world_region_trigger = { # The most efficient way I could 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 - } - } + trigger_else_if = { + limit = { location = { geographical_region = world_asia_southeast } } + any_county_in_region = { + region = world_asia_southeast + faith.religion = $RELIGION$ } - OR = { - any_county_in_region = { - region = world_tibet - faith.religion = $RELIGION$ - } - any_county_in_region = { - region = world_burma - faith.religion = $RELIGION$ - } + } + trigger_else_if = { + limit = { location = { geographical_region = world_tibet } } + any_county_in_region = { + region = world_tibet + faith.religion = $RELIGION$ } } trigger_else = { always = no } # This should always go at the end of this scripted trigger } -### HOLY ORDERS ### +### Military OrderS ### +is_military_order_trigger = { + leader ?= { + government_has_flag = government_is_military_holy_order + } +} +is_monastic_order_trigger = { + leader ?= { + government_has_flag = government_is_monastic_holy_order + } +} + holy_order_1000_holy_order_trigger = { title = { - NOR = { - has_variable = received_new_land - has_variable = discarded_for_being_too_big + has_none_of_variables = { + name = received_new_land + name = discarded_for_being_too_big } } } @@ -1721,36 +1721,61 @@ holy_order_1000_target_barony_trigger = { holder = { is_ai = yes } } } +holy_order_1010_target_monastic_barony_trigger = { + tier = tier_barony + barony_is_valid_for_monastic_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 + is_landed = yes faith = root is_available = yes - NOR = { - has_character_flag = holy_order_recently_requested_land - has_character_flag = holy_order_recently_received_land + has_none_of_variables = { + name = holy_order_recently_requested_land + name = holy_order_recently_received_land } save_temporary_scope_as = ruler any_sub_realm_barony = { holy_order_1000_target_barony_trigger = { CHARACTER = scope:ruler } } } +holy_order_1010_request_target_trigger = { + highest_held_title_tier >= tier_duchy + is_landed = yes + #faith = root + is_available = yes + has_none_of_variables = { + name = monastic_order_recently_requested_land + name = monastic_order_recently_received_land + } + save_temporary_scope_as = ruler + any_sub_realm_barony = { + holy_order_1010_target_monastic_barony_trigger = { CHARACTER = scope:ruler } + } +} faith_dominant_gender_male_or_equal = { - faith = { + rite = { OR = { - has_doctrine_parameter = male_dominated_law - has_doctrine_parameter = gender_equal_law + rite_has_parameter = male_dominated_law + rite_has_parameter = gender_equal_law } } } faith_dominant_gender_female_or_equal = { - faith = { + rite = { OR = { - has_doctrine_parameter = female_dominated_law - has_doctrine_parameter = gender_equal_law + rite_has_parameter = female_dominated_law + rite_has_parameter = gender_equal_law } } } @@ -1768,24 +1793,49 @@ is_theological_character_trigger = { } } +holds_religious_office_trigger = { + OR = { + government_has_flag = government_is_ecclesiastical + exists = clerical_elector_title + OR = { + AND = { + religion = religion:oriental_orthodox_religion + religious_head_or_challenger ?= this + } + AND = { + religion = religion:eastern_orthodox_religion + religious_head_or_challenger ?= this + } + AND = { + religion = religion:catholic_religion + religious_head_or_challenger ?= this + } + AND = { + religion = religion:protestant_religion + religious_head_or_challenger ?= this + } + } + } +} + would_be_sinful_adulterer_trigger = { is_married = yes trigger_if = { limit = { is_male = yes } NOT = { - faith = { has_doctrine = doctrine_adultery_men_accepted } + rite = { rite_has_doctrine = doctrine_adultery_men_accepted } } } trigger_else = { NOT = { - faith = { has_doctrine = doctrine_adultery_women_accepted } + rite = { rite_has_doctrine = doctrine_adultery_women_accepted } } } } has_tolerant_faith_or_culture_trigger = { OR = { - faith = { has_doctrine = doctrine_pluralism_pluralistic } + rite = { rite_has_doctrine = doctrine_pluralism_pluralistic } culture = { has_cultural_parameter = less_likely_to_force_conversion } culture = { has_cultural_tradition = tradition_religion_blending } has_trait = nomadic_philosophy @@ -1794,9 +1844,9 @@ has_tolerant_faith_or_culture_trigger = { is_open_to_inviting_other_faiths_trigger = { OR = { - faith = { has_doctrine = tenet_adaptive } + rite = { rite_has_tenet = tenet_adaptive } faith = { has_doctrine = unreformed_faith_doctrine } - faith = { has_doctrine = doctrine_pluralism_pluralistic } + rite = { rite_has_doctrine = doctrine_pluralism_pluralistic } culture = { has_cultural_tradition = tradition_religion_blending } culture = { has_cultural_tradition = tradition_tgp_religious_hospitality } } @@ -1804,8 +1854,8 @@ is_open_to_inviting_other_faiths_trigger = { faith_is_open_minded_trigger = { OR = { - has_doctrine = tenet_adaptive - has_doctrine = doctrine_pluralism_pluralistic + rite_has_tenet = tenet_adaptive + rite_has_doctrine = doctrine_pluralism_pluralistic } } @@ -1849,106 +1899,230 @@ is_unprotected_hostile_faith = { # Checks if the faith is at least hostile but n islam_or_syncretic_with_islam_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = religion:islam_religion - has_doctrine = tenet_islamic_syncretism - } + OR = { + faith.religion = religion:islam_religion + rite = { rite_has_parameter = islamic_syncretic_actor } } } } judaism_or_syncretic_with_judaism_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = religion:judaism_religion - has_doctrine = tenet_jewish_syncretism - } + OR = { + faith.religion = religion:judaism_religion + rite = { rite_has_parameter = jewish_syncretic_actor } } } } christianity_or_syncretic_with_christianity_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = religion:oriental_orthodox_religion - religion = religion:catholic_religion - religion = religion:eastern_orthodox_religion - religion = religion:protestant_religion - has_doctrine = tenet_christian_syncretism - } + OR = { + OR = { + faith.religion = religion:oriental_orthodox_religion + rite = { rite_has_parameter = christian_syncretic_actor } + } + OR = { + faith.religion = religion:eastern_orthodox_religion + rite = { rite_has_parameter = christian_syncretic_actor } + } + OR = { + faith.religion = religion:catholic_religion + rite = { rite_has_parameter = christian_syncretic_actor } + } + OR = { + faith.religion = religion:protestant_religion + rite = { rite_has_parameter = christian_syncretic_actor } + } } } } unreformed_or_syncretic_with_unreformed_trigger = { $CHARACTER$ = { - faith = { - OR = { - has_doctrine_parameter = unreformed - has_doctrine = tenet_unreformed_syncretism - } + OR = { + faith = { has_doctrine_parameter = unreformed } + rite = { rite_has_parameter = unreformed_syncretic_actor } } } } zoroastrian_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = religion:zoroastrianism_religion - has_doctrine = tenet_eastern_syncretism - } + OR = { + faith.religion = religion:zoroastrianism_religion + rite = { rite_has_parameter = eastern_syncretic_actor } } } } eastern_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = { is_in_family = rf_eastern } - has_doctrine = tenet_eastern_syncretism - } + OR = { + faith.religion = { is_in_family = rf_eastern } + rite = { rite_has_parameter = eastern_syncretic_actor } } } } sinitic_or_syncretic_with_sinitic_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = { - is_in_family = rf_sinitic - } - has_doctrine = tenet_sinitic_syncretism - } + OR = { + faith.religion = { is_in_family = rf_sinitic } + rite = { rite_has_parameter = sinitic_syncretic_actor } } } } hindu_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = religion:hinduism_religion - has_doctrine = tenet_eastern_syncretism - } + OR = { + faith.religion = religion:hinduism_religion + rite = { rite_has_parameter = eastern_syncretic_actor } } } } jain_or_syncretic_with_eastern_trigger = { $CHARACTER$ = { - faith = { - OR = { - religion = religion:jainism_religion - has_doctrine = tenet_eastern_syncretism + OR = { + faith.religion = religion:jainism_religion + rite = { rite_has_parameter = eastern_syncretic_actor } + } + } +} + +holy_site_adoptable_by_character_trigger = { + any_holy_site_faith = { + save_temporary_scope_as = compare_faith + OR = { + $CHARACTER$.rite = { rite_has_parameter = allow_adopt_any_holy_site } + AND = { + OR = { + religion = $CHARACTER$.faith.religion + $CHARACTER$.faith = { + faith_is_syncretic_with = { + FAITH = scope:compare_faith + } + } + } + $CHARACTER$.faith = { + faith_hostility_level = { + target = prev + value <= faith_astray_level + } + } } } - } + } +} + +# Faith is the scope here +faith_has_free_holy_site_action_trigger = { + trigger_if = { + limit = { has_variable = free_holy_site_actions } + var:free_holy_site_actions >= 1 + } + trigger_else = { + always = no + } +} + +# BARONY = the candidate holy site's barony title, in faith scope +# One created or adopted holy site per de jure kingdom +faith_holy_site_kingdom_unused_trigger = { + trigger_if = { + limit = { + has_variable_list = dynamic_holy_site_kingdoms + exists = $BARONY$.kingdom + } + NOT = { + is_target_in_variable_list = { + name = dynamic_holy_site_kingdoms + target = $BARONY$.kingdom + } + } + } +} + +# As above, with the player-facing requirement line. Root must be the acting character. +faith_can_use_holy_site_kingdom_trigger = { + custom_tooltip = { + text = holy_site_kingdom_already_used_tt + faith_holy_site_kingdom_unused_trigger = { BARONY = $BARONY$ } + } +} + +has_particular_personal_deity_group = { + OR = { + trigger_if = { + limit = { has_fp1_dlc_trigger = yes } + religion = religion:germanic_religion + } + religion = religion:hinduism_religion + religion = religion:buddhism_religion + } +} + +has_any_syncretism_personal_tenet_trigger = { + OR = { + has_personal_tenet = tenet_eastern_syncretism + has_personal_tenet = tenet_unreformed_syncretism + has_personal_tenet = tenet_christian_syncretism + has_personal_tenet = tenet_islamic_syncretism + has_personal_tenet = tenet_jewish_syncretism + has_personal_tenet = tenet_sinitic_syncretism + } +} + +# can_pick only check when you pick, so amount = 0 +unique_syncretism_trigger = { + custom_description = { + text = incompatible_tenet_other_syncretism_trigger + NOR = { + tenet:tenet_eastern_syncretism = { is_in_list = selected_doctrines } + tenet:tenet_unreformed_syncretism = { is_in_list = selected_doctrines } + tenet:tenet_christian_syncretism = { is_in_list = selected_doctrines } + tenet:tenet_islamic_syncretism = { is_in_list = selected_doctrines } + tenet:tenet_jewish_syncretism = { is_in_list = selected_doctrines } + tenet:tenet_sinitic_syncretism = { is_in_list = selected_doctrines } + } + } +} +unique_christology_trigger = { + custom_tooltip = { + text = INCOMPATIBLE_TENET_OTHER_CHRISTOLOGY_TRIGGER + NOR = { + tenet:tenet_adoptionism = { is_in_list = selected_doctrines } + tenet:tenet_miaphysitism = { is_in_list = selected_doctrines } + tenet:tenet_monophysitism = { is_in_list = selected_doctrines } + } + } +} +unique_christology_personal_trigger = { + trigger_if = { + limit = { has_global_variable = game_has_started } + custom_tooltip = { + text = INCOMPATIBLE_TENET_OTHER_CHRISTOLOGY_TRIGGER + NOR = { + has_personal_tenet = tenet_adoptionism + has_personal_tenet = tenet_miaphysitism + has_personal_tenet = tenet_monophysitism + } + } + } + trigger_else = { + # prevent startup assert error + custom_tooltip = { + text = INCOMPATIBLE_TENET_OTHER_CHRISTOLOGY_TRIGGER + calc_true_if = { + amount <= 1 + has_personal_tenet = tenet_adoptionism + has_personal_tenet = tenet_miaphysitism + has_personal_tenet = tenet_monophysitism + } + } + } } #Used on faiths @@ -1965,35 +2139,23 @@ has_holy_building = { has_building_with_flag = holy_building #Replaces manually maintained list of all holy buildings } -invalid_for_heresy_events = { - always = no -# OR = { -# this = faith:conversos -# this = faith:insular_celtic -# this = faith:bosnian_church -# this = faith:mozarabic_church -# this = faith:adamites -# this = faith:kabarism -# } -} - is_faith_dominant_gender = { OR = { AND = { is_male = yes - faith = { + rite = { OR = { - has_doctrine_parameter = male_dominated_law - has_doctrine_parameter = gender_equal_law + rite_has_parameter = male_dominated_law + rite_has_parameter = gender_equal_law } } } AND = { is_female = yes - faith = { + rite = { OR = { - has_doctrine_parameter = female_dominated_law - has_doctrine_parameter = gender_equal_law + rite_has_parameter = female_dominated_law + rite_has_parameter = gender_equal_law } } } @@ -2004,38 +2166,83 @@ religion_is_broadly_asian_trigger = { OR = { religion_is_east_asian_trigger = yes broadly_dharmic_trigger = yes -# broadly_chinese_religion_trigger = yes + broadly_chinese_religion_trigger = yes } } religion_is_east_asian_trigger = { OR = { faith.religion = religion:buddhism_religion - faith.religion = religion:sikhism_religion -# faith.religion = religion:confucianism_religion -# faith.religion = religion:taoism_religion -# faith.religion = religion:shintoism_religion + faith.religion = religion:confucianism_religion + faith.religion = religion:taoism_religion + faith.religion = religion:shintoism_religion + } +} + +religion_is_non_norse_european_pagan_trigger = { + OR = { + faith.religion = religion:baltic_religion + faith.religion = religion:finno_ugric_religion + faith.religion = religion:germanic_religion + faith.religion = religion:paganism_religion + faith.religion = religion:slavic_religion + } +} + +non_dharmic_east_asia_trigger = { + OR = { + faith.religion = religion:shintoism_religion + faith.religion = religion:dualism_religion + faith.religion = religion:bon_religion + faith.religion = religion:dab_qhuas_religion + faith.religion = religion:aluk_religion + faith.religion = religion:dayawism_religion + faith.religion = religion:hantuism_religion + faith.religion = religion:kaharingan_religion + faith.religion = religion:satsana_phi_religion + faith.religion = religion:tolotang_religion + faith.religion = religion:utaki_religion + faith.religion = religion:bimoism_religion + faith.religion = religion:moism_religion + faith.religion = religion:muism_religion + faith.religion = religion:qiangic_religion + } +} + +religion_is_pagan_steppe = { + OR = { + faith.religion = religion:tengrism_religion + faith.religion = religion:magyar_religion + faith.religion = religion:siberian_religion + faith.religion = religion:shamanism_religion + faith.religion = religion:kamuyism_religion + } +} + +broadly_dharmic_faith_trigger = { + OR = { + religion = religion:buddhism_religion + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:bon_religion + religion = religion:dab_qhuas_religion + religion = religion:aluk_religion + religion = religion:dayawism_religion + religion = religion:hantuism_religion + religion = religion:kaharingan_religion + religion = religion:satsana_phi_religion + religion = religion:tolotang_religion + religion = religion:utaki_religion + religion = religion:bimoism_religion + religion = religion:moism_religion + religion = religion:muism_religion + religion = religion:qiangic_religion } } broadly_dharmic_trigger = { - OR = { - faith.religion = religion:buddhism_religion -# faith.religion = religion:hinduism_religion -# faith.religion = religion:jainism_religion -# faith.religion = religion:bon_religion -# faith.religion = religion:dab_qhuas_religion -# faith.religion = religion:aluk_religion -# faith.religion = religion:dayawism_religion -# faith.religion = religion:hantuism_religion -# faith.religion = religion:kaharingan_religion -# faith.religion = religion:satsana_phi_religion -# faith.religion = religion:tolotang_religion -# faith.religion = religion:utaki_religion -# faith.religion = religion:bimoism_religion -# faith.religion = religion:moism_religion -# faith.religion = religion:muism_religion -# faith.religion = religion:qiangic_religion + faith = { + broadly_dharmic_faith_trigger = yes } } @@ -2052,18 +2259,19 @@ south_east_asian_pagan_trigger = { } broadly_jungle_dwelling_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_austronesian - has_cultural_pillar = heritage_burman - has_cultural_pillar = heritage_tai - has_cultural_pillar = heritage_hmongic - has_cultural_pillar = heritage_dravidian - has_cultural_pillar = heritage_mon_khmer - has_cultural_pillar = heritage_viet - has_cultural_pillar = heritage_indo_aryan - } - } + always = no +# culture = { +# OR = { +# has_cultural_pillar = heritage_austronesian +# has_cultural_pillar = heritage_burman +# has_cultural_pillar = heritage_tai +# has_cultural_pillar = heritage_hmongic +# has_cultural_pillar = heritage_dravidian +# has_cultural_pillar = heritage_mon_khmer +# has_cultural_pillar = heritage_viet +# has_cultural_pillar = heritage_indo_aryan +# } +# } } broadly_chinese_religion_trigger = { @@ -2075,22 +2283,1377 @@ broadly_chinese_religion_trigger = { } broadly_mainland_east_asian_heritage_trigger = { - culture = { + always = no +# culture = { +# OR = { +# has_cultural_pillar = heritage_chinese +# has_cultural_pillar = heritage_korean +# has_cultural_pillar = heritage_buyeo +# has_cultural_pillar = heritage_qiangic +# has_cultural_pillar = heritage_viet +# } +# } +} + +broadly_japanese_island_heritage_trigger = { + always = no +# culture = { +# OR = { +# has_cultural_pillar = heritage_japonic +# has_cultural_pillar = heritage_ainuic +# } +# } +} + +potential_abbot_trigger = { + has_trait = devoted + is_adult = yes + faith = root.faith + rite = root.rite + NOT = { + is_in_list = grabbed_monks + } + basic_is_available_ai = yes + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:founder } + } + trigger_if = { + limit = { + exists = scope:leader.primary_title + } OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_buyeo - has_cultural_pillar = heritage_qiangic - has_cultural_pillar = heritage_viet + AND = { + is_female = yes + scope:leader.primary_title = { + NOT = { has_variable = male_order } + } + } + AND = { + is_female = no + scope:leader.primary_title = { + NOT = { has_variable = female_order } + } + } + } + } + trigger_if = { + limit = { + exists = scope:monk_grabbin_tenet + } + OR = { + any_personal_tenet = { + this = scope:monk_grabbin_tenet + } + any_desired_tenet = { + selection_count = 97 + only_positive = yes + threshold = 1 + this = scope:monk_grabbin_tenet + } } } } -broadly_japanese_island_heritage_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_japonic - has_cultural_pillar = heritage_ainuic +#Has a sinful or a shunned trait - IS PRETTY BAD, NOT STRAIGHT UP EVIL +#Meant to be used in character scope +#needs scope of the rite they're being judged by - not necessarily their own rite +character_considered_morally_dubious_trigger = { + save_temporary_scope_as = judged + + #Check they aren't considered so pious it excuses their sins... + trigger_if = { + limit = { + rite = $RITE$ + is_ruler = yes # Performance reasons, avoids 5 trait array lookups + } + NOR = { + piety_level >= 5 + has_trait = saint + has_trait = herald + has_trait = chakravarti + has_trait = saoshyant + has_trait = savior + } + } + + OR = { + #Things that make just same-rite people mad + trigger_if = { + limit = { + rite = $RITE$ + } + piety_level < 1 + } + #A rite the judge holds at evil-level hostility makes its adherents dubious outright, judged rite-to-rite rather than faith-to-faith. + trigger_else = { + $RITE$ = { + save_temporary_scope_as = moral_dubious_judge_rite + } + scope:moral_dubious_judge_rite = { + "rite_hostility_level(scope:judged.rite)" >= faith_evil_level + } + } + AND = { + has_trait = heresiarch + NOT = { + rite = $RITE$ + } + } + + #SIN TRAITS - counted by the judging rite's reckoning, not the judged character's own + num_sinful_traits = { + target = $RITE$ + value >= 2 + } + #Sins outweigh virtue + AND = { + num_sinful_traits = { + target = $RITE$ + value >= 1 + } + num_virtuous_traits = { + target = $RITE$ + value = 0 + } + } + + #SHUNNED TRAITS + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:sodomite + GENDER_CHARACTER = scope:judged + } + has_trait = sodomite + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:deviant + GENDER_CHARACTER = scope:judged + } + has_trait = deviant + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:adulterer + GENDER_CHARACTER = scope:judged + } + has_trait = adulterer + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:fornicator + GENDER_CHARACTER = scope:judged + } + OR = { + has_trait = fornicator + has_trait = rakish + } + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:witch + GENDER_CHARACTER = scope:judged + } + has_trait = witch + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:kinslayer_1 + GENDER_CHARACTER = scope:judged + } + has_trait = kinslayer_1 + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:kinslayer_2 + GENDER_CHARACTER = scope:judged + } + has_trait = kinslayer_2 + } + AND = { + trait_is_shunned_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:kinslayer_3 + GENDER_CHARACTER = scope:judged + } + has_trait = kinslayer_3 + } + + #Generally questionable traits (virtue read from judge rite $RITE$) + AND = { + has_trait = lunatic + NOR = { + $RITE$ = { + trait_is_virtue_rite = lunatic_1 + } + $RITE$ = { + trait_is_virtue_rite = lunatic_genetic + } + } + } + AND = { + has_trait = gallowsbait + NOT = { + $RITE$ = { + trait_is_virtue_rite = gallowsbait + } + } + } + AND = { + has_trait = despoiler_of_byzantium + NOT = { + $RITE$ = { + trait_is_virtue_rite = despoiler_of_byzantium + } + } + } + AND = { + has_trait = disloyal + NOT = { + $RITE$ = { + trait_is_virtue_rite = disloyal + } + } + } + } +} + +#Has multiple sins or a criminal trait - IS EVIL +#Meant to be used in character scope +#needs scope of the rite they're being judged by - not necessarily their own rite +character_considered_wicked_trigger = { + save_temporary_scope_as = judged + trigger_if = { + limit = { + rite = $RITE$ + is_ruler = yes # Performance reasons, avoids 5 trait array lookups + } + NOR = { + piety_level >= 4 + has_trait = saint + has_trait = herald + has_trait = chakravarti + has_trait = saoshyant + has_trait = savior + } + } + + OR = { + #Things that make just same-rite people mad + trigger_if = { + limit = { + rite = $RITE$ + } + has_trait = excommunicated + } + #SIN TRAITS + num_sinful_traits >= 3 + + #HERETICAL RITE + AND = { + rite ?= { + save_temporary_scope_as = wicked_judged_rite + } + $RITE$ = { + "divergence(scope:wicked_judged_rite)" >= faith.heresy_threshold + } + } + + #CRIMINAL TRAITS + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:sodomite + GENDER_CHARACTER = scope:judged + } + has_trait = sodomite + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:deviant + GENDER_CHARACTER = scope:judged + } + has_trait = deviant + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:adulterer + GENDER_CHARACTER = scope:judged + } + has_trait = adulterer + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:fornicator + GENDER_CHARACTER = scope:judged + } + OR = { + has_trait = fornicator + has_trait = rakish + } + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:witch + GENDER_CHARACTER = scope:judged + } + has_trait = witch + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:kinslayer_1 + GENDER_CHARACTER = scope:judged + } + has_trait = kinslayer_1 + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:kinslayer_2 + GENDER_CHARACTER = scope:judged + } + has_trait = kinslayer_2 + } + AND = { + trait_is_criminal_in_rite_trigger = { + RITE = $RITE$ + TRAIT = trait:kinslayer_3 + GENDER_CHARACTER = scope:judged + } + has_trait = kinslayer_3 + } + + AND = { + has_trait = murderer + NOT = { + $RITE$ = { + trait_is_virtue_rite = murderer + } + } + } + AND = { + has_trait = cannibal + NOT = { + $RITE$ = { + trait_is_virtue_rite = cannibal + } + } + } + AND = { + has_trait = gallowsbait + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 60 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 80 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 40 + } + } + NOT = { + $RITE$ = { + trait_is_virtue_rite = gallowsbait + } + } + } + } +} + +#The whole spectrum of badness in one trigger +character_considered_morally_dubious_or_wicked_trigger = { + OR = { + character_considered_wicked_trigger = { RITE = $RITE$ } + character_considered_morally_dubious_trigger = { RITE = $RITE$ } + } +} + +rite_embraces_the_secular_flesh_trigger = { + OR = { + AND = { + trait_is_virtue_rite = lustful + $CHARACTER$.rite = { NOT = { trait_is_virtue_rite = lustful } } + } + AND = { + trait_is_sin_rite = chaste + $CHARACTER$.rite = { NOT = { trait_is_sin_rite = chaste } } + } + #you are a gay person... and their take on the gays is better than yours + trigger_if = { + limit = { + $CHARACTER$ = { + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + rite = { NOT = { rite_has_parameter = homosexuality_accepted } } + } + } + OR = { + rite_has_parameter = homosexuality_accepted + AND = { + rite_has_parameter = homosexuality_shunned + $CHARACTER$.rite = { rite_has_parameter = homosexuality_illegal } + } + } + } + #You are female and female adultery is a soft yes + trigger_if = { + limit = { + $CHARACTER$ = { + is_female = yes + rite = { NOT = { rite_has_parameter = adultery_female_accepted } } + } + } + OR = { + rite_has_parameter = adultery_female_accepted + AND = { + rite_has_parameter = adultery_female_shunned + $CHARACTER$.rite = { rite_has_parameter = adultery_female_crime } + } + } + } + #You are male and male adultery is a soft yes + trigger_if = { + limit = { + $CHARACTER$ = { + is_male = yes + rite = { NOT = { rite_has_parameter = adultery_male_accepted } } + } + } + OR = { + rite_has_parameter = adultery_male_accepted + AND = { + rite_has_parameter = adultery_male_shunned + $CHARACTER$.rite = { rite_has_parameter = adultery_male_crime } + } + } + } + } +} +#Check how your rite views YOUR horny activities +rite_forbids_the_secular_flesh_trigger = { + OR = { + AND = { + trait_is_virtue_rite = chaste + $CHARACTER$.rite = { NOT = { trait_is_virtue_rite = chaste } } + } + AND = { + trait_is_sin_rite = lustful + $CHARACTER$.rite = { NOT = { trait_is_sin_rite = lustful } } + } + #you are a gay person... and their take on the gays is crueler than yours + trigger_if = { + limit = { + $CHARACTER$ = { + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + rite = { NOT = { rite_has_parameter = homosexuality_illegal } } + } + } + OR = { + rite_has_parameter = homosexuality_illegal + AND = { + rite_has_parameter = homosexuality_shunned + $CHARACTER$.rite = { rite_has_parameter = homosexuality_accepted } + } + } + } + #You are female and female adultery is a hard no + trigger_if = { + limit = { + $CHARACTER$ = { + is_female = yes + rite = { NOT = { rite_has_parameter = adultery_female_crime } } + } + } + OR = { + rite_has_parameter = adultery_female_crime + AND = { + rite_has_parameter = adultery_female_shunned + $CHARACTER$.rite = { rite_has_parameter = adultery_female_accepted } + } + } + } + #You are male and male adultery is a hard no + trigger_if = { + limit = { + $CHARACTER$ = { + is_male = yes + rite = { NOT = { rite_has_parameter = adultery_male_crime } } + } + } + OR = { + rite_has_parameter = adultery_male_crime + AND = { + rite_has_parameter = adultery_male_shunned + $CHARACTER$.rite = { rite_has_parameter = adultery_male_accepted } + } + } + } + } +} + +###Demand Church Succession### +# True if the actor's diocese (clerical_region) is the same as TARGET's diocese. +is_in_same_clerical_region_as_trigger = { + exists = $TARGET$.capital_county.clerical_region_title + capital_county.clerical_region_title ?= $TARGET$.capital_county.clerical_region_title +} + +is_valid_demand_church_succession_target_trigger = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_tribal # also covers wanua (which carries government_is_tribal) + government_has_flag = government_is_japan_feudal + government_has_flag = government_is_mandala + } +} + +# Demand Divorce offences, shared by AI targeting and event text +# Same checks as divorce_character_ai_accept_modifier +demand_divorce_marriage_incestuous_trigger = { + $RULER$ = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = $SPOUSE$ } + } +} + +demand_divorce_spouse_heathen_trigger = { + $RULER$.faith.religion != $SPOUSE$.faith.religion +} + +demand_divorce_spouse_heretic_trigger = { + $RULER$.faith.religion = $SPOUSE$.faith.religion + $SPOUSE$ = { + faith != $RULER$.faith + } +} + +demand_divorce_spouse_infidelity_trigger = { + $SPOUSE$ = { + exposed_cheating_on_spouse_trigger = { SPOUSE = $RULER$ } + } +} + +demand_divorce_marriage_same_sex_trigger = { + $RULER$ = { + sex_same_as = $SPOUSE$ + allowed_to_marry_same_sex_trigger = no + } +} + +demand_divorce_marriage_polygamous_trigger = { + $RULER$ = { + any_consort = { + is_alive = yes + this != $SPOUSE$ + } + any_consort = { + this = $SPOUSE$ + } + } + $SPOUSE$.culture = { NOT = { has_cultural_tradition = tradition_polygamous } } + $SPOUSE$.rite = { NOT = { rite_has_doctrine = doctrine_polygamy } } +} + +demand_divorce_marriage_offensive_trigger = { + OR = { + demand_divorce_marriage_incestuous_trigger = { RULER = $RULER$ SPOUSE = $SPOUSE$ } + demand_divorce_marriage_same_sex_trigger = { RULER = $RULER$ SPOUSE = $SPOUSE$ } + demand_divorce_spouse_heathen_trigger = { RULER = $RULER$ SPOUSE = $SPOUSE$ } + demand_divorce_spouse_heretic_trigger = { RULER = $RULER$ SPOUSE = $SPOUSE$ } + demand_divorce_spouse_infidelity_trigger = { RULER = $RULER$ SPOUSE = $SPOUSE$ } + demand_divorce_marriage_polygamous_trigger = { RULER = $RULER$ SPOUSE = $SPOUSE$ } + } +} + +############################ +# Faith Rite Growth System # +############################ + +rite_growth_founder_is_archbishop_trigger = { + scope:founder = { + any_held_title = { has_clerical_region = yes } + } +} + +# Character scope. Holds a see with enough counties for a spawned rite to have somewhere to spread. +rite_growth_holds_sizable_clerical_region_trigger = { + any_held_title = { + has_clerical_region = yes + clerical_region_size >= rite_growth_min_clerical_region_size + } +} + +# Character scope, requires scope:founder +rite_growth_in_founder_spread_area_trigger = { + exists = capital_county + exists = cp:councillor_court_chaplain + trigger_if = { + limit = { rite_growth_founder_is_archbishop_trigger = yes } + OR = { + AND = { + is_landed = yes + faith = { has_doctrine_parameter = has_clerical_regions } + exists = capital_county.clerical_region_title + scope:founder.capital_county.clerical_region_title ?= capital_county.clerical_region_title + } + AND = { + is_landed = yes + exists = scope:founder.capital_county + capital_county = { + squared_distance = { + target = scope:founder.capital_county + value <= squared_distance_small + } + } + } + } + } + trigger_else = { + OR = { + is_vassal_or_below_of = scope:founder + AND = { + is_landed = yes + exists = scope:founder.capital_county + capital_county = { + squared_distance = { + target = scope:founder.capital_county + value <= squared_distance_small + } + } + } + } + } +} + +# Founder eligibility for spawning a new rite +is_eligible_rite_growth_founder_trigger = { + is_available_ai_adult = yes + rite = scope:source_rite + learning >= medium_skill_rating + NOR = { + has_trait = heresiarch + has_trait = herald + recently_converted_faith_trigger = yes + has_character_flag = recently_converted_by_rite_growth + faith.religious_head ?= this + scope:source_rite.head_of_rite ?= this + highest_held_title_tier >= tier_empire + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + OR = { + AND = { + is_landed = yes + highest_held_title_tier >= tier_duchy + any_held_title = { + tier = tier_county + rite = scope:source_rite + } + } + any_held_title = { has_clerical_region = yes } + } +} + +# AI sweep-target eligibility for rite_growth.0011 +is_eligible_rite_growth_target_trigger = { + is_physically_able_ai_adult = yes + rite = scope:source_rite + NOR = { + scope:founder ?= this + has_trait = heresiarch + has_trait = herald + recently_converted_faith_trigger = yes + has_character_flag = recently_converted_by_rite_growth + has_character_flag = ai_will_not_convert + this = faith.religious_head + scope:source_rite.head_of_rite ?= this + highest_held_title_tier >= tier_empire + } + OR = { + AND = { + is_landed = yes + highest_held_title_tier >= tier_county + any_held_title = { + tier = tier_county + OR = { + rite = scope:source_rite + rite = scope:new_rite + } + } + } + any_held_title = { has_clerical_region = yes } + } +} + +# Everyone who doesn't fulfil this gets to include_unknown = yes +rite_growth_founder_is_well_versed_trigger = { + tenets_doctrines_unknown_to_faith >= 5 +} + +rite_growth_tenet_is_unique_to_new_rite_trigger = { + save_temporary_scope_as = candidate_tenet + scope:source_rite = { NOT = { rite_has_tenet = scope:candidate_tenet } } +} + +rite_growth_doctrine_is_unique_to_new_rite_trigger = { + save_temporary_scope_as = candidate_doctrine + scope:new_rite = { rite_has_doctrine = scope:candidate_doctrine } + scope:source_rite = { NOT = { rite_has_doctrine = scope:candidate_doctrine } } +} + +rite_growth_founder_is_meaningful_relation_trigger = { + OR = { + is_close_or_extended_family_of = scope:founder + any_spouse = { this = scope:founder } + any_consort = { this = scope:founder } + betrothed ?= scope:founder + has_relation_friend = scope:founder + has_relation_lover = scope:founder + has_relation_potential_lover = scope:founder + has_relation_rival = scope:founder + liege ?= scope:founder + scope:founder.liege ?= root + AND = { + exists = scope:founder.dynasty + dynasty ?= scope:founder.dynasty + } + } +} + +# Can edit a rite +can_edit_rite_trigger = { + is_adult = yes + is_at_war = no + custom_tooltip = { + text = ecumenical_council_already_ongoing_tt + NOT = { faith = { has_variable = ecumenical_council_ongoing } } + } + trigger_if = { + limit = { + is_clergy = no + highest_held_title_tier = tier_county + top_liege != this + } + custom_description = { + text = "faith_creation_duchy_or_higher" + highest_held_title_tier >= tier_duchy + } + } + + trigger_if = { + limit = { + rite = { + rite_has_doctrine = doctrine_theocracy_temporal + } + is_clergy = no + has_puppet_type = theological_agent_puppet + # Allow Mandala God-Kings and Son of Heaven to create and edit rites freely + trigger_if = { + limit = { + top_overlord = this + } + NOR = { + government_has_flag = government_is_mandala + tgp_has_access_to_ministry_trigger = yes + } + } + } + is_puppet_action_valid = puppet_trigger_can_create_rite + } + + custom_description = { + text = "character_is_rite_head" + rite.head_of_rite == root + } + + custom_description = { + text = "character_can_only_edit_one_rite" + NOT = { exists = var:has_edited_a_rite } + } + + trigger_if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + } + + NOT = { + custom_description = { + text = faith_has_been_reformed + object = faith + exists = faith.var:has_been_reformed + } + } + + trigger_if = { + limit = { + NOT = { + has_character_flag = ignore_3_holy_site_rule + } + } + # Empire Faith Gate: easier reformation path + trigger_if = { + limit = { + empire_faith_gate_enabled_trigger = yes + } + custom_tooltip = { + text = empire_faith_gate_reformation_piety_level + piety_level >= 2 + } + custom_tooltip = { + text = empire_faith_gate_reformation_tribal_authority + has_realm_law = tribal_authority_3 + } + custom_tooltip = { + text = empire_faith_gate_reformation_holy_site + faith = { + any_holy_site_barony = { + count >= 3 + county.holder = { + faith = root.faith + } + } + } + } + } + # Vanilla: 3 holy sites + trigger_else = { + faith = { + num_realm_holy_sites_faithful_holders = { + CHARACTER = root + COUNT = 3 + } + } + } + } + + custom_tooltip = { + text = faith_reformation_via_decision + faith = { + NOT = { has_variable = block_reformation_var } + } + } + } +} + +# Can create a rite +can_create_rite_trigger = { + + is_adult = yes + is_at_war = no + + trigger_if = { + limit = { + is_clergy = no + highest_held_title_tier = tier_county + top_liege != this + } + custom_description = { + text = "faith_creation_duchy_or_higher" + highest_held_title_tier >= tier_duchy + } + } + + trigger_if = { + limit = { + rite = { + rite_has_doctrine = doctrine_theocracy_temporal + } + is_clergy = no + has_puppet_type = theological_agent_puppet + # Allow Mandala God-Kings and Son of Heaven to create and edit rites freely + trigger_if = { + limit = { + top_overlord = this + } + NOR = { + government_has_flag = government_is_mandala + tgp_has_access_to_ministry_trigger = yes + } + } + } + is_puppet_action_valid = puppet_trigger_can_create_rite + } + + custom_description = { + text = "character_is_not_real_head" + faith.religious_head != root + } + + custom_description = { + text = "character_can_only_create_one_rite" + NOT = { exists = var:has_created_a_faith } + } + + trigger_if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + } + + NOT = { + custom_description = { + text = faith_has_been_reformed + object = faith + exists = faith.var:has_been_reformed + } + } + + trigger_if = { + limit = { + NOT = { + has_character_flag = ignore_3_holy_site_rule + } + } + # Empire Faith Gate: easier reformation path + trigger_if = { + limit = { + empire_faith_gate_enabled_trigger = yes + } + custom_tooltip = { + text = empire_faith_gate_reformation_piety_level + piety_level >= 2 + } + custom_tooltip = { + text = empire_faith_gate_reformation_tribal_authority + has_realm_law = tribal_authority_3 + } + custom_tooltip = { + text = empire_faith_gate_reformation_holy_site + faith = { + any_holy_site_barony = { + count >= 3 + county.holder = { + faith = root.faith + } + } + } + } + } + # Vanilla: 3 holy sites + trigger_else = { + faith = { + num_realm_holy_sites_faithful_holders = { + CHARACTER = root + COUNT = 3 + } + } + } + } + + custom_tooltip = { + text = faith_reformation_via_decision + faith = { + NOT = { has_variable = block_reformation_var } + } + } + } +} + +spiritual_hof_or_realm_priest_superior_recipient_trigger = { + #If there are no superiors (867), just their own bishop is fine... + trigger_if = { + limit = { + NOR = { + AND = { + religious_head_or_challenger ?= scope:recipient + faith = { + has_doctrine = doctrine_spiritual_head + } + } + exists = cp:councillor_court_chaplain.superior + AND = { + government_has_flag = government_is_theocracy + exists = superior + } + } + } + custom_tooltip = { + text = duke_plus_court_chaplain_tt + cp:councillor_court_chaplain ?= { + highest_held_title_tier >= tier_duchy + government_has_flag = government_is_theocracy + } + } + + } + trigger_else = { + custom_tooltip = { + text = superior_or_spiritual_hof_tt + OR = { + AND = { + religious_head_or_challenger = scope:recipient + faith = { + has_doctrine = doctrine_spiritual_head + } + } + cp:councillor_court_chaplain ?= { + superior ?= scope:recipient + } + AND = { + government_has_flag = government_is_theocracy + superior ?= scope:recipient + } + } + } + } +} + +hof_or_realm_priest_superior_recipient_trigger = { + #If there are no superiors (867), just their own bishop is fine... + trigger_if = { + limit = { + NOR = { + exists = faith.religious_head + exists = cp:councillor_court_chaplain.superior + AND = { + government_has_flag = government_is_theocracy + exists = superior + } + } + } + custom_tooltip = { + text = duke_plus_court_chaplain_tt + cp:councillor_court_chaplain ?= { + highest_held_title_tier >= tier_duchy + government_has_flag = government_is_theocracy + } + } + + } + trigger_else = { + custom_tooltip = { + text = superior_or_hof_tt + OR = { + faith = { + religious_head ?= scope:recipient + } + cp:councillor_court_chaplain ?= { + superior ?= scope:recipient + } + AND = { + government_has_flag = government_is_theocracy + superior ?= scope:recipient + } + } + } + } +} +broader_clergy_show_hof_or_superior_interactions_trigger = { + OR = { + religious_head_or_challenger ?= scope:recipient + scope:recipient = { + is_clergy = yes + OR = { + AND = { + exists = scope:puppet_or_actor.cp:councillor_court_chaplain + this = scope:puppet_or_actor.cp:councillor_court_chaplain + } + is_ruler = yes + } + } + } +} + +need_hof_for_clergy_interaction_trigger = { + trigger_if = { + limit = { has_pam_dlc_trigger = yes } + highest_held_title_tier >= tier_kingdom + } + trigger_else = { + highest_held_title_tier >= tier_empire + } +} + +# Seek Indulgences: whose portrait the interaction appears on, in petitioner scope +# is_clergy misses many PAM prelates +seek_indulgences_show_recipient_trigger = { + OR = { + religious_head_or_challenger ?= scope:recipient + cp:councillor_court_chaplain ?= scope:recipient + scope:recipient = { + is_ruler = yes + pam_is_investiture_clergy_trigger = yes + } + } +} + +# Actor scope: capital region archbishops resolve to themselves and do not count +seek_indulgences_has_capital_archbishop_trigger = { + capital_county ?= { + clerical_region_title ?= { + holder ?= { + NOT = { this = scope:actor } + faith = scope:actor.faith + } + } + } +} + +# Seek Indulgences: a landed prelate of the petitioner's own faith within their top realm. +seek_indulgences_landed_clergy_recipient_trigger = { + scope:recipient = { + pam_is_investiture_landed_prelate_trigger = yes + faith = scope:actor.faith + top_liege ?= scope:actor.top_liege + } +} + +# Your own archbishop outranks the Head of Faith +# Archbishops themselves go to the Head of Faith, then the realm priest last +seek_indulgences_recipient_trigger = { + trigger_if = { + limit = { + seek_indulgences_has_capital_archbishop_trigger = yes + pam_is_archbishop_or_higher_trigger = no + } + custom_tooltip = { + text = seek_indulgences_recipient_archbishop_tt + OR = { + capital_county.clerical_region_title.holder ?= scope:recipient + seek_indulgences_landed_clergy_recipient_trigger = yes + } + } + } + trigger_else_if = { + limit = { + exists = religious_head_or_challenger + } + custom_tooltip = { + text = seek_indulgences_recipient_head_of_faith_tt + OR = { + religious_head_or_challenger ?= scope:recipient + seek_indulgences_landed_clergy_recipient_trigger = yes + } + } + } + trigger_else = { + custom_tooltip = { + text = seek_indulgences_recipient_realm_priest_tt + OR = { + cp:councillor_court_chaplain ?= scope:recipient + seek_indulgences_landed_clergy_recipient_trigger = yes + } + } + } +} + +# Bishop search for the excommunicated recovery alert. Evaluated on the candidate; $ACTOR$ is the excommunicated player. +excommunicated_recovery_valid_cleric_for_actor_trigger = { + save_temporary_scope_as = recovery_cleric + NOT = { scope:recovery_cleric = $ACTOR$ } + $ACTOR$ = { + NOR = { + petition_head_of_faith_repentance_requires_petition_trigger = yes + has_character_modifier = recent_excommunication + is_at_war_with = scope:recovery_cleric + } + } + scope:recovery_cleric = { + highest_held_title_tier >= tier_duchy + OR = { + is_clergy = yes + government_has_flag = government_is_ecclesiastical + } + faith = $ACTOR$.faith + # Only archbishops and above may name the Head of Faith here; everyone else needs a local bishop. + $ACTOR$ = { + trigger_if = { + limit = { pam_is_archbishop_or_higher_trigger = no } + NOT = { faith.religious_head ?= scope:recovery_cleric } + } + } + } +} +hof_or_realm_priest_superior_actor_trigger = { + #If there are no superiors (867), just their own bishop is fine... + trigger_if = { + limit = { + NOR = { + exists = faith.religious_head + exists = cp:councillor_court_chaplain.superior + AND = { + government_has_flag = government_is_theocracy + exists = superior + } + } + } + custom_tooltip = { + text = duke_plus_court_chaplain_tt + cp:councillor_court_chaplain ?= { + highest_held_title_tier >= tier_duchy + government_has_flag = government_is_theocracy + } + } + + } + trigger_else = { + custom_tooltip = { + text = superior_or_hof_tt + OR = { + faith = { + religious_head ?= scope:recipient + } + cp:councillor_court_chaplain ?= { + superior ?= scope:recipient + } + AND = { + government_has_flag = government_is_theocracy + superior ?= scope:recipient + } + } + } + } +} + +faith_can_have_heresy_trigger = { + OR = { + NOR = { + has_doctrine = eastern_hostility_doctrine + has_doctrine = sinitic_hostility_doctrine + } + has_doctrine = heresy_hostility_doctrine #Zoroastrians also get heresies, despite being Eastern. + } +} + +faith_is_in_same_rf = { + trigger_if = { + limit = { is_in_family = rf_abrahamic } + $FAITH$ = { is_in_family = rf_abrahamic } + } + trigger_else_if = { + limit = { is_in_family = rf_pagan } + $FAITH$ = { is_in_family = rf_pagan } + } + trigger_else_if = { + limit = { is_in_family = rf_eastern } + $FAITH$ = { is_in_family = rf_eastern } + } + trigger_else_if = { + limit = { is_in_family = rf_sinitic } + $FAITH$ = { is_in_family = rf_sinitic } + } + trigger_else = { + always = no + } +} + +faith_is_syncretic_with = { + $FAITH$ = { + trigger_if = { + limit = { has_doctrine_parameter = unreformed } + prev = { has_doctrine_parameter = unreformed_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = eastern_orthodox_religion } } + prev = { has_doctrine_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = catholic_religion } } + prev = { has_doctrine_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = protestant_religion } } + prev = { has_doctrine_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = oriental_orthodox_religion } } + prev = { has_doctrine_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { religion_tag = islam_religion } + prev = { has_doctrine_parameter = islamic_syncretic_actor } + } + trigger_else_if = { + limit = { religion_tag = judaism_religion } + prev = { has_doctrine_parameter = jewish_syncretic_actor } + } + trigger_else_if = { + limit = { is_in_family = rf_eastern } + prev = { has_doctrine_parameter = eastern_syncretic_actor } + } + trigger_else_if = { + limit = { is_in_family = rf_sinitic } + prev = { has_doctrine_parameter = sinitic_syncretic_actor } + } + trigger_else = { + always = no + } + } +} + +rite_is_syncretic_with = { + $RITE$ = { + trigger_if = { + limit = { rite_has_parameter = unreformed } + prev = { rite_has_parameter = unreformed_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = eastern_orthodox_religion } } + prev = { rite_has_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = catholic_religion } } + prev = { rite_has_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = protestant_religion } } + prev = { rite_has_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = oriental_orthodox_religion } } + prev = { rite_has_parameter = christian_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = islam_religion } } + prev = { rite_has_parameter = islamic_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { religion_tag = judaism_religion } } + prev = { rite_has_parameter = jewish_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { is_in_family = rf_eastern } } + prev = { rite_has_parameter = eastern_syncretic_actor } + } + trigger_else_if = { + limit = { faith = { is_in_family = rf_sinitic } } + prev = { rite_has_parameter = sinitic_syncretic_actor } + } + trigger_else = { + always = no } } } diff --git a/common/scripted_triggers/00_scripted_rule_triggers.txt b/common/scripted_triggers/00_scripted_rule_triggers.txt index 8a9b55fb8..28e5d9758 100644 --- a/common/scripted_triggers/00_scripted_rule_triggers.txt +++ b/common/scripted_triggers/00_scripted_rule_triggers.txt @@ -9,6 +9,7 @@ can_raid_trigger = { vassal_contract_has_flag = vassal_contract_allow_raiding # Faith Logic. faith = { has_doctrine_parameter = faith_can_raid } + has_personal_tenet_flag = unlock_destruction_raid_intent_personal # Dynasty logic. dynasty ?= { OR = { @@ -54,7 +55,8 @@ can_raid_trigger = { # Some faiths prohibit this. OR = { NOR = { - faith = { has_doctrine_parameter = holy_wars_forbidden } + rite ?= { rite_has_parameter = holy_wars_forbidden } + rite ?= { rite_has_parameter = tenet_peace_of_god_raid_ban } government_has_flag = government_is_landless_adventurer } # But not for Nomads or Wanua diff --git a/common/scripted_triggers/00_succession_triggers.txt b/common/scripted_triggers/00_succession_triggers.txt index 9fa311068..2f09a11f6 100644 --- a/common/scripted_triggers/00_succession_triggers.txt +++ b/common/scripted_triggers/00_succession_triggers.txt @@ -24,7 +24,7 @@ special_succession_jirga_trigger = { historical_succession_access_single_heir_succession_law_trigger = { trigger_if = { - limit = { government_allows = administrative } + limit = { government_has_mechanic = administrative } OR = { tgp_japan_single_heir_succession_override_trigger = yes tgp_korea_single_heir_succession_override_trigger = yes @@ -59,7 +59,7 @@ historical_succession_access_single_heir_succession_law_trigger = { } historical_succession_access_single_heir_succession_law_youngest_trigger = { - NOT = { government_allows = administrative } + NOT = { government_has_mechanic = administrative } # OR = { # #has_title = title:e_byzantium # #Add any subsequent exceptions here. @@ -67,7 +67,7 @@ historical_succession_access_single_heir_succession_law_youngest_trigger = { } historical_succession_access_single_heir_dynasty_house_trigger = { - NOT = { government_allows = administrative } + NOT = { government_has_mechanic = administrative } AND = { has_title = title:d_bohemia culture = { has_innovation = innovation_table_of_princes } @@ -78,7 +78,7 @@ can_have_meritocratic_regency_succession_law_trigger = { has_tgp_dlc_trigger = yes is_independent_ruler = yes highest_held_title_tier = tier_empire - government_allows = administrative + government_has_mechanic = administrative government_allows = merit NOT = { government_allows = obedience } # Stop Khanates OR = { diff --git a/common/scripted_triggers/00_title_triggers.txt b/common/scripted_triggers/00_title_triggers.txt index 9935ee81b..83f05d77d 100644 --- a/common/scripted_triggers/00_title_triggers.txt +++ b/common/scripted_triggers/00_title_triggers.txt @@ -119,11 +119,12 @@ title_counts_towards_too_many_duchies_trigger = { title_lost_from_realm_on_foreign_ruler_succession_trigger = { tier > $VASSAL$.highest_held_title_tier exists = holder # Ignoring titles that will be created by confederate partition, cause that be magic and unlikely to make a warning anyway + NOT = { heir_resigns_realm_on_inheriting = $VASSAL$ } holder = { NOR = { this = $LIEGE$ target_is_liege_or_above = $LIEGE$ - government_has_flag = government_is_special_administrative # Ignoring because admin counts do not take it with them, but immediately resign it when they inherit a governorship + government_has_mechanic = administrative # Ignoring because admin counts do not take it with them, but immediately resign it when they inherit a governorship } } } @@ -136,14 +137,14 @@ character_title_allows_off_screen_wandering_trigger = { AND = { highest_held_title_tier >= tier_empire OR = { - government_has_flag = government_is_special_administrative + government_has_mechanic = administrative government_has_flag = government_is_clan } } # No administrative kings. AND = { highest_held_title_tier = tier_kingdom - government_has_flag = government_is_special_administrative + government_has_mechanic = administrative } # No religious heads. faith.religious_head ?= this diff --git a/common/scripted_triggers/00_war_and_peace_triggers.txt b/common/scripted_triggers/00_war_and_peace_triggers.txt index 3583a4575..e6ecfc0ef 100644 --- a/common/scripted_triggers/00_war_and_peace_triggers.txt +++ b/common/scripted_triggers/00_war_and_peace_triggers.txt @@ -220,29 +220,255 @@ can_potentially_call_ally_trigger = { } } -war_declarer_needs_hook_on_liege = { - scope:actor = { - top_liege != this - liege != scope:recipient - NAND = { - government_allows = administrative - liege = { government_allows = administrative } +admin_governor_allows_declaring_war_trigger = { + OR = { + vassal_contract_has_flag = admin_theme_frontier + vassal_contract_has_flag = admin_theme_naval + } +} + +allows_declaring_war_against_target_trigger = { + save_temporary_scope_as = attacker_check + $TARGET$ = { save_temporary_scope_as = defender_check } + custom_tooltip = { + text = sworn_peace_tt + NOT = { has_character_flag = sworn_peace } + } + is_incapable = no + trigger_if = { + limit = { + NOT = { + has_cb_on = { + target = scope:defender_check + casus_belli = pam_humiliation_cb + } + } + } + can_attack_in_hierarchy = scope:defender_check + } + trigger_if = { + limit = { + NOT = { + government_has_flag = can_start_war_with_raised_troops + } + } + has_raised_armies = no + } + trigger_else = { + custom_description = { + text = army_blocks_defender_army + NOT = { + any_army = { + location.county.holder ?= { + target_is_same_character_or_above = scope:defender_check + } + } + } + } + } + NOT = { + is_allied_in_war = scope:defender_check + } + custom_description = { + text = "is_not_bankrupt" + is_in_debt = no + } + is_in_activity = no + trigger_if = { + limit = { + culture = { has_cultural_parameter = cannot_attack_allies } } NOT = { - vassal_contract_has_flag = vassal_contract_war_override + is_allied_to = scope:defender_check } - OR = { - AND = { - liege = scope:recipient.liege - liege = { has_realm_law_flag = vassal_internal_wars_banned } - } - liege = { has_realm_law_flag = vassal_all_wars_banned } - AND = { - has_realm_law = japanese_bureaucracy_2 - NOT = { government_allows = administrative } + } + trigger_if = { + limit = { + culture = { has_cultural_parameter = cannot_attack_truces } + } + NOT = { + has_truce = scope:defender_check + } + } + is_imprisoned = no + trigger_if = { + limit = { + has_variable_list = subjugation_offer_under_consideration + } + custom_description = { + text = is_not_considering_offer_of_subjugation + NOT = { + is_target_in_variable_list = { + name = subjugation_offer_under_consideration + target = scope:defender_check + } } } } + scope:defender_check = { + custom_tooltip = { + text = is_a_herder_recipient_tt + NOT = { government_has_flag = government_is_herder } # herders can't fight + } + NOT = { is_tributary_of_suzerain_or_above = scope:attacker_check } # can't fight your tributaries or your tributaries' tributaries + NOT = { has_strong_hook = scope:attacker_check } + trigger_if = { + limit = { is_imprisoned = yes } + custom_tooltip = { + text = declare_war_target_is_your_prisoner_tt + imprisoner != scope:attacker_check + } + } + } + trigger_if = { + limit = { liege != this } + trigger_if = { + limit = { + government_has_mechanic = administrative + } + # internal war + trigger_if = { + limit = { top_liege = scope:defender_check.top_liege } + trigger_if = { + limit = { + scope:defender_check = { government_has_mechanic = administrative } + top_liege != scope:defender_check + } + custom_tooltip = { + text = admin_cannot_declare_internal_wars + always = no + } + } + } + trigger_else = { + trigger_if = { # Admin - Laws prevent all vassals from declaring war + limit = { + top_liege = { + has_realm_law_flag = admin_vassal_wars_banned + } + } + custom_tooltip = { + text = admin_all_vassal_wars_banned + always = no + } + } + trigger_else = { + trigger_if = { # Admin - Laws only allow frontier and naval themes to declare war + limit = { + top_liege = { + has_realm_law_flag = admin_vassal_wars_restricted + } + } + custom_tooltip = { + text = admin_all_vassal_wars_banned + admin_governor_allows_declaring_war_trigger = yes + } + } + trigger_if = { # Admin - Laws only allow frontier and naval themes to declare war IF they have permission + limit = { + top_liege = { + has_realm_law_flag = admin_vassal_wars_permission_only + } + } + custom_tooltip = { + text = admin_vassal_wars_permission_only_desc + has_variable = admin_permission_to_declare_war + } + } + } + } + } + trigger_else = { + trigger_if = { + limit = { + liege ?= { + has_realm_law_flag = vassal_all_wars_banned_permanent + } + NOT = { + top_participant_group:dynastic_cycle ?= { + has_participant_group_parameter = dynastic_cycle_vassal_internal_wars_allowed + } + } + } + custom_tooltip = { + text = admin_all_vassal_wars_banned + government_has_mechanic = administrative + } + } + } + trigger_if = { + limit = { + trigger_if = { + limit = { NOT = { exists = scope:recipient } } + scope:defender_check = { + save_temporary_scope_as = recipient + } + } + war_declarer_needs_hook_on_liege = yes + } + has_usable_hook = liege + } + } + trigger_if = { + limit = { + scope:defender_check = { + OR = { + has_subject_contract_group = tributary_celestial + has_subject_contract_group = tributary_hegemonic + } + } + is_independent_ruler = no # to avoid duplicating tooltips already applying to the top_liege + } + NOT = { + scope:defender_check = { + is_tributary_of = scope:attacker_check.top_liege + } + } + } + scope:attacker_check = { + trigger_if = { + limit = { has_government = landless_adventurer_government } + custom_tooltip = { + text = camp_located_in_defender_realm.tt + domicile.domicile_location.county.holder = { + NOT = { + target_is_same_character_or_above = scope:defender_check + } + } + } + } + } + trigger_if = { + limit = { + scope:attacker_check = { + is_confederation_member = yes + } + } + NOT = { + scope:defender_check = { + is_member_of_confederation = scope:attacker_check.confederation + } + } + } +} + +war_declarer_needs_hook_on_liege = { + top_liege != this + liege != scope:recipient + NAND = { + government_has_mechanic = administrative + liege = { government_has_mechanic = administrative } + } + NOT = { + vassal_contract_has_flag = vassal_contract_war_override + } + OR = { + AND = { + liege = scope:recipient.liege + liege = { has_realm_law_flag = vassal_internal_wars_banned } + } + liege = { has_realm_law_flag = vassal_all_wars_banned } + } } any_liege_or_above_is_participant_trigger = { @@ -261,7 +487,7 @@ can_use_conquest_cbs_trigger = { government_has_flag = government_is_clan government_has_flag = government_is_nomadic government_has_flag = government_is_steppe_admin - faith = { has_doctrine_parameter = conquest_cb_enabled } + rite = { rite_has_parameter = conquest_cb_enabled } culture = { has_cultural_parameter = can_use_conquest_cbs } AND = { government_has_flag = government_is_japan_feudal @@ -289,7 +515,7 @@ can_be_warrior_trigger = { #not for admin $ARMY_OWNER$ = { NOT = { - government_allows = administrative + government_has_mechanic = administrative } culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars } } @@ -318,7 +544,8 @@ can_be_knight_trigger = { can_be_warrior_trigger = { ARMY_OWNER = $ARMY_OWNER$ } trigger_if = { # Admin governors cannot be knights limit = { - government_allows = administrative + $ARMY_OWNER$ = { government_has_mechanic = administrative } + is_courtier = no exists = primary_title } primary_title = { @@ -342,7 +569,13 @@ can_be_knight_trigger = { is_clergy = yes } OR = { - faith = { has_doctrine_parameter = clergy_can_fight } + rite = { rite_has_parameter = clergy_can_fight } + AND = { + has_personal_tenet_flag = clergy_can_fight_personal + NOT = { + rite = { rite_has_parameter = pacifist } + } + } culture = { has_cultural_parameter = culture_clergy_can_fight } AND = { $ARMY_OWNER$.culture = { @@ -390,14 +623,6 @@ can_be_commander_basic_trigger = { incapable = no hostage = no } - NAND = { - is_clergy = yes - NOR = { - has_trait = order_member # Order Members will fight for their faith even if their faith says no - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - } - } OR = { # You can always lead your own armies this = $ARMY_OWNER$ @@ -438,6 +663,7 @@ can_be_commander_now_trigger = { has_character_flag = meditation_character_flag has_character_flag = local_shrine_rite has_character_flag = petition_liege_character_flag + has_variable = petition_head_of_faith_petitioner has_character_flag = holding_court_character_flag is_being_visited_on_tour_strict = yes } @@ -446,18 +672,23 @@ can_be_commander_now_trigger = { get_valid_commander_list_trigger = { any_vassal = { + count = all add_to_temporary_list = temp$LIST$ } any_courtier = { + count = all add_to_temporary_list = temp$LIST$ } any_in_list = { list = temp$LIST$ count = all - can_be_commander_now_trigger = { ARMY_OWNER = scope:army_owner } - - add_to_temporary_list = $LIST$ + trigger_if = { + limit = { + can_be_commander_now_trigger = { ARMY_OWNER = scope:army_owner } + } + add_to_temporary_list = $LIST$ + } } } @@ -686,13 +917,25 @@ is_religious_war = { } } +# scope:attacker and scope:defender come from holy war defensive joining +same_faith_clergy_war_trigger = { + scope:attacker.faith = scope:defender.faith + scope:attacker = { government_has_flag = government_uses_church_authority } + scope:defender = { + OR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_holy_order + } + } +} + conquest_cb_holder_under_target_can_be_vassalized = { # If there is no holder they can't be vassalized! holder ?= { # We can only vassalize characters of a lower tier than us. highest_held_title_tier < scope:attacker.highest_held_title_tier # We can't vassalize Governors - NOT = { government_has_flag = government_is_special_administrative } + NOT = { government_has_mechanic = administrative } # Only (sub)vassals of the defender can be considered for transfer (no poaching vassals from 3rd parties without fighting them!) target_is_liege_or_above = scope:defender # *All* of a character's subrealm must be within the target area. If we're attacking for Jerusalem, we don't want to also be stealing parts of Egypt, Syria, etc. @@ -707,17 +950,17 @@ religious_cb_holder_under_target_can_be_vassalized = { conquest_cb_holder_under_target_can_be_vassalized = yes # Religious Tolerance Check - scope:attacker.faith = { - OR = { - # For all Faiths, if the attacker views this vassal's faith more favorably than the defender does, they are 'liberated' and become vassals under the attacker. - # For example, if Catholics are crusading against Ash'aris(viewed as Evil), any Messalian vassals (viewed as Hostile) will become vassals under the Catholic attacker. + OR = { + # For all Faiths, if the attacker views this vassal's faith more favorably than the defender does, they are 'liberated' and become vassals under the attacker. + # For example, if Catholics are crusading against Ash'aris(viewed as Evil), any Messalian vassals (viewed as Hostile) will become vassals under the Catholic attacker. + scope:attacker.faith = { faith_hostility_level_comparison = { prev.holder.faith < scope:defender.faith } - - # Pluralist faiths always attempt to preserve vassals if possible, even if the vassal follows an Evil faith. - has_doctrine_parameter = pluralism_pluralistic_holy_wars_preserve_vassals } + + # Pluralist faiths always attempt to preserve vassals if possible, even if the vassal follows an Evil faith. + scope:attacker.rite = { rite_has_parameter = pluralism_pluralistic_holy_wars_preserve_vassals } } } @@ -767,7 +1010,7 @@ can_use_viking_invasion_cbs_trigger = { can_use_viking_invasion_cbs_dlc_trigger = { culture = { has_innovation = innovation_longboats } - faith = { has_doctrine = tenet_warmonger } + rite = { rite_has_tenet = tenet_warmonger } any_sub_realm_county = { is_coastal_county = yes } trigger_if = { limit = { is_ai = yes } @@ -779,7 +1022,7 @@ can_use_viking_invasion_cbs_dlc_trigger = { NOT = { any_liege_or_above = { NOT = { - faith = { has_doctrine = tenet_warmonger } + rite = { rite_has_tenet = tenet_warmonger } } } } @@ -906,7 +1149,7 @@ herders_and_tributary_constraints = { NOR = { custom_tooltip = { text = is_a_herder_defender_tt # herders can't fight - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder } is_tributary_of_suzerain_or_above = scope:attacker # can't fight your tributaries or your tributaries' tributaries } @@ -985,7 +1228,7 @@ feudal_clan_tribal_conquest_constraints = { short_term_gold < 200 OR = { AND = { - government_has_flag = government_is_special_administrative + government_has_mechanic = administrative short_term_gold < 700 this != top_liege } diff --git a/common/scripted_triggers/00_weather_triggers.txt b/common/scripted_triggers/00_weather_triggers.txt index 57905aa25..dcfb960e5 100644 --- a/common/scripted_triggers/00_weather_triggers.txt +++ b/common/scripted_triggers/00_weather_triggers.txt @@ -106,7 +106,6 @@ tropical_seasons_region_trigger = { geographical_region = world_africa_west geographical_region = world_africa_east geographical_region = world_india_deccan - geographical_region = world_burma geographical_region = world_asia_china geographical_region = world_asia_southeast } @@ -394,15 +393,22 @@ current_season_dry_season = { current_month < 3 } } - trigger_else = { - location = { - geographical_region = seasonal_region_deccan + trigger_else_if = { + limit = { + location = { + geographical_region = seasonal_region_deccan + } } OR = { current_month >= 12 current_month < 3 } } + trigger_else = { # June, July and August are generally dry + #Generic Northern Hemisphere + current_month >= 6 + current_month < 9 + } } current_season_rainy_season = { @@ -501,6 +507,14 @@ current_season_wet = { current_season_rainy_season = yes } } +current_season_wet_extended = { + OR = { + current_season_spring = yes + current_season_autumn = yes + current_season_winter = yes + current_season_rainy_season = yes + } +} current_season_dry = { OR = { current_season_summer = yes diff --git a/common/scripted_triggers/01_fp1_scripted_triggers.txt b/common/scripted_triggers/01_fp1_scripted_triggers.txt index 5e32d0531..e44566282 100644 --- a/common/scripted_triggers/01_fp1_scripted_triggers.txt +++ b/common/scripted_triggers/01_fp1_scripted_triggers.txt @@ -211,7 +211,7 @@ basic_can_have_trial_by_combat_trigger = { can_have_trial_by_combat_trigger = { # First, evaluate culture to trim down our potentials list. - scope:actor = { basic_can_have_trial_by_combat_trigger = yes } + scope:puppet_or_actor = { basic_can_have_trial_by_combat_trigger = yes } scope:recipient = { basic_can_have_trial_by_combat_trigger = yes } } @@ -221,14 +221,14 @@ eligible_knight_to_champion_trial_by_combat_trigger = { } trial_by_combat_shown_and_not_invalid_trigger = { - # Scope:actor must be able to fight personally. - scope:actor = { can_start_single_combat_trigger = yes } - # Scope:actor cannot challenge someone they have a ceasefire against. - scope:actor = { + # Scope:puppet_or_actor must be able to fight personally. + scope:puppet_or_actor = { can_start_single_combat_trigger = yes } + # Scope:puppet_or_actor cannot challenge someone they have a ceasefire against. + scope:puppet_or_actor = { NOT = { has_truce = scope:recipient } } - # Scope:actor *definitely* cannot challenge someone they're at war with. - scope:actor = { + # Scope:puppet_or_actor *definitely* cannot challenge someone they're at war with. + scope:puppet_or_actor = { NOT = { is_at_war_with = scope:recipient } } } @@ -237,7 +237,7 @@ trial_by_combat_is_valid_trigger = { # Calc some stuff that might invalidate elsewhere before the bout is sorted. trial_by_combat_shown_and_not_invalid_trigger = yes # Must have an imprisonment reason on the character. - scope:actor = { has_imprisonment_reason = scope:recipient } + scope:puppet_or_actor = { has_imprisonment_reason = scope:recipient } # Scope:recipient must be able to fight or else have at least *one* designatable champion. scope:recipient = { trigger_if = { @@ -273,7 +273,7 @@ trial_by_combat_is_valid_trigger = { } } # Neither of the characters can be imprisoned. - scope:actor = { is_imprisoned = no } + scope:puppet_or_actor = { is_imprisoned = no } scope:recipient = { is_imprisoned = no } } diff --git a/common/scripted_triggers/02_ep1_scripted_triggers.txt b/common/scripted_triggers/02_ep1_scripted_triggers.txt index 2f232b68d..988b6da8b 100644 --- a/common/scripted_triggers/02_ep1_scripted_triggers.txt +++ b/common/scripted_triggers/02_ep1_scripted_triggers.txt @@ -19,6 +19,8 @@ ep1_is_valid_character_for_inspiration_trigger = { any_traveling_family_member = { count = 1 } + # Prevent paiza merchants from becoming inspired + NOT = { has_variable = merchant_var } } } @@ -290,7 +292,6 @@ hold_court_8010_county_trigger = { } target_of_powerful_faction_trigger = { - exists = yes OR = { faction_is_type = liberty_faction faction_is_type = claimant_faction diff --git a/common/scripted_triggers/03_fp2_scripted_triggers.txt b/common/scripted_triggers/03_fp2_scripted_triggers.txt index aed14e94c..5dda508b7 100644 --- a/common/scripted_triggers/03_fp2_scripted_triggers.txt +++ b/common/scripted_triggers/03_fp2_scripted_triggers.txt @@ -59,14 +59,8 @@ eligible_for_fp2_dynasty_legacies_trigger = { #is_toledo_ownership_valid_trigger = { # title:c_toledo.holder = { -# OR = { -# this = root -# liege = root -# top_liege = root -# } -# faith = { -# portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } -# } +# target_is_same_character_or_above = root +# rite = rite:mozarabic_church # } #} @@ -507,10 +501,15 @@ fp2_struggle_secure_iberian_foothold_faith_trigger = { } fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = { + exists = empire + empire != title:e_spain + kingdom.holder.top_liege = root +} + +fp2_struggle_secure_iberian_foothold_neighbor_with_outsider_kingdom_trigger = { any_de_jure_county = { any_title_to_title_neighboring_and_across_water_county = { - NOT = { empire = title:e_spain } - kingdom.holder = root + fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = yes } } } @@ -618,7 +617,8 @@ struggle_can_access_unlocks_bargain_fealty_interaction_trigger = { # #fp2_lyonese_monk_0002_valid_character_configuration_trigger = { # OR = { -# has_trait = scholar +# has_trait = erudite +# has_trait = lifestyle_scholar # has_trait = theologian # has_trait = lifestyle_mystic # AND = { @@ -662,7 +662,7 @@ struggle_can_access_unlocks_bargain_fealty_interaction_trigger = { # is_alive = no # is_imprisoned = yes # AND = { -# is_landed_or_landless_administrative = no +# is_landed_or_landless_administrative_or_theocratic = no # NOT = { # host = scope:acolyte_host # # Make an exception if you're in prison, since that should give a different event. @@ -670,7 +670,7 @@ struggle_can_access_unlocks_bargain_fealty_interaction_trigger = { # } # } # AND = { -# is_landed_or_landless_administrative = yes +# is_landed_or_landless_administrative_or_theocratic = yes # NOT = { # any_liege_or_above = { this = scope:acolyte_host } # } @@ -682,13 +682,13 @@ struggle_can_access_unlocks_bargain_fealty_interaction_trigger = { #fp2_lyonese_monk_0000_out_of_freedom_trigger = { is_imprisoned = yes } # #fp2_lyonese_monk_0000_out_of_popes_trigger = { -# NOT = { exists = scope:story.var:base_faith.religious_head } +# NOT = { exists = faith.main_rite.head_of_rite } #} # #fp2_lyonese_monk_0000_out_of_faith_trigger = { # OR = { -# scope:acolyte.faith.religious_head != scope:story.var:base_faith.religious_head -# scope:acolyte_host.faith.religious_head != scope:story.var:base_faith.religious_head +# scope:acolyte.faith.main_rite.head_of_rite != scope:story.var:base_faith.main_rite.head_of_rite +# scope:acolyte_host.faith.main_rite.head_of_rite != scope:story.var:base_faith.main_rite.head_of_rite # } #} # @@ -731,5 +731,6 @@ fp2_purchase_truce_interaction_soft_requirements_trigger = { # } has_perk = defensive_negotiations_perk culture = { has_cultural_parameter = unlocks_purchase_truce } + has_personal_tenet_flag = tenet_peace_of_god_personal_truce } } diff --git a/common/scripted_triggers/07_ep3_triggers.txt b/common/scripted_triggers/07_ep3_triggers.txt index b76307bdf..8cc7029b2 100644 --- a/common/scripted_triggers/07_ep3_triggers.txt +++ b/common/scripted_triggers/07_ep3_triggers.txt @@ -5,7 +5,7 @@ dynasty = { OR = { dynast = { - government_allows = administrative + government_has_mechanic = administrative } has_dynasty_perk = ep3_administrative_legacy_1 } @@ -72,7 +72,7 @@ valid_for_byz_governor_content_trigger = { } } } -# + valid_for_byz_succession_trigger = { is_eunuch_trigger = no NOR = { @@ -125,14 +125,14 @@ available_charioteers_spots_trigger = { #} is_competing_for_same_title_as = { - government_allows = administrative + government_has_mechanic = administrative any_heir_title = { exists = this is_noble_family_title = no save_temporary_scope_as = temp_title } $CHARACTER$ = { - government_allows = administrative + government_has_mechanic = administrative } scope:temp_title = { any_title_heir = { @@ -266,12 +266,12 @@ is_candidate_for_title_trigger = { valid_governor_contract_trigger = { OR = { - government_allows = administrative + government_has_mechanic = administrative AND = { government_has_flag = government_is_landless_minority exists = liege liege = { - government_allows = administrative + government_has_mechanic = administrative } } } @@ -286,30 +286,28 @@ valid_governor_contract_trigger = { valid_governor_contract_basic_trigger = { task_contract_taker = { #you have to be a governor - OR = { - trigger_if = { - limit = { - government_has_flag = government_is_celestial - } - is_governor_or_admin_count = yes + trigger_if = { + limit = { + government_has_flag = government_is_celestial } - trigger_else = { - is_governor = yes + AND = { + government_has_flag = government_is_landless_minority + exists = liege + liege = { + government_has_mechanic = administrative + } } - #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 - } - } - } - AND = { - government_has_flag = government_is_landless_minority - exists = liege - liege = { - government_allows = administrative + is_governor_or_admin_count = yes + } + trigger_else = { + 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 } } } @@ -886,9 +884,33 @@ is_appointment_valid_trigger = { $TOP_LIEGE$ = { save_temporary_scope_as = top_liege_temp } custom_tooltip = { # Capital should be never a valid appointment (go for higher title instead text = not_top_liege_capital_county_tt - NOT = { scope:title_temp ?= scope:candidate_temp.top_liege.capital_county } + trigger_if = { # Candidates outside a landed realm have no capital county to clash with + limit = { exists = scope:candidate_temp.top_liege.capital_county } + NOT = { scope:title_temp ?= scope:candidate_temp.top_liege.capital_county } + } } scope:candidate_temp = { + trigger_if = { + limit = { + scope:top_liege_temp = { tgp_realm_has_ceremonial_liege_trigger = yes } + tgp_is_in_ceremonial_house_trigger = yes + } + trigger_if = { + limit = { + scope:title_temp ?= { has_variable = administrative_ui_special_title } + } + custom_tooltip = { + text = ceremonial_liege_only_heir_can_be_ruler_trigger + tgp_is_ceremonial_liege_or_direct_heir_trigger = yes + } + } + trigger_else = { + custom_tooltip = { + text = ceremonial_liege_cannot_be_governor_trigger + tgp_is_ceremonial_liege_trigger = no + } + } + } trigger_if = { limit = { exists = scope:title_temp } custom_tooltip = { # Has relevant law @@ -900,6 +922,10 @@ is_appointment_valid_trigger = { } } } + custom_tooltip = { + text = follows_other_title_appointment_tt + $TITLE$.tier = $TITLE$.holder.primary_title.tier + } trigger_if = { limit = { NOT = { top_liege.highest_held_title_tier = scope:title_temp.tier } @@ -956,13 +982,21 @@ is_appointment_valid_trigger = { text = only_administrative_tt trigger_if = { limit = { is_landed = yes } - government_allows = administrative + government_has_mechanic = administrative } } is_clergy = no } } +domicile_is_estate_trigger = { + OR = { + is_domicile_type = estate + is_domicile_type = east_asian_estate + is_domicile_type = japanese_manor + } +} + ep3_adventurer_ai_logic_valid_trigger = { is_alive = yes is_ai = yes @@ -973,8 +1007,8 @@ ep3_adventurer_ai_logic_valid_trigger = { ep3_laamp_diplo_range_trigger = { custom_description = { text = ep3_laamp_diplo_range_trigger_tt - subject = scope:actor - object = scope:recipient + subject = $LAAMP$ + object = $TARGET$ trigger_if = { limit = { exists = $LAAMP$.domicile.domicile_location } trigger_if = { @@ -1095,9 +1129,9 @@ 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 + has_none_of_variables = { + name = ongoing_cid_story_cycle + name = had_cid_story_cycle } has_government = landless_adventurer_government top_liege ?= { @@ -1156,13 +1190,13 @@ has_any_gallowsbait_xp_trigger = { # } #} -faith_is_interesting_heresy_to_state_faith_trigger = { - religion = root.top_liege.primary_title.state_faith.religion - this != root.top_liege.primary_title.state_faith - num_county_followers >= 3 +rite_is_interesting_heresy_to_state_rite_trigger = { + faith.religion = root.top_liege.primary_title.state_rite.faith.religion + this != root.top_liege.primary_title.state_rite + num_rite_county_followers >= 3 save_temporary_scope_as = temp_heresy - root.top_liege.primary_title.state_faith = { - faith_hostility_level = { + root.top_liege.primary_title.state_rite = { + rite_hostility_level = { target = scope:temp_heresy value >= faith_hostile_level } @@ -1250,7 +1284,7 @@ ep3_interesting_courtier_to_ask_trigger = { ep3_admin_faction_trigger = { trigger_if = { # Enabled for all admin realms with EP3 limit = { has_ep3_dlc_trigger = yes } - $FACTION_TARGET$ = { government_allows = administrative } + $FACTION_TARGET$ = { government_has_mechanic = administrative } } # trigger_else = { # Enabled for Byzantium without EP3 # $FACTION_TARGET$ = { has_title = title:e_byzantium } @@ -1513,7 +1547,6 @@ ep3_adventurer_ai_valid_contract_trigger = { 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$ } diff --git a/common/scripted_triggers/07_frankokratia_triggers.txt b/common/scripted_triggers/07_frankokratia_triggers.txt index 81f6e8bab..3a2fea38a 100644 --- a/common/scripted_triggers/07_frankokratia_triggers.txt +++ b/common/scripted_triggers/07_frankokratia_triggers.txt @@ -8,20 +8,21 @@ # NOT = { exists = title:e_latin_empire.holder } # #Byzantine emperor is Christian, but not Catholic # title:e_byzantium.holder.faith = { -# NOT = { this = faith:catholic } -# OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } +# religion = religion:christianity_religion +# } +# title:e_byzantium.holder.rite = { +# rite_has_doctrine = special_doctrine_is_eastern_christian_faith # } # trigger_if = { # limit = { # title:e_byzantium.holder = { -# government_has_flag = government_is_special_administrative +# government_has_mechanic = administrative # } # } -# #Byzantine state faith is not Catholic +# #Byzantine state rite is still Eastern Christian (not Latin) # title:e_byzantium.holder.primary_title = { -# state_faith = { -# NOT = { this = faith:catholic } -# OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } +# state_rite = { +# rite_has_doctrine = special_doctrine_is_eastern_christian_faith # } # } # } @@ -130,17 +131,22 @@ #ep3_frankokratia_transiting_relative_trigger = { # OR = { # is_ruler = no +# # Prefer char_temp; root is a faith in great_holy_war.0001, so do not evaluate root.highest_held_title_tier there. # AND = { -# exists = scope:char_temp -# highest_held_title_tier <= scope:char_temp.highest_held_title_tier -# } -# AND = { -# exists = root -# highest_held_title_tier <= root.highest_held_title_tier +# trigger_if = { +# limit = { +# exists = scope:char_temp +# } +# highest_held_title_tier <= scope:char_temp.highest_held_title_tier +# } +# trigger_else = { +# exists = root +# highest_held_title_tier <= root.highest_held_title_tier +# } # } # highest_held_title_tier < tier_county # NOT = { -# religion = religion:catholic_religion +# faith = faith:catholic # } # is_imprisoned = yes # is_incapable = yes @@ -164,7 +170,7 @@ # #ep3_frankokratia_story_owner_trigger = { # save_temporary_scope_as = char_temp -# religion = religion:catholic_religion +# faith = faith:catholic # is_playable_character = yes # highest_held_title_tier >= tier_county # highest_held_title_tier <= tier_kingdom @@ -382,7 +388,7 @@ #} # #ep3_frankokratia_financier_trigger = { -# religion = religion:catholic_religion +# faith = faith:catholic # is_ai = yes # #Not pals with byz emperor # NOR = { @@ -577,8 +583,8 @@ # has_trait = incapable # has_trait = devoted # AND = { -# scope:frankokratia_crusader.faith = { -# has_doctrine = doctrine_theocracy_temporal +# scope:frankokratia_crusader.rite = { +# rite_has_doctrine = doctrine_theocracy_temporal # } # has_council_position = councillor_court_chaplain # } @@ -675,8 +681,9 @@ # } # } # #Most affected Christians -# religion = religion:catholic_religion +# faith = faith:catholic # faith = faith:orthodox +# faith = faith:miaphysitism # faith = faith:armenian_apostolic # #Target faith of crusade # faith = scope:defender.faith @@ -697,6 +704,13 @@ #} # #ep3_orthodox_faith_trigger = { -# religion = religion:eastern_orthodox_religion +# OR = { +# faith = faith:orthodox +# faith = faith:miaphysitism +# faith = faith:armenian_apostolic +# faith = faith:iconoclast +# faith = faith:bogomilist +# faith = faith:paulician +# faith = faith:nestorian +# } #} -# \ No newline at end of file diff --git a/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt b/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt index 44b9177f5..b179a3e8f 100644 --- a/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt +++ b/common/scripted_triggers/09_mpo_greatest_of_khans_triggers.txt @@ -53,7 +53,7 @@ mpo_gok_coalition_member_trigger = { } highest_held_title_tier < tier_county - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder is_imprisoned_by = root is_obedient_to = root } @@ -140,7 +140,7 @@ mpo_gok_submitting_coward_trigger = { } OR = { is_imprisoned_by = root - government_has_flag = government_is_true_herder + government_has_flag = government_is_herder has_relation_friend = root AND = { exists = root.house @@ -279,10 +279,7 @@ gok_desirable_vassal_trigger = { } } mpo_greatest_of_khans_0030_willing_nomad_vassal = { - OR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_true_herder - } + government_has_flag = government_is_in_steppe OR = { is_obedient = yes opinion = { @@ -304,10 +301,7 @@ mpo_greatest_of_khans_0030_willing_nomad_vassal = { } mpo_greatest_of_khans_0030_dominated_nomad_vassal = { - OR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_true_herder - } + government_has_flag = government_is_in_steppe OR = { is_obedient = yes opinion = { @@ -334,8 +328,7 @@ mpo_greatest_of_khans_0030_dominated_nomad_vassal = { mpo_greatest_of_khans_0030_willing_sedentary_vassal = { NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_true_herder + government_has_flag = government_is_in_steppe government_has_flag = government_is_theocracy government_has_flag = government_is_landless_adventurer } @@ -360,8 +353,7 @@ mpo_greatest_of_khans_0030_willing_sedentary_vassal = { } mpo_greatest_of_khans_0030_dominated_sedentary_vassal = { NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_true_herder + government_has_flag = government_is_in_steppe government_has_flag = government_is_theocracy government_has_flag = government_is_landless_adventurer } @@ -414,10 +406,9 @@ gok_willing_new_admin_vassal_trigger = { OR = { mpo_greatest_of_khans_0030_dominated_nomad_vassal = yes mpo_greatest_of_khans_0030_willing_sedentary_vassal = yes + culture_is_historically_admin_trigger = yes } NOR = { - government_has_flag = government_is_special_administrative - government_has_flag = government_is_administrative government_has_flag = government_is_tribal } } diff --git a/common/scripted_triggers/10_ach_scripted_triggers.txt b/common/scripted_triggers/10_ach_scripted_triggers.txt index 6374a8c43..eb87b380c 100644 --- a/common/scripted_triggers/10_ach_scripted_triggers.txt +++ b/common/scripted_triggers/10_ach_scripted_triggers.txt @@ -11,7 +11,7 @@ } } trigger_if = { - limit = { government_allows = administrative } + limit = { government_has_mechanic = administrative } is_independent_ruler = yes } trigger_else = { @@ -66,15 +66,132 @@ coronation_hostile_to_host_trigger = { } } -is_important_hof_trigger = { - faith = { - # The HoF actually matters - NOT = { has_doctrine = doctrine_theocracy_temporal } - # And this HoF is relevant to the activity - this = scope:host.faith +# We save coronation_anointment_authority silently because another tooltip trigger already reports it +coronation_anointment_save_authority_trigger = { + trigger_if = { + limit = { exists = religious_head_or_challenger } + religious_head_or_challenger = { save_temporary_scope_as = coronation_anointment_authority } } + trigger_else_if = { + limit = { + exists = rite.head_of_rite + rite.head_of_rite = { pam_is_clergy_ruler_trigger = yes } + } + rite.head_of_rite = { save_temporary_scope_as = coronation_anointment_authority } + } + trigger_else = { + # No authority: callers check scope:coronation_anointment_authority + always = yes + } +} + +coronation_anointment_authority_available_trigger = { + coronation_anointment_save_authority_trigger = yes + custom_description = { + text = CORONATION_RELIGIOUS_AUTHORITY_DOESNT_EXIST + exists = scope:coronation_anointment_authority + } +} + +# Kept in step with activity_types/coronation.txt is_location_valid for anointment location +coronation_anointment_no_holy_site_available_trigger = { + NOT = { + AND = { + $AUTHORITY$ = { is_landed = yes } + $AUTHORITY$.faith = { + any_holy_site_barony = { + holder = { + target_is_same_character_or_above = $AUTHORITY$ + } + } + } + } + } + NOT = { + $HOST$.faith = { + any_holy_site_barony = { + holder = { + target_is_same_character_or_above = $HOST$ + } + } + } + } +} + +coronation_anointment_authority_is_trigger = { + trigger_if = { + limit = { exists = religious_head_or_challenger } + religious_head_or_challenger ?= $CHARACTER$ + } + trigger_else_if = { + limit = { + exists = rite.head_of_rite + rite.head_of_rite = { pam_is_clergy_ruler_trigger = yes } + } + rite.head_of_rite ?= $CHARACTER$ + } + trigger_else = { + always = no + } +} + +is_important_hof_trigger = { + # The HoF actually matters + rite = { NOT = { rite_has_doctrine = doctrine_theocracy_temporal } } government_has_flag = government_is_theocracy - any_held_title = { is_head_of_faith = yes } + OR = { + AND = { + # Preserve the ordinary-coronation Head of Faith behavior + faith = scope:host.faith + any_held_title = { is_head_of_faith = yes } + } + AND = { + scope:host.involved_activity ?= { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:host = { + coronation_anointment_authority_is_trigger = { CHARACTER = root } + } + } + } +} + +is_coronation_artifact_trigger = { + artifact_owner = { + trigger_if = { + limit = { + faith = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } + } + prev = { + artifact_slot_type = helmet + } + } + trigger_else_if = { + limit = { + faith = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } + } + prev = { + artifact_slot_type = regalia + } + } + trigger_else = { + prev = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + } } coronation_has_proper_artifact_trigger = { diff --git a/common/scripted_triggers/10_tgp_japan_triggers.txt b/common/scripted_triggers/10_tgp_japan_triggers.txt index f5dc38f97..132cdf705 100644 --- a/common/scripted_triggers/10_tgp_japan_triggers.txt +++ b/common/scripted_triggers/10_tgp_japan_triggers.txt @@ -22,7 +22,7 @@ tgp_is_japanese_governor_trigger = { can_have_kampaku_acclamation_succession_law_trigger = { has_tgp_dlc_trigger = yes - government_allows = administrative + government_has_mechanic = administrative is_independent_ruler = yes } @@ -103,7 +103,7 @@ target_shares_nearest_related_title_holder_trigger = { limit = { any_parent = { even_if_dead = yes - any_parent = { + any_parent = { even_if_dead = yes is_a_previous_title_holder_trigger = { TITLE = $TITLE$ } } @@ -178,7 +178,7 @@ tgp_ceremonial_candidacy_restriction_trigger = { } trigger_if = { limit = { - top_liege.primary_title.var:administrative_ui_special_title.holder = { tgp_has_ceremonial_liege_title_trigger = yes } + top_liege.primary_title.var:administrative_ui_special_title.holder = { tgp_is_ceremonial_liege_trigger = yes } } custom_tooltip = { text = ceremonial_liege_only_heir_can_be_ruler_trigger @@ -227,11 +227,11 @@ tgp_ceremonial_title_revoke_restriction_trigger = { trigger_if = { limit = { exists = scope:recipient.house - scope:actor.top_liege.primary_title.var:administrative_ui_special_title.holder ?= scope:recipient + scope:puppet_or_actor.top_liege.primary_title.var:administrative_ui_special_title.holder ?= scope:recipient } custom_tooltip = { text = tgp_blocked_ceremonial_title_revocation_trigger - NOT = { scope:target ?= scope:actor.top_liege.primary_title.var:administrative_ui_special_title } + NOT = { scope:target ?= scope:puppet_or_actor.top_liege.primary_title.var:administrative_ui_special_title } } } } @@ -402,15 +402,16 @@ japan_imperial_reconquest_cb_allowed_against_character_trigger = { } realm_law_use_imperial_policy_trigger = { - top_liege = { + top_liege = { highest_held_title_tier >= tier_empire - government_is_japanese_trigger = yes + government_is_japanese_trigger = yes } } tgp_japan_defense_mobilization_valid_trigger = { custom_tooltip = { text = defense_mobilization_law_valid_trigger + exists = capital_county OR = { AND = { is_at_war = yes @@ -436,7 +437,7 @@ tgp_japan_defense_mobilization_valid_trigger = { } } } - capital_county.empire = { + capital_county.empire ?= { any_de_jure_county = { holder.top_liege != root.top_liege } } } @@ -496,17 +497,17 @@ tgp_install_regent_faction_can_create_trigger = { trigger_if = { limit = { scope:target ?= { - has_government = meritocratic_government # am I a compatible government type? + government_has_flag = government_is_meritocratic # am I a compatible government type? } } - has_government = meritocratic_government + government_has_flag = government_is_meritocratic } } japan_faction_cohesion_trigger = { trigger_if = { - limit = { - government_has_flag = government_has_house_blocs + limit = { + government_has_flag = government_has_house_blocs is_confederation_member = yes } custom_tooltip = { @@ -531,8 +532,8 @@ japan_faction_cohesion_trigger = { japan_faction_cohesion_hard_trigger = { trigger_if = { - limit = { - government_has_flag = government_has_house_blocs + limit = { + government_has_flag = government_has_house_blocs is_confederation_member = yes } custom_tooltip = { @@ -683,7 +684,7 @@ tgp_japan_cadet_creates_dynasty_trigger = { this = dynasty.dynast this = house.house_head } - dynasty.dynast ?= { government_allows = administrative } + dynasty.dynast ?= { government_has_mechanic = administrative } } tgp_soryo_or_bushido_trigger = { @@ -712,30 +713,32 @@ should_learn_chinese_trigger = { } num_of_known_languages < language_soft_cap exists = house - age >= 10 + age >= 10 is_faith_dominant_gender = yes probably_unintelligent_trigger = no house.house_head ?= { OR = { government_is_japanese_trigger = yes #This will account for korea and friends - government_allows = merit + government_allows = merit + culture = { culture_use_chinese_character_trigger = yes } # it's free content so don't block everything in gov type } OR = { - #Cultural acceptance will be our guiding light for teaching young, noblemen (dominate gender) adults Chinese. These values will be set in game_start.txt + #Cultural acceptance will be our guiding light for teaching young, noblemen (dominate gender) adults Chinese. These values will be set in game_start.txt culture = { OR = { - cultural_acceptance = { + cultural_acceptance = { target = culture:han value >= 65 } any_parent_culture_or_above = { this = culture:han } - } + has_cultural_tradition = tradition_sinophilic + } } - top_liege = { - highest_held_title_tier >= tier_kingdom + top_liege ?= { + highest_held_title_tier >= tier_kingdom has_dlc_feature = royal_court - has_court_language_of_culture = culture:han + has_court_language_of_culture = culture:han } } } diff --git a/common/scripted_triggers/10_tgp_triggers.txt b/common/scripted_triggers/10_tgp_triggers.txt index 040403d00..10cc6d6bb 100644 --- a/common/scripted_triggers/10_tgp_triggers.txt +++ b/common/scripted_triggers/10_tgp_triggers.txt @@ -85,7 +85,9 @@ administrative_tier_allows_independence = { limit = { administrative_counts_can_be_independent = yes } - highest_held_title_tier >= tier_county + any_held_county = { + is_noble_family_title = no + } } trigger_else = { # Administrative/default highest_held_title_tier >= tier_kingdom @@ -361,10 +363,7 @@ should_be_mandala_tributary_trigger = { AND = { $SUZERAIN$ = { has_government = mandala_government } $TRIBUTARY$ = { - OR = { - has_government = tribal_government - has_government = wanua_government - } + government_has_flag = government_is_tribal } } } @@ -515,7 +514,7 @@ tgp_should_become_meritocratic_trigger = { is_independent_ruler = yes liege = { NOT = { - government_has_flag = government_is_administrative + government_has_mechanic = administrative } } } @@ -523,7 +522,6 @@ tgp_should_become_meritocratic_trigger = { OR = { geographical_region = world_asia geographical_region = world_tibet - geographical_region = world_burma geographical_region = world_steppe_east } } @@ -558,6 +556,15 @@ tgp_can_become_celestial_trigger = { } } +tgp_can_become_japanese_feudal_trigger = { + has_tgp_dlc_trigger = yes + OR = { + top_liege = { government_is_japanese_trigger = yes } # Soryo not created outside Ritsuryo/Soryo Realms + domicile ?= { is_domicile_type = japanese_manor } # Vassalized Ritsuryo/Soryo stay Soryo + has_character_flag = can_become_japanese_feudal + } +} + tgp_mongol_vassal_will_become_admin = { highest_held_title_tier > tier_barony primary_title = { @@ -576,12 +583,7 @@ tgp_mongol_vassal_will_become_admin = { #An admin type has_trait = governor faith.religion = religion:confucianism_religion - culture = { - has_cultural_pillar = heritage_chinese - } - culture = { - has_cultural_pillar = heritage_korean - } + culture_is_historically_admin_trigger = yes #Nomad type government_has_flag = government_is_nomadic has_trait = nomadic_philosophy @@ -638,12 +640,36 @@ tgp_is_chinese_style_emperor_trigger = { government_allows = merit } +culture_use_chinese_character_trigger = { + OR = { + culture_use_standard_chinese_character_trigger = yes + culture_use_variant_chinese_character_trigger = yes + } +} +culture_use_standard_chinese_character_trigger = { + OR = { + has_cultural_pillar = language_chinese + has_cultural_pillar = language_korean + has_cultural_pillar = language_japonic + has_cultural_pillar = language_vietnamese + } +} +culture_use_variant_chinese_character_trigger = { + OR = { + has_cultural_pillar = language_khitan + has_cultural_pillar = language_tungusic # all 3 cultures using this has different chinese character variant + has_cultural_tradition = tradition_sinophilic # assume they have do same thing + } +} + is_valid_for_east_asian_events_trigger = { culture = { OR = { has_cultural_pillar = heritage_japonic has_cultural_pillar = heritage_chinese has_cultural_pillar = heritage_korean + has_cultural_pillar = heritage_buyeo + has_cultural_pillar = heritage_viet } } } @@ -668,10 +694,7 @@ shared_raid_estate_participant_valid_trigger = { any_held_title = { is_noble_family_title = yes } house.house_head ?= this } - OR = { - government_allows = administrative - government_is_japanese_trigger = yes - } + government_allows = noble_families tgp_is_ceremonial_liege_trigger = no } @@ -913,6 +936,7 @@ is_merit_based_official = { } } } + tgp_is_ceremonial_regent_trigger = yes } } @@ -947,13 +971,7 @@ tgp_is_ceremonial_petition_valid_trigger = { } take_vows_available_trigger = { - OR = { - faith = { has_doctrine_parameter = take_vows_active } - AND = { - religion:buddhism_religion ?= religion - faith = { has_doctrine = special_doctrine_immaterial_harmony } - } - } + rite = { rite_has_parameter = take_vows_active } } tgp_use_chinese_naming_trigger = { @@ -1076,3 +1094,20 @@ farm_estates_3_4_trigger = { } } } + +culture_uses_eastern_siege_weapons_trigger = { + OR = { + has_cultural_pillar = heritage_chinese + has_cultural_pillar = heritage_korean + has_cultural_pillar = heritage_japonic + has_cultural_pillar = heritage_buyeo + has_cultural_pillar = heritage_viet + } +} + +tgp_cranial_trophies_collection_trigger = { + OR = { + rite = { rite_has_parameter = killing_bestows_heads } + has_personal_tenet_flag = killing_bestows_heads + } +} diff --git a/common/scripted_triggers/mpo_scripted_triggers.txt b/common/scripted_triggers/mpo_scripted_triggers.txt index 7d5ab9952..5844c5501 100644 --- a/common/scripted_triggers/mpo_scripted_triggers.txt +++ b/common/scripted_triggers/mpo_scripted_triggers.txt @@ -48,6 +48,13 @@ valid_confederation_member_trigger = { } } } + custom_tooltip = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + text = is_nomadic_or_tribal_tt + } is_confederation_member = no } @@ -189,14 +196,14 @@ mpo_valid_heir_friend_trigger = { NOT = { has_relation_blood_brother = $CHARACTER$.player_heir } - custom_description = { + custom_tooltip = { text = not_friends_with_player_heir_tt NOR = { has_relation_friend = $CHARACTER$.player_heir has_relation_best_friend = $CHARACTER$.player_heir } } - custom_description = { + custom_tooltip = { text = not_bad_relation_with_player_heir_tt NOT = { has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$.player_heir } @@ -205,10 +212,7 @@ mpo_valid_heir_friend_trigger = { is_imprisoned = no is_incapable = no OR = { - custom_description = { - text = is_nomadic_tt - government_has_flag = government_is_nomadic - } + government_has_flag = government_is_nomadic has_trait = nomadic_philosophy } highest_held_title_tier >= tier_county @@ -621,10 +625,8 @@ mpo_overrunning_willing_vassal_trigger = { } } } - highest_held_title_tier >= tier_county + highest_held_title_tier = tier_county government_has_flag = government_is_nomadic - highest_held_title_tier < tier_duchy - NOT = { government_has_flag = government_is_herder } } is_tsagaan_sar = { @@ -740,10 +742,10 @@ mpo_valid_widow_marrier_trigger = { # faith.religion = faith:tengri_pagan.religion } #Can have multiple wives or concubines - faith = { + rite = { OR = { - has_doctrine = doctrine_polygamy - has_doctrine = doctrine_concubines + rite_has_doctrine = doctrine_polygamy + rite_has_doctrine = doctrine_concubines } } is_male = yes @@ -760,7 +762,7 @@ mpo_valid_widow_marrier_trigger = { } #Can marry the widow NOT = { - relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:widow } + relation_with_character_is_incestuous_in_my_rite_trigger = { CHARACTER = scope:widow } } } @@ -1056,8 +1058,8 @@ mpo_can_be_blood_brothers_trigger = { } } } - $CHARACTER_1$.faith = { - NOT = { has_doctrine_parameter = gender_equal_law } + $CHARACTER_1$.rite = { + NOT = { rite_has_parameter = gender_equal_law } } } custom_tooltip = { @@ -1391,6 +1393,7 @@ mpo_blood_brother_loving_trigger = { has_bad_season_nomadic_capital_root_trigger = { any_county_situation_sub_region = { + situation_sub_region_has_county = prev OR = { sub_region_current_phase = situation_steppe_white_zud_season sub_region_current_phase = situation_steppe_cold_zud_season @@ -1401,61 +1404,67 @@ has_bad_season_nomadic_capital_root_trigger = { } has_zud_season_nomadic_capital_root_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = root.capital_county + root ?= { + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.capital_county + } } } } } has_zud_season_in_county_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = $COUNTY$ + $COUNTY$ = { + any_county_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = $COUNTY$ + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = $COUNTY$ + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = $COUNTY$ + } } } } } has_bad_season_nomadic_capital_character_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = $CHARACTER$.capital_county + $CHARACTER$ = { + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_severe_drought_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } } } } @@ -1463,6 +1472,7 @@ has_bad_season_nomadic_capital_character_trigger = { has_bad_season_in_county_trigger = { any_county_situation_sub_region = { + situation_sub_region_has_county = prev OR = { sub_region_current_phase = situation_steppe_white_zud_season sub_region_current_phase = situation_steppe_cold_zud_season @@ -1473,39 +1483,42 @@ has_bad_season_in_county_trigger = { } has_good_season_nomadic_capital_root_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - situation_sub_region_has_county = root.capital_county - + root ?= { + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.capital_county + } } } } } has_good_season_nomadic_capital_character_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - situation_sub_region_has_county = $CHARACTER$.capital_county + $CHARACTER$ = { + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = $CHARACTER$.capital_county + } } } } @@ -1513,6 +1526,7 @@ has_good_season_nomadic_capital_character_trigger = { has_good_season_in_county_trigger = { any_county_situation_sub_region = { + situation_sub_region_has_county = prev OR = { sub_region_current_phase = situation_steppe_abundant_grazing_season sub_region_current_phase = situation_steppe_warm_nights_season @@ -1910,6 +1924,7 @@ mpo_nomad_invasion_war_ai_trigger = { # Havsaran zud? Leave the steppe! capital_county ?= { any_county_situation_sub_region = { + situation_sub_region_has_county = prev sub_region_current_phase = situation_steppe_havsarsan_zud_season } } @@ -2002,6 +2017,7 @@ mpo_nomad_duchy_invasion_war_ai_trigger = { # Havsaran zud? Leave the steppe! capital_county ?= { any_county_situation_sub_region = { + situation_sub_region_has_county = prev sub_region_current_phase = situation_steppe_havsarsan_zud_season } } diff --git a/common/scripted_triggers/music_triggers.txt b/common/scripted_triggers/music_triggers.txt index 9764410d2..d40276e92 100644 --- a/common/scripted_triggers/music_triggers.txt +++ b/common/scripted_triggers/music_triggers.txt @@ -193,12 +193,22 @@ should_use_specifically_persian_music_trigger = { } } -should_use_european_christian_music_trigger = { - NOT = { government_has_flag = government_is_nomadic } +should_use_christian_music_trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:protestant_religion - religion = religion:oriental_orthodox_religion + religion = religion:oriental_orthodox_religion + } +} + +should_use_european_christian_music_trigger = { + NOT = { government_has_flag = government_is_nomadic } + OR = { + OR = { + religion = religion:eastern_orthodox_religion + religion = religion:protestant_religion + religion = religion:oriental_orthodox_religion + } AND = { exists = capital_province capital_province = {