This commit is contained in:
Heidesommer 2026-05-21 21:45:58 -04:00
parent 6bc66eeada
commit 93cf9747bd
25 changed files with 2049 additions and 2002 deletions

File diff suppressed because it is too large Load diff

View file

@ -64,28 +64,28 @@ on_title_destroyed = {
frankokratia_latin_emp_end_msg_effect = yes
}
#Create byz collapse variable that defines anarchy period
else_if = {
limit = {
scope:landed_title = {
this = title:e_byzantium
}
}
if = {
limit = {
exists = global_var:byz_collapse_counter
}
remove_global_variable = byz_collapse_counter
}
set_global_variable = {
name = byz_collapse_counter
value = {
value = current_year
add = 100
}
}
# Silk Road prosperity gets hit if Byzantium dies
tgp_silk_road_byzantium_destroyed_effect = yes
}
# else_if = {
# limit = {
# scope:landed_title = {
# this = title:e_byzantium
# }
# }
# if = {
# limit = {
# exists = global_var:byz_collapse_counter
# }
# remove_global_variable = byz_collapse_counter
# }
# set_global_variable = {
# name = byz_collapse_counter
# value = {
# value = current_year
# add = 100
# }
# }
# # Silk Road prosperity gets hit if Byzantium dies
# tgp_silk_road_byzantium_destroyed_effect = yes
# }
else_if = {
limit = {
scope:landed_title = title:h_china
@ -107,44 +107,44 @@ on_title_destroyed = {
reset_title_name = yes
}
}
else_if = { # Danelaw-England partition calc.
limit = {
# Partition must be active.
exists = global_var:partition_active_danelaw
# And the destroyed title must be one of the two partitioned entities.
OR = {
scope:landed_title = title:k_england
scope:landed_title = title:k_danelaw
}
}
# If k_england has been destroyed, set k_danelaw as the de jure inheritor.
if = {
limit = { scope:landed_title = title:k_england }
title:k_danelaw = { save_scope_as = partition_winner }
# Try to grab the old holder for down the line.
if = {
limit = {
exists = this
is_alive = yes
}
save_scope_as = loser
}
}
# If k_danelaw has been destroyed, set k_england as the de jure inheritor.
if = {
limit = { scope:landed_title = title:k_danelaw }
title:k_england = { save_scope_as = partition_winner }
if = {
limit = {
exists = this
is_alive = yes
}
save_scope_as = loser
}
}
# Either way, trigger the maintenance event.
trigger_event = british_isles.1041
}
# else_if = { # Danelaw-England partition calc.
# limit = {
# # Partition must be active.
# exists = global_var:partition_active_danelaw
# # And the destroyed title must be one of the two partitioned entities.
# OR = {
# scope:landed_title = title:k_england
# scope:landed_title = title:k_danelaw
# }
# }
# # If k_england has been destroyed, set k_danelaw as the de jure inheritor.
# if = {
# limit = { scope:landed_title = title:k_england }
# title:k_danelaw = { save_scope_as = partition_winner }
# # Try to grab the old holder for down the line.
# if = {
# limit = {
# exists = this
# is_alive = yes
# }
# save_scope_as = loser
# }
# }
# # If k_danelaw has been destroyed, set k_england as the de jure inheritor.
# if = {
# limit = { scope:landed_title = title:k_danelaw }
# title:k_england = { save_scope_as = partition_winner }
# if = {
# limit = {
# exists = this
# is_alive = yes
# }
# save_scope_as = loser
# }
# }
# # Either way, trigger the maintenance event.
# trigger_event = british_isles.1041
# }
# Safety against invalid house bloc members
else_if = {
limit = {
@ -1325,31 +1325,31 @@ on_title_gain = {
tier >= tier_empire
}
}
# Byzantine-only: The Patriarch refuses to crown you as new emperor because you have a criminal trait (e.g. kinslayer)
if = {
limit = {
valid_for_byz_emperor_content_trigger = yes
has_ep3_dlc_trigger = yes
exists = root.faith.religious_head
this != faith.religious_head
faith.religious_head = {
opinion = {
target = root
value <= 0
}
location = root.location
}
has_any_criminal_trait_in_faith_trigger = {
CHARACTER = root
FAITH = root.faith
}
NOT = { has_character_flag = has_had_ep3_2020 }
}
trigger_event = {
id = ep3_emperor_yearly.2020
days = 1
}
}
# # Byzantine-only: The Patriarch refuses to crown you as new emperor because you have a criminal trait (e.g. kinslayer)
# if = {
# limit = {
# valid_for_byz_emperor_content_trigger = yes
# has_ep3_dlc_trigger = yes
# exists = root.faith.religious_head
# this != faith.religious_head
# faith.religious_head = {
# opinion = {
# target = root
# value <= 0
# }
# location = root.location
# }
# has_any_criminal_trait_in_faith_trigger = {
# CHARACTER = root
# FAITH = root.faith
# }
# NOT = { has_character_flag = has_had_ep3_2020 }
# }
# trigger_event = {
# id = ep3_emperor_yearly.2020
# days = 1
# }
# }
### EP3 Admin Emperor Flavor ###
if = {
limit = {
@ -1378,303 +1378,303 @@ on_title_gain = {
days = 5
}
}
#Byzantium is reborn!
if = {
limit = {
scope:title = {
this = title:e_byzantium
}
exists = global_var:byz_collapse_counter
}
save_scope_as = byz_emperor
title:e_byzantium = {
every_in_de_jure_hierarchy = {
limit = {
tier <= tier_kingdom
tier >= tier_county
is_title_created = yes
exists = holder
}
if = {
limit = {
holder ?= {
is_alive = yes
NOR = {
is_in_list = byz_return_notify
any_held_title = {
this = title:e_byzantium
}
}
}
}
holder = {
add_to_list = byz_return_notify
}
}
}
}
title:e_latin_empire = {
every_in_de_jure_hierarchy = {
limit = {
tier <= tier_kingdom
tier >= tier_county
is_title_created = yes
exists = holder
}
if = {
limit = {
holder = {
is_alive = yes
NOR = {
is_in_list = byz_return_notify
any_held_title = {
this = title:e_byzantium
}
}
}
}
holder = {
add_to_list = byz_return_notify
}
}
}
}
every_in_list = {
list = byz_return_notify
trigger_event = ep3_frankokratia_events.0130
}
remove_global_variable = byz_collapse_counter
}
# #Byzantium is reborn!
# if = {
# limit = {
# scope:title = {
# this = title:e_byzantium
# }
# exists = global_var:byz_collapse_counter
# }
# save_scope_as = byz_emperor
# title:e_byzantium = {
# every_in_de_jure_hierarchy = {
# limit = {
# tier <= tier_kingdom
# tier >= tier_county
# is_title_created = yes
# exists = holder
# }
# if = {
# limit = {
# holder ?= {
# is_alive = yes
# NOR = {
# is_in_list = byz_return_notify
# any_held_title = {
# this = title:e_byzantium
# }
# }
# }
# }
# holder = {
# add_to_list = byz_return_notify
# }
# }
# }
# }
# title:e_latin_empire = {
# every_in_de_jure_hierarchy = {
# limit = {
# tier <= tier_kingdom
# tier >= tier_county
# is_title_created = yes
# exists = holder
# }
# if = {
# limit = {
# holder = {
# is_alive = yes
# NOR = {
# is_in_list = byz_return_notify
# any_held_title = {
# this = title:e_byzantium
# }
# }
# }
# }
# holder = {
# add_to_list = byz_return_notify
# }
# }
# }
# }
# every_in_list = {
# list = byz_return_notify
# trigger_event = ep3_frankokratia_events.0130
# }
# remove_global_variable = byz_collapse_counter
# }
# TGP CHINA
else_if = {
limit = {
scope:title = title:h_china
}
# When conquering China - Change to conquest phase
if = {
limit = {
OR = {
root.dynasty != scope:previous_holder.dynasty
is_lowborn = yes # in the rare instance that a lowborn theocrat reunites China
}
}
if = {
limit = {
is_valid_celestial_dynasty = no
}
situation:dynastic_cycle = {
situation_top_sub_region = {
change_phase = { phase = situation_dynastic_cycle_phase_instability_conquest }
}
}
}
else_if = {
limit = {
situation:dynastic_cycle ?= {
situation_current_phase = situation_dynastic_cycle_phase_instability_conquest
}
}
situation:dynastic_cycle = {
situation_top_sub_region = {
change_phase = { phase = situation_dynastic_cycle_phase_instability }
}
}
}
}
# When inheriting China - Move towards instability/chaotic phase
if = {
limit = {
root.house != scope:previous_holder.house
current_date_is_start_date_trigger = no # We check this to avoid potentially triggering this immediately on game start
}
situation:dynastic_cycle = {
if = {
limit = {
situation_top_has_catalyst = catalyst_new_dynasty_inherits
}
trigger_situation_catalyst = catalyst_new_dynasty_inherits
}
}
}
# Clear the Strengthen Capital great project cooldown
situation:dynastic_cycle ?= {
if = {
limit = { has_variable = gp_strengthen_capital_cooldown }
remove_variable = gp_strengthen_capital_cooldown
}
}
#setup Grand Secretariat
if = {
limit = {
has_dlc_feature = all_under_heaven
NOT = { has_diarchy_type = grand_secretariat }
}
if = {# Clear out any old diarchy
limit = { has_active_diarchy = yes }
end_diarchy = yes
}
if = {
limit = {
has_realm_law = grand_chancellor_law
exists = title:h_china.holder.cp:councillor_chancellor
}
try_start_diarchy = grand_secretariat
set_diarch = title:h_china.holder.cp:councillor_chancellor
}
else_if = {
limit = {
has_realm_law = grand_marshal_law
exists = title:h_china.holder.cp:minister_grand_marshal
}
try_start_diarchy = grand_secretariat
set_diarch = title:h_china.holder.cp:minister_grand_marshal
}
else_if = {
limit = {
exists = title:h_china.holder.cp:councillor_spymaster
}
try_start_diarchy = grand_secretariat
set_diarch = title:h_china.holder.cp:councillor_spymaster
}
}
root.house.house_head.domicile ?= {
set_family_accomplishment_effect = { ACCOMPLISHMENT = family_accomplishment_dynasty }
}
}
# left them in enum since we can not avoid touch here with encapsulated macro
else_if = {
limit = {
OR = {
scope:title = title:e_minister_chancellor
scope:title = title:e_minister_censor
scope:title = title:e_minister_grand_marshal
scope:title = title:e_minister_of_personnel
scope:title = title:e_minister_of_revenue
scope:title = title:e_minister_of_rites
scope:title = title:e_minister_of_war
scope:title = title:e_minister_of_justice
scope:title = title:e_minister_of_works
}
}
# set up the council holder as dejure liege of the ministry title, as this effect is not called with the same scope as council onactions
scope:title.de_jure_liege.holder = {
save_scope_as = councillor_liege
}
# If we get a minister title, make sure we set things up correctly
switch = {
trigger = scope:title
title:e_minister_chancellor = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor }
}
title:e_minister_censor = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster }
}
title:e_minister_grand_marshal = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal }
}
title:e_minister_of_personnel = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel }
}
title:e_minister_of_revenue = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward }
}
title:e_minister_of_rites = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_rites MINISTER_POSITION = councillor_court_chaplain }
}
title:e_minister_of_war = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_war MINISTER_POSITION = councillor_marshal }
}
title:e_minister_of_justice = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_justice MINISTER_POSITION = minister_justice }
}
title:e_minister_of_works = {
got_minister_position_effect = { MINISTER_TITLE = e_minister_of_works MINISTER_POSITION = minister_works }
}
}
}
# TGP JAPAN
else_if = {
limit = { scope:title = title:e_japan }
# TGP RETIRED EMPEROR
if = {
limit = {
exists = title:e_japan.var:administrative_ui_special_title
has_title = title:e_japan.var:administrative_ui_special_title
}
# Flavourization setup
title:e_japan = { remove_variable = shogun_flag }
remove_character_flag = shogun_flag
if = { # Flavourization setup
limit = { has_global_variable = tenno_restored }
title:e_japan = { set_variable = ceremonial_liege_flag }
add_character_flag = ceremonial_liege_flag
trigger_event = {
id = tgp_japan_general.9100
days = 1
}
}
else = { # Event to abdicate and become Joko
trigger_event = {
id = tgp_japan_general.9120
days = 1
}
}
}
# TGP SHOGUN
else_if = {
limit = {
has_government = japan_feudal_government
has_global_variable = shogunate_established
}
title:e_japan = { remove_variable = ceremonial_liege_flag }
remove_character_flag = ceremonial_liege_flag
title:e_japan = { set_variable = shogun_flag }
add_character_flag = shogun_flag
}
# TGP KAMPAKU
else = {
title:e_japan = { remove_variable = ceremonial_liege_flag }
remove_character_flag = ceremonial_liege_flag
title:e_japan = { remove_variable = shogun_flag }
remove_character_flag = shogun_flag
}
# Japanese regent laws
if = {
limit = {
tgp_realm_has_ceremonial_liege_trigger = yes
government_is_japanese_trigger = yes
NOR = {
has_global_variable = shogunate_established
has_global_variable = tenno_restored
}
}
if = {
limit = {
government_has_flag = government_is_japan_administrative
NOT = { has_realm_law = japanese_regency_succession_law }
}
add_realm_law_skip_effects = japanese_regency_succession_law
}
else_if = {
limit = {
government_has_flag = government_is_japan_feudal
has_realm_law = japanese_regency_succession_law
}
remove_realm_law = japanese_regency_succession_law
}
}
}
# ROME
else_if = {
limit = {
OR = {
scope:title = title:h_roman_empire
scope:title = title:h_eastern_roman_empire
}
NOT = { has_trait = augustus }
}
trigger_event = roman_restoration.0005
}
# else_if = {
# limit = {
# scope:title = title:h_china
# }
# # When conquering China - Change to conquest phase
# if = {
# limit = {
# OR = {
# root.dynasty != scope:previous_holder.dynasty
# is_lowborn = yes # in the rare instance that a lowborn theocrat reunites China
# }
# }
# if = {
# limit = {
# is_valid_celestial_dynasty = no
# }
# situation:dynastic_cycle = {
# situation_top_sub_region = {
# change_phase = { phase = situation_dynastic_cycle_phase_instability_conquest }
# }
# }
# }
# else_if = {
# limit = {
# situation:dynastic_cycle ?= {
# situation_current_phase = situation_dynastic_cycle_phase_instability_conquest
# }
# }
# situation:dynastic_cycle = {
# situation_top_sub_region = {
# change_phase = { phase = situation_dynastic_cycle_phase_instability }
# }
# }
# }
# }
# # When inheriting China - Move towards instability/chaotic phase
# if = {
# limit = {
# root.house != scope:previous_holder.house
# current_date_is_start_date_trigger = no # We check this to avoid potentially triggering this immediately on game start
# }
# situation:dynastic_cycle = {
# if = {
# limit = {
# situation_top_has_catalyst = catalyst_new_dynasty_inherits
# }
# trigger_situation_catalyst = catalyst_new_dynasty_inherits
# }
# }
# }
# # Clear the Strengthen Capital great project cooldown
# situation:dynastic_cycle ?= {
# if = {
# limit = { has_variable = gp_strengthen_capital_cooldown }
# remove_variable = gp_strengthen_capital_cooldown
# }
# }
# #setup Grand Secretariat
# if = {
# limit = {
# has_dlc_feature = all_under_heaven
# NOT = { has_diarchy_type = grand_secretariat }
# }
# if = {# Clear out any old diarchy
# limit = { has_active_diarchy = yes }
# end_diarchy = yes
# }
# if = {
# limit = {
# has_realm_law = grand_chancellor_law
# exists = title:h_china.holder.cp:councillor_chancellor
# }
# try_start_diarchy = grand_secretariat
# set_diarch = title:h_china.holder.cp:councillor_chancellor
# }
# else_if = {
# limit = {
# has_realm_law = grand_marshal_law
# exists = title:h_china.holder.cp:minister_grand_marshal
# }
# try_start_diarchy = grand_secretariat
# set_diarch = title:h_china.holder.cp:minister_grand_marshal
# }
# else_if = {
# limit = {
# exists = title:h_china.holder.cp:councillor_spymaster
# }
# try_start_diarchy = grand_secretariat
# set_diarch = title:h_china.holder.cp:councillor_spymaster
# }
# }
# root.house.house_head.domicile ?= {
# set_family_accomplishment_effect = { ACCOMPLISHMENT = family_accomplishment_dynasty }
# }
# }
# # left them in enum since we can not avoid touch here with encapsulated macro
# else_if = {
# limit = {
# OR = {
# scope:title = title:e_minister_chancellor
# scope:title = title:e_minister_censor
# scope:title = title:e_minister_grand_marshal
# scope:title = title:e_minister_of_personnel
# scope:title = title:e_minister_of_revenue
# scope:title = title:e_minister_of_rites
# scope:title = title:e_minister_of_war
# scope:title = title:e_minister_of_justice
# scope:title = title:e_minister_of_works
# }
# }
# # set up the council holder as dejure liege of the ministry title, as this effect is not called with the same scope as council onactions
# scope:title.de_jure_liege.holder = {
# save_scope_as = councillor_liege
# }
# # If we get a minister title, make sure we set things up correctly
# switch = {
# trigger = scope:title
# title:e_minister_chancellor = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor }
# }
# title:e_minister_censor = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster }
# }
# title:e_minister_grand_marshal = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal }
# }
# title:e_minister_of_personnel = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel }
# }
# title:e_minister_of_revenue = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward }
# }
# title:e_minister_of_rites = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_of_rites MINISTER_POSITION = councillor_court_chaplain }
# }
# title:e_minister_of_war = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_of_war MINISTER_POSITION = councillor_marshal }
# }
# title:e_minister_of_justice = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_of_justice MINISTER_POSITION = minister_justice }
# }
# title:e_minister_of_works = {
# got_minister_position_effect = { MINISTER_TITLE = e_minister_of_works MINISTER_POSITION = minister_works }
# }
# }
# }
# # TGP JAPAN
# else_if = {
# limit = { scope:title = title:e_japan }
# # TGP RETIRED EMPEROR
# if = {
# limit = {
# exists = title:e_japan.var:administrative_ui_special_title
# has_title = title:e_japan.var:administrative_ui_special_title
# }
# # Flavourization setup
# title:e_japan = { remove_variable = shogun_flag }
# remove_character_flag = shogun_flag
# if = { # Flavourization setup
# limit = { has_global_variable = tenno_restored }
# title:e_japan = { set_variable = ceremonial_liege_flag }
# add_character_flag = ceremonial_liege_flag
# trigger_event = {
# id = tgp_japan_general.9100
# days = 1
# }
# }
# else = { # Event to abdicate and become Joko
# trigger_event = {
# id = tgp_japan_general.9120
# days = 1
# }
# }
# }
# # TGP SHOGUN
# else_if = {
# limit = {
# has_government = japan_feudal_government
# has_global_variable = shogunate_established
# }
# title:e_japan = { remove_variable = ceremonial_liege_flag }
# remove_character_flag = ceremonial_liege_flag
# title:e_japan = { set_variable = shogun_flag }
# add_character_flag = shogun_flag
# }
# # TGP KAMPAKU
# else = {
# title:e_japan = { remove_variable = ceremonial_liege_flag }
# remove_character_flag = ceremonial_liege_flag
# title:e_japan = { remove_variable = shogun_flag }
# remove_character_flag = shogun_flag
# }
# # Japanese regent laws
# if = {
# limit = {
# tgp_realm_has_ceremonial_liege_trigger = yes
# government_is_japanese_trigger = yes
# NOR = {
# has_global_variable = shogunate_established
# has_global_variable = tenno_restored
# }
# }
# if = {
# limit = {
# government_has_flag = government_is_japan_administrative
# NOT = { has_realm_law = japanese_regency_succession_law }
# }
# add_realm_law_skip_effects = japanese_regency_succession_law
# }
# else_if = {
# limit = {
# government_has_flag = government_is_japan_feudal
# has_realm_law = japanese_regency_succession_law
# }
# remove_realm_law = japanese_regency_succession_law
# }
# }
# }
# # ROME
# else_if = {
# limit = {
# OR = {
# scope:title = title:h_roman_empire
# scope:title = title:h_eastern_roman_empire
# }
# NOT = { has_trait = augustus }
# }
# trigger_event = roman_restoration.0005
# }
#Mongol empire and GoK should lose other empires
# You just inherited an Emperor title!!
if = {
@ -4782,65 +4782,65 @@ on_vassal_change = {
}
### If a minister becomes independent we destroy the ministry title
if = {
limit = {
# independent title
OR = {
liege ?= { tgp_has_access_to_ministry_trigger = no }
this = top_liege
}
# has a ministry title that is not being swapped
tgp_has_minister_title = yes
}
every_held_title = {
limit = {
tgp_is_minister_title = yes
}
root = { destroy_title = prev }
}
}
# if = {
# limit = {
# # independent title
# OR = {
# liege ?= { tgp_has_access_to_ministry_trigger = no }
# this = top_liege
# }
#
# # has a ministry title that is not being swapped
# tgp_has_minister_title = yes
# }
# every_held_title = {
# limit = {
# tgp_is_minister_title = yes
# }
# root = { destroy_title = prev }
# }
# }
# Make sure independent rulers and their vassals leave movements if they are part of the Dynastic Cycle
if = {
limit = {
exists = top_participant_group:dynastic_cycle
NOT = {
has_title = title:h_china
}
OR = {
liege = root
liege.top_participant_group:dynastic_cycle ?= {
participant_group_type = other_rulers
}
}
}
remove_variable = movement_member
every_vassal_or_below = {
remove_variable = movement_member
}
recalculate_participant_group = situation:dynastic_cycle
}
# if = {
# limit = {
# exists = top_participant_group:dynastic_cycle
# NOT = {
# has_title = title:h_china
# }
# OR = {
# liege = root
# liege.top_participant_group:dynastic_cycle ?= {
# participant_group_type = other_rulers
# }
# }
# }
# remove_variable = movement_member
# every_vassal_or_below = {
# remove_variable = movement_member
# }
# recalculate_participant_group = situation:dynastic_cycle
# }
# Additional Flavor Title
additional_flavor_check_effect = yes
if = {
limit = {
# We have become independent!
scope:old_liege != root
liege = root
tgp_use_chinese_naming_trigger = yes
tgp_chinese_naming_tier_trigger = yes
primary_title = {
has_custom_title_name = no # sanity check
}
OR = {
tgp_has_unique_chinese_naming = yes
primary_title = title:h_china # failsafe, in case this somehow ends up here
}
}
tgp_fire_china_realm_name_event_effect = yes
}
# if = {
# limit = {
# # We have become independent!
# scope:old_liege != root
# liege = root
# tgp_use_chinese_naming_trigger = yes
# tgp_chinese_naming_tier_trigger = yes
# primary_title = {
# has_custom_title_name = no # sanity check
# }
# OR = {
# tgp_has_unique_chinese_naming = yes
# primary_title = title:h_china # failsafe, in case this somehow ends up here
# }
# }
# tgp_fire_china_realm_name_event_effect = yes
# }
if = {
limit = {
scope:old_liege = root

File diff suppressed because it is too large Load diff