on actions updated files
This commit is contained in:
parent
707660e545
commit
6fe43fad95
13 changed files with 3892 additions and 965 deletions
|
|
@ -21,6 +21,10 @@
|
|||
# flag:faction_demand
|
||||
# flag:swear_fealty
|
||||
# flag:stepped_down
|
||||
# flag:appointment
|
||||
# flag:appointment_succession
|
||||
# flag:migration
|
||||
# flag:confederation
|
||||
|
||||
# A title is destroyed
|
||||
# root = the holder before destruction
|
||||
|
|
@ -28,10 +32,13 @@
|
|||
# Does *not* provide scope:transfer_type
|
||||
on_title_destroyed = {
|
||||
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 = {
|
||||
limit = {
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
top_liege = this
|
||||
administrative_counts_can_be_independent = no
|
||||
NOT = {
|
||||
|
|
@ -58,6 +65,20 @@ on_title_destroyed = {
|
|||
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
|
||||
# else_if = {
|
||||
# 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 = {
|
||||
limit = {
|
||||
government_has_flag = government_is_urepublic
|
||||
|
|
@ -476,8 +507,33 @@ on_title_gain = {
|
|||
}
|
||||
title_domicile = {
|
||||
add_domicile_building = yurt_main_02
|
||||
add_domicile_building = yurt_main_03
|
||||
add_domicile_building = yurt_main_04
|
||||
if = {
|
||||
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
|
||||
|
|
@ -494,8 +550,33 @@ on_title_gain = {
|
|||
}
|
||||
title_domicile = {
|
||||
add_domicile_building = yurt_main_02
|
||||
add_domicile_building = yurt_main_03
|
||||
add_domicile_building = yurt_main_04
|
||||
if = {
|
||||
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
|
||||
|
|
@ -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
|
||||
###########
|
||||
|
|
@ -839,9 +939,10 @@ on_title_gain = {
|
|||
if = {
|
||||
limit = {
|
||||
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 = {
|
||||
scope:title = { is_holy_order = yes }
|
||||
NOT = { has_trait = order_member }
|
||||
government_has_flag = government_is_holy_order
|
||||
government_has_flag = government_is_military_holy_order
|
||||
}
|
||||
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)
|
||||
if = {
|
||||
|
|
@ -1316,7 +1436,7 @@ on_title_gain = {
|
|||
# Not for meritocratic
|
||||
NOT = { government_has_flag = government_has_merit }
|
||||
# Admin only
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
has_ep3_dlc_trigger = yes
|
||||
# Independent rulers only
|
||||
this = top_liege
|
||||
|
|
@ -2048,7 +2168,7 @@ on_title_gain = {
|
|||
}
|
||||
if = {
|
||||
limit = {
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
NOT = { has_variable = laamp_invasion_flag }
|
||||
}
|
||||
# EP3 - apply unique domicile building bonus if appropriate
|
||||
|
|
@ -2109,7 +2229,6 @@ on_title_gain = {
|
|||
top_liege = this
|
||||
highest_held_title_tier >= tier_kingdom
|
||||
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
|
||||
current_date_is_start_date_trigger = no
|
||||
}
|
||||
|
|
@ -2188,10 +2307,11 @@ on_title_gain = {
|
|||
primary_title.tier <= scope:title.tier
|
||||
NOT = { has_character_flag = admin_title_gain_notification_sent }
|
||||
exists = house
|
||||
NOT = { exists = scope:title.var:ceremonial_title }
|
||||
any_player = {
|
||||
house ?= root.house
|
||||
top_liege = root.top_liege
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
this != root
|
||||
}
|
||||
}
|
||||
|
|
@ -2204,7 +2324,7 @@ on_title_gain = {
|
|||
limit = {
|
||||
house ?= root.house
|
||||
top_liege = root.top_liege
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
this != scope:title_gainer
|
||||
# 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
|
||||
if = {
|
||||
limit = {
|
||||
OR = {
|
||||
has_variable = merit_civilian_career_score_bonus
|
||||
has_variable = merit_military_career_score_bonus
|
||||
has_variable = {
|
||||
name = merit_civilian_career_score_bonus
|
||||
name = merit_military_career_score_bonus
|
||||
}
|
||||
is_landed = yes
|
||||
scope:title.tier >= primary_title.tier
|
||||
|
|
@ -2406,7 +2526,7 @@ on_title_gain = {
|
|||
var:homage_liege_scope ?= scope:previous_holder
|
||||
NOT = { has_character_flag = currently_invalidating_petition_liege_travel }
|
||||
}
|
||||
current_travel_plan = {
|
||||
current_travel_plan = {
|
||||
if = {
|
||||
limit = { can_cancel = yes }
|
||||
cancel_travel_plan = yes
|
||||
|
|
@ -2429,7 +2549,7 @@ on_title_gain = {
|
|||
var:pledge_loyalty_to_liege_scope ?= scope:previous_holder
|
||||
NOT = { has_character_flag = currently_invalidating_petition_liege_travel }
|
||||
}
|
||||
current_travel_plan = {
|
||||
current_travel_plan = {
|
||||
if = {
|
||||
limit = { can_cancel = 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
|
||||
}
|
||||
}
|
||||
|
|
@ -2534,7 +2654,7 @@ on_title_gain = {
|
|||
is_ruler = no
|
||||
highest_held_title_tier <= scope:title.tier
|
||||
government_has_flag = government_is_landless_adventurer
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
}
|
||||
}
|
||||
if = {
|
||||
|
|
@ -2614,6 +2734,57 @@ on_title_gain = {
|
|||
}
|
||||
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
|
||||
if = {
|
||||
limit = {
|
||||
|
|
@ -2784,7 +2955,6 @@ on_title_gain = {
|
|||
is_independent_ruler = yes
|
||||
government_has_flag = government_is_celestial
|
||||
scope:title ?= {
|
||||
tier >= tier_kingdom
|
||||
has_custom_title_name = yes
|
||||
this != root.primary_title
|
||||
}
|
||||
|
|
@ -2793,6 +2963,180 @@ on_title_gain = {
|
|||
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 = {
|
||||
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.
|
||||
diarchy.0011
|
||||
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.
|
||||
scope:title = {
|
||||
tier = tier_county
|
||||
exists = title_province
|
||||
title_province = {
|
||||
OR = {
|
||||
geographical_region = world_europe
|
||||
|
|
@ -3283,7 +3629,7 @@ on_title_lost = {
|
|||
|
||||
custom_tooltip = msg_rival_dethroned_desc
|
||||
|
||||
stress_impact = {
|
||||
stress_and_fulfillment_impact = {
|
||||
base = medium_stress_loss
|
||||
vengeful = medium_stress_loss
|
||||
}
|
||||
|
|
@ -3561,9 +3907,9 @@ on_title_lost = {
|
|||
additional_flavor_check_effect = yes
|
||||
|
||||
if = {
|
||||
limit = {
|
||||
limit = {
|
||||
OR = {
|
||||
scope:title = title:h_roman_empire
|
||||
scope:title = title:h_roman_empire
|
||||
scope:title = title:h_eastern_roman_empire
|
||||
}
|
||||
}
|
||||
|
|
@ -3573,6 +3919,7 @@ on_title_lost = {
|
|||
if = {
|
||||
limit = {
|
||||
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
|
||||
limit = {
|
||||
is_landed = yes
|
||||
|
|
@ -3581,7 +3928,7 @@ on_title_lost = {
|
|||
}
|
||||
is_alive = yes
|
||||
NOT = { has_character_flag = admin_title_loss_notification_sent }
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
house ?= {
|
||||
any_house_member = {
|
||||
is_ai = no
|
||||
|
|
@ -3589,7 +3936,7 @@ on_title_lost = {
|
|||
limit = { exists = root.top_liege }
|
||||
top_liege = root.top_liege
|
||||
}
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
this != root
|
||||
}
|
||||
}
|
||||
|
|
@ -3607,7 +3954,7 @@ on_title_lost = {
|
|||
limit = { exists = root.top_liege }
|
||||
top_liege = root.top_liege
|
||||
}
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
this != scope:title_loser
|
||||
}
|
||||
send_interface_message = {
|
||||
|
|
@ -3732,9 +4079,7 @@ on_title_lost = {
|
|||
limit = {
|
||||
exists = root.player_heir
|
||||
exists = root.dynasty
|
||||
player_heir = {
|
||||
dynasty ?= story_owner.dynasty
|
||||
}
|
||||
player_heir.dynasty ?= root.dynasty
|
||||
}
|
||||
player_heir ?= {
|
||||
trigger_event = {
|
||||
|
|
@ -3934,6 +4279,22 @@ on_title_lost = {
|
|||
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
|
||||
if = {
|
||||
limit = {
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
NOT = { has_variable = laamp_invasion_flag }
|
||||
top_liege = this
|
||||
trigger_if = {
|
||||
|
|
@ -4102,15 +4463,15 @@ on_rank_up = { # Will not fire during history execution or for dying characters
|
|||
is_ai = no
|
||||
primary_title.tier >= tier_kingdom
|
||||
has_realm_law = uncrowned
|
||||
NOR = {
|
||||
has_variable = crowned_king_var
|
||||
has_variable = crowned_emperor_var
|
||||
has_none_of_variables = {
|
||||
name = crowned_king_var
|
||||
name = crowned_emperor_var
|
||||
}
|
||||
NOR = {
|
||||
has_character_flag = had_coronation_reminder
|
||||
any_sponsored_inspiration = { has_inspiration_type = smith_inspiration }
|
||||
}
|
||||
is_available_adult = yes
|
||||
is_available_adult = yes
|
||||
}
|
||||
trigger_event = {
|
||||
id = ach_yearly_events.1005
|
||||
|
|
@ -4163,7 +4524,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
|
|||
limit = {
|
||||
is_ai = no
|
||||
is_landed = yes
|
||||
highest_held_title_tier = tier_empire
|
||||
highest_held_title_tier >= tier_empire
|
||||
}
|
||||
add_achievement_global_variable_effect = {
|
||||
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 = {
|
||||
is_ai = no
|
||||
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
|
||||
}
|
||||
add_achievement_global_variable_effect = {
|
||||
|
|
@ -4217,7 +4578,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
|
|||
if = {
|
||||
limit = {
|
||||
is_independent_ruler = yes
|
||||
government_allows = administrative
|
||||
government_has_mechanic = administrative
|
||||
scope:title ?= {
|
||||
any_title_maa_regiment = {
|
||||
count >= 1
|
||||
|
|
@ -4234,7 +4595,6 @@ on_rank_up = { # Will not fire during history execution or for dying characters
|
|||
is_independent_ruler = yes
|
||||
government_has_flag = government_is_celestial
|
||||
scope:title ?= {
|
||||
tier >= tier_kingdom
|
||||
has_custom_title_name = yes
|
||||
}
|
||||
primary_title = {
|
||||
|
|
@ -4256,7 +4616,7 @@ on_rank_up = { # Will not fire during history execution or for dying characters
|
|||
type = conquest_populist
|
||||
days = 1
|
||||
}
|
||||
previous_holder = {
|
||||
previous_holder ?= {
|
||||
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 ?= {
|
||||
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 = {
|
||||
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
|
||||
}
|
||||
|
||||
# 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_check_effect = yes
|
||||
|
||||
|
||||
# ACH - Remove variables if they are going below certain ranks
|
||||
coronation_reset_realm_law_variable_effect = yes
|
||||
|
||||
|
||||
# ACH - if you are below king tier, remove all oaths
|
||||
if = {
|
||||
limit = {
|
||||
|
|
@ -4412,7 +4778,7 @@ on_rank_down = { # Will not fire during history execution or for dying character
|
|||
}
|
||||
|
||||
if = {
|
||||
limit = {
|
||||
limit = {
|
||||
exists = scope:new_wedding_host
|
||||
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
|
||||
on_vassal_change = {
|
||||
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 = {
|
||||
limit = {
|
||||
government_allows = administrative
|
||||
government_allows = noble_families
|
||||
is_house_head = yes
|
||||
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
|
||||
|
|
@ -4563,7 +4931,7 @@ on_vassal_change = {
|
|||
trigger_else = { highest_held_title_tier >= tier_duchy }
|
||||
liege = {
|
||||
top_liege = this
|
||||
government_allows = administrative
|
||||
government_allows = noble_families
|
||||
}
|
||||
NOR = {
|
||||
any_held_title = { is_noble_family_title = yes }
|
||||
|
|
@ -4580,10 +4948,10 @@ on_vassal_change = {
|
|||
### If an admin ruler becomes independent...
|
||||
if = {
|
||||
limit = {
|
||||
government_has_flag = government_is_administrative
|
||||
government_has_mechanic = administrative
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
limit = {
|
||||
liege = root # I.e. root is independent
|
||||
}
|
||||
# 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
|
||||
else_if = {
|
||||
limit = {
|
||||
government_allows = noble_families
|
||||
NOT = {
|
||||
any_held_title = {
|
||||
is_noble_family_title = yes
|
||||
}
|
||||
exists = house.noble_family
|
||||
}
|
||||
}
|
||||
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
|
||||
else_if = {
|
||||
limit = {
|
||||
government_has_flag = government_is_administrative
|
||||
liege != top_liege
|
||||
primary_title = {
|
||||
is_noble_family_title = yes
|
||||
|
|
@ -4626,6 +4994,43 @@ on_vassal_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.
|
||||
if = {
|
||||
limit = {
|
||||
|
|
@ -4645,7 +5050,7 @@ on_vassal_change = {
|
|||
}
|
||||
vassal_contract_set_obligation_level = { type = celestial_provinces level = 3 }
|
||||
}
|
||||
|
||||
|
||||
### If a minister becomes independent we destroy the ministry title
|
||||
# if = {
|
||||
# limit = {
|
||||
|
|
@ -4718,7 +5123,7 @@ on_vassal_change = {
|
|||
reset_title_name = yes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Destroy ceremonial titles of vassalized realms
|
||||
if = {
|
||||
limit = {
|
||||
|
|
@ -4738,7 +5143,7 @@ on_vassal_change = {
|
|||
remove_trait = former_emperor
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Bloc
|
||||
if = {
|
||||
# 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,
|
||||
# move when granted a better title, becoming landed for the first time
|
||||
# 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
|
||||
on_realm_capital_change = {
|
||||
effect = {
|
||||
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?
|
||||
if = {
|
||||
limit = { has_diarchy_parameter = diarchy_is_vizierate }
|
||||
|
|
@ -4912,13 +5324,10 @@ on_realm_capital_change = {
|
|||
|
||||
# Move ministers to realm capital.
|
||||
if = {
|
||||
limit = {
|
||||
tgp_has_access_to_ministry_trigger = yes
|
||||
}
|
||||
limit = { tgp_has_access_to_ministry_trigger = yes }
|
||||
capital_province = { save_scope_as = capital_province }
|
||||
every_vassal = {
|
||||
limit = {
|
||||
tgp_has_minister_title = yes
|
||||
}
|
||||
limit = { tgp_has_minister_title = yes }
|
||||
every_held_title = {
|
||||
limit = {
|
||||
OR = {
|
||||
|
|
@ -4926,13 +5335,10 @@ on_realm_capital_change = {
|
|||
tgp_is_minister_title = yes
|
||||
}
|
||||
}
|
||||
set_capital_county = ROOT.county
|
||||
set_capital_county = scope:capital_province.county
|
||||
}
|
||||
if = {
|
||||
limit = { is_ai = yes }
|
||||
domicile ?= {
|
||||
move_domicile = ROOT.title_province
|
||||
}
|
||||
domicile ?= {
|
||||
move_domicile = scope:capital_province
|
||||
}
|
||||
# don't move them in such cases
|
||||
if = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue