hopefully updated on actions and scripted triggers

This commit is contained in:
trashmasteruni 2026-10-19 21:12:02 +02:00
parent 84ac41f6ca
commit a4d812a52c
27 changed files with 10879 additions and 4415 deletions

View file

@ -97,7 +97,7 @@ ai_has_warlike_personality = {
ai_greed >= 25
}
government_has_flag = government_is_tribal
culture ?= { has_cultural_pillar = ethos_bellicose }
culture = { has_cultural_pillar = ethos_bellicose }
}
NOR = {
@ -105,8 +105,8 @@ ai_has_warlike_personality = {
has_trait = compassionate
has_trait = craven
has_trait = calm
faith ?= { has_doctrine_parameter = pacifist }
culture ?= { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith }
faith = { has_doctrine_parameter = pacifist }
culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith }
house ?= {
has_house_modifier = unity_house_focused_on_economy_modifier
}

View file

@ -967,7 +967,10 @@ is_landed_or_landless_administrative_or_theocratic = {
is_playable_character = {
is_ruler = yes
OR = {
exists = domicile
custom_tooltip = {
text = GAME_OVER_CANNOT_PLAY_ESTATELESS
has_domicile = yes
}
# exclude barons
trigger_if = {
limit = {

View file

@ -237,12 +237,8 @@ building_orchards_requirement_terrain = {
terrain = floodplains
terrain = oasis
has_building_or_higher = qanats_05
AND = {
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = vegetarian_fruit_orchard_allowed }
}
culture = {
has_cultural_parameter = vegetarian_fruit_orchard_allowed
}
}
}
@ -255,13 +251,7 @@ building_farm_estates_requirement_terrain = {
terrain = hills
terrain = jungle
}
AND = {
exists = county.culture
trigger_if = {
limit = { exists = county.culture }
county.culture ?= { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle }
}
}
county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle }
}
}
}
@ -335,26 +325,14 @@ building_paddy_fields_requirement_terrain = {
}
AND = {
terrain = wetlands
AND = {
exists = county.culture
trigger_if = {
limit = { exists = county.culture }
county.culture ?= { has_cultural_parameter = champa_rice_wet_land_paddies }
}
}
county.culture = { has_cultural_parameter = champa_rice_wet_land_paddies }
}
AND = {
OR = {
terrain = hills
terrain = jungle
}
AND = {
exists = county.culture
trigger_if = {
limit = { exists = county.culture }
county.culture ?= { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle }
}
}
county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle }
}
}
}
@ -469,13 +447,7 @@ building_elephant_pens_requirement_terrain = {
terrain = jungle
OR = {
geographical_region = world_innovation_elephants
AND = {
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = elephant_pens_building_bonuses }
}
}
culture = { has_cultural_parameter = elephant_pens_building_bonuses }
}
}
@ -483,13 +455,7 @@ building_horse_pastures_requirement_terrain = {
OR = {
terrain = steppe
geographical_region = world_steppe_east
AND = {
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = unlock_horse_pastures_building }
}
}
culture = { has_cultural_parameter = unlock_horse_pastures_building }
}
}
@ -505,13 +471,7 @@ building_quarries_requirement_terrain = {
OR = {
terrain = mountains
terrain = desert_mountains
AND = {
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = can_build_quarries_everywhere }
}
}
culture = { has_cultural_parameter = can_build_quarries_everywhere }
}
}
@ -526,13 +486,7 @@ building_warrior_lodges_requirement_terrain = {
}
NOT = { geographical_region = world_horse_buildings_in_hills_and_mountains }
}
AND = {
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = warrior_lodges_lift_restrictions }
}
}
culture = { has_cultural_parameter = warrior_lodges_lift_restrictions }
}
}
@ -569,7 +523,7 @@ building_wind_furnace_requirement_terrain = {
}
scope:holder.culture ?= { has_innovation = innovation_wootz_steel }
scope:holder.culture = { has_innovation = innovation_wootz_steel }
}
building_hill_forts_requirement_terrain = {
@ -633,13 +587,7 @@ building_caravanserai_requirement_terrain = {
building_qanats_requirement_terrain = {
county ?= {
AND = {
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = unlocks_qanat_building }
}
}
culture = { has_cultural_parameter = unlocks_qanat_building }
county_has_province_with_terrain = {
terrain = hills
terrain = tells
@ -700,7 +648,34 @@ barony_cannot_construct_holding = {
terrain = desert
terrain = desert_mountains
}
geographical_region = world_africa_sahara
# the corridors
trigger_if = {
limit = { geographical_region = world_africa_sahara }
OR = {
this = province:6650
this = province:6651
this = province:6652
this = province:6653
this = province:6654
this = province:6655
this = province:6656
this = province:6657
this = province:6658
this = province:6659
this = province:6660
this = province:6661
this = province:6662
this = province:6663
this = province:6664
this = province:6665
this = province:6666
this = province:6667
this = province:6668
}
}
trigger_else = {
always = no
}
}
}
@ -809,22 +784,22 @@ add_random_building_trigger = {
generic_economic_building_innovation_trigger = {
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_01 }
scope:build_owner.culture ?= { has_innovation = innovation_crop_rotation }
scope:build_owner.culture = { has_innovation = innovation_crop_rotation }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_02 }
building_requirement_castle_city_church = { LEVEL = 02 }
scope:build_owner.culture ?= { has_innovation = innovation_manorialism }
scope:build_owner.culture = { has_innovation = innovation_manorialism }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_04 }
building_requirement_castle_city_church = { LEVEL = 03 }
scope:build_owner.culture ?= { has_innovation = innovation_guilds }
scope:build_owner.culture = { has_innovation = innovation_guilds }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_06 }
building_requirement_castle_city_church = { LEVEL = 04 }
scope:build_owner.culture ?= { has_innovation = innovation_cranes }
scope:build_owner.culture = { has_innovation = innovation_cranes }
}
}
@ -832,22 +807,22 @@ generic_economic_building_innovation_trigger = {
generic_fortification_building_innovations_trigger = {
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_01 }
scope:build_owner.culture ?= { has_innovation = innovation_motte }
scope:build_owner.culture = { has_innovation = innovation_motte }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_02 }
building_requirement_castle_city_church = { LEVEL = 02 }
scope:build_owner.culture ?= { has_innovation = innovation_battlements }
scope:build_owner.culture = { has_innovation = innovation_battlements }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_04 }
building_requirement_castle_city_church = { LEVEL = 03 }
scope:build_owner.culture ?= { has_innovation = innovation_hoardings }
scope:build_owner.culture = { has_innovation = innovation_hoardings }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_06 }
building_requirement_castle_city_church = { LEVEL = 04 }
scope:build_owner.culture ?= { has_innovation = innovation_machicolations }
scope:build_owner.culture = { has_innovation = innovation_machicolations }
}
}
@ -855,22 +830,22 @@ generic_fortification_building_innovations_trigger = {
generic_recruitment_building_innovations_trigger = {
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_01 }
scope:build_owner.culture ?= { has_innovation = innovation_barracks }
scope:build_owner.culture = { has_innovation = innovation_barracks }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_02 }
building_requirement_castle_city_church = { LEVEL = 02 }
scope:build_owner.culture ?= { has_innovation = innovation_burhs }
scope:build_owner.culture = { has_innovation = innovation_burhs }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_04 }
building_requirement_castle_city_church = { LEVEL = 03 }
scope:build_owner.culture ?= { has_innovation = innovation_castle_baileys }
scope:build_owner.culture = { has_innovation = innovation_castle_baileys }
}
trigger_if = {
limit = { has_building_or_higher = $BUILDING$_06 }
building_requirement_castle_city_church = { LEVEL = 04 }
scope:build_owner.culture ?= { has_innovation = innovation_royal_armory }
scope:build_owner.culture = { has_innovation = innovation_royal_armory }
}
}
@ -998,7 +973,7 @@ religious_special_building_exclusion_trigger = { # checks if any special buildin
building_monastic_schools_holding_level_requirement_trigger = {
trigger_if = {
limit = { scope:holder.rite ?= { rite_has_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$
@ -1027,11 +1002,7 @@ building_waterworks_requirement_terrain = {
terrain = mountains
terrain = desert_mountains
}
exists = scope:holder.culture
trigger_if = {
limit = { exists = scope:holder.culture }
scope:holder.culture ?= { has_cultural_parameter = unlocks_waterworks_buildings }
}
scope:holder.culture = { has_cultural_parameter = unlocks_waterworks_buildings }
}
building_spice_plantation_requirement_terrain = {
@ -1070,22 +1041,12 @@ building_breweries_requirement = {
}
OR = {
religion = religion:catholic_religion
AND = {
exists = faith
trigger_if = {
limit = { exists = faith }
faith ?= { has_doctrine_parameter = allows_brewery }
}
}
rite = { rite_has_parameter = allows_brewery }
}
}
trigger_else = {
building_requirement_castle_city_church = { LEVEL = $NUMBER$ }
exists = culture
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = allows_brewery }
}
building_requirement_castle_city_church = { LEVEL = $NUMBER$ }
culture = { has_cultural_parameter = allows_brewery }
}
}

View file

@ -8,7 +8,7 @@ coa_african_trigger = {
}
coa_african_culture_trigger = {
scope:culture ?= {
scope:culture = {
OR = {
has_coa_gfx = central_african_group_coa_gfx
has_coa_gfx = east_african_coa_gfx
@ -41,7 +41,7 @@ coa_bishopric_trigger = {
coa_breton_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = breton_coa_gfx }
scope:culture = { has_coa_gfx = breton_coa_gfx }
scope:title ?= {
any_this_title_or_de_jure_above = {
this = title:k_brittany
@ -52,12 +52,12 @@ coa_breton_trigger = {
coa_byzantine_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = byzantine_group_coa_gfx }
# scope:title ?= {
# any_this_title_or_de_jure_above = {
# this = title:e_byzantium
# }
# }
scope:culture = { has_coa_gfx = byzantine_group_coa_gfx }
}
}
@ -124,7 +124,7 @@ coa_switch_to_norse_trigger = {
}
OR = {
faith.religion = religion:folk_germanic_religion
culture ?= { has_coa_gfx = norse_coa_gfx }
culture = { has_coa_gfx = norse_coa_gfx }
}
}
}
@ -147,7 +147,7 @@ coa_feudal_trigger = {
coa_french_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = french_coa_gfx }
scope:culture = { has_coa_gfx = french_coa_gfx }
AND = {
exists = root
any_liege_or_above = {
@ -161,7 +161,7 @@ coa_french_trigger = {
coa_irish_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = irish_coa_gfx }
scope:culture = { has_coa_gfx = irish_coa_gfx }
scope:title ?= {
any_this_title_or_de_jure_above = {
this = title:k_ireland
@ -172,7 +172,7 @@ coa_irish_trigger = {
coa_indian_culture_trigger = {
scope:culture ?= {
scope:culture = {
OR = {
has_coa_gfx = burman_group_coa_gfx
has_coa_gfx = dravidian_group_coa_gfx
@ -189,22 +189,16 @@ coa_indian_region_trigger = {
}
}
coa_indian_religion_trigger = {
trigger_if = {
limit = { exists = scope:faith.religion }
scope:faith.religion = {
save_temporary_scope_as = religion
}
}
trigger_else = {
always = no
scope:faith.religion = {
save_temporary_scope_as = religion
}
scope:religion = {
OR = {
this = { is_in_family = rf_eastern }
# this = religion:bon_religion
this = religion:buddhism_religion
# this = religion:hinduism_religion
# this = religion:jainism_religion
this = religion:hinduism_religion
}
}
}
@ -214,27 +208,19 @@ coa_indian_trigger = {
coa_indian_region_trigger = yes
coa_indian_religion_trigger = yes
}
scope:culture ?= { has_graphical_east_asia_culture_group_trigger = no }
scope:culture = { has_graphical_east_asia_culture_group_trigger = no }
}
coa_jewish_trigger = {
OR = {
trigger_if = {
limit = { exists = scope:faith.religion }
scope:faith.religion = religion:judaism_religion
}
trigger_else = { always = no }
trigger_if = {
limit = { exists = scope:culture }
scope:culture ?= { has_coa_gfx = israelite_group_coa_gfx }
}
trigger_else = { always = no }
scope:faith.religion = religion:judaism_religion
scope:culture = { has_coa_gfx = israelite_group_coa_gfx }
}
}
coa_leonese_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = leonese_coa_gfx }
scope:culture = { has_coa_gfx = leonese_coa_gfx }
scope:title ?= {
any_this_title_or_de_jure_above = {
this = title:k_leon
@ -267,7 +253,7 @@ coa_manx_trigger = {
coa_mena_trigger = {
OR = {
scope:faith.religion = religion:islam_religion
scope:culture ?= {
scope:culture = {
OR = {
has_coa_gfx = arabic_group_coa_gfx
has_coa_gfx = berber_group_coa_gfx
@ -279,7 +265,7 @@ coa_mena_trigger = {
coa_suomenusko_trigger = {
OR = {
scope:faith.religion = religion:uralic_religion
scope:culture ?= {
scope:culture = {
OR = {
has_coa_gfx = balto_finnic_group_coa_gfx
has_coa_gfx = ugro_permian_group_coa_gfx
@ -291,7 +277,7 @@ coa_suomenusko_trigger = {
coa_polish_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = polish_coa_gfx }
scope:culture = { has_coa_gfx = polish_coa_gfx }
AND = {
exists = root
any_liege_or_above = {
@ -305,7 +291,7 @@ coa_polish_trigger = {
coa_scottish_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = scottish_coa_gfx }
scope:culture = { has_coa_gfx = scottish_coa_gfx }
scope:title ?= {
any_this_title_or_de_jure_above = {
this = title:k_scotland
@ -323,15 +309,15 @@ coa_theocratic_trigger = {
}
coa_welsh_trigger = {
scope:culture ?= { has_coa_gfx = welsh_coa_gfx }
scope:culture = { has_coa_gfx = welsh_coa_gfx }
}
coa_tamga_trigger = {
scope:culture ?= { has_coa_gfx = steppe_coa_gfx }
scope:culture = { has_coa_gfx = steppe_coa_gfx }
}
coa_scandinavian_trigger = {
scope:culture ?= {
scope:culture = {
OR = {
has_coa_gfx = swedish_coa_gfx
has_coa_gfx = norwegian_coa_gfx
@ -341,18 +327,18 @@ coa_scandinavian_trigger = {
}
coa_norse_trigger = {
scope:culture ?= { has_coa_gfx = norse_coa_gfx }
scope:culture = { has_coa_gfx = norse_coa_gfx }
}
coa_germanic_trigger = {
scope:culture ?= { has_coa_gfx = german_group_coa_gfx }
scope:culture = { has_coa_gfx = german_group_coa_gfx }
}
coa_iberian_trigger = {
OR = {
scope:culture ?= { has_coa_gfx = iberian_group_coa_gfx }
scope:culture = { has_coa_gfx = iberian_group_coa_gfx }
AND = {
scope:culture ?= { has_coa_gfx = arabic_group_coa_gfx }
scope:culture = { has_coa_gfx = arabic_group_coa_gfx }
scope:title ?= {
OR = {
this = title:e_spain
@ -364,7 +350,7 @@ coa_iberian_trigger = {
}
coa_iranian_trigger = {
scope:culture ?= { has_coa_gfx = iranian_group_coa_gfx }
scope:culture = { has_coa_gfx = iranian_group_coa_gfx }
}
has_recognizable_chinese_seal = {

View file

@ -33,11 +33,7 @@ can_be_councillor_gender_trigger = {
has_variable = can_be_councillor_override
AND = {
is_female = yes
exists = $COURT_OWNER$.rite
trigger_if = {
limit = { exists = $COURT_OWNER$.rite }
$COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = male_dominated_council } }
}
$COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } }
}
AND = {
is_female = yes
@ -47,11 +43,7 @@ can_be_councillor_gender_trigger = {
}
AND = {
is_male = yes
exists = $COURT_OWNER$.rite
trigger_if = {
limit = { exists = $COURT_OWNER$.rite }
$COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = female_dominated_council } }
}
$COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } }
}
}
}
@ -63,7 +55,7 @@ can_be_chancellor_trigger = {
}
NAND = {
has_council_position = councillor_court_chaplain
rite ?= { rite_has_parameter = clerical_appointment_fixed }
rite = { rite_has_parameter = clerical_appointment_fixed }
}
NOR = {
has_council_position = councillor_spouse
@ -82,7 +74,7 @@ can_be_steward_trigger = {
}
NAND = {
has_council_position = councillor_court_chaplain
rite ?= { rite_has_parameter = clerical_appointment_fixed }
rite = { rite_has_parameter = clerical_appointment_fixed }
}
NOR = {
has_council_position = councillor_spouse
@ -102,7 +94,7 @@ can_be_marshal_trigger = {
is_hostage = no
NAND = {
has_council_position = councillor_court_chaplain
rite ?= { rite_has_parameter = clerical_appointment_fixed }
rite = { rite_has_parameter = clerical_appointment_fixed }
}
NOR = {
has_council_position = councillor_spouse
@ -115,7 +107,7 @@ can_be_marshal_trigger = {
can_be_councillor_gender_trigger = { COURT_OWNER = $COURT_OWNER$ }
AND = {
has_trait = shieldmaiden
$COURT_OWNER$.culture ?= { has_cultural_parameter = has_access_to_shieldmaidens }
$COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
}
}
}
@ -124,7 +116,7 @@ can_be_spymaster_trigger = {
can_be_councillor_basics_trigger = yes
NAND = {
has_council_position = councillor_court_chaplain
rite ?= { rite_has_parameter = clerical_appointment_fixed }
rite = { rite_has_parameter = clerical_appointment_fixed }
}
NOR = {
has_council_position = councillor_spouse
@ -149,18 +141,12 @@ can_be_court_chaplain_trigger = {
liege = { has_diarchy_active_parameter = diarchy_is_vizierate }
}
}
exists = $COURT_OWNER$.rite
trigger_if = {
limit = { exists = $COURT_OWNER$.rite }
$COURT_OWNER$.rite ?= { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check }
}
trigger_if = {
limit = { exists = $COURT_OWNER$.rite }
rite = $COURT_OWNER$.rite
}
$COURT_OWNER$.rite = { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check }
faith = $COURT_OWNER$.faith
rite = { rite_has_allowed_gender_for_clergy = scope:court_chaplain_check }
trigger_if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_theocracy_temporal }
rite = { rite_has_doctrine = doctrine_theocracy_temporal }
}
OR = {
is_ruler = no
@ -181,7 +167,7 @@ can_be_court_chaplain_trigger = {
}
trigger_if = { # Married characters are excluded if the doctrine is not there
limit = {
rite ?= {
rite = {
NOT = { rite_has_parameter = clergy_can_marry }
}
}
@ -193,7 +179,7 @@ can_be_court_chaplain_trigger = {
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 ?= {
rite = {
NOT = { rite_has_parameter = clerical_appointment_fixed }
}
tgp_has_access_to_ministry_trigger = yes
@ -281,23 +267,15 @@ can_be_kurultai_trigger = {
is_ruler = yes
AND = {
is_female = yes
exists = $COURT_OWNER$.rite
trigger_if = {
limit = { exists = $COURT_OWNER$.rite }
$COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = male_dominated_council } }
}
$COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } }
}
AND = {
is_male = yes
exists = $COURT_OWNER$.rite
trigger_if = {
limit = { exists = $COURT_OWNER$.rite }
$COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = female_dominated_council } }
}
$COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } }
}
AND = {
has_trait = shieldmaiden
$COURT_OWNER$.culture ?= { has_cultural_parameter = has_access_to_shieldmaidens }
$COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
}
}
}
@ -336,15 +314,15 @@ can_be_any_kurultai_trigger = {
is_ruler = yes
AND = {
is_female = yes
$COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = male_dominated_council } }
$COURT_OWNER$.rite = { NOT = { rite_has_parameter = male_dominated_council } }
}
AND = {
is_male = yes
$COURT_OWNER$.rite ?= { NOT = { rite_has_parameter = female_dominated_council } }
$COURT_OWNER$.rite = { NOT = { rite_has_parameter = female_dominated_council } }
}
AND = {
has_trait = shieldmaiden
$COURT_OWNER$.culture ?= { has_cultural_parameter = has_access_to_shieldmaidens }
$COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens }
}
}
}
@ -459,7 +437,7 @@ can_be_fired_from_council_trigger = {
has_council_position = councillor_court_chaplain
liege = { tgp_has_access_to_ministry_trigger = no }
}
rite ?= {
rite = {
OR = {
rite_has_doctrine = doctrine_clerical_succession_temporal_appointment
rite_has_doctrine = doctrine_clerical_succession_spiritual_appointment
@ -1117,7 +1095,7 @@ task_conversion_valid_county_trigger = {
}
}
NOT = {
rite ?= { has_variable = pam_rite_grace_period }
rite = { has_variable = pam_rite_grace_period }
}
}
trigger_if = {
@ -1126,7 +1104,7 @@ task_conversion_valid_county_trigger = {
trigger_if = {
limit = {
scope:councillor_liege = {
faith ?= {
faith = {
has_doctrine_parameter = unreformed
}
}
@ -1137,7 +1115,7 @@ task_conversion_valid_county_trigger = {
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.faith = { has_doctrine_parameter = unreformed }
scope:county_check = { # Always convert holy sites
any_county_province = {
barony = {
@ -1151,7 +1129,7 @@ task_conversion_valid_county_trigger = {
trigger_if = {
limit = {
scope:councillor_liege = {
faith ?= {
faith = {
faith_hostility_level = {
target = scope:county_check.faith
value <= faith_fully_accepted_level
@ -1181,7 +1159,7 @@ task_conversion_valid_county_trigger = {
trigger_if = {
limit = {
scope:councillor_liege = {
faith ?= {
faith = {
faith_hostility_level = {
target = scope:county_check.faith
value <= faith_astray_level
@ -1214,7 +1192,7 @@ task_conversion_valid_county_trigger = {
trigger_else_if = {
limit = {
scope:councillor_liege = {
rite ?= { rite_has_doctrine = doctrine_pluralism_fundamentalist }
rite = { rite_has_doctrine = doctrine_pluralism_fundamentalist }
}
}
OR = {
@ -1284,11 +1262,11 @@ task_conversion_valid_county_trigger = {
limit = {
scope:councillor_liege = {
OR = {
rite ?= { rite_has_tenet = tenet_tax_nonbelievers }
faith ?= { has_doctrine = special_doctrine_jizya }
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 } }
scope:councillor_liege.faith = { faith_is_in_same_rf = { FAITH = scope:county_check.faith } }
}
OR = {
scope:councillor_liege = {
@ -1296,8 +1274,8 @@ task_conversion_valid_county_trigger = {
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 ?= {
scope:county_check.faith = { has_doctrine_parameter = unreformed }
scope:councillor_liege.faith = {
any_holy_site_barony = {
kingdom = scope:county_check.kingdom
}
@ -1456,7 +1434,7 @@ can_be_trained_as_knight_now_light_trigger = {
is_in_army = no
has_contagious_deadly_disease_trigger = no
is_incapable = no
is_in_activity = yes
is_in_activity = no
}
teacher_has_trait_that_student_does_not_trigger = {

View file

@ -397,37 +397,39 @@ can_recruit_character_to_court_trigger = {
trigger_if = {
limit = { exists = host }
#Are they employed?
is_councillor_of = scope:recruitee.host
is_knight_of = scope:recruitee.host
any_relation = {
type = ward
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
OR = {
is_councillor_of = scope:recruitee.host
is_knight_of = scope:recruitee.host
any_relation = {
type = ward
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
}
}
}
any_relation = {
type = guardian
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
any_relation = {
type = guardian
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
}
}
}
any_relation = {
type = mentor
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
any_relation = {
type = mentor
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
}
}
}
any_relation = {
type = student
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
any_relation = {
type = student
OR = {
this = scope:recruitee.host
is_close_family_of = scope:recruitee.host
}
}
any_court_position_employer = { this = scope:recruitee.host }
}
any_court_position_employer = { this = scope:recruitee.host }
}
trigger_if = {
limit = {
@ -850,14 +852,7 @@ is_courtier_or_knight_of_root = {
guest_herder_candidate_trigger = {
government_has_flag = government_is_herder
has_trait = lifestyle_seasoned_pastor
trigger_if = {
limit = { root.rite = { rite_has_doctrine = doctrine_gender_male_dominated } }
is_male = yes
}
trigger_if = {
limit = { root.rite = { rite_has_doctrine = doctrine_gender_female_dominated } }
is_female = yes
}
root.rite = { rite_has_dominant_ruling_gender = prev }
age < 45
age >= 25
}

View file

@ -165,20 +165,7 @@ diarch_callable_in_internal_war_trigger = {
}
diarch_matches_liege_faith_gender_preference_trigger = {
OR = {
# Female preference.
AND = {
is_female = yes
liege.rite = { rite_has_doctrine = doctrine_gender_female_dominated }
}
# Male preference.
AND = {
is_male = yes
liege.rite = { rite_has_doctrine = doctrine_gender_male_dominated }
}
# Equality.
liege.rite = { rite_has_doctrine = doctrine_gender_equal }
}
liege.rite = { rite_has_dominant_ruling_gender = prev }
}
##################################################

View file

@ -1,447 +0,0 @@
remove_guardian_interaction_visible_ward_trigger = {
OR = {
#If I am the child
this = scope:actor
#The ward has actor as its liege
employer ?= scope:actor
#The guardian is actor
any_relation = {
type = guardian
this = scope:actor
}
#The guardian is actor's courtier
any_relation = {
type = guardian
is_courtier_of = scope:actor
}
}
}
remove_guardian_interaction_available_ward_trigger = {
#is_imprisoned = no
}
kick_from_court_validity_trigger = {
NOR = {
is_spouse_of = scope:actor
is_concubine_of = scope:actor
is_close_family_of = scope:actor
has_council_position = councillor_court_chaplain
is_diarch = yes
# Marriage major partners of diarchs.
## Female.
AND = {
is_married = yes
is_female = yes
matrilinear_marriage = yes
any_consort = { is_diarch = yes }
}
## Male.
AND = {
is_married = yes
is_male = yes
patrilinear_marriage = yes
any_consort = { is_diarch = yes }
}
}
}
ask_for_pardon_available_trigger = {
$ACTOR$ = {
top_liege != this
any_liege_or_above = {
OR = {
has_imprisonment_reason = $ACTOR$
has_banish_reason = $ACTOR$
has_execute_reason = $ACTOR$
has_revoke_title_reason = $ACTOR$
}
}
}
}
has_extra_criminal_reason_against_trigger = {
OR = {
has_banish_reason = $CRIMINAL$
has_execute_reason = $CRIMINAL$
has_revoke_title_reason = $CRIMINAL$
}
}
title_revocation_standard_valid_showing_failures_only_trigger = {
scope:puppet_or_actor = {
NOR = {
is_at_war_with = scope:recipient
has_truce = scope:recipient
}
custom_description = {
text = "character_interactions_revoke_title_from_ally_without_reason"
object = scope:recipient
OR = {
NOT = {
is_allied_to = scope:recipient
}
has_revoke_title_reason = scope:recipient
}
}
}
scope:recipient = {
NOT = { has_strong_hook = scope:puppet_or_actor }
}
}
title_revocation_standard_can_pick_title_trigger = {
is_contested = no
custom_description = {
text = "revoke_title_not_noble_family_title"
is_noble_family_title = no
}
NOT = {
recent_history = {
type = granted
years = 1
}
}
custom_description = {
text = "character_interactions_not_rel_head_title"
is_head_of_faith = no
}
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 = {
custom_description = {
text = diarch_has_claim_on_revokable_title
object = scope:recipient
scope:actor = {
any_claim = {
holder ?= scope:recipient
}
}
}
}
title_revocation_is_admin_governor_trigger = {
government_has_mechanic = administrative
top_liege = this
save_temporary_scope_as = liege_temp
$VASSAL$ = {
government_has_mechanic = administrative
target_is_liege_or_above = scope:liege_temp
}
}
title_revocation_is_tyrannical_trigger = {
NOR = {
exists = scope:administrative_revocation
has_revoke_title_reason = $VASSAL$
trigger_if = {
limit = { exists = scope:landed_title }
has_claim_on = scope:landed_title
}
title_revocation_is_admin_governor_trigger = { VASSAL = $VASSAL$ }
AND = {
rite = { rite_has_parameter = tenet_legalism_sinful_revocation }
$VASSAL$ = {
num_sinful_traits = {
value > 0
target = prev.rite
}
}
}
AND = {
$VASSAL$ = {
NOT = { vassal_contract_has_flag = religiously_protected }
}
OR = {
AND = {
rite = { rite_has_parameter = pluralism_righteous_revocation_tyranny_reduced }
faith = {
faith_hostility_level = {
target = $VASSAL$.faith
value = faith_evil_level
}
}
}
AND = {
rite = { rite_has_parameter = pluralism_fundamentalist_revocation_tyranny_minimal }
faith = {
faith_hostility_level = {
target = $VASSAL$.faith
value >= faith_hostile_level
}
}
}
}
}
}
}
# 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_has_mechanic = administrative
$VASSAL$ = {
government_has_mechanic = administrative
}
}
has_revoke_title_reason = $VASSAL$
OR = {
AND = {
rite = { rite_has_parameter = pluralism_righteous_revocation_tyranny_reduced }
faith = {
faith_hostility_level = {
target = $VASSAL$.faith
value = faith_evil_level
}
}
}
AND = {
rite = { rite_has_parameter = pluralism_fundamentalist_revocation_tyranny_minimal }
faith = {
faith_hostility_level = {
target = $VASSAL$.faith
value >= faith_hostile_level
}
}
}
}
}
}
vassal_retraction_standard_valid_showing_failures_only_trigger = {
NOT = {
scope:puppet_or_actor = { is_at_war_with = scope:recipient }
}
scope:recipient = {
NOT = { has_strong_hook = scope:puppet_or_actor }
}
}
diarch_retraction_is_de_jure_liege_trigger = {
custom_description = {
text = "diarch_is_de_jure_liege_of_retractable_vassal"
object = scope:recipient
scope:actor = {
any_held_title = {
any_direct_de_jure_vassal_title = { holder.liege = scope:recipient }
}
}
}
}
is_de_jure_vassal_of_liege_trigger = {
liege = {
save_temporary_scope_as = my_liege
}
primary_title = {
OR = {
de_jure_liege = {
holder ?= scope:my_liege
}
trigger_if = {
limit = {
tier = tier_duchy
}
de_jure_liege = {
de_jure_liege = {
holder ?= scope:my_liege
}
}
}
}
}
}
send_poem_positive_poem_lock_trigger = {
OR = {
is_ai = no
NOT = { has_relation_rival = scope:recipient }
NOT = { has_relation_nemesis = scope:recipient }
}
}
send_poem_negative_poem_lock_trigger = {
OR = {
is_ai = no
has_relation_rival = scope:recipient
has_relation_nemesis = scope:recipient
}
}
can_any_traveling_family_members_travel_trigger = {
NOR = {
this = scope:recipient
is_in_pool_at = scope:actor.capital_province
}
is_ruler = no
trigger_if = {
limit = {
exists = scope:recipient.host
is_child_of = scope:recipient.host
is_adult = no
}
dynasty != scope:recipient.host.dynasty
}
}
imprison_neutral_is_valid_showing_failures_only_triggers_trigger = {
scope:puppet_or_actor.liege = {
trigger_if = {
limit = { has_realm_law_flag = imprisonment_toggle_enable }
# TIT-43801
#has_realm_law_flag = imprisonment_toggle_on
NOT = { has_realm_law = tribal_authority_0 }
}
}
scope:puppet_or_actor = { is_imprisoned = no }
custom_description = {
text = cannot_imprison_almohad_leader
subject = scope:recipient
NOT = {
scope:recipient = { has_character_modifier = almohad_leader_modifier }
}
}
}
grant_title_rivalry_trigger = {
is_ai = yes
is_playable_character = yes
top_liege = scope:actor
faith = scope:actor.faith
reverse_opinion = {
target = top_liege
value > -50
}
opinion = {
target = top_liege
value > -50
}
trigger_if = {
limit = {
is_female = yes
faith_dominant_gender_female_or_equal = no
}
scope:recipient = { is_female = yes }
}
trigger_if = {
limit = {
is_male = yes
faith_dominant_gender_male_or_equal = no
}
scope:recipient = { is_male = yes }
}
has_dread_level_towards = {
target = scope:actor
level < 1
}
is_eunuch_trigger = no
NOR = {
this = scope:actor
this = scope:recipient
has_trait = content
has_trait = humble
has_trait = blind
has_trait = devoted
is_close_family_of = scope:recipient
has_any_good_relationship_with_character_trigger = { CHARACTER = scope:actor }
has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor }
}
}
should_prioritise_hostile_action_against_due_to_personal_relations_trigger = {
$ACTOR$ = {
OR = {
has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
opinion = {
target = $RECIPIENT$
value <= very_high_negative_opinion
}
}
}
}
should_avoid_hostile_action_against_due_to_personal_relations_trigger = {
$ACTOR$ = {
OR = {
has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
is_allied_to = $RECIPIENT$
opinion = {
target = $RECIPIENT$
value >= very_high_positive_opinion
}
# Plus filter out heirs & other family, unless we hate 'em.
AND = {
OR = {
is_close_or_extended_family_of = $RECIPIENT$
any_spouse = { this = $RECIPIENT$ }
is_heir_of = $RECIPIENT$
}
NOR = {
has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
exposed_cheating_on_spouse_trigger = { SPOUSE = $RECIPIENT$ }
AND = {
is_ai = yes
opinion = {
target = $RECIPIENT$
value <= low_negative_opinion
}
}
}
}
}
}
}
should_avoid_hostile_action_against_due_to_liege_relations_trigger = {
$ACTOR$ = {
liege ?= {
OR = {
has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ }
is_allied_to = $RECIPIENT$
opinion = {
target = $RECIPIENT$
value >= very_high_positive_opinion
}
}
}
}
}
is_asking_for_gold_in_ransom_trigger = {
OR = {
scope:extortionate_gold ?= yes
scope:extortionate_current_gold ?= yes
scope:gold ?= yes
scope:current_gold ?= yes
}
}

View file

@ -26,7 +26,7 @@ maa_regiments_valid_to_refill_trigger = {
maa_current_troops_count < maa_max_troops_count
trigger_if = {
limit = {
scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } }
regiment_owner ?= { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } }
is_unit_type = elephant_cavalry
}
regiment_owner.domicile ?= { has_domicile_parameter = camp_reinforce_elephant_regiments_anywhere }

View file

@ -100,8 +100,11 @@ realm_law_use_government_authority = {
}
realm_law_authority_level_0 = {
has_realm_law_flag = authority_level_0
NOT = { has_realm_law_flag = authority_level_1 }
custom_description = {
text = has_lowest_government_authority
has_realm_law_flag = authority_level_0
NOT = { has_realm_law_flag = authority_level_1 }
}
}
realm_law_authority_level_1 = {

View file

@ -21,7 +21,7 @@ valid_for_maa_trigger = {
has_perk = planned_cultivation_perk
location.county.culture ?= { has_cultural_parameter = $PARAMETER$ }
}
culture ?= { has_cultural_parameter = $PARAMETER$ }
culture = { has_cultural_parameter = $PARAMETER$ }
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -276,7 +276,7 @@ allows_declaring_war_against_target_trigger = {
is_in_activity = no
trigger_if = {
limit = {
culture ?= { has_cultural_parameter = cannot_attack_allies }
culture = { has_cultural_parameter = cannot_attack_allies }
}
NOT = {
is_allied_to = scope:defender_check
@ -284,7 +284,7 @@ allows_declaring_war_against_target_trigger = {
}
trigger_if = {
limit = {
culture ?= { has_cultural_parameter = cannot_attack_truces }
culture = { has_cultural_parameter = cannot_attack_truces }
}
NOT = {
has_truce = scope:defender_check
@ -487,16 +487,8 @@ can_use_conquest_cbs_trigger = {
government_has_flag = government_is_clan
government_has_flag = government_is_nomadic
government_has_flag = government_is_steppe_admin
trigger_if = {
limit = { exists = rite }
rite ?= { rite_has_parameter = conquest_cb_enabled }
}
trigger_else = { always = no }
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = can_use_conquest_cbs }
}
trigger_else = { always = no }
rite = { rite_has_parameter = conquest_cb_enabled }
culture = { has_cultural_parameter = can_use_conquest_cbs }
AND = {
government_has_flag = government_is_japan_feudal
has_realm_law = imperial_expansion_law
@ -514,13 +506,7 @@ can_be_warrior_trigger = {
OR = {
can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $ARMY_OWNER$ }
AND = {
$ARMY_OWNER$ = {
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = high_prowess_ignores_knight_restrictions }
}
trigger_else = { always = no }
}
$ARMY_OWNER$.culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions }
prowess >= 10
}
# Japan Onna-musha
@ -531,17 +517,9 @@ can_be_warrior_trigger = {
NOT = {
government_has_mechanic = administrative
}
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
}
trigger_else = { always = no }
culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
}
trigger_if = {
limit = { exists = culture }
culture ?= { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
}
trigger_else = { always = no }
culture = { has_cultural_parameter = non_admin_close_family_non_martial_gender_knights_in_defensive_wars }
}
AND = {
$ARMY_OWNER$ = { is_at_war_as_defender = yes }
@ -580,12 +558,8 @@ can_be_knight_trigger = {
}
trigger_if = {
limit = {
exists = $ARMY_OWNER$.culture
trigger_if = {
limit = { exists = $ARMY_OWNER$.culture }
$ARMY_OWNER$.culture ?= {
has_cultural_parameter = minimum_prowess_for_knights
}
$ARMY_OWNER$.culture = {
has_cultural_parameter = minimum_prowess_for_knights
}
}
prowess >= 12
@ -595,21 +569,17 @@ can_be_knight_trigger = {
is_clergy = yes
}
OR = {
rite ?= { rite_has_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 }
rite = { rite_has_parameter = pacifist }
}
}
culture ?= { has_cultural_parameter = culture_clergy_can_fight }
culture = { has_cultural_parameter = culture_clergy_can_fight }
AND = {
exists = $ARMY_OWNER$.culture
trigger_if = {
limit = { exists = $ARMY_OWNER$.culture }
$ARMY_OWNER$.culture ?= {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
$ARMY_OWNER$.culture = {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
prowess >= 10
}
@ -617,12 +587,8 @@ can_be_knight_trigger = {
}
OR = {
AND = {
exists = $ARMY_OWNER$.culture
trigger_if = {
limit = { exists = $ARMY_OWNER$.culture }
$ARMY_OWNER$.culture ?= {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
$ARMY_OWNER$.culture = {
has_cultural_parameter = high_prowess_ignores_knight_restrictions
}
prowess >= 10
}
@ -987,14 +953,14 @@ religious_cb_holder_under_target_can_be_vassalized = {
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 ?= {
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.
scope:attacker.rite ?= { rite_has_parameter = pluralism_pluralistic_holy_wars_preserve_vassals }
scope:attacker.rite = { rite_has_parameter = pluralism_pluralistic_holy_wars_preserve_vassals }
}
}
@ -1043,16 +1009,8 @@ can_use_viking_invasion_cbs_trigger = {
}
can_use_viking_invasion_cbs_dlc_trigger = {
trigger_if = {
limit = { exists = culture }
culture ?= { has_innovation = innovation_longboats }
}
trigger_else = { always = no }
trigger_if = {
limit = { exists = rite }
rite ?= { rite_has_tenet = tenet_warmonger }
}
trigger_else = { always = no }
culture = { has_innovation = innovation_longboats }
rite = { rite_has_tenet = tenet_warmonger }
any_sub_realm_county = { is_coastal_county = yes }
trigger_if = {
limit = { is_ai = yes }
@ -1064,11 +1022,7 @@ can_use_viking_invasion_cbs_dlc_trigger = {
NOT = {
any_liege_or_above = {
NOT = {
trigger_if = {
limit = { exists = rite }
rite ?= { rite_has_tenet = tenet_warmonger }
}
trigger_else = { always = no }
rite = { rite_has_tenet = tenet_warmonger }
}
}
}

View file

@ -1876,7 +1876,7 @@ laamp_as_mercenary_payout_trigger = {
scope:merc_temp = { is_attacker_in_war = scope:war_temp }
}
trigger_else = {
scope:merc_temp = { is_attacker_in_war = scope:war_temp }
scope:merc_temp = { is_defender_in_war = scope:war_temp }
}
}
NOT = { is_leader_in_war = scope:war_temp }

View file

@ -1,278 +0,0 @@
# Any theocratic vassal of $LIEGE$'s faith, no matter the rite
pam_valid_antipope_clergy_vassal_trigger = {
save_temporary_scope_as = antipope_temp
is_clergy = yes
custom_tooltip = {
text = pam_antipope_clerical_gender_tt
$LIEGE$.rite = { rite_has_allowed_gender_for_clergy = scope:antipope_temp }
}
faith = $LIEGE$.faith
NOT = { any_held_title = { is_head_of_faith = yes } }
pam_is_antipope_trigger = no
}
# Holds one of their faith's antipope titles
pam_is_antipope_trigger = {
save_temporary_scope_as = pam_antipope_holder_check
faith ?= {
any_religious_head_challenger = {
holder ?= scope:pam_antipope_holder_check
}
}
}
pam_title_is_antipope_office_trigger = {
has_variable = pam_antipope_office
}
# Holds the sponsor title behind one of their faith's antipopes. A self-declared antipope sponsors themselves
pam_is_antipope_sponsor_trigger = {
save_temporary_scope_as = pam_antipope_sponsor_check
faith = {
any_religious_head_challenger = {
challenger_sponsor ?= {
holder ?= scope:pam_antipope_sponsor_check
}
}
}
}
pam_sponsors_other_antipope_trigger = {
save_temporary_scope_as = pam_other_antipope_sponsor_check
faith = {
any_religious_head_challenger = {
NOT = { holder ?= scope:pam_other_antipope_sponsor_check }
challenger_sponsor ?= {
holder ?= scope:pam_other_antipope_sponsor_check
}
}
}
}
# Scoped to an antipope: $SPONSOR$ is the ruler whose title backs them
pam_antipope_is_sponsored_by_trigger = {
save_temporary_scope_as = pam_checked_antipope
$SPONSOR$ = { save_temporary_scope_as = pam_expected_sponsor }
faith = {
any_religious_head_challenger = {
holder ?= scope:pam_checked_antipope
challenger_sponsor ?= {
holder ?= scope:pam_expected_sponsor
}
}
}
}
pam_is_sponsored_antipope_trigger = {
pam_is_antipope_trigger = yes
pam_is_antipope_sponsor_trigger = no
}
pam_antipope_declaration_discounted_trigger = {
situation:the_christian_church ?= {
has_situation_top_phase_parameter = the_christian_church_cheaper_antipope_declaration
}
}
# Covers the antipope, their sponsor, and anyone under either of them
pam_antipope_protected_from_excommunication_trigger = {
is_following_religious_head_challenger = yes
faith.religious_head ?= $EXCOMMUNICATOR$
NOT = { has_personal_tenet_flag = tenet_apostolic_succession_antipope_opposition }
}
# Clerical requests that the mainline hierarchy would answer
# Anyone under an antipope has to take them to that antipope instead
pam_antipope_clerical_request_trigger = {
trigger_if = {
limit = { pam_is_antipope_trigger = yes }
custom_tooltip = {
text = pam_clerical_request_actor_is_antipope_tt
religious_head_or_challenger ?= $RECIPIENT$
}
}
trigger_else_if = {
limit = { pam_is_antipope_sponsor_trigger = yes }
custom_tooltip = {
text = pam_clerical_request_actor_is_antipope_sponsor_tt
religious_head_or_challenger ?= $RECIPIENT$
}
}
trigger_else_if = {
limit = { is_following_religious_head_challenger = yes }
custom_tooltip = {
text = pam_clerical_request_in_antipope_realm_tt
religious_head_or_challenger ?= $RECIPIENT$
}
}
trigger_else = {
always = yes
}
}
pam_antipope_may_grant_clerical_region_trigger = {
trigger_if = {
limit = { scope:actor = { pam_is_antipope_trigger = yes } }
trigger_if = {
limit = { exists = $SEE$.holder }
$SEE$.holder.religious_head_or_challenger ?= scope:actor
}
trigger_else = {
$SEE$.title_capital_county.holder.religious_head_or_challenger ?= scope:actor
}
}
trigger_else = {
always = yes
}
}
# Antipope + Sponsor
pam_can_use_challenge_hof_cb_trigger = {
OR = {
pam_is_antipope_trigger = yes
pam_is_antipope_sponsor_trigger = yes
}
faith = {
exists = religious_head
NOT = { religious_head = scope:attacker }
}
}
pam_challenge_hof_join_war_trigger = {
is_ai = yes
highest_held_title_tier >= tier_county
NOR = {
is_participant_in_war = scope:war
# Don't add vassals of targets
is_vassal_or_below_of = scope:defender
is_vassal_or_below_of = scope:attacker
# Not part of an attacker's realm
any_liege_or_above = { is_participant_in_war = scope:war }
}
OR = {
# Military Holy Orders always join
government_has_flag = government_is_military_holy_order
AND = {
# Landed rulers join if zealous independents or theocrats, prevent every cardinal and monastic abbot joining
is_landed = yes
OR = {
AND = {
is_independent_ruler = yes
# Attackers always join if rite is different, to reward spreading rite
trigger_if = {
limit = {
scope:defender.rite != scope:attacker.rite
rite = scope:attacker.rite
}
always = yes
}
# Otherwise attackers/defenders join only if zealous
trigger_else = {
ai_zeal >= very_high_positive_ai_value
}
}
government_has_flag = government_is_theocracy
}
}
}
}
# Against the Antipope sponsor (which can be the antipope themselves if self-declared)
pam_can_target_antiking_cb_trigger = {
scope:defender = {
pam_is_antipope_sponsor_trigger = yes
faith = scope:attacker.faith
top_liege = this
}
scope:attacker = {
is_landed = yes
faith = scope:defender.faith
NOT = { this = scope:defender }
NOR = {
pam_is_antipope_sponsor_trigger = yes
pam_is_antipope_trigger = yes
}
}
}
antipope_requirements_trigger = {
calc_true_if = {
amount >= $AMOUNT$
has_trait = herald
trigger_if = {
limit = { religion = religion:islam_religion }
# Sayyids get a free pass.
has_trait = sayyid
}
trigger_else_if = {
limit = { religion = religion:zoroastrianism_religion }
OR = {
has_trait = saoshyant
has_trait = saoshyant_descendant
}
}
# to prevent "false" visible, but you should not get this as a potential antipope since this can only be granted to a HoF
trigger_else = {
has_trait = savior
}
has_trait_xp = {
trait = lifestyle_scholar
value >= 100
}
custom_description = {
text = is_head_of_rite_tt
subject = root
rite.head_of_rite ?= this
}
# has_relation_rival has no first-person trigger localization, so describe it explicitly
custom_description = {
text = declare_yourself_antipope_decision_hof_rival_tt
has_relation_rival = faith.religious_head
}
custom_description = {
text = appoint_a_righteous_caliph_decision.caliph_not_in_diplo_range
NOT = { in_diplomatic_range = faith.religious_head }
}
# Having a holy site.
custom_description = {
text = appoint_a_righteous_caliph_decision.control_one_holy_site
faith = {
any_holy_site_barony = {
count >= 1
holder ?= { target_is_same_character_or_above = root }
}
}
}
# Having *2* holy sites.
custom_description = {
text = appoint_a_righteous_caliph_decision.control_two_holy_sites
faith = {
any_holy_site_barony = {
count >= 2
holder ?= { target_is_same_character_or_above = root }
}
}
}
# Having a higher-than-minimum piety level.
piety_level >= very_high_piety_level
custom_description = {
text = declare_yourself_antipope_decision_hof_piety_level_tt
piety_level > faith.religious_head.piety_level
}
# And just having a caliph who doesn't live up to the root's faith's ideals.
custom_description = {
text = appoint_a_righteous_caliph_decision.caliph_has_x_or_more_traits_sinful_to_your_faith
faith.religious_head = {
num_sinful_traits = {
value >= 2
target = root.rite
}
}
}
# Has planned to schism off for a *while*.
custom_description = {
text = appoint_a_righteous_caliph_decision.has_wishes_to_schism_caliphate_flag
has_character_flag = wishes_to_schism_caliphate_flag
}
}
}

View file

@ -0,0 +1,378 @@
######################################
# Heresy system - scripted triggers #
######################################
# Per-heresy gating, geography helpers, and component eligibility checks.
# Resurgence model: each historical heresy can fire more than once per game.
# first outbreak: pam_heresy_X_first_fired global var is unset
# resurgence: first_fired set, plus pam_heresy_X_cooldown timed flag absent
# A 50-year cooldown is set after every outbreak via timed global variable.
# --- Component eligibility (faith scope) ---
# The second and third heresy components are blocked below this
# The first still fires, but we dampen the pulse with pam_heresy_pulse_no_event_value
pam_heresy_main_rite_substantial_trigger = {
main_rite.rite_counties >= pam_heresy_main_rite_county_threshold_value
}
# Component 2 gate: main rite must be substantial (size floor) AND hold at least 60% of faith counties (dominance share).
pam_heresy_c2_main_rite_dominant_trigger = {
pam_heresy_main_rite_substantial_trigger = yes
main_rite.rite_counties >= pam_heresy_c2_main_rite_share_required_value
}
#pam_heresy_c3_eligible_trigger = {
# religion = religion:christianity_religion
# pam_heresy_main_rite_substantial_trigger = yes
# OR = {
# pam_heresy_lollard_eligible_trigger = yes
# pam_heresy_hussite_eligible_trigger = yes
# pam_heresy_joachimite_eligible_trigger = yes
# pam_heresy_cathar_eligible_trigger = yes
# pam_heresy_waldensian_eligible_trigger = yes
# pam_heresy_bogomilist_eligible_trigger = yes
# pam_heresy_paulician_eligible_trigger = yes
# pam_heresy_iconoclast_eligible_trigger = yes
# pam_heresy_adoptionist_eligible_trigger = yes
# pam_heresy_messalian_eligible_trigger = yes
# }
#}
# --- Per-heresy "is this heresy still available?" ---
# Each heresy can fire if past its earliest_date, the parent faith of the outbreak
# (root) is not the heresy faith itself, optional time windows pass, and the
# 50-year resurgence cooldown has elapsed since the last outbreak (if any).
#pam_heresy_lollard_eligible_trigger = {
# current_date >= 1340.1.1
# this != faith:lollard
# pam_heresy_lollard_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_lollard_cooldown }
#}
#pam_heresy_hussite_eligible_trigger = {
# current_date >= 1360.1.1
# this != faith:hussite
# pam_heresy_hussite_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_hussite_cooldown }
#}
#pam_heresy_joachimite_eligible_trigger = {
# current_date >= 1200.1.1
# this != faith:joachimite
# pam_heresy_joachimite_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_joachimite_cooldown }
#}
#pam_heresy_cathar_eligible_trigger = {
# current_date >= 1140.1.1
# this != faith:cathar
# pam_heresy_cathar_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_cathar_cooldown }
#}
#pam_heresy_waldensian_eligible_trigger = {
# current_date >= 1160.1.1
# this != faith:waldensian
# pam_heresy_waldensian_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_waldensian_cooldown }
#}
#pam_heresy_bogomilist_eligible_trigger = {
# current_date >= 950.1.1
# this != faith:bogomilist
# pam_heresy_bogomilist_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_bogomilist_cooldown }
#}
# Always-anonymous repeating outbreaks. No first-historical figure - founder is always a generic resurgence preacher.
#pam_heresy_paulician_eligible_trigger = {
# current_date >= 870.1.1
# this != faith:paulician
# pam_heresy_paulician_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_paulician_cooldown }
#}
#pam_heresy_iconoclast_eligible_trigger = {
# current_date >= 900.1.1
# this != faith:iconoclast
# pam_heresy_iconoclast_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_iconoclast_cooldown }
#}
# Adoptionism: Felix of Urgell died ~818, the Spanish argument fades after the first millennium - hard time-gate to before 1000.
#pam_heresy_adoptionist_eligible_trigger = {
# current_date >= 870.1.1
# current_date <= 999.12.31
# this != faith:adoptionist
# NOT = { exists = global_var:pam_heresy_adoptionist_cooldown }
#}
#pam_heresy_messalian_eligible_trigger = {
# current_date >= 870.1.1
# this != faith:messalian
# pam_heresy_messalian_strict_window_ok_trigger = yes
# NOT = { exists = global_var:pam_heresy_messalian_cooldown }
#}
# --- Strict-rule per-heresy historical windows ---
# Only enforced when game rule = strict_regional_heresy.
# The "strict" window is the historical lifetime of the named founder; outside that, strict mode rejects the outbreak entirely.
# Always-anonymous heresies have no strict window (they're resurgence-flavoured by default).
#pam_heresy_lollard_strict_window_ok_trigger = {
# OR = {
# NOT = { has_game_rule = strict_regional_heresy }
# current_date <= 1430.1.1
# }
#}
#pam_heresy_hussite_strict_window_ok_trigger = {
# OR = {
# NOT = { has_game_rule = strict_regional_heresy }
# current_date <= 1450.1.1
# }
#}
# Joachimite: strict mode cuts off after Fra Dolcino's burning, as later Fraticelli are too institutional
#pam_heresy_joachimite_strict_window_ok_trigger = {
# OR = {
# NOT = { has_game_rule = strict_regional_heresy }
# current_date <= 1310.1.1
# }
#}
#pam_heresy_cathar_strict_window_ok_trigger = {
# OR = {
# NOT = { has_game_rule = strict_regional_heresy }
# current_date <= 1230.1.1
# }
#}
#pam_heresy_waldensian_strict_window_ok_trigger = {
# OR = {
# NOT = { has_game_rule = strict_regional_heresy }
# current_date <= 1250.1.1
# }
#}
#pam_heresy_bogomilist_strict_window_ok_trigger = {
# OR = {
# NOT = { has_game_rule = strict_regional_heresy }
# current_date <= 1100.1.1
# }
#}
# Always-anonymous: strict mode just lets them through (no historical figure to anchor).
pam_heresy_paulician_strict_window_ok_trigger = { always = yes }
pam_heresy_iconoclast_strict_window_ok_trigger = { always = yes }
pam_heresy_messalian_strict_window_ok_trigger = { always = yes }
# --- Resurgence detection (faith scope on the parent faith) ---
# Always-anonymous heresies skip this and set scope:is_resurgence in the router
#pam_heresy_lollard_is_resurgence_trigger = {
# exists = global_var:pam_heresy_lollard_first_fired
#}
#pam_heresy_hussite_is_resurgence_trigger = {
# exists = global_var:pam_heresy_hussite_first_fired
#}
#pam_heresy_joachimite_is_resurgence_trigger = {
# exists = global_var:pam_heresy_joachimite_first_fired
#}
#pam_heresy_cathar_is_resurgence_trigger = {
# exists = global_var:pam_heresy_cathar_first_fired
#}
#pam_heresy_waldensian_is_resurgence_trigger = {
# exists = global_var:pam_heresy_waldensian_first_fired
#}
#pam_heresy_bogomilist_is_resurgence_trigger = {
# exists = global_var:pam_heresy_bogomilist_first_fired
#}
# --- Pre-declaration vs already-declared (faith scope on the heresy faith) ---
pam_heresy_faith_is_pre_declaration_trigger = {
has_variable = block_conversion_till_decision_taken
}
# True when the recipient is already on the heresy's rite.
# Used to gate "embrace" / reframe "reject" options and description text so the
# event does not address one of the heresy's own followers as an outside observer.
pam_heresy_player_is_heresy_insider_trigger = {
trigger_if = {
limit = { exists = scope:new_rite }
rite = scope:new_rite
}
trigger_else_if = {
limit = { exists = scope:heresy_faith }
faith = scope:heresy_faith
}
trigger_else = {
always = no
}
}
# --- Geography helpers (province scope) ---
# Callers in county scope must wrap with title_province = { ... }.
#pam_heresy_lollard_region_trigger = {
# OR = {
# geographical_region = world_europe_west_britannia
# geographical_region = world_europe_west_germania
# }
#}
#pam_heresy_hussite_region_trigger = {
# # Bohemia / Moravia sit inside world_europe_west_germania.
# geographical_region = world_europe_west_germania
#}
#pam_heresy_joachimite_region_trigger = {
# # Calabria, the Italian peninsula, Provence, and southern France
# OR = {
# geographical_region = world_europe_south_italy
# geographical_region = world_europe_west_francia
# }
#}
#pam_heresy_cathar_region_trigger = {
# OR = {
# geographical_region = world_europe_west_francia
# geographical_region = world_europe_south_italy
# }
#}
#pam_heresy_waldensian_region_trigger = {
# OR = {
# geographical_region = world_europe_west_francia
# geographical_region = world_europe_south_italy
# }
#}
#pam_heresy_bogomilist_region_trigger = {
# geographical_region = world_europe_south_east
#}
#pam_heresy_paulician_region_trigger = {
# geographical_region = world_asia_minor
#}
#pam_heresy_iconoclast_region_trigger = {
# OR = {
# geographical_region = world_asia_minor
# geographical_region = world_europe_south_east
# }
#}
#pam_heresy_adoptionist_region_trigger = {
# geographical_region = world_europe_west_iberia
#}
#pam_heresy_messalian_region_trigger = {
# geographical_region = world_middle_east
#}
# --- Component 2 founder eligibility (character scope) ---
# Mirrors is_eligible_rite_growth_founder_trigger but is permissive about existing heresiarch / herald carriers
# C2 is the "charismatic schismatic" path and those traits are an asset here.
# Archbishop-only candidates (no held county on the source rite) are accepted via the clerical_region branch.
is_eligible_pam_heresy_c2_founder_trigger = {
is_available_ai_adult = yes
rite = scope:source_rite
learning >= medium_skill_rating
NOR = {
recently_converted_faith_trigger = yes
has_character_flag = recently_converted_by_heresy
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 }
}
}
# Test convenience trigger for narrative branching (e.g. event text).
pam_heresy_c2_founder_is_archbishop_trigger = {
scope:founder = {
any_held_title = { has_clerical_region = yes }
}
}
# --- Epicenter ruler eligibility (character scope) ---
# A duke+ same-faith landed AI ruler.
# Capital-in-region check is applied separately by the picker (with title_province wrapping).
is_eligible_heresy_epicenter_ruler_trigger = {
is_landed = yes
is_ai = yes
highest_held_title_tier >= tier_duchy
NOR = {
this = faith.religious_head
has_trait = heresiarch
has_trait = herald
recently_converted_faith_trigger = yes
}
}
# --- Component 3 game-rule gates ---
pam_heresy_relaxed_rule_trigger = {
has_game_rule = relaxed_regional_heresy
}
pam_heresy_strict_rule_trigger = {
has_game_rule = strict_regional_heresy
}
pam_heresy_default_rule_trigger = {
OR = {
has_game_rule = default_regional_heresy
# Defensive: if no rule explicitly matches, treat as default.
AND = {
NOT = { has_game_rule = strict_regional_heresy }
NOT = { has_game_rule = relaxed_regional_heresy }
}
}
}
# Province scope, branching on scope:heresy_faith
#pam_heresy_capital_in_heresy_region_trigger = {
# OR = {
# AND = {
# scope:heresy_faith = faith:lollard
# pam_heresy_lollard_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:hussite
# pam_heresy_hussite_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:joachimite
# pam_heresy_joachimite_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:cathar
# pam_heresy_cathar_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:waldensian
# pam_heresy_waldensian_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:bogomilist
# pam_heresy_bogomilist_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:paulician
# pam_heresy_paulician_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:iconoclast
# pam_heresy_iconoclast_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:adoptionist
# pam_heresy_adoptionist_region_trigger = yes
# }
# AND = {
# scope:heresy_faith = faith:messalian
# pam_heresy_messalian_region_trigger = yes
# }
# }
#}

View file

@ -0,0 +1,254 @@
############################################
# Canonizing Saints - scripted triggers
# pam_can_canonize_saint_trigger
# pam_is_canonization_candidate_trigger
# pam_faith_uses_cathedrals_trigger
# pam_character_has_cathedral_trigger
# pam_has_consecration_site_trigger
# pam_site_free_trigger
# pam_province_is_free_burial_site_trigger
# pam_has_free_primary_site_trigger
# pam_county_has_actor_primary_site_trigger
# pam_has_free_adjacent_site_trigger
# pam_needs_hof_approval_for_canonization_trigger
# pam_hof_thinks_well_of_canonizer_trigger
# pam_saint_is_buried_in_my_lands_trigger
# pam_can_extract_relic_from_saint_trigger
# pam_saint_relic_drawable_trigger
# pam_venerated_the_saints_personally_trigger
############################################
has_corpse_trigger = {
trigger_if = {
limit = { is_alive = no }
NOR = {
has_dead_character_variable = no_corpse_left
saint_burial_location ?= { has_variable = no_corpse_left }
death_reason = death_disappearance
death_reason = death_vanished
death_reason = death_hunted_by_wild_beast
death_reason = death_disappeared_into_slave_markets
death_reason = death_killed_by_monstrous_dog
death_reason = death_killed_by_monstrous_wolf
death_reason = death_killed_by_monstrous_hyena
death_reason = death_killed_by_monstrous_lion
death_reason = death_killed_by_monstrous_tiger
death_reason = death_killed_by_monstrous_leopard
death_reason = death_killed_by_monstrous_panther
death_reason = death_killed_by_monstrous_lynx
death_reason = death_killed_by_monstrous_caracal
death_reason = death_killed_by_monstrous_bear
death_reason = death_killed_by_monstrous_hippo
death_reason = death_killed_by_monstrous_crocodile
}
}
}
# Can this ruler canonize saints at all? (the actor of the decision)
pam_can_canonize_saint_trigger = {
has_pam_dlc_trigger = yes
is_landed_or_landless_administrative_or_theocratic = yes
is_adult = yes
is_ruler = yes
exists = faith
# Christian sainthood needs Dulia not forbidden or unknown; non-Christian (Venerated Ancestor) faiths are unaffected.
trigger_if = {
limit = {
OR = {
faith.religion = religion:catholic_religion
faith.religion = religion:protestant_religion
faith.religion = religion:eastern_orthodox_religion
faith.religion = religion:oriental_orthodox_religion
}
}
rite = {
NOT = { has_tenet_status = { tenet = tenet_dulia status = unknown } }
NOT = { has_tenet_status = { tenet = tenet_dulia status = prohibited } }
}
}
}
# Can this dead ancestor be canonized? CANONIZER is passed in because the picker runs with root = none; virtue/sin are judged by the canonizer's rite.
pam_is_canonization_candidate_trigger = {
is_alive = no
NOT = { has_trait = saint }
faith ?= $CANONIZER$.faith
dynasty ?= $CANONIZER$.dynasty
# Saintly life: at least one virtue and no sins by our rite's reckoning.
num_virtuous_traits = {
value >= 1
target = this.rite
}
num_sinful_traits = {
value = 0
target = this.rite
}
}
# Faiths with clerical regions and a temporal/appointed clergy build cathedrals; every other faith, including all non-Christian ones, consecrates at a holy site instead. Mirrors the ecclesiastical_government gate (see 02_theocratic_government_types.txt).
pam_faith_uses_cathedrals_trigger = {
faith ?= { has_doctrine_parameter = has_clerical_regions }
NOT = { rite = { rite_has_doctrine = doctrine_theocracy_lay_clergy } }
}
# We start with government because it is quick, then ecclesiastical_domicile_main_01 or higher
pam_character_has_cathedral_trigger = {
has_government = ecclesiastical_government
domicile ?= { has_domicile_building_or_higher = ecclesiastical_domicile_main_01 }
}
# Does the actor have somewhere to consecrate a saint? A free (unoccupied) cathedral / holy site, or - once those are all taken - a free county-capital barony neighbouring one. Burial is one saint per province, so "free" means the province holds no saint yet.
pam_has_consecration_site_trigger = {
OR = {
pam_has_free_primary_site_trigger = yes
pam_has_free_adjacent_site_trigger = yes
}
}
# A consecration barony (barony scope) whose province has no saint buried yet. Burial is province-anchored (the poi_buried_saint marks the province), so one province holds at most one saint.
pam_site_free_trigger = {
title_province ?= {
NOR = {
has_variable = hide_location_for_saint
has_travel_point_of_interest = poi_buried_saint
}
}
}
# Province can take add_saint: holding present, no buried-saint PoI yet.
pam_province_is_free_burial_site_trigger = {
has_holding = yes
NOR = {
has_variable = hide_location_for_saint
has_travel_point_of_interest = poi_buried_saint
}
}
# Does the actor have a free primary consecration site? Cathedral faiths: an unoccupied cathedral in their realm. Others: an unoccupied holy site of their faith in realm.
pam_has_free_primary_site_trigger = {
trigger_if = {
limit = { pam_faith_uses_cathedrals_trigger = yes }
OR = {
AND = {
pam_character_has_cathedral_trigger = yes
domicile ?= { domicile_location = { barony ?= { pam_site_free_trigger = yes } } }
}
any_realm_province = {
barony ?= { pam_site_free_trigger = yes }
any_province_domicile = { owner = { pam_character_has_cathedral_trigger = yes } }
}
}
}
trigger_else = {
save_temporary_scope_as = pam_primary_site_actor
any_realm_province = {
barony ?= { is_holy_site_of = scope:pam_primary_site_actor.faith }
NOT = { has_travel_point_of_interest = poi_buried_saint }
}
}
}
# Does this county (title scope) hold one of $ACTOR$'s primary consecration sites? Used to find provinces adjacent to a real site. Cathedral faiths: a cathedral (an ecclesiastical domicile) in $ACTOR$'s realm sits in the county, whoever owns it. Others: a holy site of $ACTOR$'s faith sits in the county, in realm. Identified from the province's domicile side (same walk as pam_has_free_primary_site_trigger and setup_items) - a cathedral barony's holder isn't reliably the bishop, so a barony->holder lookup misses them. Intentionally intrinsic (cathedral/holy-site nature, not occupancy) so an adjacency burial never seeds further neighbours.
pam_county_has_actor_primary_site_trigger = {
save_temporary_scope_as = pam_primary_site_county
trigger_if = {
limit = { $ACTOR$ = { pam_faith_uses_cathedrals_trigger = yes } }
$ACTOR$ = {
OR = {
AND = {
pam_character_has_cathedral_trigger = yes
domicile ?= { domicile_location ?= { county = scope:pam_primary_site_county } }
}
any_realm_province = {
county = scope:pam_primary_site_county
any_province_domicile = { owner = { pam_character_has_cathedral_trigger = yes } }
}
}
}
}
trigger_else = {
$ACTOR$ = {
any_realm_province = {
barony ?= { is_holy_site_of = $ACTOR$.faith }
county = scope:pam_primary_site_county
}
}
}
}
# Once every primary site is taken, may the actor consecrate in a neighbouring province instead? True when a free county-capital barony in realm borders a county that holds one of the actor's primary sites (one candidate per county, keeping the picker focused).
pam_has_free_adjacent_site_trigger = {
save_temporary_scope_as = pam_adjacency_actor
any_realm_province = {
is_county_capital = yes
NOT = { has_travel_point_of_interest = poi_buried_saint }
county = {
any_neighboring_county = {
pam_county_has_actor_primary_site_trigger = { ACTOR = scope:pam_adjacency_actor }
}
}
}
}
# Approval is needed when a Head of Faith exists and it is not the actor.
pam_needs_hof_approval_for_canonization_trigger = {
exists = faith.religious_head
NOT = { faith.religious_head = root }
}
# A Head of Faith who thinks poorly of the actor will not entertain the petition at all. Vacuously true where approval is not sought anyway - no Head of Faith, or the actor holds the office - and for a puppeted Head of Faith, who cannot refuse their puppeteer (mirrors the certain-approval branch in the canonize decision).
pam_hof_thinks_well_of_canonizer_trigger = {
trigger_if = {
limit = {
pam_needs_hof_approval_for_canonization_trigger = yes
NOT = { faith.religious_head.puppeteer ?= root }
}
faith.religious_head ?= {
opinion = {
target = root
value >= high_positive_opinion
}
}
}
}
# Is this burial province within $EXTRACTOR$'s realm (held by them or a vassal/sub-vassal)? EXTRACTOR is passed in because the relic picker runs with root = none.
pam_saint_is_buried_in_my_lands_trigger = {
county.holder ?= {
target_is_same_character_or_above = $EXTRACTOR$
}
}
# Can $EXTRACTOR$ draw another relic from this site? The AI always leaves one relic
# $SAINT$ is the saint being evaluated
pam_can_extract_relic_from_saint_trigger = {
# add_saint deliberately accepts living characters for modders, so the registry can hold one - never offer them as a relic source
$SAINT$ = { is_alive = no }
pam_saint_is_buried_in_my_lands_trigger = { EXTRACTOR = $EXTRACTOR$ }
trigger_if = {
limit = { $EXTRACTOR$ = { is_ai = yes } }
$SAINT$ = {
remaining_saint_relics > 1
}
}
trigger_else = {
$SAINT$ = {
remaining_saint_relics > 0
}
}
}
# Relic picker is_item_valid helper (scope = picked saint): can $EXTRACTOR$ still draw from this saint? Resolve their burial province, then defer to the shared eligibility trigger (prev = the saint).
pam_saint_relic_drawable_trigger = {
saint_burial_location = {
pam_can_extract_relic_from_saint_trigger = { EXTRACTOR = $EXTRACTOR$ SAINT = prev }
}
}
pam_venerated_the_saints_personally_trigger = {
trigger_if = {
limit = { is_alive = yes }
has_personal_tenet_flag = tenet_dulia_personal_sainthood_chance
}
trigger_else = {
has_dead_character_variable = pam_dulia_personal_sainthood
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,65 @@

# Base gate shared by every Secular Faith event.
pam_secular_faith_base_trigger = {
has_pam_dlc_trigger = yes
is_available_adult = yes
}
# The default ambient actor.
pam_secular_faith_landed_actor_trigger = {
pam_secular_faith_base_trigger = yes
is_landed_or_landless_administrative = yes
}
# As above, but also open to clergy rulers (visions, scripture, hermits, etc. make sense for them too).
pam_secular_faith_clergy_ok_actor_trigger = {
pam_secular_faith_base_trigger = yes
is_landed_or_landless_administrative_or_theocratic = yes
}
# Christian-primary convenience gate.
pam_secular_faith_christian_actor_trigger = {
pam_secular_faith_landed_actor_trigger = yes
OR = {
religion = religion:catholic_religion
religion = religion:protestant_religion
religion = religion:eastern_orthodox_religion
religion = religion:oriental_orthodox_religion
}
}
pam_can_adopt_forbidden_personal_tenet_trigger = {
any_desired_tenet = {
only_positive = yes
threshold = 1
selection_count = 97
save_temporary_scope_as = pam_sf_forbidden_candidate
NOT = { root = { any_personal_tenet = { this = scope:pam_sf_forbidden_candidate } } }
root.faith.main_rite = {
has_tenet_status = {
tenet = scope:pam_sf_forbidden_candidate
status = prohibited
}
}
}
}
pam_sf_carnal_art_indian_setting_trigger = {
OR = {
culture = { has_cultural_pillar = heritage_indo_aryan }
culture = { has_cultural_pillar = heritage_dravidian }
location = { geographical_region = world_india }
}
}
pam_poverty_tenets_trigger = {
OR = {
this = tenet:tenet_mendicant_preachers
this = tenet:tenet_vows_of_poverty
this = tenet:tenet_asceticism
this = tenet:tenet_sanctity_of_nature
this = tenet:tenet_communal_possessions
this = tenet:tenet_philanthropia
}
}