hopefully updated on actions and scripted triggers
This commit is contained in:
parent
84ac41f6ca
commit
a4d812a52c
27 changed files with 10879 additions and 4415 deletions
|
|
@ -258,7 +258,7 @@ on_death = {
|
|||
}
|
||||
if = {
|
||||
limit = {
|
||||
player_heir = { is_ai = no NOT = { government_has_flag = government_allows_nomad_domicile_titles }}
|
||||
player_heir = { is_ai = no }
|
||||
}
|
||||
player_heir = {
|
||||
every_held_title = {
|
||||
|
|
@ -273,16 +273,11 @@ on_death = {
|
|||
limit = {
|
||||
is_ai = no
|
||||
}
|
||||
if = {
|
||||
every_held_title = {
|
||||
limit = {
|
||||
NOT = { government_has_flag = government_allows_nomad_domicile_titles }
|
||||
}
|
||||
every_held_title = {
|
||||
limit = {
|
||||
is_nomad_title = yes
|
||||
}
|
||||
set_variable = player_domicile_title
|
||||
is_nomad_title = yes
|
||||
}
|
||||
set_variable = player_domicile_title
|
||||
}
|
||||
player_heir = {
|
||||
add_character_flag = {
|
||||
|
|
@ -351,7 +346,7 @@ on_death = {
|
|||
# destroy_title = title:e_mongol_empire
|
||||
# }
|
||||
|
||||
# Fix gods-damned Bavaria splitting from East Francia in an ugly fashion in 867.
|
||||
# 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.
|
||||
|
|
@ -374,28 +369,60 @@ on_death = {
|
|||
}
|
||||
}
|
||||
NOT = { has_primary_title = title:k_bavaria }
|
||||
# Players can sort this themselves: you just need to have Bavaria as your primary title and it's all fine.
|
||||
is_ai = yes
|
||||
NOT = { exists = designated_heir }
|
||||
is_valid_designated_heir = character:42019
|
||||
}
|
||||
# If we've got no Bavaria, create it.
|
||||
if = {
|
||||
limit = {
|
||||
title:k_bavaria = { is_title_created = no }
|
||||
}
|
||||
create_title_and_vassal_change = {
|
||||
type = created
|
||||
save_scope_as = change
|
||||
}
|
||||
title:k_bavaria = {
|
||||
change_title_holder = {
|
||||
holder = root
|
||||
change = scope:change
|
||||
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 }
|
||||
}
|
||||
resolve_title_and_vassal_change = scope:change
|
||||
}
|
||||
# Then switch around.
|
||||
set_primary_title_to = 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
|
||||
}
|
||||
|
||||
# Diarchies
|
||||
|
|
@ -784,12 +811,6 @@ on_death = {
|
|||
limit = { ep1_artifact_is_court_artifact_trigger = yes }
|
||||
set_variable = equipped_court_succession
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
any_equipped_character_artifact = { artifact_visual_after_death_trigger = yes }
|
||||
}
|
||||
trigger_event = death_management.0150
|
||||
}
|
||||
}
|
||||
|
||||
if = {
|
||||
|
|
@ -2341,6 +2362,25 @@ on_death = {
|
|||
}
|
||||
}
|
||||
}
|
||||
# CE3 achievement: The Father, the Son, and the Holy Grandson - pass the theocrat dynasty chain to the player's same-dynasty heir
|
||||
if = {
|
||||
limit = {
|
||||
is_ai = no
|
||||
has_variable = ce3_theocrat_dynasty_chain
|
||||
exists = dynasty
|
||||
player_heir ?= { dynasty ?= root.dynasty }
|
||||
}
|
||||
save_scope_value_as = {
|
||||
name = ce3_theocrat_dynasty_chain_predecessor
|
||||
value = var:ce3_theocrat_dynasty_chain
|
||||
}
|
||||
player_heir = {
|
||||
trigger_event = {
|
||||
on_action = ce3_theocrat_dynasty_chain_succession
|
||||
days = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
#If you are a Christian ruler who does not take pam_decision_last_rites their will have their legitimacy and vassal opinion lowered
|
||||
if = {
|
||||
limit = {
|
||||
|
|
@ -2603,6 +2643,33 @@ pam_dulia_personal_sainthood_convert = {
|
|||
}
|
||||
}
|
||||
|
||||
# Root = the player's heir, one day after the player's same-dynasty predecessor died
|
||||
# scope:ce3_theocrat_dynasty_chain_predecessor = the predecessor's chain length
|
||||
ce3_theocrat_dynasty_chain_succession = {
|
||||
trigger = {
|
||||
is_ai = no
|
||||
exists = scope:ce3_theocrat_dynasty_chain_predecessor
|
||||
government_has_flag = government_is_theocracy
|
||||
any_held_title = { has_clerical_region = yes }
|
||||
}
|
||||
effect = {
|
||||
set_variable = {
|
||||
name = ce3_theocrat_dynasty_chain
|
||||
value = {
|
||||
add = scope:ce3_theocrat_dynasty_chain_predecessor
|
||||
add = 1
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = { var:ce3_theocrat_dynasty_chain >= 3 }
|
||||
add_achievement_global_variable_effect = {
|
||||
VARIABLE = ce3_07_the_father_the_son_and_the_holy_grandson_achievement_unlocked
|
||||
VALUE = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# 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