Hi all,
I've been trying to mod the holy war CB so that the targeted duchy becomes an independent tributary instead of being absorbed into your realm.
To do this I took a lot of inspiration from the kingdom liberation cb and I didn't expect much trouble.
Strangely enough, when I have yesmen enabled, my CB works as intended but, when I don't, it just ends the war without any territorial changes. I've been wracking my brain for a week now and I can't think of anything else to try. If someone has some advice I would love to hear it.
In the spoiler is my code for the on_success_title section, otherwise, the other sections of the CB are identical to the holy war CB.
Thanks for your help!
I've been trying to mod the holy war CB so that the targeted duchy becomes an independent tributary instead of being absorbed into your realm.
To do this I took a lot of inspiration from the kingdom liberation cb and I didn't expect much trouble.
Strangely enough, when I have yesmen enabled, my CB works as intended but, when I don't, it just ends the war without any territorial changes. I've been wracking my brain for a week now and I can't think of anything else to try. If someone has some advice I would love to hear it.
In the spoiler is my code for the on_success_title section, otherwise, the other sections of the CB are identical to the holy war CB.
Thanks for your help!
Code:
on_success_title = {
create_character = {
religion = ROOT
culture = ROOT
dynasty = random
random_traits = yes
female = no
age = 20
health = 7
fertility = 0.7
attributes = {
martial = 10
diplomacy = 10
stewardship = 10
}
flag = is_religious_liberation_ruler
}
new_character = {
remove_trait = cynical
add_trait = zealous
wealth = 250
prestige = 250
piety = 250
save_event_target_as = new_ruler
set_defacto_liege = THIS
}
if = {
limit = {
has_holder = no
}
usurp_title = { target = event_target:new_ruler type = invasion }
}
else = {
event_target:new_ruler = {
create_title = {
tier = DUKE
landless = no
temporary = no
custom_created = yes
culture = event_target:new_ruler
holder = event_target:new_ruler
name = "LIBERATED_KINGDOM"
base_title = PREV
}
}
}
FROM = {
random_realm_title = {
limit = {
tier = COUNT
duchy = { title = PREVPREVPREV }
}
location = {
event_target:new_ruler = {
usurp_title = { target = PREVPREV type = invasion }
}
}
}
}
event_target:new_ruler = {
vassalize_or_take_under_title = {
title = PREV
enemy = FROM
same_religion = yes # Only vassalize rulers of my religion
is_religious = yes
type = holy_war
}
}
ROOT = { make_tributary = { who = event_target:new_ruler tributary_type = default }}
}