From 04a7645cfa1f0e150106eed394c5f9ceae09fdc5 Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Tue, 10 Mar 2026 03:17:02 +0000 Subject: [PATCH] fixes --- common/laws/01_title_succession_laws.txt | 8 +- common/on_action/game_start.txt | 7 +- common/on_action/title_on_actions.txt | 18 ++-- common/on_action/yearly_on_actions.txt | 12 +-- .../00_succession_triggers.txt | 94 +++++++++++++++++++ .../succession_election/04_saxon_elective.txt | 14 +++ .../replace/prepublic_loc_l_english.yml | 2 +- 7 files changed, 128 insertions(+), 27 deletions(-) create mode 100644 common/scripted_triggers/00_succession_triggers.txt diff --git a/common/laws/01_title_succession_laws.txt b/common/laws/01_title_succession_laws.txt index 462959fd..b776d59a 100644 --- a/common/laws/01_title_succession_laws.txt +++ b/common/laws/01_title_succession_laws.txt @@ -226,7 +226,13 @@ # Noble Family Succession noble_family_succession_law = { can_title_have = { - is_noble_family_title = yes + OR = { + is_noble_family_title = yes + AND = { + is_nomad_title = yes + government_has_flag = government_is_prepublic + } + } } should_show_for_title = { # Never show this in the UI, just apply it through script always = no diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index fbdd71e4..272a051b 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -2699,13 +2699,12 @@ on_game_start_after_lobby = { save_scope_as = new_title } scope:new_title ?= { - add_title_law = single_heir_dynasty_house + add_title_law = noble_family_succession_law } } if = { limit = { government_has_flag = government_is_prepublic - is_landed = yes primary_title = { NOT = { has_title_law = saxon_elective_succession_law @@ -2714,9 +2713,7 @@ on_game_start_after_lobby = { } every_held_title = { limit = { - NOT = { - is_nomad_title = yes - } + title_tier > barony } add_title_law = saxon_elective_succession_law } diff --git a/common/on_action/title_on_actions.txt b/common/on_action/title_on_actions.txt index 1a1ca18a..394bc1fa 100644 --- a/common/on_action/title_on_actions.txt +++ b/common/on_action/title_on_actions.txt @@ -212,7 +212,7 @@ on_title_gain = { save_scope_as = new_title } scope:new_title ?= { - add_title_law = single_heir_dynasty_house + add_title_law = noble_family_succession_law } } if = { @@ -226,9 +226,7 @@ on_title_gain = { } every_held_title = { limit = { - NOT = { - is_nomad_title = yes - } + title_tier > barony } add_title_law = saxon_elective_succession_law } @@ -2848,7 +2846,7 @@ on_title_gain_inheritance = { save_scope_as = new_title } scope:new_title ?= { - add_title_law = single_heir_dynasty_house + add_title_law = noble_family_succession_law } } if = { @@ -2862,9 +2860,7 @@ on_title_gain_inheritance = { } every_held_title = { limit = { - NOT = { - is_nomad_title = yes - } + title_tier > barony } add_title_law = saxon_elective_succession_law } @@ -2934,7 +2930,7 @@ on_title_gain_usurpation = { save_scope_as = new_title } scope:new_title ?= { - add_title_law = single_heir_dynasty_house + add_title_law = noble_family_succession_law } } if = { @@ -2948,9 +2944,7 @@ on_title_gain_usurpation = { } every_held_title = { limit = { - NOT = { - is_nomad_title = yes - } + title_tier > barony } add_title_law = saxon_elective_succession_law } diff --git a/common/on_action/yearly_on_actions.txt b/common/on_action/yearly_on_actions.txt index 00e08a8d..683ade37 100644 --- a/common/on_action/yearly_on_actions.txt +++ b/common/on_action/yearly_on_actions.txt @@ -770,7 +770,7 @@ yearly_playable_pulse = { save_scope_as = new_title } scope:new_title ?= { - add_title_law = single_heir_dynasty_house + add_title_law = noble_family_succession_law } } if = { @@ -784,9 +784,7 @@ yearly_playable_pulse = { } every_held_title = { limit = { - NOT = { - is_nomad_title = yes - } + title_tier > barony } add_title_law = saxon_elective_succession_law } @@ -2725,7 +2723,7 @@ quarterly_playable_pulse = { save_scope_as = new_title } scope:new_title ?= { - add_title_law = single_heir_dynasty_house + add_title_law = noble_family_succession_law } } if = { @@ -2739,9 +2737,7 @@ quarterly_playable_pulse = { } every_held_title = { limit = { - NOT = { - is_nomad_title = yes - } + title_tier > barony } add_title_law = saxon_elective_succession_law } diff --git a/common/scripted_triggers/00_succession_triggers.txt b/common/scripted_triggers/00_succession_triggers.txt new file mode 100644 index 00000000..32bb4e8a --- /dev/null +++ b/common/scripted_triggers/00_succession_triggers.txt @@ -0,0 +1,94 @@ +#Special succession types +#If adding new types to the decision, use a trigger, otherwise they may break if the culture is split. + +special_succession_witengamot_trigger = { + culture = { has_cultural_parameter = witenagemot_succession_enabled } +} + +special_succession_thing_trigger = { + culture = { has_cultural_parameter = scandinavian_elective_enabled } +} + +special_succession_tanistry_trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_brythonic + has_cultural_pillar = heritage_goidelic + } + } +} + +special_succession_jirga_trigger = { + culture = { has_cultural_parameter = tribal_elective_enabled } +} + +historical_succession_access_single_heir_succession_law_trigger = { + trigger_if = { + limit = { government_allows = administrative } + OR = { + tgp_japan_single_heir_succession_override_trigger = yes + tgp_korea_single_heir_succession_override_trigger = yes + has_title = title:e_hindustan + has_title = title:h_china + AND = { + is_independent_ruler = yes + government_has_flag = government_is_steppe_admin + } + } + } + trigger_else = { + OR = { + has_title = title:k_austria + is_roman_emperor_trigger = yes + AND = { + has_title = title:e_france + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_reformed_carolingian_empire + } + } + has_title = title:e_hindustan + has_title = title:h_china + AND = { + government_has_flag = government_is_japan_feudal + is_independent_ruler = yes + } + #Add any subsequent exceptions here. + } + } +} + +historical_succession_access_single_heir_succession_law_youngest_trigger = { + NOT = { government_allows = administrative } + OR = { + #has_title = title:e_byzantium + #Add any subsequent exceptions here. + } +} + +historical_succession_access_single_heir_dynasty_house_trigger = { + NOT = { government_allows = administrative } + AND = { + has_title = title:d_bohemia + culture = { has_innovation = innovation_table_of_princes } + } +} + +can_have_meritocratic_regency_succession_law_trigger = { + has_tgp_dlc_trigger = yes + is_independent_ruler = yes + highest_held_title_tier = tier_empire + government_allows = administrative + government_allows = merit + NOT = { government_allows = obedience } # Stop Khanates + OR = { + # Ceremonial Monarch title always pairs with law + exists = primary_title.var:administrative_ui_special_title + # Jipjeong Jeong Jung-bu + AND = { + game_start_date = 1178.10.1 + has_title = title:e_goryeo + months_from_game_start < 1 + } + } +} diff --git a/common/succession_election/04_saxon_elective.txt b/common/succession_election/04_saxon_elective.txt index add2a524..4afd96db 100644 --- a/common/succession_election/04_saxon_elective.txt +++ b/common/succession_election/04_saxon_elective.txt @@ -70,6 +70,20 @@ saxon_elective = { #Farmer Elective NOT = { has_trait = incapable } } } + add = { + type = holder_council_members + limit = { + is_adult = yes + NOT = { has_trait = incapable } + } + } + add = { + type = holder_direct_vassals + limit = { + is_adult = yes + NOT = { has_trait = incapable } + } + } } candidate_score = { diff --git a/localization/english/replace/prepublic_loc_l_english.yml b/localization/english/replace/prepublic_loc_l_english.yml index 20374ca0..ed9a70bb 100644 --- a/localization/english/replace/prepublic_loc_l_english.yml +++ b/localization/english/replace/prepublic_loc_l_english.yml @@ -38,7 +38,7 @@ c_nf_colbrugha:0 "Farmstead of the $dynn_colbrugha$'s" c_nf_colbrugha_adj:0 "Farmer" c_nf_colbrugha_article:0 "The " - government_locked_to_elective:0 "Government is locked to Elctive" + government_locked_to_elective:0 "Government is locked to Elective" government_is_prepublic:0 "Has access to a [farmstead_i|E][farmstead|E]" farmstead_domicile_title: "Farmstead" farmstead_type: "Farmstead"