Attempt 1 at holy orders head of faith

This commit is contained in:
edwardtheelbowhigh 2026-05-19 13:49:18 +01:00
parent ff646e671b
commit c7bd60cc44
16 changed files with 2996 additions and 4 deletions

View file

@ -608,6 +608,60 @@ on_character_faith_change = {
# Code on-action: once a month for each faith
# Root is the faith
on_faith_monthly = {
effect = {
if = {
limit = {
has_doctrine = doctrine_holy_order_head
}
every_faith_holy_order = {
limit = {
title = { is_head_of_faith = yes }
NOT = { exists = leader }
}
title = { save_scope_as = hof_holy_order }
scope:hof_holy_order.holder.faith = {
random_holy_site = {
limit = {
county.holder = {
realm_size > 1
faith = root
}
}
save_scope_as = leased_barony
}
}
create_character = {
template = ate_holy_order_faith_leader_character
location = scope:leased_barony.title_province
culture = scope:leased_barony.county.holder.culture
faith = root
gender_female_chance = {
if = {
limit = {
root = { has_doctrine_parameter = clergy_must_be_male }
}
add = 0
}
else_if = {
limit = {
root = { has_doctrine_parameter = clergy_must_be_female }
}
add = 100
}
else = {
add = 50
}
}
save_scope_as = leader
}
scope:leader = {
get_title = scope:hof_holy_order
get_title = scope:leased_barony
}
}
}
}
on_actions = {
faith_holy_order_land_acquisition_pulse
delay = { days = { 5 10 }}