revert holy order

This commit is contained in:
Damimani 2026-05-21 20:53:29 +02:00
parent def95ea312
commit 9d15fd1cea
16 changed files with 4 additions and 4120 deletions

View file

@ -1,394 +0,0 @@
namespace = N3OW_faith_creation
# Fired when you make a faith. Holy Order rel head setup
N3OW_holy_order.0001 = {
hidden = yes
trigger = {
faith = {
has_doctrine = doctrine_holy_order_head
#can_create_holy_order_head_of_faith_title_trigger = yes
}
}
immediate = {
trigger_event = N3OW_holy_order.0003
}
}
namespace = N3OW_holy_order
# Create Holy Order HoF Titles
N3OW_holy_order.0001 = {
hidden = yes
type = character_event
trigger = {
#root = faith:ursuline.religious_head
always = yes
}
immediate = {
# Select a random county.
ordered_held_title = {
limit = {
tier = tier_county
any_county_province = {
has_holding = no
barony = { is_holy_site_of = root.faith }
}
}
alternative_limit = {
tier = tier_county
any_county_province = { has_holding = no }
}
save_scope_as = designated_county
}
# Select an appropriate barony.
## If there's an empty space in the capital, we create a castle.
scope:designated_county = {
random_county_province = {
limit = { has_holding = no }
set_holding_type = castle_holding
barony = { save_scope_as = leased_barony }
}
}
#if we already have one on history, use it!
if = {
limit = {
exists = root.faith.religious_head
}
#but destroy the actual title to avoid errors
root.faith.religious_head = {
save_scope_as = leader
destroy_title = root.faith.religious_head_title
}
}
else = {
create_character = {
template = ate_holy_order_faith_leader_character
location = scope:leased_barony.title_province
culture = root.culture
faith = root.faith
save_scope_as = leader
}
}
# Create the actual holy order.
create_holy_order = {
leader = scope:leader
capital = scope:leased_barony
save_scope_as = new_holy_order
}
scope:leader = {
add_piety_level = 2
add_gold = holy_order_starting_gold
every_courtier = { add_trait = order_member }
}
## Give it some buildings.
scope:leased_barony.title_province = {
# Walls & Towers.
if = {
limit = {
NOT = { has_building_or_higher = curtain_walls_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = curtain_walls_01
}
# Barracks.
if = {
limit = {
NOT = { has_building_or_higher = barracks_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = barracks_01
}
# Military Camps.
if = {
limit = {
NOT = { has_building_or_higher = military_camps_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = military_camps_01
}
}
#TODO make sure this doesn't break faiths without a coa
scope:new_holy_order.title = {
set_coa = root.faith.religious_head_title
}
root.faith = {
set_religious_head_title = scope:new_holy_order.title
}
}
}
#generic Holy Order creation
N3OW_holy_order.0002 = {
hidden = yes
type = character_event
trigger = {
#root = faith:ursuline.religious_head
always = yes
}
immediate = {
# Display simplified results.
custom_tooltip = create_holy_order_decision_effect_message
# Select a random county.
random_held_title = {
limit = {
tier = tier_county
any_county_province = {
custom_description = {
text = forge_the_jomsvikings_decision.tt.empty_castle_or_city
OR = {
has_holding = no
has_holding_type = castle_holding
has_holding_type = city_holding
}
}
}
}
save_scope_as = designated_county
}
# Select an appropriate barony.
## If there's an empty space in the capital, we create a castle.
if = {
limit = {
scope:designated_county = {
any_county_province = { has_holding = no }
}
}
scope:designated_county = {
random_county_province = {
limit = { has_holding = no }
set_holding_type = castle_holding
barony = { save_scope_as = leased_barony }
}
}
}
## Otherwise, grab an existing non-capital castle/city.
else = {
scope:designated_county = {
random_county_province = {
limit = {
is_county_capital = no
OR = {
has_holding_type = castle_holding
has_holding_type = city_holding
}
}
barony = { save_scope_as = leased_barony }
}
}
}
# Create a suitable leader for the Jomsvikings.
create_character = {
template = holy_order_leader_character
location = scope:leased_barony.title_province
culture = root.culture
faith = root.faith
save_scope_as = leader
}
# Create the actual holy order.
create_holy_order = {
leader = scope:leader
capital = scope:leased_barony
save_scope_as = new_holy_order
}
scope:leader = {
add_piety_level = 2
add_gold = holy_order_starting_gold
every_courtier = { add_trait = order_member }
}
## Give it some buildings.
scope:leased_barony.title_province = {
# Walls & Towers.
if = {
limit = {
NOT = { has_building_or_higher = curtain_walls_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = curtain_walls_01
}
# Barracks.
if = {
limit = {
NOT = { has_building_or_higher = barracks_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = barracks_01
}
# Military Camps.
if = {
limit = {
NOT = { has_building_or_higher = military_camps_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = military_camps_01
}
}
}
}
# Fired when you make a faith (if you meet the reqs) or recreate the Head of Faith
N3OW_holy_order.0003 = {
hidden = yes
trigger = {
faith = {
has_doctrine = doctrine_holy_order_head
#can_create_holy_order_head_of_faith_title_trigger = yes
}
}
immediate = {
faith = {
save_scope_as = my_faith
}
# Select a random county.
ordered_held_title = {
limit = {
tier = tier_county
any_county_province = {
OR = {
has_holding = no
}
}
OR = {
is_holy_site_of = root.faith
any_county_province = {
barony = {
is_holy_site_of = root.faith
}
}
}
}
alternative_limit = {
tier = tier_county
any_county_province = {
OR = {
has_holding = no
}
}
}
save_scope_as = designated_county
}
# Select an appropriate barony.
## If there's an empty space in the capital, we create a castle.
scope:designated_county = {
random_county_province = {
limit = { has_holding = no }
set_holding_type = castle_holding
barony = { save_scope_as = leased_barony }
}
}
# Create a suitable leader
create_character = {
template = ate_holy_order_faith_leader_character
location = scope:leased_barony.title_province
culture = root.culture
faith = scope:my_faith
save_scope_as = leader
}
# Create the actual holy order.
create_holy_order = {
leader = scope:leader
capital = scope:leased_barony
save_scope_as = new_holy_order
}
scope:leader = {
add_trait = order_member
add_piety_level = 2
add_gold = holy_order_starting_gold
every_courtier = { add_trait = order_member }
}
scope:leased_barony.title_province = {
# Walls & Towers.
if = {
limit = {
NOT = { has_building_or_higher = curtain_walls_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = curtain_walls_01
}
# Barracks.
if = {
limit = {
NOT = { has_building_or_higher = barracks_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = barracks_01
}
# Military Camps.
if = {
limit = {
NOT = { has_building_or_higher = military_camps_01 }
}
# If it doesn't have a free building slot, give it one.
if = {
limit = { free_building_slots = 0 }
add_province_modifier = extra_building_slot
}
# Add the building.
add_building = military_camps_01
}
}
create_holy_order_effect = yes
scope:my_faith = {
set_religious_head_title = scope:new_holy_order.title
}
}
}

View file

@ -1,750 +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
NOR = {
has_doctrine_parameter = claim_the_maxim_stone_active
has_doctrine_parameter = follows_americanist_presidency
}
}
}
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
NOR = {
has_doctrine_parameter = follows_grand_command
has_doctrine_parameter = follows_council_presidency
has_doctrine_parameter = follows_nohoch_tata
}
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/Holy Order Head of Faith re-creation event
faith_creation.0012 = {
hidden = yes
trigger = {
faith = {
doctrine_is_spiritual_type = yes
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_if = {
limit = { faith = { has_doctrine = doctrine_holy_order_head } }
create_character = {
template = ate_holy_order_faith_leader_character
location = root.capital_province
culture = root.culture
faith = root.faith
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_5
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 = {
scope:old_faith = faith:mervivant
faith = { exists = religious_head_title }
}
scope:new_title = {
set_coa = mervivant_hof
}
}
if = {
limit = {
scope:old_faith = faith:springsearcher
faith = { exists = religious_head_title }
}
scope:new_title = {
set_coa = d_springsearcher
}
}
if = {
limit = {
scope:old_faith = faith:pelagic
faith = { exists = religious_head_title }
}
scope:new_title = {
set_coa = d_fogsong
}
}
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 = {
OR = {
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_harmonic_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 = tenet_adaptive
#hey we need like more of these!
}
}
}
}
}
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 = {
OR = {
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 = {
OR = {
has_doctrine = tenet_sanctity_of_nature
}
}
}
desc = faith_creation.1001.desc.belief.nature
}
#Community
triggered_desc = {
trigger = {
scope:reformed_faith = {
OR = {
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
exists = religious_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
}
}
}
#Holy Order Head
triggered_desc = {
trigger = {
scope:reformed_faith = {
has_doctrine = doctrine_holy_order_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.holy_order.sameold
}
desc = faith_creation.1001.desc.holy_order
}
}
}
#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
doctrine_is_spiritual_type = yes
}
NOT = { exists = religious_head }
}
}
desc = faith_creation.1001.desc.no_holy_sites
}
}
}
left_portrait = {
character = scope:reformer
}
right_portrait = {
trigger = {
NOT = { 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
}
triggered_desc = {
trigger = {
scope:faith = {
has_doctrine = doctrine_holy_order_head
}
}
desc = faith_creation.1010.desc.holy_order
}
}
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 = {
doctrine_is_spiritual_type = yes
}
}
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
}
}
}