on actions updated files

This commit is contained in:
Thakia 2026-10-09 17:58:54 -03:00
parent 707660e545
commit 6fe43fad95
13 changed files with 3892 additions and 965 deletions

View file

@ -1,17 +0,0 @@
on_game_start = {
events = {
historical_artifacts.999
}
on_actions = {
NEOW_on_game_start
}
}
NEOW_on_game_start = {
effect = {
### Fire Starting Events
debug_log = "NEOW_on_game_start fired"
fire_starting_events = yes
}
}

View file

@ -50,7 +50,7 @@ on_army_monthly = {
} }
} }
# called when a county is (fully) occupied. Does not fire on reoccupation by province owner # called when a county is (fully) occupied. Does not fire on reoccupation by province owner, there is on_liberation_siege_completion for that.
# root is the occupant # root is the occupant
# scope:county is the county title # scope:county is the county title
# scope:barony is the barony title that got occupied # scope:barony is the barony title that got occupied
@ -404,7 +404,7 @@ on_county_occupied = {
} }
} }
# called when a siege completes. Does *not* fire on reoccupation by province order # called when a siege completes. Does not fire on reoccupation by province owner, there is on_liberation_siege_completion for that.
# root is the occupant # root is the occupant
# scope:barony is the barony title that got occupied # scope:barony is the barony title that got occupied
# scope:county is the county title for the barony # scope:county is the county title for the barony
@ -416,6 +416,7 @@ on_siege_completion = {
siege.0101 # Notify holders/lieges that the county was lost to siege siege.0101 # Notify holders/lieges that the county was lost to siege
siege.0001 # Capture/kill prisoners siege.0001 # Capture/kill prisoners
siege.0031 # Chance to steal an artifact siege.0031 # Chance to steal an artifact
siege.0032 # Chance to steal an artifact from holy site
faction_demand.1010 #Reinforce populist rebels faction_demand.1010 #Reinforce populist rebels
faction_demand.1110 #Reinforce peasant rebels faction_demand.1110 #Reinforce peasant rebels
siege.1001 #Someone I care about was immured here... siege.1001 #Someone I care about was immured here...
@ -437,7 +438,7 @@ on_siege_completion = {
# If you have the Sacred Destruction tenet get piety/destroy development # If you have the Sacred Destruction tenet get piety/destroy development
if = { if = {
limit = { limit = {
faith = { has_doctrine_parameter = successful_sieges_give_piety } rite = { rite_has_parameter = successful_sieges_give_piety }
} }
send_interface_toast = { send_interface_toast = {
title = successful_sieges_give_piety_toast title = successful_sieges_give_piety_toast
@ -447,6 +448,54 @@ on_siege_completion = {
} }
} }
if = {
limit = {
rite = { rite_has_parameter = tenet_aniconism_siege_destruction_bonus }
exists = scope:previous_controller
scope:previous_controller.rite ?= { NOT = { rite_has_tenet = tenet_aniconism } }
}
send_interface_toast = {
title = tenet_aniconism_siege_destruction_toast
left_icon = root
add_piety = minor_piety_gain
scope:barony.county = { change_development_progress_with_overflow = -3 }
}
}
# Extinction of Dharma: razing a rival faith's holdings hastens the dharma's decline
if = {
limit = {
rite = { rite_has_parameter = extinction_of_dharma_siege_bonus }
exists = scope:previous_controller
scope:previous_controller = {
faith.religion = root.faith.religion
NOT = { faith = root.faith }
}
}
send_interface_toast = {
title = extinction_of_dharma_siege_toast
left_icon = root
add_piety = minor_piety_gain
scope:barony.county = { change_development_progress_with_overflow = -3 }
}
}
# If you have the Miles Christi tenet get SP
pam_miles_christi_fulfillment_from_combat_effect = yes
if = {
limit = {
has_personal_tenet_flag = tenet_aniconism_destruction_fulfillment
exists = scope:previous_controller
scope:previous_controller.rite ?= { NOT = { rite_has_tenet = tenet_aniconism } }
}
send_interface_toast = {
title = pam_aniconism_siege_toast
left_icon = root
change_spiritual_fulfillment = minor_spiritual_fulfillment_value
}
}
# We change your legend to reflect this siege # We change your legend to reflect this siege
if = { if = {
limit = { limit = {
@ -593,6 +642,17 @@ on_siege_completion = {
} }
} }
# called when a "liberation siege" completes, meaning a siege that turns an occupied barony into an unoccupied one.
# root is the liberator of the occupation.
# scope:barony is the barony title that got liberated
# scope:county is the county title for the barony
# scope:previous_controller is the previous controller of the county
# scope:war is the war causing the previous controller and the liberator to be hostile
# liberated_baronies is a list of all baronies that the siege caused the occupier to control (I.E., can include baronies with no fort level)
on_liberation_siege_completion = {
}
# Called when a siege loots a holding # Called when a siege loots a holding
# root is sieging character # root is sieging character
# scope:barony is the barony title that got looted # scope:barony is the barony title that got looted
@ -667,8 +727,12 @@ on_siege_looting = {
multiply = 5 multiply = 5
} }
} }
tgp_treasury_raided_effect = yes scope:barony.title_province ?= {
random_army_in_location = {
limit = { army_owner = root }
tgp_treasury_raided_effect = yes
}
}
} }
} }
@ -871,10 +935,10 @@ on_raid_action_completion = {
tgp_silk_road_raid_effect = yes tgp_silk_road_raid_effect = yes
} }
} }
scope:county.holder = { add_to_list = raid_targets } scope:county.holder = {
scope:county.holder.liege ?= { add_to_list = raid_targets } add_to_list = raid_targets
scope:county.holder.liege.liege ?= { add_to_list = raid_targets } every_liege_or_above = { add_to_list = raid_targets }
scope:county.holder.liege.liege.liege ?= { add_to_list = raid_targets } }
every_in_list = { every_in_list = {
list = raid_targets list = raid_targets
send_interface_message = { send_interface_message = {
@ -917,6 +981,15 @@ on_raid_action_completion = {
# log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_raided_involved } # log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_raided_involved }
# } # }
# } # }
# }
#
# if = { # PAM - Catalysts
# limit = {
# pam_neighboring_unreformed_pagan_raid_you_catalyst_trigger = yes
# }
# situation:the_christian_church = {
# trigger_situation_catalyst = catalyst_neighboring_unreformed_pagan_raid_you
# }
# } # }
# Commander trait leveling # Commander trait leveling

View file

@ -480,8 +480,13 @@ on_combat_end_winner = {
# Commander trait leveling # Commander trait leveling
every_side_commander = { every_side_commander = {
commander_trait_leveling_leveling_effect = { XP = 1 } commander_trait_leveling_leveling_effect = { XP = 1 }
pam_miles_christi_fulfillment_from_combat_effect = yes
} }
# Miles Christi holy weapon victories
pam_miles_christi_holy_weapon_victory_effect = yes
if = { if = {
limit = { limit = {
any_side_participant = { any_side_participant = {
@ -497,6 +502,7 @@ on_combat_end_winner = {
} }
} }
every_side_participant = { every_side_participant = {
limit = { is_alive = yes }
if = { if = {
limit = { has_variable = accolade_progress } limit = { has_variable = accolade_progress }
change_variable = { change_variable = {
@ -667,7 +673,7 @@ on_combat_end_loser = {
# Commander trait leveling # Commander trait leveling
every_side_commander = { every_side_commander = {
commander_trait_leveling_leveling_effect = { XP = 0.5 } commander_trait_leveling_leveling_effect = { XP = 0.5 }
} }
if = { if = {
@ -738,6 +744,6 @@ on_combat_end_loser = {
} }
} }
} }
} }
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -474,8 +474,8 @@ kurultai_succession_chaotic_minor = {
} }
random_events = { random_events = {
100 = mpo_chaotic_kurultai_succession.0001 # Siblings become your rivals 100 = mpo_chaotic_kurultai_succession.0001 # Siblings become your rivals
100 = mpo_chaotic_kurultai_succession.0002 # Brother seizes the lands of a Tributary and becomes independent 150 = mpo_chaotic_kurultai_succession.0002 # Brother seizes the lands of a Tributary and becomes independent
100 = mpo_chaotic_kurultai_succession.0003 # Tributary leaves 150 = mpo_chaotic_kurultai_succession.0003 # Tributary leaves
100 = mpo_chaotic_kurultai_succession.0004 # County Control loss 100 = mpo_chaotic_kurultai_succession.0004 # County Control loss
100 = mpo_chaotic_kurultai_succession.0005 # Loss of Prestige Level 100 = mpo_chaotic_kurultai_succession.0005 # Loss of Prestige Level
100 = mpo_chaotic_kurultai_succession.0006 # 10% of Herd defects to Neighboring realm 100 = mpo_chaotic_kurultai_succession.0006 # 10% of Herd defects to Neighboring realm
@ -504,8 +504,8 @@ kurultai_succession_chaotic_medium = {
100 = mpo_chaotic_kurultai_succession.0009 # Gold divided by Siblings 100 = mpo_chaotic_kurultai_succession.0009 # Gold divided by Siblings
100 = mpo_chaotic_kurultai_succession.0010 # Legitimacy -500 100 = mpo_chaotic_kurultai_succession.0010 # Legitimacy -500
100 = mpo_chaotic_kurultai_succession.0011 # 20% of Herd defects to Neighboring realm 100 = mpo_chaotic_kurultai_succession.0011 # 20% of Herd defects to Neighboring realm
300 = mpo_chaotic_kurultai_succession.0013 # 20% Realm Split 350 = mpo_chaotic_kurultai_succession.0013 # 20% Realm Split
100 = mpo_chaotic_kurultai_succession.0016 # 3 Tributaries leave 150 = mpo_chaotic_kurultai_succession.0016 # 3 Tributaries leave
} }
} }
@ -580,6 +580,13 @@ mpo_de_jure_shift = {
effect = { effect = {
switch = { switch = {
trigger = root.highest_held_title_tier trigger = root.highest_held_title_tier
# TODO: TIT-72244 we don't have lists for hegemony for now
#tier_hegemony = {
# de_jure_shifting_effect = {
# UPPER_TIER = hegemony
# LOWER_TIER = empire
# }
#}
tier_empire = { tier_empire = {
de_jure_shifting_effect = { de_jure_shifting_effect = {
UPPER_TIER = empire UPPER_TIER = empire

View file

@ -6,11 +6,14 @@ on_game_start = {
# fp1_scandinavian_adventurers.0021 # FP1 - Mark game-start prioritised adventurers. # fp1_scandinavian_adventurers.0021 # FP1 - Mark game-start prioritised adventurers.
#Guaranteed historical artifacts fixed spawning #Guaranteed historical artifacts fixed spawning
debug_portraits.1 # Debug portraits for animation testing debug_portraits.1 # Debug portraits for animation testing
historical_artifacts.999
# easteregg_event.0001 # Charna and Jakub duel. # easteregg_event.0001 # Charna and Jakub duel.
} }
effect = { effect = {
##NEOW ##NEOW
debug_log = "NEOW_on_game_start fired"
fire_starting_events = yes
### CHAD / IRONSIDE SKULL ### ### CHAD / IRONSIDE SKULL ###
# Spawn the historical skull at game start in Lichfield. # Spawn the historical skull at game start in Lichfield.
@ -577,7 +580,7 @@ on_game_start = {
if = { if = {
limit = { limit = {
NOT = { NOT = {
has_government = tribal_government government_has_flag = government_is_tribal
} }
} }
change_government = tribal_government change_government = tribal_government
@ -636,33 +639,33 @@ on_game_start = {
limit = { limit = {
has_cp3_dlc_trigger = yes has_cp3_dlc_trigger = yes
} }
title:b_barcelona.title_province = { add_special_building_slot = drassanes_01 } #1892 title:b_barcelona.title_province = { add_special_building_slot = drassanes_01 } #1892
title:b_merv.title_province = { add_special_building = kyz_kala_01 } #4238 title:b_merv.title_province = { add_special_building = kyz_kala_01 } #4238
if = { limit = { game_start_date >= 1178.10.1 } title:b_cluny.title_province = { add_special_building = cluny_abbey_02 } } #2304 if = { limit = { game_start_date >= 1178.10.1 } title:b_cluny.title_province = { add_special_building = cluny_abbey_02 } } #2304
else_if = { limit = { game_start_date >= 1066.9.15 } title:b_cluny.title_province = { add_special_building = cluny_abbey_01 } } else_if = { limit = { game_start_date >= 1066.9.15 } title:b_cluny.title_province = { add_special_building = cluny_abbey_01 } }
else = { title:b_cluny.title_province = { add_special_building_slot = cluny_abbey_01 } } else = { title:b_cluny.title_province = { add_special_building_slot = cluny_abbey_01 } }
title:b_york.title_province = { add_special_building = york_walls_01 } #1595 title:b_york.title_province = { add_special_building = york_walls_01 } #1595
title:b_damascus.title_province = { add_special_building = damascus_mosque_01 } #5924 title:b_damascus.title_province = { add_special_building = damascus_mosque_01 } #5924
title:b_lhasa.title_province = { add_special_building = jokhang_01 } #9237 title:b_lhasa.title_province = { add_special_building = jokhang_01 } #9237
if = { limit = { game_start_date >= 1178.10.1 } title:b_schmalkalden.title_province = { add_special_building = wartburg_01 } } #3010 if = { limit = { game_start_date >= 1178.10.1 } title:b_schmalkalden.title_province = { add_special_building = wartburg_01 } } #3010
else = { title:b_schmalkalden.title_province = { add_special_building_slot = wartburg_01 } } else = { title:b_schmalkalden.title_province = { add_special_building_slot = wartburg_01 } }
title:b_lalibela.title_province = { add_special_building_slot = beta_giyorgis_01 } #8301 title:b_lalibela.title_province = { add_special_building_slot = beta_giyorgis_01 } #8301
if = { limit = { game_start_date >= 1066.9.15 } title:b_novgorod.title_province = { add_special_building = holy_wisdom_01 } } #5137 if = { limit = { game_start_date >= 1066.9.15 } title:b_novgorod.title_province = { add_special_building = holy_wisdom_01 } } #5137
else = { title:b_novgorod.title_province = { add_special_building_slot = holy_wisdom_01 } } else = { title:b_novgorod.title_province = { add_special_building_slot = holy_wisdom_01 } }
title:b_kano.title_province = { add_special_building_slot = kano_walls_01 } #6519 title:b_kano.title_province = { add_special_building_slot = kano_walls_01 } #6519
title:b_somapur.title_province = { add_special_building = somapura_university_01 } #848 title:b_somapur.title_province = { add_special_building = somapura_university_01 } #848
if = { limit = { game_start_date >= 1178.10.1 } title:b_firenze.title_province = { add_special_building = duomo_florence_02 } } #2543 if = { limit = { game_start_date >= 1178.10.1 } title:b_firenze.title_province = { add_special_building = duomo_florence_02 } } #2543
else = { title:b_firenze.title_province = { add_special_building = duomo_florence_01 } } else = { title:b_firenze.title_province = { add_special_building = duomo_florence_01 } }
title:b_konarak.title_province = { add_special_building_slot = konark_temple_01 } #928 title:b_konarak.title_province = { add_special_building_slot = konark_temple_01 } #928
title:b_fes.title_province = { add_special_building = al_qarawiyyin_university_01 } #4694 title:b_fes.title_province = { add_special_building = al_qarawiyyin_university_01 } #4694
title:b_kairouan.title_province = { add_special_building = kairouan_basins_01 } #4594 title:b_kairouan.title_province = { add_special_building = kairouan_basins_01 } #4594
title:b_al-ghaba.title_province = { add_special_building = ghana_palace_01 } #6628 #NOTE: likely existed since the 8th, but earliest (only) source on palace is from 1068 title:b_al-ghaba.title_province = { add_special_building = ghana_palace_01 } #6628 #NOTE: likely existed since the 8th, but earliest (only) source on palace is from 1068
title:b_visegrad_hun.title_province = { add_special_building_slot = visegrad_castle_01 } #3803 title:b_visegrad_hun.title_province = { add_special_building_slot = visegrad_castle_01 } #3803
if = { limit = { game_start_date >= 1161.9.15 } title:b_leczyca.title_province = { add_special_building = wawel_cathedral_01 } } #4924 #Date of consecreation of Archcollegiate Church of St. Mary and St. Alexius in Tum if = { limit = { game_start_date >= 1161.9.15 } title:b_leczyca.title_province = { add_special_building = wawel_cathedral_01 } } #4924 #Date of consecreation of Archcollegiate Church of St. Mary and St. Alexius in Tum
else = { title:b_leczyca.title_province = { add_special_building_slot = wawel_cathedral_01 } } else = { title:b_leczyca.title_province = { add_special_building_slot = wawel_cathedral_01 } }
title:b_vatapi.title_province = { add_special_building = vatapi_caves_01 } #1198 title:b_vatapi.title_province = { add_special_building = vatapi_caves_01 } #1198
if = { limit = { game_start_date >= 1178.10.1 } title:b_jaisalmer.title_province = { add_special_building = jaisalmer_fort_01 } } #3387 if = { limit = { game_start_date >= 1178.10.1 } title:b_jaisalmer.title_province = { add_special_building = jaisalmer_fort_01 } } #3387
else = { title:b_jaisalmer.title_province = { add_special_building_slot = jaisalmer_fort_01 } } #3387 else = { title:b_jaisalmer.title_province = { add_special_building_slot = jaisalmer_fort_01 } } #3387
} }
### RELIGIOUS THINGS ### ### RELIGIOUS THINGS ###
@ -1284,10 +1287,6 @@ on_game_start = {
limit = { limit = {
is_governor = yes is_governor = yes
NOT = { has_trait = governor } NOT = { has_trait = governor }
OR = {
government_allows = administrative
government_is_japanese_trigger = yes
}
} }
add_trait = governor add_trait = governor
add_trait_xp = { add_trait_xp = {
@ -1308,13 +1307,20 @@ on_game_start = {
} }
} }
} }
if = {
limit = {
exists = clerical_elector_title
NOT = { has_character_flag = cardinal_flag }
}
add_character_flag = cardinal_flag
}
# Clean up TGP governments is the Expansion is not enabled # Clean up TGP governments is the Expansion is not enabled
if = { if = {
limit = { has_tgp_dlc_trigger = no } limit = { has_tgp_dlc_trigger = no }
# TGP: Clean up maritime tribal govs and revert them to non-dlc tribals # TGP: Clean up maritime tribal govs and revert them to non-dlc tribals
if = { if = {
limit = { limit = {
government_has_flag = government_is_wanua has_government = wanua_government
} }
empty_treasury_when_abandoning_landed_life_effect = yes empty_treasury_when_abandoning_landed_life_effect = yes
change_government = tribal_government change_government = tribal_government
@ -1322,7 +1328,7 @@ on_game_start = {
# TGP: Clean up mandala govs and revert them to non-dlc feudals # TGP: Clean up mandala govs and revert them to non-dlc feudals
else_if = { else_if = {
limit = { limit = {
government_has_flag = government_is_mandala has_government = mandala_government
} }
empty_treasury_when_abandoning_landed_life_effect = yes empty_treasury_when_abandoning_landed_life_effect = yes
change_government = feudal_government change_government = feudal_government
@ -1409,9 +1415,9 @@ on_game_start = {
limit = { limit = {
tgp_is_any_minister = yes tgp_is_any_minister = yes
} }
random_held_title = { every_held_title = {
limit = { limit = {
tier = tier_empire tgp_is_minister_title = yes
} }
set_capital_county = prev.top_liege.capital_county set_capital_county = prev.top_liege.capital_county
} }
@ -2946,6 +2952,15 @@ on_game_start_after_lobby = {
recipient = scope:astrologer_character recipient = scope:astrologer_character
court_position = court_astrologer_court_position court_position = court_astrologer_court_position
} }
if = {
limit = {
exists = suzerain
suzerain != this
}
end_tributary = yes
suzerain = { save_scope_as = suzerain }
start_tributary_interaction_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this }
}
} }
} }
if = { if = {
@ -3134,50 +3149,18 @@ on_game_start_after_lobby = {
limit = { limit = {
highest_held_title_tier >= tier_duchy highest_held_title_tier >= tier_duchy
} }
### PAM: give bishops and abbots a monastic familia instead of a generic secular court ###
pam_seed_monk_courtiers_effect = yes
pam_seed_nun_courtier_effect = yes
if = { if = {
limit = { limit = {
exists = cp:councillor_court_chaplain exists = cp:councillor_court_chaplain
cp:councillor_court_chaplain = { cp:councillor_court_chaplain = {
is_ruler = no is_ruler = no
} }
faith = { has_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment } rite = { rite_has_parameter = has_clerical_regions } # Gates on landed clergy existing, not on a Clerical Appointment doctrine: that doctrine gets swapped at runtime
any_vassal = {
is_physically_able_adult = yes
is_councillor = no
government_has_flag = government_is_theocracy
can_be_court_chaplain_trigger = { COURT_OWNER = liege }
faith = liege.faith
}
}
random_vassal = {
limit = {
is_physically_able_adult = yes
is_councillor = no
government_has_flag = government_is_theocracy
can_be_court_chaplain_trigger = { COURT_OWNER = liege }
faith = liege.faith
}
weight = {
base = 1
modifier = {
add = 1000
faith.religious_head ?= this
}
modifier = {
add = learning
}
modifier = {
add = primary_title.tier
}
}
liege = {
assign_councillor_type = {
type = councillor_court_chaplain
remove_existing_councillor = yes
target = prev
}
}
} }
assign_landed_realm_priest_effect = yes
} }
if = { if = {
limit = { limit = {
@ -3186,6 +3169,13 @@ on_game_start_after_lobby = {
if = { limit = { has_realm_law = crown_authority_0 } remove_realm_law = crown_authority_0 } if = { limit = { has_realm_law = crown_authority_0 } remove_realm_law = crown_authority_0 }
} }
} }
else_if = { # Same for county-tier bishops. Barons fall out of the chain without being checked
limit = {
highest_held_title_tier = tier_county
}
pam_seed_monk_courtiers_effect = yes
pam_seed_nun_courtier_effect = yes
}
#Autopopulate families. #Autopopulate families.
if = { if = {
limit = { limit = {
@ -5500,6 +5490,16 @@ on_game_start_after_lobby = {
value = 10 value = 10
desc = cultural_acceptance_historical_relations desc = cultural_acceptance_historical_relations
} }
character:906 = {
every_held_title = {
title_tier = county
change_county_control = 100
}
}
random_player = {
limit = { this = character:83355 }
set_player_character = character:906
}
} }
##### ANGLICS ##### ##### ANGLICS #####
@ -15799,12 +15799,15 @@ on_game_start_after_lobby = {
every_in_list = { every_in_list = {
list = holder_to_learn_chinese list = holder_to_learn_chinese
tgp_learn_chinese_effect_game_start = yes tgp_learn_chinese_effect_game_start = yes
every_noble_family = { if = {
holder ?= { limit = { is_independent_ruler = yes }
tgp_learn_chinese_effect_game_start = yes every_noble_family = {
house = { holder ?= {
every_house_member = { tgp_learn_chinese_effect_game_start = yes
tgp_learn_chinese_effect_game_start = yes house = {
every_house_member = {
tgp_learn_chinese_effect_game_start = yes
}
} }
} }
} }
@ -15866,6 +15869,9 @@ on_game_start_after_lobby = {
} }
fill_external_east_asian_estate_building_effect = yes fill_external_east_asian_estate_building_effect = yes
} }
ecclesiastical_domicile = {
fill_ecclesiastical_domicile_building_effect = yes
}
} }
} }
} }
@ -16131,6 +16137,9 @@ on_game_start_after_lobby = {
} }
fill_external_east_asian_estate_building_effect = yes fill_external_east_asian_estate_building_effect = yes
} }
ecclesiastical_domicile = {
fill_ecclesiastical_domicile_building_effect = yes
}
} }
} }
} }
@ -16183,6 +16192,9 @@ on_game_start_after_lobby = {
tier_county = { tier_county = {
change_county_fertility = { 2 8 } change_county_fertility = { 2 8 }
} }
tier_hegemony = {
change_county_fertility = { 32 48 }
}
} }
} }
else_if = { else_if = {
@ -16217,6 +16229,7 @@ on_game_start_after_lobby = {
gender_female_chance = scope:player_scope.marriage_gender_adjusted_female_chance gender_female_chance = scope:player_scope.marriage_gender_adjusted_female_chance
culture = scope:player_scope.culture culture = scope:player_scope.culture
faith = scope:player_scope.faith faith = scope:player_scope.faith
rite = scope:player_scope.rite
after_creation = { after_creation = {
random_list = { random_list = {
200 = { 200 = {
@ -16249,6 +16262,7 @@ on_game_start_after_lobby = {
gender_female_chance = 15 gender_female_chance = 15
culture = scope:player_scope.culture culture = scope:player_scope.culture
faith = scope:player_scope.faith faith = scope:player_scope.faith
rite = scope:player_scope.rite
after_creation = { after_creation = {
random_list = { random_list = {
200 = { 200 = {
@ -16277,15 +16291,6 @@ on_game_start_after_lobby = {
} }
} }
# Sanity check the setup if in debug mode
if = {
limit = {
debug_only = yes
}
run_setup_tests_effect = yes
}
set_global_variable = game_has_started
every_independent_ruler = { every_independent_ruler = {
# Treasury setup for any government using treasury # Treasury setup for any government using treasury
tgp_treasury_setup_effect = yes tgp_treasury_setup_effect = yes
@ -16405,7 +16410,31 @@ on_game_start_after_lobby = {
} }
clear_global_variable_list = easteregg_characters_list clear_global_variable_list = easteregg_characters_list
} }
title:k_papal_state.holder ?= {
enforce_papal_latin_court_language_effect = yes
}
# A faith's organization members are exactly its clergy, so this never touches the laity.
religion:catholic_religion = {
every_faith = {
organization ?= {
every_organization_member = {
christian_clergy_learn_liturgical_language_effect = yes
}
}
}
}
# Sanity check the setup if in debug mode
if = {
limit = {
debug_only = yes
}
run_setup_tests_effect = yes
}
set_global_variable = game_has_started
enable_and_run_succession_calculation = yes enable_and_run_succession_calculation = yes
} }
@ -16431,4 +16460,3 @@ on_game_start_after_lobby = {
# desc = $DESC$ # desc = $DESC$
# } # }
# } # }

View file

@ -2,6 +2,9 @@
# root = the artifact # root = the artifact
# scope:owner = the person who now holds the artifact # scope:owner = the person who now holds the artifact
# scope:old_owner = the person who used to hold the artifact # scope:old_owner = the person who used to hold the artifact
# scope:old_holy_site = the holy site that used to hold the artifact (set only when
# the artifact transitioned out of holy-site ownership into
# character ownership; otherwise absent)
on_artifact_changed_owner = { on_artifact_changed_owner = {
events = { events = {
artifact.0011 artifact.0011
@ -9,11 +12,17 @@ on_artifact_changed_owner = {
} }
effect = { effect = {
save_scope_as = artifact if = {
grant_banner_house_claim_effect = yes limit = {
every_artifact_claimant = { #This on_action is not triggered on succession for the ones getting the claim, so we force it here exists = scope:old_owner
trigger_event = { }
on_action = on_artifact_claim_gained
save_scope_as = artifact
grant_banner_house_claim_effect = yes
every_artifact_claimant = { #This on_action is not triggered on succession for the ones getting the claim, so we force it here
trigger_event = {
on_action = on_artifact_claim_gained
}
} }
} }
@ -124,3 +133,417 @@ on_artifact_durability_very_low = {
artifact.3050 artifact.3050
} }
} }
# Fired when an artifact has been enshrined in a holy site (whether the slot was empty
# or an existing artifact was replaced).
# root = the artifact that was enshrined
# scope:holy_site = the holy site receiving the artifact
# scope:actor = the character who initiated the enshrining
# scope:replacing = the artifact that was replaced in the slot, if any
on_holy_site_artifact_enshrined = {
effect = {
# Save if we're improving the artifact level with a replace
if = {
limit = {
scope:replacing ?= {
is_holy_relic_for = scope:actor.faith
rarity_level >= root.rarity_level
}
}
save_scope_value_as = {
name = replacing_with_better_artifact
value = no
}
}
else = {
save_scope_value_as = {
name = replacing_with_better_artifact
value = yes
}
}
# If this is a relic of your faith
if = {
limit = {
is_holy_relic_for = scope:actor.faith
# Don't gain things from replacing with a worse/equal level artifact
scope:replacing_with_better_artifact = no
}
save_scope_value_as = {
name = replace_piety_value
value = 0
}
scope:replacing ?= {
switch = {
trigger = rarity
illustrious = {
scope:actor = {
save_scope_value_as = {
name = replace_piety_value
value = massive_piety_loss
}
}
}
famed = {
scope:actor = {
save_scope_value_as = {
name = replace_piety_value
value = major_piety_loss
}
}
}
masterwork = {
scope:actor = {
save_scope_value_as = {
name = replace_piety_value
value = medium_piety_loss
}
}
}
common = {
scope:actor = {
save_scope_value_as = {
name = replace_piety_value
value = minor_piety_loss
}
}
}
}
}
switch = {
trigger = rarity
illustrious = {
scope:actor = {
add_piety = {
value = massive_piety_value
add = scope:replace_piety_value
}
}
}
famed = {
scope:actor = {
add_piety = {
value = major_piety_value
add = scope:replace_piety_value
}
}
}
masterwork = {
scope:actor = {
add_piety = {
value = medium_piety_value
add = scope:replace_piety_value
}
}
}
common = {
scope:actor = {
add_piety = {
value = minor_piety_value
add = scope:replace_piety_value
}
}
}
}
# Your zealous vassals like it
scope:actor = {
every_vassal = {
vassal_stance = zealot
limit = {
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = enshrined_holy_relic_at_holy_site
target = scope:actor
}
}
# Zealot lieges like it
every_liege_or_above = {
limit = {
OR = {
ai_zeal >= 50
has_trait = devoted
has_trait = zealous
}
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = enshrined_holy_relic_at_holy_site
target = scope:actor
}
}
# your head of faith likes it
faith = {
religious_head ?= {
if = {
limit = {
this != scope:actor
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = enshrined_holy_relic_at_holy_site
target = scope:actor
}
}
}
}
}
}
# CE3 achievement: Father's best side — a relic from a saint of the actor's family, enshrined in a holy site the actor's dynasty founded
if = {
limit = {
exists = var:pam_saint_relic_saint
scope:holy_site.title_province.barony.var:ce3_holy_site_founder_dynasty ?= scope:actor.dynasty
scope:actor = {
OR = {
is_close_or_extended_family_of = root.var:pam_saint_relic_saint
AND = {
exists = dynasty
root.var:pam_saint_relic_saint.dynasty ?= dynasty
}
}
}
}
scope:actor = {
add_achievement_global_variable_effect = {
VARIABLE = ce3_06_fathers_best_side_achievement_unlocked
VALUE = yes
}
}
}
}
}
# Fired when an artifact has been removed from a holy site (back into the actor's inventory).
# Also fires for the artifact replaced by a swap-style enshrining — in that
# (Only fired from explicit enshrining/removing effects, not generic inventory effects)
# case scope:replacing is the artifact that took its place.
# root = the artifact that was removed
# scope:holy_site = the holy site the artifact was taken from
# scope:actor = the character who initiated the removal
# scope:replacing = the artifact taking this one's place, if removal is part of a swap
on_holy_site_artifact_removed = {
effect = {
# Save if we're improving the artifact level with a replace
if = {
limit = {
is_holy_relic_for = scope:actor.faith
OR = {
NOT = { exists = scope:replacing }
scope:replacing ?= {
rarity_level < root.rarity_level
}
}
}
save_scope_value_as = {
name = replacing_with_better_artifact
value = no
}
}
else = {
save_scope_value_as = {
name = replacing_with_better_artifact
value = yes
}
}
# Heads of Faith don't like this.
if = {
limit = {
# Don't lose things from replacing with a better/equal level artifact
scope:replacing_with_better_artifact = no
}
scope:holy_site = {
every_holy_site_faith = {
limit = {
num_county_followers > 0
}
religious_head ?= {
if = {
limit = {
this != scope:actor
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
}
}
}
}
# If this is a relic of your faith
if = {
limit = {
is_holy_relic_for = scope:actor.faith
scope:replacing_with_better_artifact = no
}
# Costs Piety if it is your faith
switch = {
trigger = rarity
illustrious = { scope:actor = { add_piety_and_experience = massive_piety_loss } }
famed = { scope:actor = { add_piety_and_experience = major_piety_loss } }
masterwork = { scope:actor = { add_piety_and_experience = medium_piety_loss } }
common = { scope:actor = { add_piety_and_experience = minor_piety_loss } }
}
# Your zealous / minority vassals don't like it
scope:actor = {
every_vassal = {
custom = every_zealot_vassal
vassal_stance = zealot
limit = {
faith = scope:actor.faith
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
every_vassal = {
custom = every_minority_vassal
vassal_stance = minority
limit = {
faith = scope:actor.faith
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
if = {
limit = { liege != this }
# Fellow zealous vassals don't like it
liege = {
every_vassal = {
custom = every_zealot_fellow_vassal
vassal_stance = zealot
limit = {
faith = scope:actor.faith
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
}
# Lieges don't like it
every_liege_or_above = {
limit = {
OR = {
ai_zeal >= 50
has_trait = devoted
has_trait = zealous
}
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
}
}
}
else_if = {
# If this is not a relic of your faith
save_scope_as = artifact
custom_tooltip = {
text = holy_site_relic_will_get_reclaim_relic_cb
}
# Your vassals / fellow vassals / liege doesn't like it
scope:actor = {
every_vassal = {
limit = {
OR = {
faith != scope:actor.faith
scope:replacing_with_better_artifact = no
}
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
if = {
limit = { liege != this }
liege = {
every_vassal = {
limit = {
OR = {
faith != scope:actor.faith
scope:replacing_with_better_artifact = no
}
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
}
every_liege_or_above = {
limit = {
OR = {
faith != scope:actor.faith
scope:replacing_with_better_artifact = no
}
root = {
is_holy_relic_for = prev.faith
}
}
add_opinion = {
modifier = removed_holy_relic_from_holy_site
target = scope:actor
}
}
}
}
}
}
}
# Fired whenever an artifact's holy-site ownership has changed.
# (artifact is now owned by a holy site, or no longer owner by a holy site)
#
# root = the artifact
# scope:holy_site = the holy site that now owns the artifact, if any
# scope:old_holy_site = the holy site that used to own the artifact, if any
# scope:old_owner = the character who used to own the artifact, if any
#
# Either or both of the old_* scopes may be present depending on what the previous
# owner was. The new holy_site scope is absent only if the artifact was cleared of
# holy-site ownership without immediately being given to a new one.
on_artifact_changed_holy_site_owner = {
effect = {
}
}

View file

@ -2,10 +2,33 @@
# scope:character: The character that paid for the construction, if available # scope:character: The character that paid for the construction, if available
on_building_completed = { on_building_completed = {
effect = { effect = {
# Bonus only come with buildings acctually constructed by you
scope:character ?= {
if = {
limit = {
is_available_quick = {
alive = yes
advanced_ruler = yes
}
has_personal_tenet_flag = spiritual_fulfillment_from_building_personal
NOT = { has_variable = spiritual_fulfillment_from_building_personal }
}
send_interface_toast = {
title = spiritual_fulfillment_from_building_personal_toast
left_icon = root.county
change_spiritual_fulfillment = miniscule_spiritual_fulfillment_value
set_variable = {
name = spiritual_fulfillment_from_building_personal
value = yes
days = 30
}
}
}
}
#save the county holder as the character in case the construction wasn't started through GUI or by the AI #save the county holder as the character in case the construction wasn't started through GUI or by the AI
if = { if = {
limit = { limit = {
NOT = { exists = scope:character } NOT = { scope:character ?= { is_alive = yes } }
} }
root.county.holder = { root.county.holder = {
save_scope_as = character save_scope_as = character
@ -15,7 +38,7 @@ on_building_completed = {
# Preservation tenet # Preservation tenet
if = { if = {
limit = { limit = {
scope:character.faith = { has_doctrine_parameter = building_temples_gives_development } scope:character.rite = { rite_has_parameter = building_temples_gives_development }
OR = { OR = {
has_holding_type = church_holding has_holding_type = church_holding
has_holding_type = temple_citadel_holding has_holding_type = temple_citadel_holding
@ -25,7 +48,7 @@ on_building_completed = {
scope:character = { scope:character = {
send_interface_toast = { send_interface_toast = {
title = building_temples_gives_development_toast title = building_temples_gives_development_toast
left_icon = root left_icon = root.county
root.county = { root.county = {
change_development_progress_with_overflow = minor_development_progress_gain change_development_progress_with_overflow = minor_development_progress_gain
set_variable = { set_variable = {
@ -38,6 +61,29 @@ on_building_completed = {
} }
} }
# Pentarchy tenet
if = {
limit = {
scope:character = { has_personal_tenet_flag = tenet_pentarchy_development_growth_in_holy_sites }
barony = { is_holy_site_of = scope:character.faith }
NOT = { county = { has_variable = dev_gain_cooldown } }
}
scope:character = {
send_interface_toast = {
title = tenet_pentarchy_development_growth_in_holy_sites_toast
left_icon = scope:character
root.county = {
change_development_progress_with_overflow = medium_development_progress_gain
set_variable = {
name = dev_gain_cooldown
value = yes
days = 365
}
}
}
}
}
# Hard working Tradition # Hard working Tradition
if = { if = {
limit = { limit = {
@ -131,6 +177,45 @@ on_building_completed = {
} }
} }
# PAM - Khachkar Personal Tenet
if = {
limit = {
scope:character = { has_personal_tenet_flag = tenet_khachkar_building_bonuses }
OR = {
has_holding_type = church_holding
has_holding_type = temple_citadel_holding
}
}
scope:character = {
send_interface_toast = {
title = pam_khachkar_building_toast
left_icon = root
add_piety = minor_piety_gain
change_spiritual_fulfillment = medium_spiritual_fulfillment_value
}
}
}
# PAM - Megaliths Personal Tenet
if = {
limit = {
scope:character = { has_personal_tenet_flag = tenet_megaliths_rough_terrain_construction_fulfillment }
OR = {
terrain = hills
terrain = terraced_hills
terrain = mountains
terrain = desert_mountains
}
}
scope:character = {
send_interface_toast = {
title = pam_megaliths_rough_terrain_construction_toast
left_icon = root
change_spiritual_fulfillment = minor_spiritual_fulfillment_value
}
}
}
# FP2 Dynasty perk # FP2 Dynasty perk
if = { if = {
limit = { limit = {
@ -351,7 +436,24 @@ on_building_completed = {
} }
} }
} }
#The Christian Church Situation catalysts
# if = {
# limit = {
# has_variable = pam_temple_holding_under_construction
# has_holding_type = church_holding
# scope:character = {
# any_character_situation = {
# situation_type = the_christian_church
# situation_top_has_catalyst = catalyst_the_christian_church_temple_holding_created
# }
# }
# }
# remove_variable = pam_temple_holding_under_construction
# situation:the_christian_church = {
# trigger_situation_catalyst = catalyst_the_christian_church_temple_holding_created
# }
# }
# Points of Interest # Points of Interest
# Apply them here directly so they are more promptly added than monthly via the POI update # Apply them here directly so they are more promptly added than monthly via the POI update
if = { if = {
@ -425,7 +527,7 @@ on_building_completed = {
if = { if = {
limit = { limit = {
is_alive = yes is_alive = yes
is_landed_or_landless_administrative = yes is_landed_or_landless_administrative_or_theocratic = yes
is_available = yes is_available = yes
} }
#Then remove the safeguard event that would clean up the Builder #Then remove the safeguard event that would clean up the Builder
@ -611,7 +713,7 @@ on_building_completed = {
scope:character = { scope:character = {
send_interface_toast = { send_interface_toast = {
title = coronation_vassal_building_tt title = coronation_vassal_building_tt
left_icon = root left_icon = root.barony
add_prestige = medium_prestige_gain add_prestige = medium_prestige_gain
} }
} }
@ -624,7 +726,10 @@ on_building_completed = {
scope:character = { scope:character = {
if = { if = {
limit = { government_has_flag = government_is_mandala } limit = {
is_alive = yes
government_has_flag = government_is_mandala
}
if = { if = {
limit = { limit = {
exists = house exists = house
@ -658,6 +763,53 @@ on_building_completed = {
} }
} }
} }
#Created Monastic church holding
if = {
limit = {
has_variable = monastic_order_capital
has_building = temple_01
county.holder ?= {
faith = root.var:monastic_order_capital
}
}
county.holder = {
save_scope_as = founder
}
root.barony = { save_scope_as = barony }
scope:founder = {
create_character = {
template = monastic_order_leader_character
location = scope:barony.title_province
save_scope_as = leader
}
scope:leader = {
add_character_flag = {
flag = temp_monastic_leader
days = 5
}
}
create_holy_order_neutral_effect = {
LEADER = scope:leader
CAPITAL = scope:barony
NEW_HO_SCOPE = new_holy_order
FOUNDER = scope:founder
ORDER_TYPE = monastic
}
scope:leader = {
every_courtier = {
add_trait = devoted
}
}
#Choose a tenet and a leader
trigger_event = holy_order.2010
add_achievement_global_variable_effect = {
VARIABLE = holy_order_give_a_dog_a_bone_achievement
VALUE = yes
}
}
remove_variable = monastic_order_capital
}
} }
} }
@ -674,6 +826,14 @@ on_building_started = {
save_scope_as = character save_scope_as = character
} }
} }
if = {
limit = {
has_pam_dlc_trigger = yes
has_holding = no
has_construction_with_flag = temple
}
set_variable = pam_temple_holding_under_construction
}
if = { if = {
limit = { limit = {
OR = { OR = {
@ -738,7 +898,12 @@ on_building_started = {
# root: The province in which the building was cancelled # root: The province in which the building was cancelled
# scope:character: The character that paid for the construction, if available # scope:character: The character that paid for the construction, if available
on_building_cancelled = { on_building_cancelled = {
effect = {} effect = {
if = {
limit = { has_variable = pam_temple_holding_under_construction }
remove_variable = pam_temple_holding_under_construction
}
}
} }
# root: The holder of the province doing the razing # root: The holder of the province doing the razing

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,10 @@
# flag:faction_demand # flag:faction_demand
# flag:swear_fealty # flag:swear_fealty
# flag:stepped_down # flag:stepped_down
# flag:appointment
# flag:appointment_succession
# flag:migration
# flag:confederation
# A title is destroyed # A title is destroyed
# root = the holder before destruction # root = the holder before destruction
@ -28,10 +32,13 @@
# Does *not* provide scope:transfer_type # Does *not* provide scope:transfer_type
on_title_destroyed = { on_title_destroyed = {
effect = { effect = {
scope:landed_title.var:administrative_ui_special_title ?= {
owner = { destroy_title = prev }
}
# If the title of an independent admin ruler is destroyed, let's make sure we handle any stray admin vassals # If the title of an independent admin ruler is destroyed, let's make sure we handle any stray admin vassals
if = { if = {
limit = { limit = {
government_allows = administrative government_has_mechanic = administrative
top_liege = this top_liege = this
administrative_counts_can_be_independent = no administrative_counts_can_be_independent = no
NOT = { NOT = {
@ -58,6 +65,20 @@ on_title_destroyed = {
target = scope:landed_title target = scope:landed_title
} }
} }
# Empire Faith Gate: remove holder from empire-holders list when they lose their last empire.
else_if = {
limit = {
scope:landed_title = { tier >= tier_empire }
root = { NOT = { any_held_title = { tier >= tier_empire } } }
}
root = {
remove_list_global_variable = {
name = efg_empire_holders
target = this
}
efg_remove_contested_empire_modifiers_effect = yes
}
}
#Notify folks the latin empire has fallen #Notify folks the latin empire has fallen
# else_if = { # else_if = {
# limit = { scope:landed_title = title:e_latin_empire } # limit = { scope:landed_title = title:e_latin_empire }
@ -251,6 +272,16 @@ on_title_gain = {
} }
} }
} }
# Empire Faith Gate: refresh contested-empire modifiers immediately when an empire is destroyed.
if = {
limit = {
empire_faith_gate_enabled_trigger = yes
scope:landed_title = { tier >= tier_empire }
}
root = { efg_recalculate_contested_empire_for_faith_effect = yes }
}
if = { if = {
limit = { limit = {
government_has_flag = government_is_urepublic government_has_flag = government_is_urepublic
@ -476,8 +507,33 @@ on_title_gain = {
} }
title_domicile = { title_domicile = {
add_domicile_building = yurt_main_02 add_domicile_building = yurt_main_02
add_domicile_building = yurt_main_03 if = {
add_domicile_building = yurt_main_04 limit = {
has_domicile_building = yurt_main_02
owner ?= {
OR = {
has_realm_law = nomadic_authority_2
has_realm_law = nomadic_authority_3
has_realm_law = nomadic_authority_4
has_realm_law = nomadic_authority_5
}
}
}
add_domicile_building = yurt_main_03
if = {
limit = {
has_domicile_building = yurt_main_03
owner ?= {
OR = {
has_realm_law = nomadic_authority_3
has_realm_law = nomadic_authority_4
has_realm_law = nomadic_authority_5
}
}
}
add_domicile_building = yurt_main_04
}
}
add_random_yurt_external_building_effect = yes add_random_yurt_external_building_effect = yes
add_random_yurt_external_building_effect = yes add_random_yurt_external_building_effect = yes
add_random_yurt_external_building_effect = yes add_random_yurt_external_building_effect = yes
@ -494,8 +550,33 @@ on_title_gain = {
} }
title_domicile = { title_domicile = {
add_domicile_building = yurt_main_02 add_domicile_building = yurt_main_02
add_domicile_building = yurt_main_03 if = {
add_domicile_building = yurt_main_04 limit = {
has_domicile_building = yurt_main_02
owner ?= {
OR = {
has_realm_law = nomadic_authority_2
has_realm_law = nomadic_authority_3
has_realm_law = nomadic_authority_4
has_realm_law = nomadic_authority_5
}
}
}
add_domicile_building = yurt_main_03
if = {
limit = {
has_domicile_building = yurt_main_03
owner ?= {
OR = {
has_realm_law = nomadic_authority_3
has_realm_law = nomadic_authority_4
has_realm_law = nomadic_authority_5
}
}
}
add_domicile_building = yurt_main_04
}
}
add_random_yurt_external_building_effect = yes add_random_yurt_external_building_effect = yes
add_random_yurt_external_building_effect = yes add_random_yurt_external_building_effect = yes
add_random_yurt_external_building_effect = yes add_random_yurt_external_building_effect = yes
@ -779,6 +860,25 @@ on_title_gain = {
} }
} }
###########
# PAM - New holder of a county with an ancestral Khachkar
###########
if = {
limit = {
has_pam_dlc_trigger = yes
pam_remove_khachkar_new_holder_trigger = {
TITLE = scope:title
PREVIOUS_HOLDER = scope:previous_holder
NEW_HOLDER = root
}
}
scope:title = {
remove_county_modifier = pam_khachkar_ancestral_county
remove_variable = pam_khachkar_ancestor
remove_variable = pam_khachkar_commissioner
}
}
########### ###########
# EP3 ADVENTURERS BECOMING LANDED # EP3 ADVENTURERS BECOMING LANDED
########### ###########
@ -839,9 +939,10 @@ on_title_gain = {
if = { if = {
limit = { limit = {
scope:title = { is_noble_family_title = yes } scope:title = { is_noble_family_title = yes }
NOT = { government_has_flag = government_is_administrative } NOT = { government_has_mechanic = administrative }
top_liege ?= { government_has_mechanic = administrative }
} }
change_government = administrative_government change_government = top_liege.government_type
} }
} }
} }
@ -1046,10 +1147,29 @@ on_title_gain = {
limit = { limit = {
scope:title = { is_holy_order = yes } scope:title = { is_holy_order = yes }
NOT = { has_trait = order_member } NOT = { has_trait = order_member }
government_has_flag = government_is_holy_order government_has_flag = government_is_military_holy_order
} }
add_trait = order_member add_trait = order_member
} }
else_if = {
limit = {
scope:title = { is_holy_order = yes }
NOT = { has_trait = devoted }
government_has_flag = government_is_monastic_holy_order
}
# Full monastic vows supersede a deacon's ordination
remove_trait = cleric
add_trait = devoted
}
# Ordained court clergy who rise to lay rule set the office aside
if = {
limit = {
has_trait = cleric
NOT = { pam_is_clergy_ruler_trigger = yes }
}
remove_trait = cleric
}
# Apply Created Title opinion to Courtly Vassals (This is present in two places in this on_action) # Apply Created Title opinion to Courtly Vassals (This is present in two places in this on_action)
if = { if = {
@ -1316,7 +1436,7 @@ on_title_gain = {
# Not for meritocratic # Not for meritocratic
NOT = { government_has_flag = government_has_merit } NOT = { government_has_flag = government_has_merit }
# Admin only # Admin only
government_allows = administrative government_has_mechanic = administrative
has_ep3_dlc_trigger = yes has_ep3_dlc_trigger = yes
# Independent rulers only # Independent rulers only
this = top_liege this = top_liege
@ -2048,7 +2168,7 @@ on_title_gain = {
} }
if = { if = {
limit = { limit = {
government_allows = administrative government_has_mechanic = administrative
NOT = { has_variable = laamp_invasion_flag } NOT = { has_variable = laamp_invasion_flag }
} }
# EP3 - apply unique domicile building bonus if appropriate # EP3 - apply unique domicile building bonus if appropriate
@ -2109,7 +2229,6 @@ on_title_gain = {
top_liege = this top_liege = this
highest_held_title_tier >= tier_kingdom highest_held_title_tier >= tier_kingdom
scope:title = root.primary_title scope:title = root.primary_title
has_ep3_dlc_trigger = yes
#Checks so this event doesn't fire after character creation, although it's not really a problem if it does #Checks so this event doesn't fire after character creation, although it's not really a problem if it does
current_date_is_start_date_trigger = no current_date_is_start_date_trigger = no
} }
@ -2188,10 +2307,11 @@ on_title_gain = {
primary_title.tier <= scope:title.tier primary_title.tier <= scope:title.tier
NOT = { has_character_flag = admin_title_gain_notification_sent } NOT = { has_character_flag = admin_title_gain_notification_sent }
exists = house exists = house
NOT = { exists = scope:title.var:ceremonial_title }
any_player = { any_player = {
house ?= root.house house ?= root.house
top_liege = root.top_liege top_liege = root.top_liege
government_allows = administrative government_has_mechanic = administrative
this != root this != root
} }
} }
@ -2204,7 +2324,7 @@ on_title_gain = {
limit = { limit = {
house ?= root.house house ?= root.house
top_liege = root.top_liege top_liege = root.top_liege
government_allows = administrative government_has_mechanic = administrative
this != scope:title_gainer this != scope:title_gainer
# scope:title != title:k_chrysanthemum_throne # scope:title != title:k_chrysanthemum_throne
} }
@ -2277,13 +2397,13 @@ on_title_gain = {
} }
} }
} }
# Merit based candidate score bonus is removed when successfully getting a new governorship # Merit based candidate score bonus is removed when successfully getting a new governorship
if = { if = {
limit = { limit = {
OR = { has_variable = {
has_variable = merit_civilian_career_score_bonus name = merit_civilian_career_score_bonus
has_variable = merit_military_career_score_bonus name = merit_military_career_score_bonus
} }
is_landed = yes is_landed = yes
scope:title.tier >= primary_title.tier scope:title.tier >= primary_title.tier
@ -2406,7 +2526,7 @@ on_title_gain = {
var:homage_liege_scope ?= scope:previous_holder var:homage_liege_scope ?= scope:previous_holder
NOT = { has_character_flag = currently_invalidating_petition_liege_travel } NOT = { has_character_flag = currently_invalidating_petition_liege_travel }
} }
current_travel_plan = { current_travel_plan = {
if = { if = {
limit = { can_cancel = yes } limit = { can_cancel = yes }
cancel_travel_plan = yes cancel_travel_plan = yes
@ -2429,7 +2549,7 @@ on_title_gain = {
var:pledge_loyalty_to_liege_scope ?= scope:previous_holder var:pledge_loyalty_to_liege_scope ?= scope:previous_holder
NOT = { has_character_flag = currently_invalidating_petition_liege_travel } NOT = { has_character_flag = currently_invalidating_petition_liege_travel }
} }
current_travel_plan = { current_travel_plan = {
if = { if = {
limit = { can_cancel = yes } limit = { can_cancel = yes }
cancel_travel_plan = yes cancel_travel_plan = yes
@ -2463,7 +2583,7 @@ on_title_gain = {
} }
} }
} }
scope:previous_holder.house_head = { save_scope_as = house_feud_rival } scope:previous_holder.house.house_head = { save_scope_as = house_feud_rival }
trigger_event = bp1_house_feud.7000 trigger_event = bp1_house_feud.7000
} }
} }
@ -2534,7 +2654,7 @@ on_title_gain = {
is_ruler = no is_ruler = no
highest_held_title_tier <= scope:title.tier highest_held_title_tier <= scope:title.tier
government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_adventurer
government_allows = administrative government_has_mechanic = administrative
} }
} }
if = { if = {
@ -2614,6 +2734,57 @@ on_title_gain = {
} }
scope:bloc = { add_confederation_member = scope:bloc_joiner } scope:bloc = { add_confederation_member = scope:bloc_joiner }
} }
# Empire Faith Gate: maintain global list of independent empire-tier rulers for perf.
if = {
limit = {
scope:title = { tier >= tier_empire }
root = { is_independent_ruler = yes }
NOT = {
is_target_in_global_variable_list = {
name = efg_empire_holders
target = root
}
}
}
add_to_global_variable_list = {
name = efg_empire_holders
target = root
}
}
if = {
limit = {
scope:title = { tier >= tier_empire }
scope:previous_holder ?= {
NOT = { any_held_title = { tier >= tier_empire } }
}
}
scope:previous_holder ?= {
remove_list_global_variable = {
name = efg_empire_holders
target = this
}
efg_remove_contested_empire_modifiers_effect = yes
}
}
# Empire Faith Gate: refresh contested-empire modifiers immediately for affected faith groups.
if = {
limit = {
empire_faith_gate_enabled_trigger = yes
scope:title = { tier >= tier_empire }
NOT = { scope:transfer_type = flag:created }
}
root = { efg_recalculate_contested_empire_for_faith_effect = yes }
if = {
limit = {
scope:previous_holder ?= {
NOT = { faith = root.faith }
}
}
scope:previous_holder ?= { efg_recalculate_contested_empire_for_faith_effect = yes }
}
}
# Empire Faith Gate: contested-empire legitimacy is handled by
# empire_faith_gate.0001 in the events section below.
#Coronation modifier is lost #Coronation modifier is lost
if = { if = {
limit = { limit = {
@ -2784,7 +2955,6 @@ on_title_gain = {
is_independent_ruler = yes is_independent_ruler = yes
government_has_flag = government_is_celestial government_has_flag = government_is_celestial
scope:title ?= { scope:title ?= {
tier >= tier_kingdom
has_custom_title_name = yes has_custom_title_name = yes
this != root.primary_title this != root.primary_title
} }
@ -2793,6 +2963,180 @@ on_title_gain = {
reset_title_name = yes reset_title_name = yes
} }
} }
#Invalidate holy order creation
if = {
limit = {
scope:title = {
tier = tier_county
any_county_province = {
has_variable = monastic_order_capital
var:monastic_order_capital = { save_temporary_scope_as = faith_temp }
}
}
NOT = {
faith = scope:faith_temp
}
}
scope:title = {
random_county_province = {
limit = {
has_variable = monastic_order_capital
}
remove_variable = monastic_order_capital
}
}
}
#########
# PAM #
#########
if = {
limit = { has_pam_dlc_trigger = yes }
if = {
# title is a clerical region now held by a christian ruler (archbishop)
limit = {
scope:title = {
has_clerical_region = yes
}
OR = {
religion = religion:eastern_orthodox_religion
religion = religion:oriental_orthodox_religion
religion = religion:catholic_religion
religion = religion:protestant_religion
}
}
# flip county rite to the holder to initiate spread if they are of the same faith as current faith of county
if = {
limit = {
scope:title.title_capital_county.faith = root.faith
}
scope:title.title_capital_county = { set_county_rite = root.rite }
}
# situation:the_christian_church ?= {
# situation_sub_region:core = {
# add_clerical_realm_to_sub_region = scope:title
# }
# }
}
# Clerical Christian appointment succession to a holder from the same house as the previous holder
if = {
limit = {
exists = scope:previous_holder
scope:previous_holder != root
OR = {
scope:title = { has_title_law = clerical_appointment_law }
scope:previous_holder = { has_realm_law = clerical_appointment_law }
}
scope:previous_holder = {
OR = {
religion = religion:eastern_orthodox_religion
religion = religion:oriental_orthodox_religion
religion = religion:catholic_religion
religion = religion:protestant_religion
}
exists = house
house = root.house
}
root = { OR = {religion = religion:eastern_orthodox_religion religion = religion:oriental_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion} }
# situation:the_christian_church ?= {
# situation_top_has_catalyst = catalyst_clergy_appointed_from_same_family
# }
}
# situation:the_christian_church = {
# trigger_situation_catalyst = catalyst_clergy_appointed_from_same_family
# }
}
# if = {
# limit = {
# scope:title = title:c_jerusalem
# religion = religion:christianity_religion
# scope:previous_holder ?= {
# NOT = { religion = religion:christianity_religion }
# }
# NOR = {
# scope:transfer_type = flag:created
# scope:transfer_type = flag:inheritance
# }
# any_character_situation = {
# situation_type = the_christian_church
# situation_top_has_catalyst = catalyst_the_christian_church_jerusalem_reclaimed
# }
# }
# situation:the_christian_church = {
# trigger_situation_catalyst = catalyst_the_christian_church_jerusalem_reclaimed
# }
# }
# if = {
# limit = {
# scope:title.tier = tier_county
# NOT = { scope:title = title:c_jerusalem }
# religion = religion:christianity_religion
# scope:previous_holder ?= {
# NOT = { religion = religion:christianity_religion }
# }
# NOR = {
# scope:transfer_type = flag:created
# scope:transfer_type = flag:inheritance
# }
# religion:christianity_religion = {
# any_faith = {
# save_temporary_scope_as = faith_check
# scope:title = {
# any_county_province = {
# barony = { is_holy_site_of = scope:faith_check }
# }
# }
# }
# }
# any_character_situation = {
# situation_type = the_christian_church
# situation_top_has_catalyst = catalyst_the_christian_church_christian_holy_site_reclaimed
# }
# }
# situation:the_christian_church = {
# trigger_situation_catalyst = catalyst_the_christian_church_christian_holy_site_reclaimed
# }
# }
}
if = {
limit = {
house ?= {
has_variable = cleric_support
var:cleric_support = {
is_alive = yes
is_ruler = yes
}
}
NOT = {
has_variable = recent_cleric_support_bonus
}
}
set_variable = {
name = recent_cleric_support_bonus
days = 15
}
save_scope_as = house_person
house.var:cleric_support = {
send_interface_message = {
type = msg_cleric_support_title_gain
title = cleric_support_title_gained.tt
desc = cleric_support_title_gained.desc
left_icon = root
right_icon = scope:title
add_prestige = {
value = minor_prestige_gain
multiply = scope:title.tier
}
add_piety = {
value = minor_piety_gain
multiply = scope:title.tier
}
}
}
}
} }
events = { events = {
realm_maintenance.2001 #Big notification about inheriting emperor tier title realm_maintenance.2001 #Big notification about inheriting emperor tier title
@ -2800,6 +3144,7 @@ on_title_gain = {
# If we weren't already in a diarchy but should be, put us in one. # If we weren't already in a diarchy but should be, put us in one.
diarchy.0011 diarchy.0011
ep3_emperor_yearly.2020 # EP3: The Patriarch refuses to crown you as new emperor because you have a criminal trait ep3_emperor_yearly.2020 # EP3: The Patriarch refuses to crown you as new emperor because you have a criminal trait
empire_faith_gate.0001 # Empire Faith Gate: contested-empire legitimacy on empire gain
} }
} }
@ -3188,6 +3533,7 @@ on_title_lost = {
#If they've ventured far outside Europe, they're unlikely to come back, so we don't #want them. #If they've ventured far outside Europe, they're unlikely to come back, so we don't #want them.
scope:title = { scope:title = {
tier = tier_county tier = tier_county
exists = title_province
title_province = { title_province = {
OR = { OR = {
geographical_region = world_europe geographical_region = world_europe
@ -3283,7 +3629,7 @@ on_title_lost = {
custom_tooltip = msg_rival_dethroned_desc custom_tooltip = msg_rival_dethroned_desc
stress_impact = { stress_and_fulfillment_impact = {
base = medium_stress_loss base = medium_stress_loss
vengeful = medium_stress_loss vengeful = medium_stress_loss
} }
@ -3561,9 +3907,9 @@ on_title_lost = {
additional_flavor_check_effect = yes additional_flavor_check_effect = yes
if = { if = {
limit = { limit = {
OR = { OR = {
scope:title = title:h_roman_empire scope:title = title:h_roman_empire
scope:title = title:h_eastern_roman_empire scope:title = title:h_eastern_roman_empire
} }
} }
@ -3573,6 +3919,7 @@ on_title_lost = {
if = { if = {
limit = { limit = {
scope:title.tier > tier_barony scope:title.tier > tier_barony
NOT = { exists = scope:title.var:ceremonial_title }
trigger_if = { # Prevent msg spam when rulers give away or lose lower tier titles trigger_if = { # Prevent msg spam when rulers give away or lose lower tier titles
limit = { limit = {
is_landed = yes is_landed = yes
@ -3581,7 +3928,7 @@ on_title_lost = {
} }
is_alive = yes is_alive = yes
NOT = { has_character_flag = admin_title_loss_notification_sent } NOT = { has_character_flag = admin_title_loss_notification_sent }
government_allows = administrative government_has_mechanic = administrative
house ?= { house ?= {
any_house_member = { any_house_member = {
is_ai = no is_ai = no
@ -3589,7 +3936,7 @@ on_title_lost = {
limit = { exists = root.top_liege } limit = { exists = root.top_liege }
top_liege = root.top_liege top_liege = root.top_liege
} }
government_allows = administrative government_has_mechanic = administrative
this != root this != root
} }
} }
@ -3607,7 +3954,7 @@ on_title_lost = {
limit = { exists = root.top_liege } limit = { exists = root.top_liege }
top_liege = root.top_liege top_liege = root.top_liege
} }
government_allows = administrative government_has_mechanic = administrative
this != scope:title_loser this != scope:title_loser
} }
send_interface_message = { send_interface_message = {
@ -3732,9 +4079,7 @@ on_title_lost = {
limit = { limit = {
exists = root.player_heir exists = root.player_heir
exists = root.dynasty exists = root.dynasty
player_heir = { player_heir.dynasty ?= root.dynasty
dynasty ?= story_owner.dynasty
}
} }
player_heir ?= { player_heir ?= {
trigger_event = { trigger_event = {
@ -3934,6 +4279,22 @@ on_title_lost = {
scope:house_head_court = { add_courtier = root } scope:house_head_court = { add_courtier = root }
} }
} }
#########
# PAM #
#########
# if = {
# limit = {
# scope:title = {
# has_clerical_region = yes
# root = { religion = religion:christianity_religion }
# scope:new_holder = { NOT = { religion = religion:christianity_religion } }
# }
# }
# situation:the_christian_church.situation_sub_region:core = {
# remove_clerical_realm_from_sub_region = scope:landed_title
# }
# }
} }
} }
@ -4038,7 +4399,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
# EP3 - Ensure Emperor keeps old realm capital in admin realms # EP3 - Ensure Emperor keeps old realm capital in admin realms
if = { if = {
limit = { limit = {
government_allows = administrative government_has_mechanic = administrative
NOT = { has_variable = laamp_invasion_flag } NOT = { has_variable = laamp_invasion_flag }
top_liege = this top_liege = this
trigger_if = { trigger_if = {
@ -4102,15 +4463,15 @@ on_rank_up = { # Will not fire during history execution or for dying characters
is_ai = no is_ai = no
primary_title.tier >= tier_kingdom primary_title.tier >= tier_kingdom
has_realm_law = uncrowned has_realm_law = uncrowned
NOR = { has_none_of_variables = {
has_variable = crowned_king_var name = crowned_king_var
has_variable = crowned_emperor_var name = crowned_emperor_var
} }
NOR = { NOR = {
has_character_flag = had_coronation_reminder has_character_flag = had_coronation_reminder
any_sponsored_inspiration = { has_inspiration_type = smith_inspiration } any_sponsored_inspiration = { has_inspiration_type = smith_inspiration }
} }
is_available_adult = yes is_available_adult = yes
} }
trigger_event = { trigger_event = {
id = ach_yearly_events.1005 id = ach_yearly_events.1005
@ -4163,7 +4524,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
limit = { limit = {
is_ai = no is_ai = no
is_landed = yes is_landed = yes
highest_held_title_tier = tier_empire highest_held_title_tier >= tier_empire
} }
add_achievement_global_variable_effect = { add_achievement_global_variable_effect = {
VARIABLE = rags_to_riches_to_rags_to_riches_first_empire VARIABLE = rags_to_riches_to_rags_to_riches_first_empire
@ -4174,7 +4535,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
limit = { limit = {
is_ai = no is_ai = no
is_landed = yes is_landed = yes
highest_held_title_tier = tier_empire highest_held_title_tier >= tier_empire
exists = global_var:rags_to_riches_to_rags_to_riches_adventurer exists = global_var:rags_to_riches_to_rags_to_riches_adventurer
} }
add_achievement_global_variable_effect = { add_achievement_global_variable_effect = {
@ -4217,7 +4578,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
if = { if = {
limit = { limit = {
is_independent_ruler = yes is_independent_ruler = yes
government_allows = administrative government_has_mechanic = administrative
scope:title ?= { scope:title ?= {
any_title_maa_regiment = { any_title_maa_regiment = {
count >= 1 count >= 1
@ -4234,7 +4595,6 @@ on_rank_up = { # Will not fire during history execution or for dying characters
is_independent_ruler = yes is_independent_ruler = yes
government_has_flag = government_is_celestial government_has_flag = government_is_celestial
scope:title ?= { scope:title ?= {
tier >= tier_kingdom
has_custom_title_name = yes has_custom_title_name = yes
} }
primary_title = { primary_title = {
@ -4256,7 +4616,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
type = conquest_populist type = conquest_populist
days = 1 days = 1
} }
previous_holder = { previous_holder ?= {
tgp_use_chinese_naming_trigger = yes tgp_use_chinese_naming_trigger = yes
} }
} }
@ -4270,7 +4630,10 @@ on_rank_up = { # Will not fire during history execution or for dying characters
primary_title ?= { primary_title ?= {
has_custom_title_name = no has_custom_title_name = no
} }
primary_title.previous_holder.dynasty != root.dynasty AND = {
exists = primary_title.previous_holder
primary_title.previous_holder.dynasty != root.dynasty
}
} }
trigger_if = { trigger_if = {
limit = { limit = {
@ -4336,6 +4699,9 @@ on_rank_up = { # Will not fire during history execution or for dying characters
} }
resolve_title_and_vassal_change = scope:change resolve_title_and_vassal_change = scope:change
} }
# Clear tier-based HoF interaction blockers
remove_character_flag = hof_request_cooldown
} }
} }
@ -4381,13 +4747,13 @@ on_rank_down = { # Will not fire during history execution or for dying character
} }
} }
} }
# Additional Flavor Title # Additional Flavor Title
additional_flavor_check_effect = yes additional_flavor_check_effect = yes
# ACH - Remove variables if they are going below certain ranks # ACH - Remove variables if they are going below certain ranks
coronation_reset_realm_law_variable_effect = yes coronation_reset_realm_law_variable_effect = yes
# ACH - if you are below king tier, remove all oaths # ACH - if you are below king tier, remove all oaths
if = { if = {
limit = { limit = {
@ -4412,7 +4778,7 @@ on_rank_down = { # Will not fire during history execution or for dying character
} }
if = { if = {
limit = { limit = {
exists = scope:new_wedding_host exists = scope:new_wedding_host
has_variable = promised_grand_wedding_to has_variable = promised_grand_wedding_to
} }
@ -4550,10 +4916,12 @@ on_vassal_gained = {
# It is also fired for rulers gaining independence, those can be identified by checking current liege # It is also fired for rulers gaining independence, those can be identified by checking current liege
on_vassal_change = { on_vassal_change = {
effect = { effect = {
# usually, diarch must be vassal or courtier
diarchy_validation_check_effect = yes
### If a admin duke-tier character becomes the top-liege's direct vassal, ensure that they have a noble family title ### If a admin duke-tier character becomes the top-liege's direct vassal, ensure that they have a noble family title
if = { if = {
limit = { limit = {
government_allows = administrative government_allows = noble_families
is_house_head = yes is_house_head = yes
trigger_if = { trigger_if = {
# This trigger is intentionally different from the similar effect in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can # This trigger is intentionally different from the similar effect in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can
@ -4563,7 +4931,7 @@ on_vassal_change = {
trigger_else = { highest_held_title_tier >= tier_duchy } trigger_else = { highest_held_title_tier >= tier_duchy }
liege = { liege = {
top_liege = this top_liege = this
government_allows = administrative government_allows = noble_families
} }
NOR = { NOR = {
any_held_title = { is_noble_family_title = yes } any_held_title = { is_noble_family_title = yes }
@ -4580,10 +4948,10 @@ on_vassal_change = {
### If an admin ruler becomes independent... ### If an admin ruler becomes independent...
if = { if = {
limit = { limit = {
government_has_flag = government_is_administrative government_has_mechanic = administrative
} }
if = { if = {
limit = { limit = {
liege = root # I.e. root is independent liege = root # I.e. root is independent
} }
# And is not of a high enough rank, change government # And is not of a high enough rank, change government
@ -4596,10 +4964,9 @@ on_vassal_change = {
# If they can be independent, make sure they have a noble family title # If they can be independent, make sure they have a noble family title
else_if = { else_if = {
limit = { limit = {
government_allows = noble_families
NOT = { NOT = {
any_held_title = { exists = house.noble_family
is_noble_family_title = yes
}
} }
} }
create_noble_family_effect = { GOVERNMENT_GIVER = this } create_noble_family_effect = { GOVERNMENT_GIVER = this }
@ -4609,6 +4976,7 @@ on_vassal_change = {
# Byz admin landless NF should always be direct vassal of top liege # Byz admin landless NF should always be direct vassal of top liege
else_if = { else_if = {
limit = { limit = {
government_has_flag = government_is_administrative
liege != top_liege liege != top_liege
primary_title = { primary_title = {
is_noble_family_title = yes is_noble_family_title = yes
@ -4626,6 +4994,43 @@ on_vassal_change = {
resolve_title_and_vassal_change = scope:change resolve_title_and_vassal_change = scope:change
} }
} }
# Empire Faith Gate: sync the empire-holders list when an empire-tier ruler gains or loses independence.
if = {
limit = {
empire_faith_gate_enabled_trigger = yes
highest_held_title_tier >= tier_empire
}
if = {
limit = { liege = root }
if = {
limit = {
NOT = {
is_target_in_global_variable_list = {
name = efg_empire_holders
target = root
}
}
}
add_to_global_variable_list = {
name = efg_empire_holders
target = root
}
}
}
else_if = {
limit = {
is_target_in_global_variable_list = {
name = efg_empire_holders
target = root
}
}
remove_list_global_variable = {
name = efg_empire_holders
target = root
}
}
root = { efg_recalculate_contested_empire_for_faith_effect = yes }
}
### Independent Celestial rulers who become direct vassals of a top liege adopt Military obligations if they have title troops - Everyone else will default to Standard. ### Independent Celestial rulers who become direct vassals of a top liege adopt Military obligations if they have title troops - Everyone else will default to Standard.
if = { if = {
limit = { limit = {
@ -4645,7 +5050,7 @@ on_vassal_change = {
} }
vassal_contract_set_obligation_level = { type = celestial_provinces level = 3 } vassal_contract_set_obligation_level = { type = celestial_provinces level = 3 }
} }
### If a minister becomes independent we destroy the ministry title ### If a minister becomes independent we destroy the ministry title
# if = { # if = {
# limit = { # limit = {
@ -4718,7 +5123,7 @@ on_vassal_change = {
reset_title_name = yes reset_title_name = yes
} }
} }
# Destroy ceremonial titles of vassalized realms # Destroy ceremonial titles of vassalized realms
if = { if = {
limit = { limit = {
@ -4738,7 +5143,7 @@ on_vassal_change = {
remove_trait = former_emperor remove_trait = former_emperor
} }
} }
# Bloc # Bloc
if = { if = {
# Let code trigger this if this is due to succession # Let code trigger this if this is due to succession
@ -4769,10 +5174,17 @@ on_baron_found_or_created_for_title = {
# Called when realm capital changes. It can be manual move, loss in conquest, move after inheritance, # Called when realm capital changes. It can be manual move, loss in conquest, move after inheritance,
# move when granted a better title, becoming landed for the first time # move when granted a better title, becoming landed for the first time
# root: New realm capital barony # root: New realm capital barony
# scope:holder character changing capital. The same character can change capital multiple times at once
# depending on what is happening, so check if the holders match.
# scope:old_capital - previous capital barony. Can be empty, can be owned by someone else # scope:old_capital - previous capital barony. Can be empty, can be owned by someone else
on_realm_capital_change = { on_realm_capital_change = {
effect = { effect = {
holder ?= { holder ?= {
# Landed-only royal court: landless Pope re-lands with a culture-derived one on_title_gain never sees
if = {
limit = { has_title = title:k_papal_state }
enforce_papal_latin_court_language_effect = yes
}
# Do we need to refresh their vizier's modifiers? # Do we need to refresh their vizier's modifiers?
if = { if = {
limit = { has_diarchy_parameter = diarchy_is_vizierate } limit = { has_diarchy_parameter = diarchy_is_vizierate }
@ -4912,13 +5324,10 @@ on_realm_capital_change = {
# Move ministers to realm capital. # Move ministers to realm capital.
if = { if = {
limit = { limit = { tgp_has_access_to_ministry_trigger = yes }
tgp_has_access_to_ministry_trigger = yes capital_province = { save_scope_as = capital_province }
}
every_vassal = { every_vassal = {
limit = { limit = { tgp_has_minister_title = yes }
tgp_has_minister_title = yes
}
every_held_title = { every_held_title = {
limit = { limit = {
OR = { OR = {
@ -4926,13 +5335,10 @@ on_realm_capital_change = {
tgp_is_minister_title = yes tgp_is_minister_title = yes
} }
} }
set_capital_county = ROOT.county set_capital_county = scope:capital_province.county
} }
if = { domicile ?= {
limit = { is_ai = yes } move_domicile = scope:capital_province
domicile ?= {
move_domicile = ROOT.title_province
}
} }
# don't move them in such cases # don't move them in such cases
if = { if = {

View file

@ -28,6 +28,8 @@ on_travel_plan_movement = {
# Used for loc in the travel completion event # Used for loc in the travel completion event
# Variable cleanup in the completion event (travel_completion_event.1000) # Variable cleanup in the completion event (travel_completion_event.1000)
effect = { effect = {
# Passive learning from foreign-rite provinces/locals.
passive_rite_learning_travel_province_effect = yes
# Wandering Lifestyle XP # Wandering Lifestyle XP
wandering_lifestyle_exp_post_travel_effect = yes wandering_lifestyle_exp_post_travel_effect = yes
# Increase xp for traveler trait # Increase xp for traveler trait
@ -409,7 +411,7 @@ on_travel_plan_movement = {
province = root.current_travel_plan.current_location province = root.current_travel_plan.current_location
is_physically_able_adult = yes is_physically_able_adult = yes
NOR = { NOR = {
faith = root.faith rite = root.rite
has_relation_rival = root has_relation_rival = root
has_character_flag = ai_will_not_convert has_character_flag = ai_will_not_convert
has_trait = zealous has_trait = zealous
@ -427,7 +429,7 @@ on_travel_plan_movement = {
limit = { limit = {
is_physically_able_adult = yes is_physically_able_adult = yes
NOR = { NOR = {
faith = root.faith rite = root.rite
has_relation_rival = root has_relation_rival = root
has_character_flag = ai_will_not_convert has_character_flag = ai_will_not_convert
has_trait = zealous has_trait = zealous
@ -445,7 +447,7 @@ on_travel_plan_movement = {
left_icon = scope:wanderer_to_convert left_icon = scope:wanderer_to_convert
add_piety = miniscule_piety_value add_piety = miniscule_piety_value
scope:wanderer_to_convert = { scope:wanderer_to_convert = {
set_character_faith = root.faith set_character_rite = root.rite
} }
} }
} }
@ -484,13 +486,27 @@ on_travel_plan_movement = {
} }
} }
} }
# PAM Scholasticism personal tenet - the travelling studium
if = {
limit = {
has_personal_tenet_flag = tenet_scholasticism_travelling_studium
current_travel_plan ?= {
any_entourage_character = {
NOT = { this = root }
is_physically_able_ai_adult = yes
ep1_is_valid_character_for_inspiration_trigger = yes
}
}
}
pam_tenet_scholasticism_studium_effect = yes
}
if = { if = {
limit = { limit = {
has_perk = church_and_state_perk has_perk = church_and_state_perk
has_government = landless_adventurer_government has_government = landless_adventurer_government
location = { has_holding_type = church_holding } location = { has_holding_type = church_holding }
} }
add_piety = miniscule_piety_gain add_piety = adventurer_church_and_state_perk_2_value
} }
# laamp_base_1041/Ambush Travellers task contract minigame. # laamp_base_1041/Ambush Travellers task contract minigame.
current_travel_plan ?= { current_travel_plan ?= {
@ -509,6 +525,8 @@ on_travel_plan_movement = {
} }
else_if = { else_if = {
limit = { var:encounters_tally < var:encounters_max } limit = { var:encounters_tally < var:encounters_max }
# 1782 picks its victim through the contract's previous_victims_list
save_scope_as = task_contract
root = { trigger_event = laamp_base_contract_schemes.1782 } root = { trigger_event = laamp_base_contract_schemes.1782 }
set_variable = { set_variable = {
name = event_ratio_tracker name = event_ratio_tracker
@ -550,6 +568,33 @@ on_travel_plan_movement = {
} }
trigger_event = migration_events.1051 trigger_event = migration_events.1051
} }
#Christians get the opportunity to acquire pilgrim badges from other Christian faiths, if out traveling
if = {
limit = {
faith.religion = religion:catholic_religion
religion:catholic_religion = {
any_faith = {
any_holy_site_barony = {
title_province = { this = root.current_travel_plan.current_location }
}
}
}
NOR = {
#Not if you already have a badge originating from this place
any_character_artifact = {
has_variable = is_pilgrim_badge
var:pilgrim_badge_location.title_province ?= root.current_travel_plan.current_location
}
#Nor if you can go on a pilgrimage here, sheesh
faith = {
any_holy_site_barony = {
title_province = { this = root.current_travel_plan.current_location }
}
}
}
}
trigger_event = travel_events.2310
}
} }
} }
@ -724,6 +769,8 @@ travel_events_on_action = {
effect = { effect = {
#Invalidate Tribute Missions #Invalidate Tribute Missions
tribute_mission_invalidation_effect = yes tribute_mission_invalidation_effect = yes
# Invalidate Petition Head of Faith travel
petition_head_of_faith_invalidation_effect = yes
# Invalidate travelling hostages # Invalidate travelling hostages
hostage_travel_invalidation_effect = yes hostage_travel_invalidation_effect = yes
# Invalidate travelling wards # Invalidate travelling wards
@ -777,6 +824,7 @@ travel_events_on_action = {
100 = travel_events.2037 #Visit some hunting grounds - Sadistic province owner is manhunting 100 = travel_events.2037 #Visit some hunting grounds - Sadistic province owner is manhunting
150 = travel_events.2038 #Visit some hunting grounds - Friendly competition with an entourage member 150 = travel_events.2038 #Visit some hunting grounds - Friendly competition with an entourage member
100 = travel_events.2200 #A local knight wants to fight someone 100 = travel_events.2200 #A local knight wants to fight someone
100 = travel_events.2300 #Thieves stole your pilgrim badge (and other things) in the night!
100 = travel_events.3000 #Rumours about grotesque creatures 100 = travel_events.3000 #Rumours about grotesque creatures
100 = travel_events.3010 #Lost pet 100 = travel_events.3010 #Lost pet
200 = travel_events.3030 #Infatuated knight 200 = travel_events.3030 #Infatuated knight
@ -907,6 +955,9 @@ travel_events_on_action = {
100 = legend_spread_events.8010 #Someone challenges you to a duel 100 = legend_spread_events.8010 #Someone challenges you to a duel
100 = travel_events.5001 #You come across a local legend 100 = travel_events.5001 #You come across a local legend
# PAM Travel Events
50 = pam_generic_events.0010 # Meet a same-faith ruler hunting in their holding
#EP3 Travel Events #EP3 Travel Events
1000 = ep3_travel_events.3000 #Waters of the Jordan 1000 = ep3_travel_events.3000 #Waters of the Jordan
300 = ep3_travel_events.3002 #Where Armenians Govern 300 = ep3_travel_events.3002 #Where Armenians Govern
@ -949,6 +1000,13 @@ travel_events_on_action = {
50 = tgp_japan_yearly_events.1040 # 1040 - You come across a red bridge 50 = tgp_japan_yearly_events.1040 # 1040 - You come across a red bridge
50 = tgp_japan_yearly_events.1120 # 1120 - You meet a warrior monk 50 = tgp_japan_yearly_events.1120 # 1120 - You meet a warrior monk
50 = tgp_japan_yearly_events.1140 # 1140 - You are stopped in Soryo lands as a Ritsuryo ruler 50 = tgp_japan_yearly_events.1140 # 1140 - You are stopped in Soryo lands as a Ritsuryo ruler
# PAM Travel Events
100 = pam_theocratic_ruler_events.0012 # Theocratic ruler: sacred grove in the forest while traveling through realm
#Passive Rite Learning travel events
150 = rite_travel_events.1000 # Fascinating Stranger - full rite learn
150 = rite_travel_events.2000 # Revelation - resonant core tenet
} }
} }
@ -1351,7 +1409,7 @@ on_travel_plan_start = {
title = wanderer_restlessness_removal_title title = wanderer_restlessness_removal_title
right_icon = root right_icon = root
add_wanderer_lifestyle_xp = 250 add_wanderer_lifestyle_xp = 250
stress_impact = { base = -25 } stress_and_fulfillment_impact = { base = -25 }
remove_character_modifier = wanderer_restlessness_modifier remove_character_modifier = wanderer_restlessness_modifier
} }
} }
@ -1362,13 +1420,18 @@ on_travel_plan_start = {
has_variable = prepare_travels_value has_variable = prepare_travels_value
var:prepare_travels_value >= 1 var:prepare_travels_value >= 1
} }
current_travel_plan = { #current_travel_plan = {
set_variable = { # set_variable = {
name = prepare_travels_modifier_value # name = prepare_travels_modifier_value
value = root.var:prepare_travels_value # value = root.var:prepare_travels_value
} # }
add_travel_plan_modifier = prepare_travels_modifier # add_travel_plan_modifier = prepare_travels_modifier
#}
set_variable = {
name = prepare_travels_modifier_value
value = root.var:prepare_travels_value
} }
add_character_modifier = prepare_travels_character_modifier
remove_variable = prepare_travels_value remove_variable = prepare_travels_value
} }
} }
@ -1701,6 +1764,14 @@ on_travel_plan_complete = {
#Remove characters added by travel options at the start of travel plan #Remove characters added by travel options at the start of travel plan
remove_travel_option_added_character_effect = yes remove_travel_option_added_character_effect = yes
if = {
limit = {
has_character_modifier = prepare_travels_character_modifier
}
remove_character_modifier = prepare_travels_character_modifier
remove_variable = prepare_travels_modifier_value
}
} }
} }
@ -1718,6 +1789,21 @@ on_travel_plan_abort = {
limit = { has_variable = ep3_laamp_decision_1000_is_excavating } limit = { has_variable = ep3_laamp_decision_1000_is_excavating }
remove_variable = ep3_laamp_decision_1000_is_excavating remove_variable = ep3_laamp_decision_1000_is_excavating
} }
#PAM Holy Myron: a landed chaplain's journey was interrupted
#Unlanded chaplains never reach this on_action
#Death and cancel hooks plus thirty-year variable lifetimes cover them instead
if = {
limit = { has_variable = pam_holy_myron_journey_tier }
var:pam_holy_myron_liege ?= {
send_interface_toast = {
type = event_toast_effect_bad
title = pam_holy_myron_journey_abandoned_toast
left_icon = root
remove_decision_cooldown = pam_prepare_holy_myron_decision
}
}
pam_holy_myron_journey_cleanup_effect = yes
}
if = { if = {
limit = { limit = {
exists = var:travel_plan_start_date exists = var:travel_plan_start_date
@ -1803,6 +1889,17 @@ on_travel_plan_abort = {
#Remove characters added by travel options at the start of travel plan #Remove characters added by travel options at the start of travel plan
remove_travel_option_added_character_effect = yes remove_travel_option_added_character_effect = yes
if = {
limit = {
has_character_modifier = prepare_travels_character_modifier
}
remove_character_modifier = prepare_travels_character_modifier
remove_variable = prepare_travels_modifier_value
}
}
on_actions = {
petition_head_of_faith_travel_planner_exit
} }
} }
@ -1815,6 +1912,19 @@ on_travel_plan_cancel = {
limit = { has_variable = ep3_laamp_decision_1000_is_excavating } limit = { has_variable = ep3_laamp_decision_1000_is_excavating }
remove_variable = ep3_laamp_decision_1000_is_excavating remove_variable = ep3_laamp_decision_1000_is_excavating
} }
#PAM - Holy Myron: the herb-gathering journey was called off; tell the sender and clean up
if = {
limit = { has_variable = pam_holy_myron_journey_tier }
var:pam_holy_myron_liege ?= {
send_interface_toast = {
type = event_toast_effect_bad
title = pam_holy_myron_journey_abandoned_toast
left_icon = root
remove_decision_cooldown = pam_prepare_holy_myron_decision
}
}
pam_holy_myron_journey_cleanup_effect = yes
}
if = { if = {
limit = { limit = {
has_character_flag = petition_liege_character_flag has_character_flag = petition_liege_character_flag
@ -1947,6 +2057,9 @@ on_travel_plan_cancel = {
requested_tribute_mission_penalty_effect = yes requested_tribute_mission_penalty_effect = yes
tribute_mission_clean_up_variables_effect = yes tribute_mission_clean_up_variables_effect = yes
} }
on_actions = {
petition_head_of_faith_travel_planner_exit
}
} }
# If the travel is due to an activity and the activity is now complete, this will trigger. # If the travel is due to an activity and the activity is now complete, this will trigger.
@ -2015,17 +2128,8 @@ on_visited_ep3_monument = {
} }
#Used in the debug interaction debug_move_domicile_interaction #Used in the debug interaction debug_move_domicile_interaction
# handled in ep3_contract_event.0002
on_travel_relocation_start = { on_travel_relocation_start = {
effect = {
every_courtier_or_guest = { #take everyone you have with you
limit = {
NOT = { exists = current_travel_plan }
}
root.current_travel_plan = {
add_companion = prev
}
}
}
} }
#Used in the debug interaction debug_move_domicile_interaction #Used in the debug interaction debug_move_domicile_interaction
@ -2115,4 +2219,4 @@ zone_rouge_death_event = {
85 = 0 85 = 0
15 = NEOW_travel_event.0001 15 = NEOW_travel_event.0001
} }
} }

View file

@ -423,3 +423,135 @@ fp3_yearly_events = {
} }
} }
} }
pam_christian_yearly_events = {
trigger = {
pam_secular_faith_clergy_ok_actor_trigger = yes
OR = {
religion = religion:eastern_orthodox_religion
religion = religion:oriental_orthodox_religion
religion = religion:catholic_religion
religion = religion:protestant_religion
}
NOT = { has_character_flag = recently_got_pam_christian_event }
}
weight_multiplier = {
base = 1
modifier = {
add = 2
government_has_flag = government_is_theocracy
}
modifier = {
add = 1
OR = {
has_focus = learning_scholarship_focus
has_focus = learning_theology_focus
has_trait = lifestyle_scholar
has_trait = lifestyle_mystic
}
}
modifier = {
factor = 0.5
OR = {
has_trait = cynical
ai_zeal <= -50
}
}
}
random_events = {
200 = 0
# PAM - Christian Rulers Events
100 = pam_religious_artifact_events.0001 # Courtier asks for sponsoring for making a religious artifact
100 = pam_theocratic_ruler_events.0001 # Theocratic ruler: ecclesiastical subordinate brings news of a noble bequest
100 = pam_theocratic_ruler_events.0002 # Prince-bishop: neighbouring unreformed ruler passes through / visits court
100 = pam_theocratic_ruler_events.0003 # Marshal/steward council after war or raids: alliance, levies, or relief
100 = pam_theocratic_ruler_events.0004 # Monastic order in realm: collaboration audience with prior/abbot
100 = pam_theocratic_ruler_events.0005 # Military holy order in realm: audience with order master
100 = pam_theocratic_ruler_events.0006 # Peasant leader withholds church taxes: enforce, forgive, or scapegoat steward
100 = pam_theocratic_ruler_events.0007 # Theocratic ruler: realm at peace; a moment of blissful harmony
100 = pam_theocratic_ruler_events.0008 # Theocratic ruler: inherited secular stone; repurpose for episcopal palace
100 = pam_theocratic_ruler_events.0009 # Theocratic ruler: heir loses temper during sermon; counsel or discipline
100 = pam_theocratic_ruler_events.0010 # Theocratic ruler: proven warrior and pilgrim; marshal and chaplain counsel sword or crozier
100 = pam_theocratic_ruler_events.0011 # Theocratic ruler: landed subject seeks church burial for fallen crusader kinsman
100 = pam_theocratic_ruler_events.0013 # Theocratic ruler: angelic voice at mass; recruit for choir, seduce, or reject worldly song
50 = pam_theocratic_ruler_events.0014 # Theocratic ruler: neighbouring convert urges adopting foreign core tenets at sermon
50 = pam_theocratic_ruler_events.0015 # Theocratic ruler: prayer hearing with top two succession candidates
# PAM Flavor Events
50 = pam_generic_events.0001 # Gain Religious Scholar
50 = pam_generic_events.0002 # Child doubts their goodness
50 = pam_generic_events.0003 # Spouse worries about your sinful ways
100 = pam_generic_events.0004 # Friend/chaplain comforts after family death
100 = pam_generic_events.0005 # Excommunicated: loyal vassal offers to thrash clerical region holder
20 = pam_generic_events.0008 # You hear the voice of god telling you how virtuous you are
50 = pam_generic_events.0009 # Clergy member has a hellish nightmare
50 = pam_generic_events.0011 # Scold a courtier for their sins
100 = pam_secular_faith_events.0001 # Holy Smoke - a holy-day censing draws the ruler into the congregation's devotion
100 = pam_secular_faith_events.0003 # A Vision in the Night - a vivid divine vision demands interpretation
25 = pam_secular_faith_events.0004 # Forbidden Truth - temptation toward a secret, forbidden personal tenet
100 = pam_secular_faith_events.0005 # By Candlelight - evening study reveals a foreign tenet or doctrine
100 = pam_secular_faith_events.0006 # Bones of a Saint - a relic-seller offers dubious holy bones
100 = pam_secular_faith_events.0007 # Arrogant Bishop - a proud theocrat vassal scorns his lord
100 = pam_secular_faith_events.0008 # The Weight of Sin - a penance for the personality trait the rite holds sinful
50 = pam_secular_faith_events.0009 # A Christlike Stranger - a beggar at the gate may be more than he seems
100 = pam_secular_faith_events.0011 # The Penitents - a flagellant procession reaches the capital
100 = pam_secular_faith_events.0012 # Blessing of Arms - a peacetime consecration of the ruler's arms
100 = pam_secular_faith_events.0013 # A Death Foretold - a mad preacher foretells the natural death of an aged or ailing courtier; the prophecy comes due in a follow-up
75 = pam_secular_faith_events.0015 # The Weeping Icon - a holy image is said to weep
100 = pam_secular_faith_events.0016 # A Price for the Pulpit - a wanderer offers gold for the realm-priest office (simony)
100 = pam_secular_faith_events.0017 # A Heretic at Court - a courtier is exposed as a heretic
100 = pam_secular_faith_events.0018 # A Child for God - an offer to pledge a child to the Church (oblation)
100 = pam_secular_faith_events.0019 # The Peace of God - end the feuds between your vassals in a holy peace
100 = pam_secular_faith_events.0021 # A Sign in the Heavens - a portent appears in the night sky
100 = pam_secular_faith_events.0022 # The King's Touch - a sick courtier begs the ruler's healing touch
100 = pam_secular_faith_events.0023 # A Wandering Scribe - a lettered wanderer offers their services
100 = pam_secular_faith_events.0024 # Into the Cloister - force a rival courtier to take holy vows
100 = pam_secular_faith_events.0025 # Godfather/Godmother - sponsoring a convert's baptism
100 = pam_secular_faith_events.0026 # A Besieged Soul - a courtier is tormented as if possessed; exorcise or treat them
150 = pam_secular_faith_events.0027 # Crisis of Faith - low Spiritual Fulfillment; realign a personal tenet
150 = pam_secular_faith_events.0028 # My Soul, at Peace - high Spiritual Fulfillment; spread or change personal tenets
75 = pam_secular_faith_events.0029 # A Visit from the Dead - a dream of a departed family member
75 = pam_secular_faith_events.0030 # The Anchorite - a devout courtier asks to be walled into a church cell
100 = pam_secular_faith_events.0031 # An Argument of Scholars - two learned courtiers clash over doctrine
100 = pam_secular_faith_events.0032 # The Tempting Hour - a fast tested in the night
100 = pam_secular_faith_events.0033 # Pillow Sermons - a spouse who believes differently
25 = pam_secular_faith_events.0034 # The Foundling - an abandoned child left at the church
100 = pam_secular_faith_events.0035 # The Mortification - a courtier's holy self-destruction
100 = pam_secular_faith_events.0036 # Wisdom of the Anchorite - a hermit's hard counsel
50 = pam_secular_faith_events.0037 # Carnal Revelation - a glimpse of Carnal Exaltation
50 = pam_secular_faith_events.0038 # A Taste of Paradise - a glimpse of Hedonism
50 = pam_secular_faith_events.0039 # A Prayer in the Dark - the spymaster uncovers a secret at prayer (Sacred Shadows)
50 = pam_secular_faith_events.0040 # Flesh of the Faithful - a glimpse of Ritual Cannibalism
50 = pam_secular_faith_events.0041 # The Naked Truth - an Adamite preaches, and a secret temptation
100 = pam_secular_faith_events.0042 # The Road Made Easy - a patron offers to fund the next pilgrimage
100 = pam_secular_faith_events.0043 # A Pilgrim's Welcome - the realm priest pledges acclaim for the next completed pilgrimage
100 = pam_secular_faith_events.0044 # The Ear of the Clergy - clerical petitions are more readily accepted for a time
5 = pam_secular_faith_events.0045 # Epiphany - a temporary faith/rite creation cost discount
100 = pam_secular_faith_events.0046 # Shared Conviction - adopting an intimate's personal tenet
100 = pam_secular_faith_events.0047 # Priestly Devotion - a free loyalty hook on the realm priest
25 = pam_secular_faith_events.0048 # Demonic Dreams - a tormenting dream, lifted by a temple or pilgrimage
50 = pam_secular_faith_events.0049 # "Celestial Hierarchy" - a lustful priest's secret midnight rite
50 = pam_secular_faith_events.0050 # Confession - lustful thoughts about the court chaplain; take a lover or resist
5 = pam_secular_faith_events.0051 # The Lord your God - a mad ruler obeys a divine voice; a gamble of blessing, apoplexy, or death
100 = pam_secular_faith_events.0052 # After You're Gone - an old ruler settles where they will lie
50 = pam_secular_faith_events.0053 # The Saint Goes Forth - a held relic is borne in procession
100 = pam_secular_faith_events.0054 # The Basin and the Towel - the ruler washes the feet of the poor
100 = pam_secular_faith_events.0055 # The Voice of Bronze - a newly recast church bell is baptized
100 = pam_secular_faith_events.0056 # A Sparrow in the Hall - Bede's sparrow flies through the evening meal
100 = pam_secular_faith_events.0057 # The Church Ale - the parish brews to pay for the church roof
100 = pam_secular_faith_events.0058 # Quid Mus Sumit? - a mouse has eaten of the reserved Host
100 = pam_secular_faith_events.0059 # The Lord's Day - the chaplain bars the hunt on the day of rest
1000 = pam_secular_faith_events.0060 # A Life Unburdened - a beggar is happier than you
}
effect = {
root = {
add_character_flag = {
flag = recently_got_pam_christian_event
days = 1095
}
}
}
}

View file

@ -1261,6 +1261,7 @@ yearly_playable_pulse = {
else = { else = {
} }
ai_budget_manipulation_effect = yes ai_budget_manipulation_effect = yes
hedonistic_obesity_modifier_sync_effect = yes
#Mandala #Mandala
if = { if = {
@ -1379,6 +1380,7 @@ yearly_playable_pulse = {
has_treasury = yes has_treasury = yes
} }
trigger_event = tgp_china_ministry.0100 trigger_event = tgp_china_ministry.0100
trigger_event = pam_theocratic_budget_events.0001
} }
} }
# Assign or level up court type trait for courtiers in a royal court # Assign or level up court type trait for courtiers in a royal court
@ -1423,9 +1425,9 @@ yearly_playable_pulse = {
save_scope_as = unity_target save_scope_as = unity_target
if = { if = {
limit = { limit = {
OR = { has_variable = {
has_character_flag = steer_unity_towards_harmonious_passive_gain name = steer_unity_towards_harmonious_passive_gain
has_character_flag = steer_unity_towards_antagonistic_passive_loss name = steer_unity_towards_antagonistic_passive_loss
} }
} }
house = { house = {
@ -1537,7 +1539,7 @@ yearly_playable_pulse = {
limit = { is_ai = yes } limit = { is_ai = yes }
is_available = yes is_available = yes
} }
NOT = { has_government = celestial_government } NOT = { government_has_flag = government_is_celestial }
} }
random = { random = {
chance = { chance = {
@ -1624,7 +1626,25 @@ yearly_playable_pulse = {
} }
} }
if = { # Is Admin if = {
limit = {
OR = {
NOT = { government_allows = noble_families }
AND = {
liege = this
any_held_title = {
count = all
is_noble_family_title = yes
}
}
}
}
every_held_title = {
limit = { is_noble_family_title = yes }
prev = { destroy_title = prev }
}
}
else_if = { # Is Admin
limit = { limit = {
government_has_flag = government_is_administrative government_has_flag = government_is_administrative
is_landed = yes is_landed = yes
@ -1796,7 +1816,11 @@ yearly_playable_pulse = {
} }
every_courtier = { every_courtier = {
limit = { limit = {
location != root.capital_province trigger_if = {
limit = { exists = location }
location != root.capital_province
}
trigger_else = { always = yes }
is_imprisoned = no is_imprisoned = no
is_travelling = no is_travelling = no
is_commanding_army = no is_commanding_army = no
@ -1814,7 +1838,11 @@ yearly_playable_pulse = {
} }
every_courtier = { every_courtier = {
limit = { limit = {
location != root.domicile.domicile_location trigger_if = {
limit = { exists = location }
location != root.domicile.domicile_location
}
trigger_else = { always = yes }
is_imprisoned = no is_imprisoned = no
is_travelling = no is_travelling = no
is_commanding_army = no is_commanding_army = no
@ -2169,53 +2197,51 @@ yearly_playable_pulse = {
} }
#If you need to be anointed... #If you need to be anointed...
coronation_save_anointment_authority_effect = { SCOPE = anointment_authority }
#First step is being un-excommunicated #First step is being un-excommunicated
if = { if = {
limit = { limit = {
highest_held_title_tier >= tier_empire highest_held_title_tier >= tier_empire
has_trait = excommunicated has_trait = excommunicated
faith = { rite = { rite_has_doctrine = doctrine_imperial_anointment }
has_doctrine = doctrine_spiritual_head exists = scope:anointment_authority
has_doctrine = doctrine_imperial_anointment
}
custom_tooltip = { custom_tooltip = {
text = anointment_request_already_supported text = anointment_request_already_supported
NOT = { scope:anointment_authority = {
is_target_in_variable_list = { NOT = {
name = supported_anointments is_target_in_variable_list = {
target = scope:actor name = supported_anointments
target = root
}
} }
} }
} }
is_character_interaction_valid = { is_character_interaction_valid = {
recipient = faith.religious_head recipient = scope:anointment_authority
interaction = declaration_of_repentance_interaction interaction = declaration_of_repentance_interaction
} }
} }
run_interaction = { run_interaction = {
interaction = declaration_of_repentance_interaction interaction = declaration_of_repentance_interaction
actor = this actor = this
recipient = faith.religious_head recipient = scope:anointment_authority
execute_threshold = maybe execute_threshold = maybe
} }
} }
#Next step is getting approval #Next step is getting approval
else_if = { else_if = {
limit = { limit = {
exists = faith.religious_head exists = scope:anointment_authority
is_character_interaction_valid = { is_character_interaction_valid = {
recipient = faith.religious_head recipient = scope:anointment_authority
interaction = coronation_anointment_request interaction = coronation_anointment_request
} }
faith = { rite = { rite_has_doctrine = doctrine_imperial_anointment }
has_doctrine = doctrine_spiritual_head
has_doctrine = doctrine_imperial_anointment
}
} }
run_interaction = { run_interaction = {
interaction = coronation_anointment_request interaction = coronation_anointment_request
actor = this actor = this
recipient = faith.religious_head recipient = scope:anointment_authority
execute_threshold = maybe execute_threshold = maybe
} }
} }
@ -2251,6 +2277,8 @@ three_year_playable_pulse = {
# 600 = global_culture.3012 # 600 = global_culture.3012
# } # }
effect = { effect = {
# Replace the monks a clerical court has lost, so it does not drift back to reading as secular
pam_seed_monk_courtiers_effect = yes
if = { # Nomadic herd starves if you're landless if = { # Nomadic herd starves if you're landless
limit = { limit = {
is_landed = no is_landed = no
@ -2481,6 +2509,23 @@ three_year_playable_pulse = {
five_year_playable_pulse = { five_year_playable_pulse = {
effect = { effect = {
ai_chance_to_become_conqueror_effect = yes ai_chance_to_become_conqueror_effect = yes
pam_ai_personal_tenet_pulse_effect = yes
###############
# PAM Peace of God Tenet
###############
if = {
limit = {
OR = {
rite = { rite_has_tenet = tenet_peace_of_god }
has_personal_tenet = tenet_peace_of_god
}
days_of_continuous_peace >= 1825 # 5 years
}
trigger_event = {
id = pam_tenet_events.0001
days = { 21 37 }
}
}
# Special Holy Seeds drops # Special Holy Seeds drops
if = { if = {
limit = { limit = {
@ -2767,6 +2812,7 @@ random_yearly_playable_pulse = {
} }
} }
6 = on_yearly_events 6 = on_yearly_events
1 = pam_christian_yearly_events
5 = fp1_yearly_events 5 = fp1_yearly_events
4 = fp2_yearly_events 4 = fp2_yearly_events
4 = fp3_yearly_events 4 = fp3_yearly_events
@ -2816,9 +2862,9 @@ random_yearly_playable_pulse = {
limit = { limit = {
is_ai = yes is_ai = yes
OR = { OR = {
has_commander_trait_trigger = yes has_trait_with_flag = commander_trait_flag
any_knight = { any_knight = {
has_commander_trait_trigger = yes has_trait_with_flag = commander_trait_flag
} }
} }
} }
@ -2826,7 +2872,7 @@ random_yearly_playable_pulse = {
every_knight = { every_knight = {
limit = { limit = {
is_ai = yes is_ai = yes
has_commander_trait_trigger = yes has_trait_with_flag = commander_trait_flag
} }
commander_trait_lvling_ai_effect = yes commander_trait_lvling_ai_effect = yes
} }
@ -2916,7 +2962,7 @@ random_yearly_everyone_pulse = {
} }
random_events = { random_events = {
500 = 0 500 = 0
100 = holy_order.0202 #Holy order demands payment 100 = holy_order.0202 #Military Order demands payment
} }
} }
@ -3036,6 +3082,27 @@ five_year_everyone_pulse = {
} }
trigger_event = ep3_yearly.3000 trigger_event = ep3_yearly.3000
} }
if = {
limit = {
NOT = {
exists = puppeteer
}
OR = {
has_character_modifier = skilled_puppeteer_modifier_diplomacy
has_character_modifier = skilled_puppeteer_modifier_martial
has_character_modifier = skilled_puppeteer_modifier_stewardship
has_character_modifier = skilled_puppeteer_modifier_intrigue
has_character_modifier = skilled_puppeteer_modifier_learning
has_character_modifier = skilled_puppeteer_modifier_general
has_character_modifier = spiritual_puppeteer_modifier_cleric
has_character_modifier = spiritual_puppeteer_modifier_secular
has_character_modifier = dreadful_puppeteer_modifier
has_character_modifier = beloved_puppeteer_modifier
has_character_modifier = deranging_puppeteer_modifier
}
}
remove_puppet_modifiers_effect = yes
}
} }
on_actions = { on_actions = {
disease_outbreak_pulse # moved from health_on_actions.txt disease_outbreak_pulse # moved from health_on_actions.txt
@ -3101,7 +3168,7 @@ ai_character_pulse = {
chance_to_happen = 25 chance_to_happen = 25
500 = 0 500 = 0
100 = learn_commander_trait.0001 100 = learn_commander_trait.0001
100 = holy_order.0100 #Give pilgrim trait to holy order members 100 = holy_order.0100 #Give pilgrim trait to Military Order members
} }
} }
@ -3273,10 +3340,10 @@ on_yearly_events = {
20 = pet_animal.5001 # Rival has cat... 20 = pet_animal.5001 # Rival has cat...
20 = pet_animal.5002 # Rival has dog... 20 = pet_animal.5002 # Rival has dog...
#Holy Order #Military Order
100 = holy_order.2001 # Child wishes to join Holy Order 100 = holy_order.2001 # Child wishes to join Military Order
100 = holy_order.2002 # Sibling wants to join a Holy Order 100 = holy_order.2002 # Sibling wants to join a Military Order
200 = holy_order.2003 # Holy Order suggests you send them a child 200 = holy_order.2003 # Military Order suggests you send them a child
1000 = holy_order.2004 # Child returns to pick up the mantle 1000 = holy_order.2004 # Child returns to pick up the mantle
100 = holy_order.2005 # A - Possibly Undesirable - Child Returns Home 100 = holy_order.2005 # A - Possibly Undesirable - Child Returns Home
1000 = fp1_jomsvikings.0011 # FP1 - Jomsvikings terrorise their neighbours 1000 = fp1_jomsvikings.0011 # FP1 - Jomsvikings terrorise their neighbours