so much event updating

This commit is contained in:
trashmasteruni 2026-04-25 13:36:44 +02:00
parent c4b6d9bdeb
commit 811167944e
135 changed files with 4885 additions and 297691 deletions

View file

@ -1,469 +0,0 @@
namespace = faith_conversion
# Fired when you convert to a new faith. Convert capital county.
faith_conversion.0001 = {
hidden = yes
trigger = {
is_landed = yes
primary_title.tier > tier_barony
exists = capital_county
exists = scope:old_faith
capital_county.faith = scope:old_faith
}
immediate = {
capital_county = { set_county_faith = root.faith }
}
}
# Fired when you convert to a new faith. Remove obsolete character modifiers.
faith_conversion.0002 = {
hidden = yes
immediate = {
if = {
limit = {
faith.religion != scope:old_faith.religion
}
remove_trait = pilgrim
}
if = {
limit = {
NOR = {
has_character_flag = converted_by_heresy_0010_event
has_character_flag = converted_by_heresy_0011_event
has_character_flag = converted_by_heresy_decision
has_character_flag = new_heresiarch
}
}
remove_trait = heresiarch
}
remove_trait = excommunicated
remove_character_modifier = recent_excommunication
remove_character_modifier = excommunication_recently_lifted
remove_character_modifier = vow_of_poverty_modifier
remove_character_modifier = temporal_condemnation_modifier
remove_character_modifier = ultimate_blasphemer_modifier
remove_character_modifier = defiant_high_king_conversion_boost_modifier
remove_character_modifier = defiant_high_queen_conversion_boost_modifier
remove_character_modifier = fp1_jomsvikings_caused_faith_crisis_modifier
remove_character_modifier = fp2_opportunistic_schismatic_modifier
remove_character_modifier = fp2_friend_of_the_old_ways_modifier
remove_character_modifier = bp2_yearly_0641_hof_modifier
remove_character_modifier = bp2_yearly_0641_realm_priest_modifier
remove_character_modifier = next_free_ho_hire_modifier
# If you championed the old ways but then reform regardless, get booted down to friend.
if = {
limit = {
faith.religion = scope:old_faith.religion
has_character_modifier = fp2_champion_of_the_old_ways_modifier
}
remove_character_modifier = fp2_champion_of_the_old_ways_modifier
add_character_modifier = fp2_friend_of_the_old_ways_modifier
}
else = { remove_character_modifier = fp2_champion_of_the_old_ways_modifier }
# Reset patron deities.
if = {
limit = {
faith = {
OR = {
has_doctrine = tenet_bhakti
religion != scope:old_faith.religion
}
}
}
remove_character_modifier = bhakti_hinduism_ganga
remove_character_modifier = bhakti_hinduism_saraswati
remove_character_modifier = bhakti_hinduism_kali
remove_character_modifier = bhakti_hinduism_kubera
remove_character_modifier = bhakti_vaishnavism_lakishmi
remove_character_modifier = bhakti_vaishnavism_jagganath
remove_character_modifier = bhakti_vaishnavism_hayagriva
remove_character_modifier = bhakti_shaivism_parvati
remove_character_modifier = bhakti_shaivism_virabhadra
remove_character_modifier = bhakti_shaivism_munishwarar
remove_character_modifier = bhakti_shaivism_dakshinamoorthy
remove_character_modifier = bhakti_smartism_ganesha
remove_character_modifier = bhakti_smartism_vishnu
remove_character_modifier = bhakti_smartism_shiva
remove_character_modifier = bhakti_germanic_generic_odin
remove_character_modifier = bhakti_germanic_not_danish_ullr
remove_character_modifier = bhakti_germanic_danish_tyr
remove_character_modifier = bhakti_germanic_generic_thor
remove_character_modifier = bhakti_germanic_generic_freyr
}
# No Friday prayer shenanigans unless you're involved in the Sunni caliphal drama.
## Friday prayers would absolutely happen for others but these modifiers are currently tied heavily to the struggle.
## Remove insubordination if you leave Islam.
if = {
limit = {
NOT = { faith.religion = religion:islam_religion }
}
remove_character_modifier = fp3_name_read_in_friday_prayer_modifier
}
## Remove subordination.
### Special use-case because you might convert faith within the various ones that consider the caliph to be their HoF, in which case it'd stay.
if = {
limit = {
faith.religious_head_title ?= {
NOT = { this = title:d_sunni }
}
}
remove_character_modifier = fp3_displayed_pious_submission_to_caliph_modifier
}
bastard_to_wild_oat_conversion_effect = yes
}
}
scripted_trigger faith_conversion_0003_valid_character = {
faith = scope:old_faith
is_alive = yes
is_ai = yes
}
# Fired when you convert to a new faith. Convert close family.
faith_conversion.0003 = {
hidden = yes
immediate = {
every_spouse = {
limit = {
faith_conversion_0003_valid_character = yes
is_landed = no
}
set_character_faith = root.faith
}
every_child = {
limit = {
faith_conversion_0003_valid_character = yes
target_is_liege_or_above = root #If they have travelled outside of your realm/control, they will not be converted.
# Children are converted regardless of Landed status, assuming they are Landed within your realm.
}
set_character_faith_with_conversion = root.faith #Also converts their spouse, children, and parents if applicable.
}
if = {
limit = {
exists = mother
}
mother = {
if = {
limit = {
faith_conversion_0003_valid_character = yes
target_is_liege_or_above = root #If they have travelled outside of your realm/control, they will not be converted.
is_landed = no #If inside your realm but landed, follow normal vassal conversion rules.
}
set_character_faith = root.faith
}
}
}
if = {
limit = {
exists = father
}
father = {
if = {
limit = {
faith_conversion_0003_valid_character = yes
target_is_liege_or_above = root #If they have travelled outside of your realm/control, they will not be converted.
is_landed = no #If inside your realm but landed, follow normal vassal conversion rules.
}
set_character_faith = root.faith
}
}
}
}
}
faith_conversion.0004 = {
hidden = yes
trigger = {
government_has_flag = government_is_theocracy
is_landed = yes
faith = {
has_doctrine = doctrine_theocracy_lay_clergy
}
}
immediate = {
if = {
limit = {
OR = {
culture = { has_cultural_pillar = heritage_arabic }
culture = { has_cultural_pillar = heritage_iranian }
culture = { has_cultural_pillar = heritage_turkic }
}
}
change_government = clan_government
}
else = {
change_government = feudal_government
}
}
}
# For softening opinion penalties, e.g., I believed in monogamous faith but was in a polygamous marriage, but now I've been converted to polygamous faith.
faith_conversion.0005 = {
hidden = yes
trigger = {
any_consort = { }
}
immediate = {
every_consort = {
save_scope_as = this_consort
root = {
update_active_consort_opinion_effect = { PARTNER = scope:this_consort }
}
}
}
}
faith_conversion.1001 = {
type = character_event
title = faith_conversion.1001.t
desc = {
desc = faith_conversion.1001.start
first_valid = {
triggered_desc = {
trigger = {
has_trait = zealous
faith = { has_doctrine = tenet_carnal_exaltation }
is_male = yes
}
desc = faith_conversion.1001.desc.zealous.carnal_male
}
triggered_desc = {
trigger = {
has_trait = zealous
faith = { has_doctrine = tenet_carnal_exaltation }
is_female = yes
}
desc = faith_conversion.1001.desc.zealous.carnal_female
}
triggered_desc = {
trigger = { has_trait = zealous }
desc = faith_conversion.1001.desc.zealous
}
triggered_desc = {
trigger = { has_trait = cynical }
desc = faith_conversion.1001.desc.cynical
}
triggered_desc = {
trigger = { faith = { has_doctrine_parameter = reincarnation_events_active } }
desc = faith_conversion.1001.desc.reincarnation
}
triggered_desc = {
trigger = { has_trait = compassionate }
desc = faith_conversion.1001.desc.compassionate
}
desc = faith_conversion.1001.desc
}
first_valid = {
triggered_desc = {
trigger = { has_government = landless_adventurer_government }
desc = faith_conversion.1001.end.is_landless_adventurer
}
triggered_desc = {
trigger = {
top_liege != this
liege = {
faith != root.faith
}
}
desc = faith_conversion.1001.end.is_vassal.convert_away
}
triggered_desc = {
trigger = {
top_liege != this
liege = {
faith = root.faith
}
}
desc = faith_conversion.1001.end.is_vassal.convert_to
}
triggered_desc = {
trigger = {
any_vassal = {
percent < 0.5
faith = root.faith
}
}
desc = faith_conversion.1001.end.is_top_liege.convert_away
}
triggered_desc = {
trigger = {
any_vassal = {
percent >= 0.5
faith = root.faith
}
}
desc = faith_conversion.1001.end.is_top_liege.convert_to
}
}
}
theme = faith
left_portrait = {
character = root
animation = prayer
}
right_portrait = {
character = scope:template_priest
animation = wedding_priest
}
trigger = {
is_ai = no # Since the event is narrative-only, there's no need to generate a temporary priest character only to kill them with no other effects for AI rulers.
}
immediate = {
faith = {
save_scope_as = new_faith
}
liege ?= {
save_scope_as = my_liege
}
primary_title = {
save_scope_as = my_title
}
dynasty = {
save_scope_as = my_dynasty
}
create_character = {
template = priest_character_template
location = root.capital_province
save_scope_as = template_priest
}
# If necessary, make them celibate.
hidden_effect = {
if = {
limit = {
NOT = {
scope:new_faith = { has_doctrine_parameter = clergy_can_marry } # scoping directly to the character was firing null character errors
}
}
scope:template_priest = {
add_trait = devoted
}
}
}
#Dummy check to avoid errors since the flag is only checked in portrait modifiers otherwise
if = {
limit = {
has_character_flag = need_priest_outfit
}
#Please dress properly!
}
if = {
limit = {
scope:template_priest = { should_be_naked_trigger = yes }
}
scope:template_priest = {
add_character_flag = is_naked
}
}
else = {
scope:template_priest = {
add_character_flag = need_priest_outfit
}
}
}
option = {
name = faith_conversion.1001.a
}
option = {
name = faith_conversion.1001.b
# Gain scope:template priest as a courtier & earmark them for future friendship.
add_courtier = scope:template_priest
reverse_add_opinion = {
target = scope:template_priest
modifier = pious_opinion
opinion = 50
}
set_relation_potential_friend = scope:template_priest
}
after = {
hidden_effect = {
if = {
limit = {
this != scope:template_priest.host
}
scope:template_priest = {
death = {
death_reason = death_disappearance
}
}
}
}
if = {
limit = {
scope:template_priest ?= {
has_character_flag = is_naked
}
}
scope:template_priest = {
remove_character_flag = is_naked
}
}
add_character_flag = {
flag = recent_convert
years = 20
}
}
}
faith_conversion.1002 = {
hidden = yes
immediate = {
# If it's desirable to delay this event (e.g., due to decision) a little, do so.
if = {
limit = { has_character_flag = delay_player_faith_conversion_notification_event }
trigger_event = {
id = faith_conversion.1001
days = 7
}
}
# Otherwise, just send it.
else = { trigger_event = faith_conversion.1001 }
}
}
faith_conversion.1101 = {
hidden = yes
immediate = {
every_vassal = {
limit = {
is_ai = no
}
send_interface_toast = {
title = faith_conversion.1101.toast
left_icon = root
show_as_tooltip = {
root = {
set_character_faith = faith
}
}
}
}
}
}

View file

@ -1,668 +0,0 @@
namespace = faith_creation
# Fired when you make a faith. Temporal rel head setup
faith_creation.0001 = {
hidden = yes
trigger = {
faith = {
has_doctrine = doctrine_temporal_head
can_create_temporal_head_of_faith_title_trigger = yes
}
}
immediate = {
set_up_dynamic_temporal_hof_title_effect = { NEW_HOLDER = root }
}
}
# Fired when you make a faith. Spiritual rel head setup
faith_creation.0002 = {
hidden = yes
trigger = {
faith = {
has_doctrine = doctrine_spiritual_head
can_create_spiritual_head_of_faith_title_trigger = yes
}
}
immediate = {
set_up_dynamic_spiritual_hof_title_effect = { CREATOR = root }
}
}
# Fired when you make a faith. Flags faith as being player-created for future heresies.
faith_creation.0003 = {
hidden = yes
trigger = {
is_ai = no
}
immediate = {
if = {
limit = { is_ai = no }
faith = {
set_variable = {
name = player_created_faith
value = yes
}
}
}
# Set original faith this one was based on
faith = {
if = {
limit = { exists = scope:old_faith.var:foundational_faith }
set_variable = {
name = foundational_faith
value = scope:old_faith.var:foundational_faith
}
}
else = {
set_variable = {
name = foundational_faith
value = scope:old_faith
}
}
}
}
}
# Temporal Head of Faith re-creation event
faith_creation.0011 = {
hidden = yes
trigger = {
faith = {
has_doctrine = doctrine_temporal_head
can_create_temporal_head_of_faith_title_trigger = yes
# Title must exist but be uncreated.
exists = religious_head_title
NOT = { exists = religious_head_title.holder }
}
}
immediate = {
faith = {
religious_head_title = {
save_scope_as = my_hof_title
}
}
create_title_and_vassal_change = {
type = created
save_scope_as = change
add_claim_on_loss = no
}
scope:my_hof_title = {
change_title_holder = {
holder = root
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
scope:my_hof_title = {
add_title_law = temporal_head_of_faith_succession_law
}
}
}
# Spiritual Head of Faith re-creation event
faith_creation.0012 = {
hidden = yes
trigger = {
faith = {
has_doctrine = doctrine_spiritual_head
can_create_spiritual_head_of_faith_title_trigger = yes
# Title must exist but be uncreated.
exists = religious_head_title
NOT = { exists = religious_head_title.holder }
}
}
immediate = {
faith = {
religious_head_title = {
save_scope_as = my_hof_title
}
}
if = {
limit = {
any_theocratic_vassal = {
faith = root.faith
}
}
ordered_theocratic_vassal = {
limit = {
faith = root.faith
}
order_by = head_of_faith_selection_weight
save_scope_as = new_religious_head
}
}
else = {
create_character = {
location = root.capital_province
age = { 30 50 }
gender_female_chance = root_faith_clergy_gender_female_chance
trait = education_learning_4
faith = root.faith
culture = root.culture
learning = { 14 22 }
save_scope_as = new_religious_head
}
}
create_title_and_vassal_change = {
type = created
save_scope_as = change
add_claim_on_loss = no
}
scope:my_hof_title = {
change_title_holder = {
holder = scope:new_religious_head
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
}
}
# Fired when a new Faith is created by a player, or when a Pagan faith is reformed. Fired off an informative event for all players.
faith_creation.1000 = {
hidden = yes
immediate = {
save_scope_as = reformer
faith = {
save_scope_as = reformed_faith
}
if = {
limit = {
faith = {
exists = religious_head
}
}
faith = {
religious_head = {
save_scope_as = reformed_hof
}
}
}
if = {
limit = {
exists = scope:old_faith.religious_head
}
scope:old_faith = {
religious_head = {
save_scope_as = old_hof
}
}
}
every_player = {
trigger_event = {
id = faith_creation.1001
days = 1
}
}
}
}
faith_creation.1001 = {
type = character_event
title = {
first_valid = {
triggered_desc = {
trigger = {
scope:old_faith = {
has_doctrine_parameter = unreformed
}
}
desc = faith_creation.1001.t.reformation
}
desc = faith_creation.1001.t.schism
}
}
desc = {
#Introduction to the faith's reformation/schism:
first_valid = {
# I am reforming a pagan faith for the first time.
triggered_desc = {
trigger = {
scope:old_faith = {
has_doctrine_parameter = unreformed
root = scope:reformer
}
}
desc = faith_creation.1001.desc.reformation.personal
}
# I am splitting off a new faith from an existing one.
triggered_desc = {
trigger = {
scope:old_faith = {
root = scope:reformer
}
}
desc = faith_creation.1001.desc.schism.personal
}
# Someone else is reforming a pagan faith for the first time.
triggered_desc = {
trigger = {
scope:old_faith = {
has_doctrine_parameter = unreformed
}
}
desc = faith_creation.1001.desc.reformation
}
# Someone else is splitting off a new faith from an existing one.
desc = faith_creation.1001.desc.schism
}
#State the new faith's external outlook:
first_valid = {
#Faith is aggressive (Great Holy Wars are allowed):
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine_parameter = great_holy_wars_active
has_doctrine_parameter = great_holy_wars_active_if_reformed
}
}
}
desc = faith_creation.1001.desc.outlook.ghw
}
#Faith is pacifist:
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine_parameter = pacifist_opinion_active
}
}
desc = faith_creation.1001.desc.outlook.pacifism
}
#Faith is 'dogmatic' (fundamentalist, or at least not pluralist but has certain strict doctrinal tenets)
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = doctrine_pluralism_fundamentalist
AND = {
has_doctrine = doctrine_pluralism_righteous
OR = {
has_doctrine = tenet_religious_legal_pronouncements
has_doctrine = tenet_literalism
has_doctrine = tenet_legalism
}
}
}
}
}
desc = faith_creation.1001.desc.outlook.dogmatic
}
#Faith is 'cosmopolitan' (pluralistic, or at least not fundamentalist but has certain syncretic tenets)
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = doctrine_pluralism_pluralistic
AND = {
has_doctrine = doctrine_pluralism_righteous
OR = {
has_doctrine = tenet_eastern_syncretism
has_doctrine = tenet_christian_syncretism
has_doctrine = tenet_islamic_syncretism
has_doctrine = tenet_jewish_syncretism
has_doctrine = tenet_unreformed_syncretism
has_doctrine = tenet_tax_nonbelievers
has_doctrine = special_doctrine_jizya
has_doctrine = tenet_adaptive
}
}
}
}
}
desc = faith_creation.1001.desc.outlook.accepting
}
desc = faith_creation.1001.desc.outlook.fallback
}
#State the new faith's most important and/or distinctive belief:
first_valid = {
#Human Sacrifice
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = tenet_human_sacrifice
has_doctrine = tenet_ritual_cannibalism
}
}
}
desc = faith_creation.1001.desc.belief.sacrifice
}
#Indulgent
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = tenet_carnal_exaltation
has_doctrine = tenet_hedonistic
}
}
}
desc = faith_creation.1001.desc.belief.indulgent
}
#Incest
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = tenet_divine_marriage
has_doctrine = doctrine_consanguinity_unrestricted
}
}
}
desc = faith_creation.1001.desc.belief.incest
}
#Aniconism
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = tenet_aniconism
}
}
desc = faith_creation.1001.desc.belief.aniconism
}
#Ascetic
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = tenet_monasticism
has_doctrine = tenet_vows_of_poverty
has_doctrine = tenet_mendicant_preachers
has_doctrine = tenet_gnosticism
has_doctrine = tenet_inner_journey
has_doctrine = tenet_asceticism
}
}
}
desc = faith_creation.1001.desc.belief.ascetic
}
#Spirits
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = tenet_ancestor_worship
has_doctrine = tenet_adorcism
}
}
}
desc = faith_creation.1001.desc.belief.spirits
}
#Superstition
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = tenet_astrology
has_doctrine = tenet_sacred_childbirth
has_doctrine = tenet_esotericism
has_doctrine = tenet_mystical_birthright
}
}
}
desc = faith_creation.1001.desc.belief.superstition
}
#Nature
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = tenet_sanctity_of_nature
}
}
desc = faith_creation.1001.desc.belief.nature
}
#Community
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = tenet_communal_identity
}
}
desc = faith_creation.1001.desc.belief.community
}
desc = faith_creation.1001.desc.belief.fallback
}
#Conclude with the new faith's religious leadership form.
first_valid = {
#Temporal Head and I am it!
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = doctrine_temporal_head
religious_head ?= root
}
}
desc = faith_creation.1001.desc.temporal.personal
}
#Temporal Head and it is someone else...
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = doctrine_temporal_head
exists = religious_head
}
}
desc = faith_creation.1001.desc.temporal
}
#Spiritual Head
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = doctrine_spiritual_head
exists = religious_head
}
}
desc = {
first_valid = {
triggered_desc = {
trigger = { scope:reformed_faith.religious_head = scope:old_hof } # Prevents the old pope from being labeled as new
desc = faith_creation.1001.desc.spiritual.sameold
}
desc = faith_creation.1001.desc.spiritual
}
}
}
#No Head
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = doctrine_no_head
}
}
desc = faith_creation.1001.desc.no_head
}
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
has_doctrine = doctrine_temporal_head
has_doctrine = doctrine_spiritual_head
}
NOT = { exists = religious_head }
}
}
desc = faith_creation.1001.desc.no_holy_sites
}
}
}
left_portrait = {
character = scope:reformer
}
right_portrait = {
trigger = {
scope:reformed_hof != scope:reformer
}
character = scope:reformed_hof
animation = personality_zealous
}
theme = faith
override_background = {
reference = temple_scope
}
immediate = {
scope:reformer = {
save_scope_as = background_temple_scope
}
play_music_cue = "mx_cue_epic_sacral_moment"
}
option = {
name = faith_creation.1001.o.getreaction
}
}
# Notification event for when you create a Head of Faith.
faith_creation.1010 = {
type = character_event
title = faith_creation.1010.t
desc = {
desc = faith_creation.1010.desc.start
first_valid = {
# I am the new temporal HoF!
triggered_desc = {
trigger = {
scope:faith = {
has_doctrine = doctrine_temporal_head
religious_head = root
}
}
desc = faith_creation.1010.desc.temporal.personal
}
# Some other person is the new temporal HoF!
triggered_desc = {
trigger = {
scope:faith = {
has_doctrine = doctrine_temporal_head
}
}
desc = faith_creation.1010.desc.temporal
}
# No wait we like spiritual HoFs instead!
triggered_desc = {
trigger = {
scope:faith = {
has_doctrine = doctrine_spiritual_head
}
}
desc = faith_creation.1010.desc.spiritual
}
}
first_valid = {
triggered_desc = {
trigger = {
scope:faith = {
has_doctrine = doctrine_temporal_head
religious_head = root
}
}
desc = faith_creation.1010.desc.end.personal
}
desc = faith_creation.1010.desc.end
}
}
left_portrait = {
character = scope:HoF
animation = personality_zealous
}
theme = faith
override_background = {
reference = temple_scope
}
trigger = {
exists = scope:faith.religious_head
}
immediate = {
play_music_cue = "mx_cue_epic_sacral_moment"
scope:faith = {
religious_head = {
save_scope_as = HoF
save_scope_as = background_temple_scope
}
show_as_tooltip = {
change_fervor = {
value = major_fervor_gain
desc = fervor_gain_recreated_hof
}
}
}
}
option = {
name = faith_creation.1010.a
if = {
limit = {
root = scope:reformer
scope:faith = {
has_doctrine = doctrine_spiritual_head
}
}
scope:HoF = {
add_opinion = {
modifier = grateful_opinion
target = scope:reformer
opinion = 30
}
}
}
}
}
faith_creation.1011 = {
hidden = yes
trigger = {
exists = scope:faith.religious_head
# Limit range, so Irish players don't hear about Zhengyi religious developments
OR = {
scope:faith.religious_head.top_liege = root.top_liege # Same realm
faith = scope:faith.religion # Same religion
culture = scope:faith.religious_head.culture # Same culture
in_diplomatic_range = scope:faith.religious_head # Fallback, actually in diplomatic range
}
}
immediate = {
scope:faith = {
religious_head = {
save_scope_as = HoF
}
}
send_interface_message = {
type = event_hof_established
left_icon = scope:HoF
title = faith_creation.1011.message.title
desc = faith_creation.1011.message.desc
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,795 +0,0 @@
########################
# Rites in Local Shrine
########################
namespace = local_rites
#shrine_location = Where we perform the rites (AKA the destination)
scripted_trigger has_two_local_shrine_options_trigger = {
# Stops after we've found 2 good places for a sacrifice (don't want to overload the player).
calc_true_if = {
amount >= 2
exists = scope:hills_location
exists = scope:mountains_location
exists = scope:temple_holding_location
exists = scope:forest_location
exists = scope:point_of_interest_location
exists = scope:mount_tai_location
}
}
scripted_effect local_shrine_at_location_effect = {
set_variable = {
name = shrine_location
value = scope:$SHRINE$_location
}
scope:$SHRINE$_location = { #to show the location name in the difficulty custom tooltip
save_scope_as = tooltip_loc
}
start_travel_plan = {
destination = var:shrine_location
on_travel_planner_cancel_event = local_rites.10
on_arrival_event = local_rites.2
on_arrival_destinations = all_but_last
}
add_character_modifier = {
modifier = visit_local_shrine_modifier
days = local_shrine_duration
}
add_character_flag = {
flag = local_shrine_rite
years = 1 #This is a fallback, it is also cleared at location
}
}
# If the player exits the travel planning UI, this event fires reseting the decision cooldown and removing variables
local_rites.10 = {
hidden = yes
trigger = {
OR = {
exists = var:shrine_location
has_character_flag = local_shrine_rite
}
}
immediate = {
current_travel_plan ?= { cancel_travel_plan = yes }
remove_decision_cooldown = visit_local_shrine_decision
remove_variable = shrine_location
remove_character_flag = local_shrine_rite
}
}
local_rites.1 = {
type = character_event
title = local_rites.1.t
desc = local_rites.1.desc
theme = faith
override_background = {
reference = throne_room
}
left_portrait = {
character = root
animation = personality_rational
}
immediate = {
# Stop characters from planning multiple activities at once.
add_character_flag = {
flag = planning_an_activity
days = 30
}
capital_barony.title_province = {
save_scope_as = capital_location
}
# Pick out possible locations
# First any Special Building Shrines
# If I am the Emperor of China I go to Mount Tai
if = {
limit = {
#I am the emperor
has_title = title:h_china
#My dynasty did not perform this sacrifice before
dynasty = {
NOT = { has_variable = fengshan_performed }
}
#The Cycle is stable
OR = {
situation:dynastic_cycle = {
situation_current_phase = situation_dynastic_cycle_phase_stability_expansion
}
situation:dynastic_cycle = {
situation_current_phase = situation_dynastic_cycle_phase_stability_advancement
}
}
title:b_xuchang = {
this != root.capital_barony
holder.top_liege = root
}
}
title:b_xuchang = {
title_province = { save_scope_as = mount_tai_location }
}
}
# Everyone else
if = {
limit = {
has_two_local_shrine_options_trigger = no
}
random_sub_realm_barony = {
limit = {
this != root.capital_barony
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
title_province = { save_scope_as = point_of_interest_location }
}
}
#Now we look for Mountains
if = {
limit = {
has_two_local_shrine_options_trigger = no
}
random_sub_realm_barony = {
limit = {
this != root.capital_barony
trigger_if = {
limit = { exists = scope:point_of_interest_location }
title_province != scope:point_of_interest_location
}
title_province = {
OR = {
terrain = mountains
terrain = desert_mountains
}
}
}
title_province = { save_scope_as = mountains_location }
}
}
#Now we look for any Temple Holding
if = {
limit = {
has_two_local_shrine_options_trigger = no
}
random_sub_realm_barony = {
limit = {
this != root.capital_barony
trigger_if = {
limit = { exists = scope:point_of_interest_location }
title_province != scope:point_of_interest_location
}
title_province = {
has_holding_type = church_holding
}
}
title_province = { save_scope_as = temple_holding_location }
}
}
#Now we look for Hills
if = {
limit = {
has_two_local_shrine_options_trigger = no
}
random_sub_realm_barony = {
limit = {
this != root.capital_barony
trigger_if = {
limit = { exists = scope:point_of_interest_location }
title_province != scope:point_of_interest_location
}
title_province = {
OR = {
terrain = hills
terrain = terraced_hills
}
}
}
title_province = { save_scope_as = hills_location }
}
}
#Any Forests?
if = {
limit = {
has_two_local_shrine_options_trigger = no
}
random_sub_realm_barony = {
limit = {
this != root.capital_barony
trigger_if = {
limit = { exists = scope:point_of_interest_location }
title_province != scope:point_of_interest_location
}
title_province = {
OR = {
terrain = forest
terrain = taiga
}
}
}
title_province = { save_scope_as = forest_location }
}
}
#If we found nothing we look to the top realm
if = {
limit = {
NOT = { exists = scope:point_of_interest_location } #Because this is the one we try to save.
has_two_local_shrine_options_trigger = no
}
top_liege = {
random_sub_realm_barony = {
limit = {
this != root.capital_barony
this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
alternative_limit = {
this != root.capital_barony
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
title_province = { save_scope_as = point_of_interest_location }
}
}
}
#We also try this a second time for landless vassals.
if = {
limit = {
has_two_local_shrine_options_trigger = no
NOT = { exists = scope:point_of_interest_location }
}
top_liege = {
random_sub_realm_barony = {
limit = {
this != root.capital_barony
this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
alternative_limit = {
this != root.capital_barony
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
title_province = { save_scope_as = point_of_interest_location }
}
}
}
#And last but not least we try to save one for adventurers
if = {
limit = {
has_two_local_shrine_options_trigger = no
NOT = { exists = scope:point_of_interest_location }
exists = location.county
}
location.county.holder.top_liege = {
random_sub_realm_barony = {
limit = {
this != root.capital_barony
this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
alternative_limit = {
this != root.capital_barony
title_province = {
has_building_with_flag = travel_point_of_interest_religious
}
}
title_province = { save_scope_as = point_of_interest_location }
}
}
}
}
# Option 1: Rituals at home - Low Impact
option = { #This option does not set the flag for being unavailable
name = local_rites.1.home
set_variable = {
name = shrine_location
value = scope:capital_location
}
add_character_modifier = {
modifier = visit_local_shrine_modifier
days = local_shrine_duration
}
scope:capital_location = { #to show the location name in the difficulty custom tooltip
save_scope_as = tooltip_loc
}
custom_tooltip = local_rites.1.home.tt
trigger_event = local_rites.3 #When you sacrifice at home this is instant.
}
# I am the Emperor Headed for Mt Tai
option = {
trigger = {
exists = scope:mount_tai_location
scope:mount_tai_location.barony = title:b_xuchang
}
name = local_rites.1.mount_tai
local_shrine_at_location_effect = { SHRINE = mount_tai }
custom_tooltip = local_rites.1.fengshan.tt
}
# Visit Famous Shrine - High Impact, High Offering Expectation
option = {
trigger = { exists = scope:point_of_interest_location }
name = local_rites.1.major_shrine
local_shrine_at_location_effect = { SHRINE = point_of_interest }
custom_tooltip = local_rites.1.major_shrine.tt
}
# Shrine in the hills. Medium Impact
option = {
trigger = { exists = scope:hills_location }
name = local_rites.1.hills
local_shrine_at_location_effect = { SHRINE = hills }
}
# Shrine in the forest. Medium Impact
option = {
trigger = { exists = scope:forest_location }
name = local_rites.1.forest
local_shrine_at_location_effect = { SHRINE = forest }
}
# Shrine in the mountains. Medium Impact
option = {
trigger = { exists = scope:mountains_location }
name = local_rites.1.mountains
local_shrine_at_location_effect = { SHRINE = mountains }
}
# Shrine in the temple holding - High Impact, High Offerings.
option = {
trigger = { exists = scope:temple_holding_location }
name = local_rites.1.temple_holding
local_shrine_at_location_effect = { SHRINE = temple_holding }
custom_tooltip = local_rites.1.major_shrine.tt
}
# Option 3: Opt-out
option = {
name = local_shrine.optout
flavor = local_shrine.optout.flavor
ai_chance = {
base = 0
}
remove_decision_cooldown = visit_local_shrine_decision
}
after = {
remove_character_flag = planning_an_activity
trigger_event = local_rites.5
}
}
local_rites.5 = {
hidden = yes
immediate = {
hidden_effect = {
random_courtier = { #We want to bring a priest if we can, if not we still want at least one character.
limit = {
is_adult = yes
is_clergy = yes
is_diarch = no
is_travelling = no
}
alternative_limit = {
is_adult = yes
is_diarch = no
is_travelling = no
}
save_scope_as = companion
}
root.current_travel_plan ?= {
add_companion = scope:companion
}
}
}
}
local_rites.2 = {
hidden = yes
immediate = {
send_interface_toast = {
title = local_rites.2.toast
left_icon = root
current_travel_plan = {
delay_travel_plan = { days = local_shrine_duration }
}
}
trigger_event = {
id = local_rites.3
days = local_shrine_duration
}
}
}
local_rites.3 = { #Destination - Making a Sacrifice
type = character_event
title = {
first_valid = {
triggered_desc = {
trigger = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
desc = local_rites.3.t.fengshan #Fang Shan
}
triggered_desc = {
trigger = {
OR = {
OR = {
faith = { is_in_family = rf_sinitic }
faith = faith:pundarika
faith = faith:mantrayana
faith = faith:dhyana
faith = faith:sukhavati
faith = faith:avatamsaka
faith = faith:maitreya
faith = faith:vinaya
faith = faith:yogacara
faith = faith:acharya
}
}
}
desc = local_rites.3.t #Sacrificing to Heaven
}
desc = local_rites.3.fallback.t #More Generic Version
}
}
desc = {
first_valid = {
triggered_desc = {
trigger = { scope:at_home = yes }
desc = local_rites.3.desc_at_home
}
triggered_desc = {
trigger = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
desc = local_rites.3.desc_mt_tai_huangdi
}
triggered_desc = {
trigger = {
var:shrine_location = {
has_building_with_flag = travel_point_of_interest_religious
}
}
desc = local_rites.3.desc_important_shrine
}
triggered_desc = {
trigger = {
var:shrine_location = {
has_holding_type = church_holding
}
}
desc = local_rites.3.desc_holding_shrine
}
triggered_desc = {
trigger = {
var:shrine_location = {
OR = {
terrain = mountains
terrain = desert_mountains
}
}
}
desc = local_rites.3.desc_mountain_shrine
}
triggered_desc = {
trigger = {
var:shrine_location = {
OR = {
terrain = forest
terrain = taiga
}
}
}
desc = local_rites.3.desc_forest_shrine
}
triggered_desc = {
trigger = {
var:shrine_location = {
terrain = hills
}
}
desc = local_rites.3.desc_hills_shrine
}
}
triggered_desc = {
trigger = {
has_trait = cynical
}
desc = local_rites.3.desc_cynical
}
}
theme = faith
override_background = { #Fengshan
trigger = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
reference = mpo_steppe_evening
}
override_background = {
trigger = { scope:at_home = yes }
reference = tgp_temple_asia
}
override_background = {
trigger = {
scope:at_home = no
scope:shrine_location = {
OR = {
has_building_with_flag = travel_point_of_interest_religious
has_holding_type = church_holding
}
}
}
reference = tgp_holysite_asia
}
override_background = {
trigger = {
scope:at_home = no
scope:shrine_location = {
NOR = {
has_building_with_flag = travel_point_of_interest_religious
has_holding_type = church_holding
}
}
}
reference = wilderness_scope
}
left_portrait = {
character = root
animation = personality_zealous
}
right_portrait = {
character = scope:companion
animation = pondering
}
immediate = {
if = { #First we try to get a travel companion
limit = {
current_travel_plan ?= {
any_entourage_character = {
NOT = { this = root }
is_adult = yes
}
}
}
current_travel_plan ?= {
random_entourage_character = {
limit = {
NOT = { this = root }
is_clergy = yes
is_adult = yes
}
alternative_limit = {
NOT = { this = root }
is_adult = yes
}
save_scope_as = companion
}
}
}
else_if = { #If you are travelling without adult companions we get a courtier/follower.
limit = {
any_courtier = {
is_adult = yes
}
}
random_courtier = {
limit = {
is_adult = yes
is_clergy = yes
}
alternative_limit = {
is_adult = yes
}
save_scope_as = companion
}
}
else = { #Your court is somehow also empty. If we get here it is going to be a bit weird. But we shouldn't.
random_pool_character = {
province = root.location
limit = {
is_adult = yes
}
save_scope_as = companion
}
}
if = {
limit = {
NOT = {
exists = var:shrine_location
}
}
set_variable = {
name = shrine_location
value = root.location
}
}
var:shrine_location = {
save_scope_as = shrine_location
save_scope_as = background_wilderness_scope
}
# Are we at home?
if = {
limit = {
exists = capital_province
scope:shrine_location = root.capital_province
}
save_scope_value_as = {
name = at_home
value = yes
}
}
else = {
save_scope_value_as = {
name = at_home
value = no
}
}
#Are we at Mt Tai? Am I the Emperor?
if = {
limit = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
hidden_effect = {
dynasty = { set_variable = fengshan_performed }
}
}
}
option = {
name = fengshan_option
trigger = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
add_treasury = {
value = major_treasury_value
multiply = -1
}
add_prestige = massive_prestige_loss
add_legitimacy = massive_legitimacy_gain
add_piety = major_piety_gain
}
option = {
name = local_rites.3.pay_gold
trigger = {
scope:at_home = no
NOR = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
}
#Pay Gold - Get Piety
switch = {
trigger = exists
scope:hills_location = {
remove_short_term_gold = minor_gold_value
add_piety = medium_piety_gain
}
scope:mountains_location = {
remove_short_term_gold = minor_gold_value
add_piety = medium_piety_gain
}
scope:temple_holding_location = {
remove_short_term_gold = medium_gold_value
add_piety = major_piety_gain
}
scope:forest_location = {
remove_short_term_gold = minor_gold_value
add_piety = medium_piety_gain
}
scope:shrine_location = {
remove_short_term_gold = medium_gold_value
add_piety = major_piety_gain
}
}
}
option = {
name = local_rites.3.pay_prestige
trigger = {
scope:at_home = no
NOR = {
has_title = title:h_china
var:shrine_location.barony = title:b_xuchang
}
}
#Pay Prestige - Get Piety
switch = {
trigger = exists
scope:hills_location = {
add_prestige = minor_prestige_loss
add_piety = medium_piety_gain
}
scope:mountains_location = {
add_prestige = minor_prestige_loss
add_piety = medium_piety_gain
}
scope:temple_holding_location = {
add_prestige = medium_prestige_loss
add_piety = major_piety_gain
}
scope:forest_location = {
add_prestige = minor_prestige_loss
add_piety = medium_piety_gain
}
scope:shrine_location = {
add_prestige = medium_prestige_loss
add_piety = major_piety_gain
}
}
}
option = {
name = local_rites.3.pay_at_home #So be it
trigger = {
scope:at_home = yes
}
#Pay A little Gold - Get Piety
remove_short_term_gold = miniscule_gold_value
add_piety = minor_piety_gain
remove_character_flag = local_shrine_rite
}
after = {
stress_impact = { #Not the main purpose of the trip but the ritual comes with some stress relief
base = minor_stress_impact_loss
zealous = minor_stress_impact_loss
cynical = minor_stress_impact_gain
}
# Run the clean-up event.
if = {
limit = {
scope:at_home = no
}
trigger_event = {
id = local_rites.1000
days = 30
}
}
else = {
remove_variable = shrine_location
}
}
}
local_rites.1000 = {
hidden = yes
immediate = {
send_interface_toast = {
title = religious_decision.0291.toast
left_icon = root
current_travel_plan ?= {
if = {
limit = { is_paused = yes }
resume_travel_plan = yes
}
}
}
remove_variable = shrine_location
remove_character_flag = local_shrine_rite
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff