N3OW/common/scripted_effects/NEOW_religion_effects.txt

1376 lines
39 KiB
Text

NEOW_set_bhakti_effect = { #reminder: patron gods will not remove on conversion until a specific base game event is replaced/overwritten. This folder is being created, rather than overwriting a base game folder to reduce overall complexity/troubleshooting
# Remove any previous personal god relation.
## Britannic
# Leviathan
if = {
limit = { portrait_religious_faith_or_foundational_trigger = { FAITH = faith:leviathan } }
if = {
limit = {
has_character_modifier = bhakti_leviathan_nationalisators
}
remove_character_modifier = bhakti_leviathan_nationalisators
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_leviathan_technosaurs
}
remove_character_modifier = bhakti_leviathan_technosaurs
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_leviathan_mechasaurs
}
remove_character_modifier = bhakti_leviathan_mechasaurs
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_leviathan_petrosaurs
}
remove_character_modifier = bhakti_leviathan_petrosaurs
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_leviathan_metallurgicals
}
remove_character_modifier = bhakti_leviathan_metallurgicals
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_leviathan_nautiluses
}
remove_character_modifier = bhakti_leviathan_nautiluses
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_leviathan_aerosaurs
}
remove_character_modifier = bhakti_leviathan_aerosaurs
add_piety = massive_piety_loss
}
}
## Folketero
else_if = {
limit = {
OR = {
has_character_modifier = bhakti_folketero_jesus
has_character_modifier = bhakti_folketero_per
has_character_modifier = bhakti_folketero_lucia
has_character_modifier = bhakti_folketero_olaf
}
}
if = {
limit = {
has_character_modifier = bhakti_folketero_jesus
}
remove_character_modifier = bhakti_folketero_jesus
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_folketero_per
}
remove_character_modifier = bhakti_folketero_per
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_folketero_lucia
}
remove_character_modifier = bhakti_folketero_lucia
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_folketero_olaf
}
remove_character_modifier = bhakti_folketero_olaf
add_piety = massive_piety_loss
}
}
## Orthodox
else_if = {
limit = {
OR = {
has_character_modifier = bhakti_orthodox_paisos
has_character_modifier = bhakti_orthodox_gabriel
has_character_modifier = bhakti_orthodox_adriana
has_character_modifier = bhakti_orthodox_olga
has_character_modifier = bhakti_orthodox_palamas
has_character_modifier = bhakti_orthodox_surgeon
has_character_modifier = bhakti_orthodox_lazar
has_character_modifier = bhakti_orthodox_theotokos
}
}
if = {
limit = {
has_character_modifier = bhakti_orthodox_paisos
}
remove_character_modifier = bhakti_orthodox_paisos
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_gabriel
}
remove_character_modifier = bhakti_orthodox_gabriel
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_adriana
}
remove_character_modifier = bhakti_orthodox_adriana
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_olga
}
remove_character_modifier = bhakti_orthodox_olga
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_palamas
}
remove_character_modifier = bhakti_orthodox_palamas
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_surgeon
}
remove_character_modifier = bhakti_orthodox_surgeon
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_lazar
}
remove_character_modifier = bhakti_orthodox_lazar
add_piety = massive_piety_loss
}
else_if = {
limit = {
has_character_modifier = bhakti_orthodox_theotokos
}
remove_character_modifier = bhakti_orthodox_theotokos
add_piety = massive_piety_loss
}
}
else = {
# If no current bhakti, cost is reduced.
add_piety = medium_piety_loss
}
add_character_modifier = $BHAKTI$
}
# i dont know where else to put this
restore_patriarch_scripted_effect = {
root.faith = {
change_fervor = {
value = 50
desc = fervor_gain_ep_restored
}
}
hidden_effect = {
create_character = {
template = religious_leader_character
random_traits = no
save_scope_as = new_patriarch
}
scope:new_patriarch = {
add_trait = education_learning_3
add_trait = zealous
add_trait = intellect_good_1
add_trait = devoted
random_list = {
1 = { add_trait = humble }
1 = { add_trait = diligent }
1 = { add_trait = just }
1 = { add_trait = compassionate }
1 = { add_trait = stubborn }
}
}
province:496 = {
remove_building = hagia_sophia_02
add_special_building = hagia_sophia_01
}
title:k_orthodox = {
set_capital_county = title:c_byzantion
}
create_title_and_vassal_change = {
type = returned
save_scope_as = patriarch_change
add_claim_on_loss = no
}
title:k_orthodox = {
change_title_holder = {
holder = scope:new_patriarch
change = scope:patriarch_change
}
}
# The title carrying the Constantinople clerical region must have
# exactly the same holder as the new Ecumenical Patriarch.
title:d_et_constantinople = {
change_title_holder = {
holder = scope:new_patriarch
change = scope:patriarch_change
}
}
scope:new_patriarch = {
change_liege = {
liege = root
change = scope:patriarch_change
}
}
resolve_title_and_vassal_change = scope:patriarch_change
# Move the restored Ecumenical Patriarch's ecclesiastical domicile to
# b_constantinople (province 496), the capital barony of c_byzantion.
# Do this after the title change so it also works for a newly enthroned HoF.
scope:new_patriarch = {
domicile ?= {
move_domicile = province:496
}
}
# The Athonite Empire supersedes Constantinople as the Orthodox HoF,
# if it has already been proclaimed.
if = {
limit = { title:e_athos = { is_title_created = no } }
faith:orthodox = { set_religious_head_title = title:k_orthodox }
}
}
}
restore_r_patriarch_scripted_effect = {
root.faith = {
change_fervor = {
value = 100
desc = fervor_gain_mp_restored
}
}
hidden_effect = {
create_character = {
template = religious_leader_character
random_traits = no
save_scope_as = new_patriarch
}
scope:new_patriarch = {
add_trait = education_learning_3
add_trait = zealous
add_trait = intellect_good_1
random_list = {
1 = { add_trait = humble }
1 = { add_trait = diligent }
1 = { add_trait = just }
1 = { add_trait = compassionate }
1 = { add_trait = stubborn }
}
}
# The patriarchate and the Moscow clerical region are inseparable.
# The region itself is assigned to d_et_moscow in title history.
title:k_russian_orthodox = {
set_capital_county = title:c_moskva
}
create_title_and_vassal_change = {
type = returned
save_scope_as = patriarch_change
add_claim_on_loss = no
}
title:k_russian_orthodox = {
change_title_holder = {
holder = scope:new_patriarch
change = scope:patriarch_change
}
}
title:d_et_moscow = {
change_title_holder = {
holder = scope:new_patriarch
change = scope:patriarch_change
}
}
scope:new_patriarch = {
change_liege = {
liege = root
change = scope:patriarch_change
}
}
resolve_title_and_vassal_change = scope:patriarch_change
# Explicitly restore the Moscow Patriarch as religious head.
faith:russian_orthodox = {
set_religious_head_title = title:k_russian_orthodox
}
}
}
form_marblist_decision_effect = {
add_prestige = massive_prestige_gain
add_piety = massive_piety_gain
save_scope_as = scoped_ruler
create_title_and_vassal_change = {
type = created
save_scope_as = change
add_claim_on_loss = no
}
title:e_marblist = {
change_title_holder = {
holder = scope:scoped_ruler
change = scope:change
}
copy_title_history = title:e_NEOW_byzantium
}
scope:scoped_ruler = {
add_trait = augustus
add_trait = zealous
}
resolve_title_and_vassal_change = scope:change
hidden_effect = {
province:496 = {
remove_building = hagia_sophia_02
add_special_building = hagia_sophia_01
}
set_primary_title_to = title:e_marblist
title:k_thrace = { set_de_jure_liege_title = title:e_marblist }
title:k_macedonia = { set_de_jure_liege_title = title:e_marblist }
title:k_hellas= { set_de_jure_liege_title = title:e_marblist }
title:k_bulgaria = { set_de_jure_liege_title = title:e_marblist }
title:k_epirus = { set_de_jure_liege_title = title:e_marblist }
title:k_cyprus = { set_de_jure_liege_title = title:e_marblist }
title:k_krete = { set_de_jure_liege_title = title:e_marblist }
if = {
limit = {
exists = title:e_greece
}
destroy_title = title:e_greece
}
if = {
limit = {
exists = title:e_turkey
}
destroy_title = title:e_turkey
}
if = {
limit = {
title:k_k_nikaea = { is_titular = no }
OR = {
has_title = title:k_nikaea
completely_controls = title:k_nikaea
}
}
title:k_k_nikaea = { set_de_jure_liege_title = title:e_marblist }
}
if = {
limit = {
title:k_anatolia = { is_titular = no }
OR = {
has_title = title:k_anatolia
completely_controls = title:k_anatolia
}
}
title:k_anatolia = { set_de_jure_liege_title = title:e_marblist }
}
if = {
limit = {
title:k_pontus = { is_titular = no }
OR = {
has_title = title:k_pontus
completely_controls = title:k_pontus
}
}
title:k_pontus = { set_de_jure_liege_title = title:e_marblist }
}
if = {
limit = {
title:k_cilicia = { is_titular = no }
OR = {
has_title = title:k_cilicia
completely_controls = title:k_cilicia
}
}
title:k_cilicia = { set_de_jure_liege_title = title:e_marblist }
}
if = {
limit = {
title:k_armenitolia = { is_titular = no }
OR = {
has_title = title:k_armenitolia
completely_controls = title:k_armenitolia
}
}
title:k_armenitolia = { set_de_jure_liege_title = title:e_marblist }
}
if = {
limit = {
title:k_serbia = { is_titular = no }
OR = {
has_title = title:k_serbia
completely_controls = title:k_serbia
}
}
title:k_serbia = { set_de_jure_liege_title = title:e_marblist }
}
else_if = {
limit = {
title:k_montenegro = { is_titular = no }
OR = {
has_title = title:k_montenegro
completely_controls = title:k_montenegro
}
}
title:k_montenegro = { set_de_jure_liege_title = title:e_marblist }
}
}
}
create_head_of_faith_title_effect = {
# Pay costs
if = {
limit = {
faith = {
has_doctrine_parameter = temporal_head_of_faith
OR = {
has_doctrine = muhammad_succession_sunni_doctrine
has_doctrine = muhammad_succession_shia_doctrine
}
}
}
if = { # Very expensive for non-sayyid to become a Caliph.
limit = { NOT = { has_trait = sayyid } }
add_piety = massive_piety_loss
}
# Free otherwise
}
else_if = {
limit = { faith = { has_doctrine_parameter = temporal_head_of_faith } }
add_piety = major_piety_loss
}
else_if = {
limit = {
faith = {
NOT = {
#HO HoF already paid on the HO interface
has_doctrine_parameter = holy_order_head_of_faith
}
}
}
remove_short_term_gold = medium_gold_max_value
}
# (Re)create the HoF title
custom_description_no_bullet = {
text = create_temporal_head_of_faith
subject = root
object = scope:faith
# Temporal HoF
if = {
limit = { faith = { has_doctrine_parameter = temporal_head_of_faith } }
if = {
limit = {
faith = {
NOT = { exists = religious_head_title }
}
}
trigger_event = faith_creation.0001 # Creates new dynamic title
}
else = { trigger_event = faith_creation.0011 } # Re-uses existing title.
}
# Spiritual/Holy Order HoF
else_if = {
limit = {
faith = {
OR = {
has_doctrine_parameter = spiritual_head_of_faith
has_doctrine_parameter = holy_order_head_of_faith
}
}
}
if = {
limit = {
faith = {
NOT = { exists = religious_head_title }
}
}
trigger_event = faith_creation.0002 # Creates new dynamic title
}
else = { trigger_event = faith_creation.0012 } # Re-uses existing title
# if = {
# limit = {
# faith = {
# has_doctrine_parameter = holy_order_head_of_faith
# }
# }
# if = {
# limit = {
# #only create a HoF if none exists
# faith = {
# any_faith_holy_order = {
# count = 0
# exists = this
# }
# }
# }
# trigger_event = N3OW_holy_order.0003
# }
# else = {
# faith = {
# random_faith_holy_order = {
# save_scope_as = picked_holy_order
# }
# }
# faith.set_religious_head_title = scope:picked_holy_order.title
# }
# }
}
}
# Send an informative message to all players about the new HoF
hidden_effect = {
save_scope_as = reformer
faith = {
save_scope_as = faith
change_fervor = {
value = major_fervor_gain
desc = fervor_gain_recreated_hof
}
}
every_player = {
if = {
limit = { faith = scope:faith }
trigger_event = {
id = faith_creation.1010
days = 1
}
}
else = {
trigger_event = {
id = faith_creation.1011
days = 1
}
}
}
}
}
# Follow the great-schism resolution pattern: preserve the victorious Church,
# remove the rival head of faith, and make its rites subordinate to the reunion.
# Rulers of the former rival communion can accept or reject that settlement.
mend_orthodox_schism_scripted_effect = {
hidden_effect = {
save_scope_as = schism_mender
faith = {
save_scope_as = reunited_orthodox_faith
# Rename only the successful Church. This is applied to the actual
# winner (Orthodox or Russian Orthodox), leaving the loser untouched.
# The matching _adj, _adherent and _adherent_plural locs are below.
set_faith_name = {
name = neow_orthodox_catholic_church
desc = neow_orthodox_catholic_church_desc
adjective = neow_orthodox_catholic_church_adj
adherent = neow_orthodox_catholic_church_adherent
adherent_plural = neow_orthodox_catholic_church_adherent_plural
}
# As in the base-game schism, the prevailing faith becomes the
# accepted mainline rather than maintaining two rival mainlines.
if = {
limit = { has_doctrine = special_doctrine_true_orthodox }
remove_doctrine = special_doctrine_true_orthodox
}
if = {
limit = { NOT = { has_doctrine = special_doctrine_mainline_orthodox } }
add_doctrine = special_doctrine_mainline_orthodox
}
change_fervor = {
value = 25
desc = fervor_gain_orthodox_schism_mended
}
}
if = {
limit = { faith = faith:orthodox }
faith:russian_orthodox = {
every_holy_site = {
limit = { holy_site_county = title:c_moskva }
save_scope_as = neow_moscow_schism_site
faith:orthodox = {
if = {
limit = {
NOT = { is_faith_holy_site = scope:neow_moscow_schism_site }
}
add_holy_site = {
target = scope:neow_moscow_schism_site
actor = scope:schism_mender
}
}
}
}
}
}
# The losing branch remains recognisable, but no longer has a
# rival patriarch or an independent family of rites.
if = {
limit = { faith = faith:orthodox }
faith:russian_orthodox = { save_scope_as = schismatic_orthodox_faith }
}
else = {
faith:orthodox = { save_scope_as = schismatic_orthodox_faith }
}
scope:schismatic_orthodox_faith = {
remove_religious_head_title = yes
if = {
limit = { has_doctrine = special_doctrine_not_allowed_to_hof }
remove_doctrine = special_doctrine_not_allowed_to_hof
}
if = {
limit = { NOT = { has_doctrine = special_doctrine_pope_blessing } }
add_doctrine = special_doctrine_pope_blessing
}
change_fervor = {
value = -25
desc = fervor_loss_orthodox_schism_mended
}
# Base-game-style incorporation of the losing Church's rites.
every_faith_rite = {
limit = { faith != scope:reunited_orthodox_faith }
set_can_convert_to_rite = no
set_parent_faith = {
target = scope:reunited_orthodox_faith
main = no
include_derived = no
}
}
}
# Removing the losing faith's HoF association does not destroy the
# actual patriarchal title. Abolish only the defeated patriarchate;
# leave its clerical-region titles and the winner's HoF intact.
if = {
limit = {
faith = faith:orthodox
title:k_russian_orthodox = { is_title_created = yes }
}
destroy_title = title:k_russian_orthodox
}
else_if = {
limit = {
faith = faith:russian_orthodox
title:k_orthodox = { is_title_created = yes }
}
destroy_title = title:k_orthodox
}
# Comparable to the base-game great-schism offer: the defeated
# Church's secular rulers can enter the reunited communion.
every_ruler = {
limit = {
faith = scope:schismatic_orthodox_faith
NOT = { government_has_flag = government_is_theocracy }
this != this.faith.religious_head
}
trigger_event = NEOW_religious_decision.0210
}
# Award the Doctor of the Church nickname to the Orthodox Schism mender.
# Unlike set_nickname_effect, give_nickname also works if the victor already has a nickname.
scope:schism_mender = {
give_nickname = nick_NEOW_the_healer_of_the_schism
trigger_event = NEOW_religious_decision.0211
}
}
}
# The ecclesiastical ruler of Constantinople assumes the patriarchal throne
# personally, rather than enthroning a newly created bishop.
NEOW_eccelarch_restore_ecumenical_patriarchate_effect = {
root.faith = {
change_fervor = {
value = 50
desc = fervor_gain_ep_restored
}
}
hidden_effect = {
save_scope_as = new_patriarch
province:496 = {
if = {
limit = { has_building = hagia_sophia_02 }
remove_building = hagia_sophia_02
add_special_building = hagia_sophia_01
}
}
title:k_orthodox = { set_capital_county = title:c_byzantion }
create_title_and_vassal_change = {
type = returned
save_scope_as = patriarch_change
add_claim_on_loss = no
}
title:k_orthodox = {
change_title_holder = {
holder = scope:new_patriarch
change = scope:patriarch_change
}
}
# This landless see owns the Constantinopolitan clerical-region office.
title:d_et_constantinople = {
change_title_holder = {
holder = scope:new_patriarch
change = scope:patriarch_change
}
}
resolve_title_and_vassal_change = scope:patriarch_change
# Move the restored Ecumenical Patriarch's ecclesiastical domicile to
# b_constantinople (province 496), the capital barony of c_byzantion.
# Do this after the title change so it also works for a newly enthroned HoF.
scope:new_patriarch = {
domicile ?= {
move_domicile = province:496
}
}
if = {
limit = { title:h_athos = { is_title_created = no } }
faith:orthodox = { set_religious_head_title = title:k_orthodox }
}
}
}
# The Empire of Athos replaces the Constantinopolitan HoF title for Orthodoxy.
# Consecration of the Citadel is automatic when the new empire is proclaimed.
NEOW_form_empire_of_athos_effect = {
save_scope_as = athonite_founder
create_title_and_vassal_change = {
type = created
save_scope_as = athonite_title_change
add_claim_on_loss = no
}
title:h_athos = {
change_title_holder = {
holder = scope:athonite_founder
change = scope:athonite_title_change
}
copy_title_history = title:k_orthodox
}
resolve_title_and_vassal_change = scope:athonite_title_change
# Proclaiming the empire replaces the existing Mount Athos building with
# the fourth stage. All tier-three bonuses are preserved at tier four.
province:3776 = {
if = {
limit = { has_building = mount_athos_01 }
remove_building = mount_athos_01
}
else_if = {
limit = { has_building = mount_athos_02 }
remove_building = mount_athos_02
}
else_if = {
limit = { has_building = mount_athos_03 }
remove_building = mount_athos_03
}
if = {
limit = { NOT = { has_building = mount_athos_04 } }
add_special_building = mount_athos_04
}
}
faith:orthodox = { set_religious_head_title = title:h_athos }
set_primary_title_to = title:h_athos
}
neow_tribunal_abolish_rival_papacies_effect = {
if = {
limit = { title:k_papal_state = { is_title_created = yes } }
destroy_title = title:k_papal_state
}
if = {
limit = { title:k_compostelan_papacy = { is_title_created = yes } }
destroy_title = title:k_compostelan_papacy
}
faith:roman_catholic_faith = { remove_religious_head_title = yes }
faith:compostelan_catholic_faith = { remove_religious_head_title = yes }
}
neow_tribunal_install_restored_pope_effect = {
create_title_and_vassal_change = {
type = created
save_scope_as = neow_tribunal_papal_change
add_claim_on_loss = no
}
title:k_catholic_tribunal = {
change_title_holder = {
holder = scope:neow_tribunal_new_pope
change = scope:neow_tribunal_papal_change
}
}
resolve_title_and_vassal_change = scope:neow_tribunal_papal_change
faith:catholic_tribunal_faith = {
if = {
limit = { has_doctrine = special_doctrine_not_allowed_to_hof }
remove_doctrine = special_doctrine_not_allowed_to_hof
}
set_religious_head_title = title:k_catholic_tribunal
change_fervor = {
value = 25
desc = NEOW_catholic_tribunal_papacy_fervor_gain
}
}
add_piety = 1000
add_prestige = 500
# The Tribunal is restored only at this point, after the papal seat was chosen.
neow_tribunal_submit_catholic_world_effect = yes
}
# Symphonia: record the patriarchal office when an emperor replaces its holder in the
# clerical region containing the Head of Faith title's capital. The ordinary interaction
# moves the bishopric; the second effect keeps the HoF title with the new bishop.
NEOW_symphonia_prepare_head_of_faith_investiture_effect = {
if = {
limit = {
scope:actor = { pam_symphonia_secular_emperor_investiture_trigger = yes }
exists = scope:pam_old_archbishop
scope:pam_old_archbishop = {
religious_head_or_challenger ?= this
faith = { exists = religious_head_title }
}
scope:pam_old_archbishop.faith.religious_head_title = {
holder ?= scope:pam_old_archbishop
}
scope:target = {
has_clerical_region = yes
pam_symphonia_clerical_region_in_realm_trigger = { RULER = scope:actor }
OR = {
is_head_of_faith = yes
this = scope:pam_old_archbishop.faith.religious_head_title.title_capital_county.clerical_region_title
this = scope:pam_old_archbishop.capital_county.clerical_region_title
}
}
}
scope:pam_old_archbishop.faith.religious_head_title = {
save_scope_as = neow_symphonia_investiture_hof_title
}
}
}
NEOW_symphonia_finish_head_of_faith_investiture_effect = {
# A HoF title that was itself transferred by the normal interaction is already done.
if = {
limit = {
exists = scope:neow_symphonia_investiture_hof_title
exists = scope:pam_new_archbishop
scope:neow_symphonia_investiture_hof_title = {
this != scope:target
holder ?= scope:pam_old_archbishop
}
}
create_title_and_vassal_change = {
type = returned
save_scope_as = neow_symphonia_investiture_hof_change
add_claim_on_loss = no
}
scope:neow_symphonia_investiture_hof_title = {
change_title_holder = {
holder = scope:pam_new_archbishop
change = scope:neow_symphonia_investiture_hof_change
}
}
resolve_title_and_vassal_change = scope:neow_symphonia_investiture_hof_change
}
}
# Invite all other Catholic rulers to the newly restored papacy. An AI ruler
# converts immediately, while a human ruler receives an independent choice.
# The county pass deliberately excludes Catholic players who have not consented.
neow_tribunal_submit_catholic_world_effect = {
faith:catholic_tribunal_faith = { save_scope_as = neow_united_papacy_faith }
rite:catholic_tribunal_rite = { save_scope_as = neow_united_papacy_rite }
neow_restored_papacy_submit_catholics_effect = yes
}
neow_cadaverist_submit_catholic_world_effect = {
faith:cadaverist_faith = { save_scope_as = neow_united_papacy_faith }
rite:cadaverist_rite = { save_scope_as = neow_united_papacy_rite }
neow_restored_papacy_submit_catholics_effect = yes
}
# Character scope; the target faith and rite are saved by the appropriate wrapper.
neow_restored_papacy_convert_catholic_ruler_effect = {
if = {
limit = { faith != scope:neow_united_papacy_faith }
set_character_faith = scope:neow_united_papacy_faith
}
if = {
limit = { rite != scope:neow_united_papacy_rite }
set_character_rite = scope:neow_united_papacy_rite
}
}
# Character scope; convert counties directly held by this ruler, not the entire
# subrealm, so a rejecting human vassal's lands cannot be changed indirectly.
neow_restored_papacy_convert_held_catholic_counties_effect = {
every_held_title = {
limit = {
tier = tier_county
faith = { religion = religion:catholic_religion }
}
if = {
limit = { faith != scope:neow_united_papacy_faith }
set_county_faith = scope:neow_united_papacy_faith
}
if = {
limit = { rite != scope:neow_united_papacy_rite }
set_county_rite = scope:neow_united_papacy_rite
}
}
}
# Called on the successful Tribunal papacy installation or Cadaverist enthronement.
neow_restored_papacy_submit_catholics_effect = {
hidden_effect = {
every_ruler = {
# Catholic rulers, including followers of other Catholic faiths
# and Catholic rulers with non-mainline rites, are offered reunion.
if = {
limit = {
faith = { religion = religion:catholic_religion }
OR = {
faith != scope:neow_united_papacy_faith
rite != scope:neow_united_papacy_rite
}
}
if = {
limit = { is_ai = yes }
# Independent 60/40 decision for each Catholic AI ruler: 60% convert, 40% remain.
# Rejecting rulers keep both their existing faith and rite.
random = {
chance = 60
neow_restored_papacy_convert_catholic_ruler_effect = yes
}
}
else = {
if = {
limit = { scope:neow_united_papacy_faith = faith:catholic_tribunal_faith }
trigger_event = NEOW_religious_decision.0250
}
else = {
trigger_event = NEOW_religious_decision.0251
}
}
}
# Catholic counties follow rulers who accepted the new papacy.
# An AI ruler who declined its 60% conversion chance retains their
# existing Catholic counties, exactly like a refusing player.
if = {
limit = {
faith = scope:neow_united_papacy_faith
rite = scope:neow_united_papacy_rite
}
neow_restored_papacy_convert_held_catholic_counties_effect = yes
}
}
}
}
neow_establish_western_orthodox_rite_effect = {
# Preserve the decision-maker's rite before the rite-creation effect runs.
# Saved as a character variable so the later option event can still read it.
rite = { save_scope_as = neow_rome_founder_original_rite }
set_variable = {
name = neow_rome_founder_original_rite
value = scope:neow_rome_founder_original_rite
}
create_rite_from_type = {
type = western_orthodox_rite
save_scope_as = neow_western_orthodox_rite
convert = no
}
# Even if rite creation has an implicit founder-conversion side effect,
# keep the original rite until the founder actually selects the option.
if = {
limit = { rite != scope:neow_rome_founder_original_rite }
set_character_rite = scope:neow_rome_founder_original_rite
}
# Establish a Western Rite Orthodox episcopal see in Rome itself.
hidden_effect = {
create_character = {
template = religious_leader_character
random_traits = no
save_scope_as = neow_western_lazio_bishop
}
scope:neow_western_lazio_bishop = {
set_character_faith = faith:orthodox
set_character_rite = scope:neow_western_orthodox_rite
add_trait = education_learning_3
add_trait = zealous
add_trait = devoted
random_list = {
1 = { add_trait = humble }
1 = { add_trait = diligent }
1 = { add_trait = just }
1 = { add_trait = compassionate }
1 = { add_trait = stubborn }
}
}
# The same title-change pattern is used for the Patriarchates of
# Constantinople and Moscow. A vacant title is created on appointment.
create_title_and_vassal_change = {
type = created
save_scope_as = neow_western_lazio_title_change
add_claim_on_loss = no
}
title:d_et_lazio = {
change_title_holder = {
holder = scope:neow_western_lazio_bishop
change = scope:neow_western_lazio_title_change
}
}
# Duchy-tier clergy cannot be vassals of count/duke rulers. Keep the
# see in the restoring ruler's realm when a kingdom-tier liege exists.
if = {
limit = { highest_held_title_tier >= tier_kingdom }
scope:neow_western_lazio_bishop = {
change_liege = {
liege = root
change = scope:neow_western_lazio_title_change
}
}
}
else_if = {
limit = {
exists = root.liege
root.top_liege.highest_held_title_tier >= tier_kingdom
}
scope:neow_western_lazio_bishop = {
change_liege = {
liege = root.top_liege
change = scope:neow_western_lazio_title_change
}
}
}
resolve_title_and_vassal_change = scope:neow_western_lazio_title_change
# Use the mod's playable Christian ecclesiastical government, as with
# its other landed episcopal offices.
scope:neow_western_lazio_bishop = {
change_government = ecclesiastical_government
}
}
set_global_variable = {
name = neow_western_orthodox_rite_established
value = yes
}
add_piety = 750
add_prestige = 300
hidden_effect = {
# Catholic vassals within the founder's realm are the only rulers invited.
# Catholic heads of faith (especially the Pope) cannot be converted.
every_vassal_or_below = {
limit = {
faith = { religion = religion:catholic_religion }
NOT = { any_held_title = { is_head_of_faith = yes } }
}
if = {
limit = { is_ai = yes }
neow_western_orthodox_convert_catholic_ruler_effect = yes
}
else = {
trigger_event = NEOW_religious_decision.0261
}
}
# Only the founder's subrealm is touched. Catholic player rulers who
# have not yet chosen, and Catholic HoFs, retain their own counties.
every_sub_realm_county = {
limit = {
faith = { religion = religion:catholic_religion }
NOT = {
holder = {
is_ai = no
faith = { religion = religion:catholic_religion }
}
}
NOT = {
holder = { any_held_title = { is_head_of_faith = yes } }
}
}
set_county_faith = faith:orthodox
set_county_rite = scope:neow_western_orthodox_rite
}
}
}
# Used on an AI Catholic vassal or a player vassal who has accepted the offer.
neow_western_orthodox_convert_catholic_ruler_effect = {
set_character_faith = faith:orthodox
set_character_rite = rite:western_orthodox_rite
every_held_title = {
limit = {
tier = tier_county
faith = { religion = religion:catholic_religion }
}
set_county_faith = faith:orthodox
set_county_rite = rite:western_orthodox_rite
}
}
# Character scope. Clergy know the liturgical tongue formally prescribed by their rite.
# A rite selecting "No Liturgical Language" teaches none automatically.
christian_clergy_learn_liturgical_language_effect = {
if = {
limit = { is_clergy = yes }
neow_teach_rite_liturgical_language_effect = yes
}
}
# Character scope: teaches the language currently selected by the character's rite.
# Kept separate from the clergy on-action so a lay character may also learn it.
neow_teach_rite_liturgical_language_effect = {
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_latin }
NOT = { knows_language = language_latin }
}
learn_language = language_latin
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_koine }
NOT = { knows_language = NEOW_language_koine }
}
learn_language = NEOW_language_koine
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_church_slavonic }
NOT = { knows_language = NEOW_language_church_slavonic }
}
learn_language = NEOW_language_church_slavonic
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_irish }
NOT = { knows_language = NEOW_language_irish }
}
learn_language = NEOW_language_irish
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_armenian }
NOT = { knows_language = language_armenian }
}
learn_language = language_armenian
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_classical_georgian }
NOT = { knows_language = NEOW_language_classical_georgian }
}
learn_language = NEOW_language_classical_georgian
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_church_romanian }
NOT = { knows_language = NEOW_language_church_romanian }
}
learn_language = NEOW_language_church_romanian
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_arabic }
NOT = { knows_language = language_arabic }
}
learn_language = language_arabic
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_hebrew }
NOT = { knows_language = NEOW_language_hebrew }
}
learn_language = NEOW_language_hebrew
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_esperanto }
NOT = { knows_language = NEOW_language_esperanto }
}
learn_language = NEOW_language_esperanto
}
}
# Rite scope. A separate negative-divergence doctrine is required because
# the category divergence of an identical doctrine is zero, not negative.
neow_sync_rite_liturgical_alignment_effect = {
if = {
limit = {
neow_rite_matches_mainline_liturgical_language_trigger = yes
NOT = { rite_has_doctrine = special_doctrine_liturgical_language_alignment }
}
add_rite_doctrine = special_doctrine_liturgical_language_alignment
}
else_if = {
limit = {
rite_has_doctrine = special_doctrine_liturgical_language_alignment
neow_rite_matches_mainline_liturgical_language_trigger = no
}
remove_rite_doctrine = special_doctrine_liturgical_language_alignment
}
}
# Any scope: resynchronizes historic rites and older saved games.
neow_sync_all_liturgical_rite_alignments_effect = {
every_religion_global = {
every_faith = {
# Historic and dynamically promoted mainline rites cannot retain this boon.
main_rite ?= {
if = {
limit = { rite_has_doctrine = special_doctrine_pope_blessing }
remove_rite_doctrine = special_doctrine_pope_blessing
}
}
every_faith_rite = {
neow_sync_rite_liturgical_alignment_effect = yes
}
}
}
}
# Character scope: adopt the rite's known liturgical language for an existing royal court.
neow_set_rite_liturgical_court_language_effect = {
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_latin }
knows_language = language_latin
NOT = { has_court_language = language_latin }
}
set_court_language = language_latin
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_koine }
knows_language = NEOW_language_koine
NOT = { has_court_language = NEOW_language_koine }
}
set_court_language = NEOW_language_koine
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_church_slavonic }
knows_language = NEOW_language_church_slavonic
NOT = { has_court_language = NEOW_language_church_slavonic }
}
set_court_language = NEOW_language_church_slavonic
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_irish }
knows_language = NEOW_language_irish
NOT = { has_court_language = NEOW_language_irish }
}
set_court_language = NEOW_language_irish
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_armenian }
knows_language = language_armenian
NOT = { has_court_language = language_armenian }
}
set_court_language = language_armenian
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_classical_georgian }
knows_language = NEOW_language_classical_georgian
NOT = { has_court_language = NEOW_language_classical_georgian }
}
set_court_language = NEOW_language_classical_georgian
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_church_romanian }
knows_language = NEOW_language_church_romanian
NOT = { has_court_language = NEOW_language_church_romanian }
}
set_court_language = NEOW_language_church_romanian
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_arabic }
knows_language = language_arabic
NOT = { has_court_language = language_arabic }
}
set_court_language = language_arabic
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_hebrew }
knows_language = NEOW_language_hebrew
NOT = { has_court_language = NEOW_language_hebrew }
}
set_court_language = NEOW_language_hebrew
}
if = {
limit = {
rite ?= { rite_has_doctrine = doctrine_liturgical_language_esperanto }
knows_language = NEOW_language_esperanto
NOT = { has_court_language = NEOW_language_esperanto }
}
set_court_language = NEOW_language_esperanto
}
}