Symphonia replacement stuff

This commit is contained in:
Greekman 2026-11-06 01:10:28 +00:00
parent 34c3bf3827
commit f562901553
5 changed files with 356 additions and 33 deletions

View file

@ -11059,7 +11059,13 @@ split_ecclesiastical_title_interaction = {
random_held_title = {
limit = {
has_clerical_region = yes
is_head_of_faith = no
OR = {
is_head_of_faith = no
AND = {
is_head_of_faith = yes
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
}
}
}
random_county_in_clerical_region = {
limit = {
@ -11116,7 +11122,13 @@ split_ecclesiastical_title_interaction = {
every_held_title = {
limit = {
has_clerical_region = yes
is_head_of_faith = no
OR = {
is_head_of_faith = no
AND = {
is_head_of_faith = yes
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
}
}
}
every_county_in_clerical_region = {
holder = {
@ -11209,7 +11221,10 @@ split_ecclesiastical_title_interaction = {
# Clerical region supporting HoF
is_available = {
is_ai = no
pam_is_clerical_title_authority_trigger = yes # HoF, or the Head of Rites when the faith has no HoF
OR = {
pam_is_clerical_title_authority_trigger = yes # HoF, or the Head of Rites when the faith has no HoF
pam_symphonia_secular_emperor_investiture_trigger = yes
}
faith ?= { has_doctrine_parameter = has_clerical_regions }
has_pam_dlc_trigger = yes
is_adult = yes
@ -11227,10 +11242,13 @@ split_ecclesiastical_title_interaction = {
pam_government_is_religious_playable_trigger = yes
any_held_title = {
has_clerical_region = yes
# The HoF may split their own see; other rulers' head-of-faith titles stay protected
# The HoF may split their own see, and a Symphonia emperor may split one within their realm.
trigger_if = {
limit = { scope:recipient != scope:actor }
is_head_of_faith = no
OR = {
is_head_of_faith = no
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
}
}
any_county_in_clerical_region = {
OR = {
@ -11258,17 +11276,29 @@ split_ecclesiastical_title_interaction = {
scope:recipient = {
is_imprisoned = no
is_adult = yes
pam_actor_is_clerical_title_authority_of_this_trigger = yes
OR = {
pam_actor_is_clerical_title_authority_of_this_trigger = yes
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
any_held_title = {
has_clerical_region = yes
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
}
}
}
custom_tooltip = {
text = split_ecclesiastical_title_no_eligible_secular_ruler_tt
scope:recipient = {
any_held_title = {
has_clerical_region = yes
# Mirror is_shown: the HoF may split their own see, other rulers' head-of-faith titles stay protected
# Match is_shown: allow a Symphonia emperor to split a Head-of-Faith see.
trigger_if = {
limit = { scope:recipient != scope:actor }
is_head_of_faith = no
OR = {
is_head_of_faith = no
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
}
}
any_county_in_clerical_region = {
OR = {
@ -11366,7 +11396,10 @@ merge_new_ecclesiastical_title_interaction = {
# Clerical region supporting HoF
is_available = {
is_ai = no
pam_is_clerical_title_authority_trigger = yes # HoF, or the Head of Rites when the faith has no HoF
OR = {
pam_is_clerical_title_authority_trigger = yes # HoF, or the Head of Rites when the faith has no HoF
pam_symphonia_secular_emperor_investiture_trigger = yes
}
faith ?= { has_doctrine_parameter = has_clerical_regions }
has_pam_dlc_trigger = yes
is_adult = yes
@ -11382,9 +11415,21 @@ merge_new_ecclesiastical_title_interaction = {
pam_government_is_religious_playable_trigger = yes
any_held_title = {
has_clerical_region = yes
is_head_of_faith = no
OR = {
is_head_of_faith = no
AND = {
is_head_of_faith = yes
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
}
}
}
OR = {
pam_actor_is_clerical_title_authority_of_this_trigger = yes
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_imperial_merge_acting_region_trigger = { ARCHBISHOP = this }
}
}
pam_actor_is_clerical_title_authority_of_this_trigger = yes
}
}
@ -11401,16 +11446,39 @@ merge_new_ecclesiastical_title_interaction = {
text = merge_new_ecclesiastical_title_cooldown_trigger
NOT = { exists = capital_province.county.clerical_region_title.var:merge_clerical_region_cooldown }
}
# Must be the recipient's own region, because a landed archbishop's capital can sit in another region
pam_acting_clerical_region_trigger = { ARCHBISHOP = this }
capital_province.county.clerical_region_title ?= {
pam_has_adjacent_mergeable_clerical_region_trigger = yes
# For a Symphonia emperor both regions must touch imperial territory.
# Church authorities retain their original merge permission and checks.
OR = {
AND = {
scope:actor = { pam_is_clerical_title_authority_trigger = yes }
pam_acting_clerical_region_trigger = { ARCHBISHOP = this }
capital_province.county.clerical_region_title ?= {
pam_has_adjacent_mergeable_clerical_region_trigger = yes
}
}
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_imperial_merge_acting_region_trigger = { ARCHBISHOP = this }
capital_province.county.clerical_region_title ?= {
pam_symphonia_imperial_has_adjacent_mergeable_clerical_region_trigger = yes
}
}
}
}
}
can_be_picked_title = {
pam_acting_clerical_region_trigger = { ARCHBISHOP = scope:recipient }
OR = {
AND = {
scope:actor = { pam_is_clerical_title_authority_trigger = yes }
pam_acting_clerical_region_trigger = { ARCHBISHOP = scope:recipient }
}
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_imperial_merge_acting_region_trigger = { ARCHBISHOP = scope:recipient }
scope:target = { pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor } }
}
}
pam_potential_merge_clerical_region_title_trigger = {
TITLE = scope:target
ABSORBING_TITLE = scope:recipient.capital_province.county.clerical_region_title
@ -11419,7 +11487,17 @@ merge_new_ecclesiastical_title_interaction = {
# can_be_picked_title is picker-only and is not rechecked on send
has_valid_target_showing_failures_only = {
pam_acting_clerical_region_trigger = { ARCHBISHOP = scope:recipient }
OR = {
AND = {
scope:actor = { pam_is_clerical_title_authority_trigger = yes }
pam_acting_clerical_region_trigger = { ARCHBISHOP = scope:recipient }
}
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_imperial_merge_acting_region_trigger = { ARCHBISHOP = scope:recipient }
scope:target = { pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor } }
}
}
pam_potential_merge_clerical_region_title_trigger = {
TITLE = scope:target
ABSORBING_TITLE = scope:recipient.capital_province.county.clerical_region_title
@ -11536,10 +11614,12 @@ replace_ecclesiastical_title_holder_interaction = {
}
}
# Church authority (HoF / Head of Rites), or a liege the faith's Clerical Appointment doctrine empowers
# Church authority, an empowered lay liege, or a secular emperor whose rite has Symphonia
is_available = {
faith ?= { has_doctrine_parameter = has_clerical_regions }
OR = {
# Symphonia grants imperial secular rulers a separate right of investiture.
pam_symphonia_secular_emperor_investiture_trigger = yes
# A secular liege when the doctrine grants rulers the right (Temporal/Revocable, Conditional)
AND = {
faith ?= { has_doctrine_parameter = clerical_appointment_ruler_can_replace_ecc }
@ -11569,7 +11649,7 @@ replace_ecclesiastical_title_holder_interaction = {
cooldown = { years = 10 }
# Same-faith AI archbishops; the HoF's own see stays protected
# Same-faith AI archbishops, including heads of faith under imperial Symphonia
is_shown = {
scope:recipient = {
is_ai = yes
@ -11579,14 +11659,30 @@ replace_ecclesiastical_title_holder_interaction = {
pam_government_is_religious_playable_trigger = yes
any_held_title = {
has_clerical_region = yes
is_head_of_faith = no
OR = {
is_head_of_faith = no
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
}
}
# A liege acting on the doctrine right (not the HoF / Head of Rites) may only depose their own vassals
# Secular rulers normally may depose only vassals. Symphonia emperors may also depose
# a region's independent bishop if the region extends into their own realm.
trigger_if = {
limit = {
pam_actor_is_clerical_title_authority_of_this_trigger = no
}
is_vassal_or_below_of = scope:actor
OR = {
is_vassal_or_below_of = scope:actor
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
any_held_title = {
has_clerical_region = yes
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
}
}
}
}
}
@ -11665,7 +11761,26 @@ replace_ecclesiastical_title_holder_interaction = {
scope:target = {
holder = scope:recipient
has_clerical_region = yes
is_head_of_faith = no
# Normally HoF sees are protected. Symphonia allows a secular emperor to fill them,
# but only where the ecclesiastical region reaches the emperor's own realm.
OR = {
is_head_of_faith = no
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
}
# When relying on Symphonia rather than a separate secular-appointment doctrine,
# only sees covering land in the emperor's own realm qualify.
trigger_if = {
limit = {
scope:actor = {
pam_symphonia_secular_emperor_investiture_trigger = yes
faith ?= { NOT = { has_doctrine_parameter = clerical_appointment_ruler_can_replace_ecc } }
}
}
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
}
}
@ -11689,11 +11804,16 @@ replace_ecclesiastical_title_holder_interaction = {
on_accept = {
scope:secondary_recipient = { save_scope_as = pam_new_archbishop }
scope:recipient = { save_scope_as = pam_old_archbishop }
NEOW_symphonia_prepare_head_of_faith_investiture_effect = yes
pam_grant_ecclesiastical_title_interaction_effect = yes
NEOW_symphonia_finish_head_of_faith_investiture_effect = yes
# Meddling by a liege (not the HoF / Head of Rites) angers the wider clergy
if = {
limit = {
scope:actor = { pam_is_clerical_title_authority_trigger = no }
scope:actor = {
pam_is_clerical_title_authority_trigger = no
pam_symphonia_secular_emperor_investiture_trigger = no
}
}
scope:actor = {
add_character_modifier = {
@ -11757,6 +11877,17 @@ replace_ecclesiastical_title_holder_interaction = {
}
}
}
# A secular emperor with Symphonia may replace disloyal bishops in the imperial realm.
modifier = {
add = 30
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
scope:recipient = {
opinion = {
target = scope:actor
value <= -20
}
}
}
# The Head of Faith removes disloyal bishops (Spiritual/Revocable, Conditional)
modifier = {
add = 40
@ -11791,11 +11922,14 @@ grant_ecclesiastical_title_interaction = {
target_filter = clerical_region
show_all_targets = no
# Clerical region supporting HoF
# Heads of Faith/Rites appoint freely; secular Symphonia emperors appoint to sees in their own realm.
is_available = {
faith ?= { has_doctrine_parameter = has_clerical_regions }
is_adult = yes
pam_is_clerical_title_authority_trigger = yes # HoF, or the Head of Rites when the faith has no HoF
OR = {
pam_is_clerical_title_authority_trigger = yes
pam_symphonia_secular_emperor_investiture_trigger = yes
}
has_pam_dlc_trigger = yes
}
@ -11856,9 +11990,24 @@ grant_ecclesiastical_title_interaction = {
can_be_picked_title = {
scope:target = {
has_clerical_region = yes
is_head_of_faith = no
# A sitting Head of Faith's clerical regions must be transferred by replacement,
# even if the region title is distinct from the Head-of-Faith title itself.
NOT = { pam_clerical_title_held_by_own_hof_trigger = yes }
OR = {
is_head_of_faith = no
AND = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
}
# An absorbed region lingers as an empty shell, and granting one mints a landless archbishop
clerical_region_size > 0
trigger_if = {
limit = {
scope:actor = { pam_is_clerical_title_authority_trigger = no }
}
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
}
trigger_if = {
limit = { exists = holder }
holder = {
@ -11889,6 +12038,17 @@ grant_ecclesiastical_title_interaction = {
text = grant_ecclesiastical_title_empty_region_tt
scope:target ?= { clerical_region_size > 0 }
}
custom_tooltip = {
text = neow_clerical_grant_hof_must_replace_tt
scope:target ?= { NOT = { pam_clerical_title_held_by_own_hof_trigger = yes } }
}
trigger_if = {
limit = { scope:actor = { pam_is_clerical_title_authority_trigger = no } }
custom_tooltip = {
text = neow_symphonia_imperial_region_in_realm_tt
scope:target ?= { pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor } }
}
}
custom_tooltip = {
text = grant_ecclesiastical_title_antipope_obedience_tt
pam_antipope_may_grant_clerical_region_trigger = { SEE = scope:target }
@ -11922,12 +12082,21 @@ grant_ecclesiastical_title_interaction = {
}
on_accept = {
scope:recipient = { save_scope_as = pam_new_archbishop }
# Re-check at execution time: title ownership may have changed since picking it.
# This guard is grant-only, so the separate HoF replacement is unaffected.
if = {
limit = { exists = scope:target.holder }
scope:target.holder = { save_scope_as = pam_old_archbishop }
limit = {
scope:target = { NOT = { pam_clerical_title_held_by_own_hof_trigger = yes } }
}
scope:recipient = { save_scope_as = pam_new_archbishop }
if = {
limit = { exists = scope:target.holder }
scope:target.holder = { save_scope_as = pam_old_archbishop }
}
NEOW_symphonia_prepare_head_of_faith_investiture_effect = yes
pam_grant_ecclesiastical_title_interaction_effect = yes
NEOW_symphonia_finish_head_of_faith_investiture_effect = yes
}
pam_grant_ecclesiastical_title_interaction_effect = yes
}
on_decline = {