A lot of updating, making republics work
This commit is contained in:
parent
09fb57c091
commit
4d6f569e96
99 changed files with 9792 additions and 9342 deletions
|
|
@ -85,7 +85,7 @@ on_death = {
|
|||
is_ruler = yes
|
||||
top_liege != this
|
||||
has_variable = {
|
||||
name = vassal_directive_improve_development
|
||||
name = vassal_directive_improve_prosperity
|
||||
name = vassal_directive_train_commanders
|
||||
name = vassal_directive_build_maa
|
||||
name = vassal_directive_convert_faith
|
||||
|
|
@ -97,7 +97,7 @@ on_death = {
|
|||
}
|
||||
primary_heir ?= {
|
||||
has_none_of_variables = {
|
||||
name = vassal_directive_improve_development
|
||||
name = vassal_directive_improve_prosperity
|
||||
name = vassal_directive_train_commanders
|
||||
name = vassal_directive_build_maa
|
||||
name = vassal_directive_convert_faith
|
||||
|
|
@ -111,9 +111,9 @@ on_death = {
|
|||
}
|
||||
if = {
|
||||
limit = {
|
||||
has_variable = vassal_directive_improve_development
|
||||
has_variable = vassal_directive_improve_prosperity
|
||||
}
|
||||
primary_heir ?= { set_variable = vassal_directive_improve_development }
|
||||
primary_heir ?= { set_variable = vassal_directive_improve_prosperity }
|
||||
}
|
||||
else_if = {
|
||||
limit = {
|
||||
|
|
@ -193,6 +193,12 @@ on_death = {
|
|||
famed_parent = scope:famous_parent
|
||||
}
|
||||
}
|
||||
scope:new_memory = {
|
||||
set_variable = {
|
||||
name = parent_fame_lvl
|
||||
value = scope:famous_parent.prestige_level
|
||||
}
|
||||
}
|
||||
trigger_event = {
|
||||
id = bp2_yearly.4010
|
||||
days = 5
|
||||
|
|
@ -234,6 +240,12 @@ on_death = {
|
|||
pious_parent = scope:pious_parent
|
||||
}
|
||||
}
|
||||
scope:new_memory = {
|
||||
set_variable = {
|
||||
name = parent_piety_lvl
|
||||
value = scope:pious_parent.piety_level
|
||||
}
|
||||
}
|
||||
trigger_event = {
|
||||
id = bp2_yearly.4020
|
||||
days = 10
|
||||
|
|
@ -314,6 +326,92 @@ on_death = {
|
|||
}
|
||||
}
|
||||
|
||||
# Dead character has debtors who their heir should inherit (make them have a money claim)
|
||||
if = {
|
||||
limit = {
|
||||
any_in_list = { variable = owes_me_money }
|
||||
}
|
||||
save_scope_as = dead_lender
|
||||
if = { # Reversed form of story_cycle_loan on_owner_death, but for the lender
|
||||
limit = { primary_heir ?= { is_alive = yes } }
|
||||
primary_heir = { save_scope_as = new_lender }
|
||||
every_in_list = {
|
||||
variable = owes_me_money
|
||||
save_scope_as = debtor
|
||||
every_owned_story = {
|
||||
limit = {
|
||||
story_type = story_cycle_loan
|
||||
var:lender = scope:dead_lender
|
||||
NOR = {
|
||||
story_owner = scope:new_lender
|
||||
var:lender = { is_player_heir_of = scope:new_lender }
|
||||
}
|
||||
}
|
||||
save_scope_as = inherited_loan
|
||||
scope:new_lender = {
|
||||
send_interface_toast = {
|
||||
type = event_toast_effect_neutral
|
||||
title = ho_debt_inherited_title
|
||||
left_icon = scope:debtor
|
||||
right_icon = scope:dead_lender
|
||||
custom_description = {
|
||||
text = ho_debt_inherited_lender_tt
|
||||
subject = scope:debtor
|
||||
object = scope:dead_lender
|
||||
value = scope:inherited_loan.var:amount_owed
|
||||
}
|
||||
}
|
||||
}
|
||||
scope:debtor = {
|
||||
send_interface_toast = {
|
||||
type = event_toast_effect_neutral
|
||||
title = ho_debt_inherited_title
|
||||
left_icon = scope:new_lender
|
||||
right_icon = scope:dead_lender
|
||||
custom_description = {
|
||||
text = ho_debt_inherited_debtor_tt
|
||||
subject = scope:new_lender
|
||||
object = scope:dead_lender
|
||||
value = scope:inherited_loan.var:amount_owed
|
||||
}
|
||||
transfer_loan_effect = {
|
||||
OLD_LOAN = scope:inherited_loan
|
||||
NEW_LENDER = scope:new_lender
|
||||
NEW_DEBTOR = scope:debtor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else = { # Wipe loans if you have no heir
|
||||
every_in_list = {
|
||||
variable = owes_me_money
|
||||
every_owned_story = {
|
||||
limit = {
|
||||
story_type = story_cycle_loan
|
||||
var:lender = scope:dead_lender
|
||||
}
|
||||
save_scope_as = wiped_loan
|
||||
story_owner = {
|
||||
send_interface_toast = {
|
||||
type = event_toast_effect_neutral
|
||||
title = ho_debt_wiped_title
|
||||
right_icon = scope:dead_lender
|
||||
custom_description = {
|
||||
text = ho_debt_wiped_debtor_tt
|
||||
subject = this
|
||||
object = scope:dead_lender
|
||||
value = scope:wiped_loan.var:amount_owed
|
||||
}
|
||||
scope:wiped_loan = { end_loan_story_effect = yes }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if = { # Lower Grandeur a little bit on death
|
||||
limit = {
|
||||
has_royal_court = yes
|
||||
|
|
@ -349,85 +447,79 @@ on_death = {
|
|||
# }
|
||||
# destroy_title = title:e_mongol_empire
|
||||
# }
|
||||
|
||||
# Ludwig the Younger inherits East Francia and Karlmann Bavaria, as historically.
|
||||
if = {
|
||||
limit = {
|
||||
# Make sure we're looking at the right guy & that the circumstances haven't changed too much.
|
||||
this = character:90107
|
||||
highest_held_title_tier = tier_kingdom
|
||||
has_realm_law = confederate_partition_succession_law
|
||||
# Bavaria should be in a fit state for interfering with the handout order.
|
||||
title:k_bavaria = {
|
||||
OR = {
|
||||
is_title_created = no
|
||||
holder = root
|
||||
}
|
||||
any_in_de_jure_hierarchy = {
|
||||
tier = tier_county
|
||||
# More than 50%.
|
||||
count >= 22
|
||||
holder = {
|
||||
any_liege_or_above = { this = root }
|
||||
}
|
||||
}
|
||||
}
|
||||
NOT = { has_primary_title = title:k_bavaria }
|
||||
NOT = { exists = designated_heir }
|
||||
is_valid_designated_heir = character:42019
|
||||
}
|
||||
set_designated_heir = character:42019
|
||||
}
|
||||
else_if = {
|
||||
limit = {
|
||||
this = character:90107
|
||||
has_variable = ludwig_younger_designated_by_history
|
||||
designated_heir ?= character:42019
|
||||
NAND = {
|
||||
highest_held_title_tier = tier_kingdom
|
||||
has_realm_law = confederate_partition_succession_law
|
||||
title:k_bavaria = {
|
||||
OR = {
|
||||
is_title_created = no
|
||||
holder = root
|
||||
}
|
||||
any_in_de_jure_hierarchy = {
|
||||
tier = tier_county
|
||||
count >= 22
|
||||
holder = {
|
||||
any_liege_or_above = { this = root }
|
||||
}
|
||||
}
|
||||
}
|
||||
NOT = { has_primary_title = title:k_bavaria }
|
||||
}
|
||||
}
|
||||
clear_designated_heir = yes
|
||||
}
|
||||
# Salzburg sits outside any de jure kingdom, so it would follow Ludwig the Younger into East Francia instead of going to Bavaria with Karlmann
|
||||
if = {
|
||||
limit = {
|
||||
this = character:90107
|
||||
designated_heir ?= character:42019
|
||||
title:d_et_salzburg.holder ?= { is_vassal_of = root }
|
||||
character:42018 ?= {
|
||||
is_alive = yes
|
||||
is_vassal_of = root
|
||||
}
|
||||
}
|
||||
create_title_and_vassal_change = {
|
||||
type = granted
|
||||
save_scope_as = salzburg_change
|
||||
add_claim_on_loss = no
|
||||
}
|
||||
title:d_et_salzburg.holder = {
|
||||
change_liege = {
|
||||
liege = character:42018
|
||||
change = scope:salzburg_change
|
||||
}
|
||||
}
|
||||
resolve_title_and_vassal_change = scope:salzburg_change
|
||||
}
|
||||
#
|
||||
# # Ludwig the Younger inherits East Francia and Karlmann Bavaria, as historically.
|
||||
# if = {
|
||||
# limit = {
|
||||
# # Make sure we're looking at the right guy & that the circumstances haven't changed too much.
|
||||
# this = character:90107
|
||||
# highest_held_title_tier = tier_kingdom
|
||||
# has_realm_law = confederate_partition_succession_law
|
||||
# # Bavaria should be in a fit state for interfering with the handout order.
|
||||
# title:k_bavaria = {
|
||||
# OR = {
|
||||
# is_title_created = no
|
||||
# holder = root
|
||||
# }
|
||||
# any_in_de_jure_hierarchy = {
|
||||
# tier = tier_county
|
||||
# # More than 50%.
|
||||
# count >= 22
|
||||
# holder = {
|
||||
# any_liege_or_above = { this = root }
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# NOT = { has_primary_title = title:k_bavaria }
|
||||
# NOT = { exists = designated_heir }
|
||||
# is_valid_designated_heir = character:42019
|
||||
# }
|
||||
# set_designated_heir = character:42019
|
||||
# }
|
||||
# else_if = {
|
||||
# limit = {
|
||||
# this = character:90107
|
||||
# has_variable = ludwig_younger_designated_by_history
|
||||
# designated_heir ?= character:42019
|
||||
# NAND = {
|
||||
# highest_held_title_tier = tier_kingdom
|
||||
# has_realm_law = confederate_partition_succession_law
|
||||
# title:k_bavaria = {
|
||||
# OR = {
|
||||
# is_title_created = no
|
||||
# holder = root
|
||||
# }
|
||||
# any_in_de_jure_hierarchy = {
|
||||
# tier = tier_county
|
||||
# count >= 22
|
||||
# holder = {
|
||||
# any_liege_or_above = { this = root }
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# NOT = { has_primary_title = title:k_bavaria }
|
||||
# }
|
||||
# }
|
||||
# clear_designated_heir = yes
|
||||
# }
|
||||
# # Salzburg sits outside any de jure kingdom, so it would follow Ludwig the Younger into East Francia instead of going to Bavaria with Karlmann
|
||||
# if = {
|
||||
# limit = {
|
||||
# this = character:90107
|
||||
# designated_heir ?= character:42019
|
||||
# title:d_et_salzburg.holder ?= { is_vassal_of = root }
|
||||
# character:42018 ?= {
|
||||
# is_alive = yes
|
||||
# is_vassal_of = root
|
||||
# }
|
||||
# }
|
||||
# character:42018 = {
|
||||
# trigger_event = {
|
||||
# on_action = ludwig_german_salzburg_to_karlmann
|
||||
# days = 1
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
# Diarchies
|
||||
## Handle regency loyalties.
|
||||
|
|
@ -567,7 +659,7 @@ on_death = {
|
|||
primary_heir = { save_scope_as = new_wedding_host }
|
||||
}
|
||||
if = { # If such an heir exists, copy all involved scopes, clean up, and recreate the promise on all relevant characters
|
||||
limit = {
|
||||
limit = {
|
||||
exists = scope:new_wedding_host
|
||||
has_variable = promised_grand_wedding_to
|
||||
}
|
||||
|
|
@ -658,9 +750,9 @@ on_death = {
|
|||
# Send relevant event to player heir
|
||||
if = {
|
||||
limit = {
|
||||
exists = player_heir
|
||||
exists = involved_activity
|
||||
is_travelling = yes
|
||||
exists = player_heir
|
||||
# Tour has their own death invalidation event
|
||||
trigger_if = {
|
||||
limit = {
|
||||
|
|
@ -1107,7 +1199,10 @@ on_death = {
|
|||
|
||||
# Court position boon invalidation
|
||||
if = {
|
||||
limit = { exists = var:booner_target }
|
||||
limit = {
|
||||
exists = var:booner_target
|
||||
exists = employer
|
||||
}
|
||||
employed_booner_invalidation_effect = { EMPLOYEE = root LIEGE = root.employer }
|
||||
}
|
||||
# Cleanup booner focus on dead courtiers
|
||||
|
|
@ -2030,7 +2125,7 @@ on_death = {
|
|||
if = {
|
||||
limit = {
|
||||
OR = {
|
||||
NOT = {
|
||||
NOT = {
|
||||
player_heir = { has_variable = not_subject_to_succession_trials }
|
||||
}
|
||||
primary_title.tier > player_heir.primary_title.tier
|
||||
|
|
@ -2174,7 +2269,7 @@ on_death = {
|
|||
}
|
||||
if = {
|
||||
limit = { is_playable_character = no }
|
||||
set_player_character = top_liege.primary_title.var:administrative_ui_special_title.holder
|
||||
set_player_character = ceremonial_liege
|
||||
}
|
||||
create_title_and_vassal_change = {
|
||||
type = appointment
|
||||
|
|
@ -2183,7 +2278,7 @@ on_death = {
|
|||
random_held_title = {
|
||||
limit = { is_noble_family_title = yes }
|
||||
change_title_holder = {
|
||||
holder = top_liege.primary_title.var:administrative_ui_special_title.holder
|
||||
holder = ceremonial_liege
|
||||
change = scope:change
|
||||
}
|
||||
}
|
||||
|
|
@ -2220,6 +2315,7 @@ on_death = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Beatify dead order founders
|
||||
if = {
|
||||
limit = {
|
||||
|
|
@ -2274,7 +2370,7 @@ on_death = {
|
|||
}
|
||||
if = {
|
||||
limit = {
|
||||
primary_title = {
|
||||
primary_title ?= {
|
||||
has_variable = founder
|
||||
var:founder = {
|
||||
is_alive = yes
|
||||
|
|
@ -2338,6 +2434,7 @@ on_death = {
|
|||
else = {
|
||||
add_trait = saint
|
||||
}
|
||||
#TODO_PAM_JC order should lose worldliness from its founder becoming a saint
|
||||
}
|
||||
#PAM - Holy Myron: the herb-gathering chaplain dies en route; inform whoever sent them
|
||||
if = {
|
||||
|
|
@ -2704,6 +2801,29 @@ ce3_theocrat_dynasty_chain_succession = {
|
|||
}
|
||||
}
|
||||
|
||||
## Root = Karlmann, one day after Ludwig the German died with Ludwig the Younger as designated heir
|
||||
## change_liege does nothing until Karlmann outranks the archbishop, so we wait until he is King of Bavaria
|
||||
#ludwig_german_salzburg_to_karlmann = {
|
||||
# trigger = {
|
||||
# has_title = title:k_bavaria
|
||||
# title:d_et_salzburg.holder ?= { is_vassal_of = character:42019 }
|
||||
# }
|
||||
# effect = {
|
||||
# create_title_and_vassal_change = {
|
||||
# type = granted
|
||||
# save_scope_as = salzburg_change
|
||||
# add_claim_on_loss = no
|
||||
# }
|
||||
# title:d_et_salzburg.holder = {
|
||||
# change_liege = {
|
||||
# liege = root
|
||||
# change = scope:salzburg_change
|
||||
# }
|
||||
# }
|
||||
# resolve_title_and_vassal_change = scope:salzburg_change
|
||||
# }
|
||||
#}
|
||||
|
||||
# Root = character
|
||||
# Triggered when someone is about to die from a natural death but is given a second chance by meeting
|
||||
# the has_natural_death_second_chance scripted rule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue