From 7a7b3fdb0160b50dba99e86af75e40d3392d3421 Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Sun, 1 Nov 2026 20:00:56 +0000 Subject: [PATCH] finishing the baking --- .../succession_appointment/admin_emperor.txt | 666 ++++++++++++++++++ .../succession_appointment/admin_governor.txt | 78 ++ 2 files changed, 744 insertions(+) create mode 100644 common/succession_appointment/admin_emperor.txt create mode 100644 common/succession_appointment/admin_governor.txt diff --git a/common/succession_appointment/admin_emperor.txt b/common/succession_appointment/admin_emperor.txt new file mode 100644 index 000000000..7cedcaf3a --- /dev/null +++ b/common/succession_appointment/admin_emperor.txt @@ -0,0 +1,666 @@ +admin_emperor = { + default_candidates = { holder_close_family landed_vassal } + + allow_children = yes + + candidate_score = { + value = { + add = appointment_score_base + # AGE + if = { + limit = { age <= 5 } + subtract = { + value = 100 + desc = infant_candidate_desc + } + } + else_if = { + limit = { age < 10 } + subtract = { + value = 50 + desc = child_candidate_desc + } + } + else_if = { + limit = { age < 16 } + subtract = { + value = 20 + desc = adolescent_candidate_desc + } + } + else_if = { + limit = { age > 60 } + subtract = { + value = 20 + desc = geriatric_candidate_desc + } + } + + # SKILLS + add = { + value = { + add = diplomacy + add = learning + add = martial + add = intrigue + add = stewardship + multiply = 2 + } + desc = sum_of_skills_desc + } + + # TRAITS + if = { + limit = { + has_trait = born_in_the_purple + } + add = { + value = 50 + desc = trait_born_in_the_purple + } + } + if = { + limit = { + has_trait = disfigured + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_disfigured + } + } + if = { + limit = { has_trait = clubfooted } + subtract = { + value = 15 + desc = trait_clubfooted + } + } + if = { + limit = { has_trait = dwarf } + subtract = { + value = 15 + desc = trait_dwarf + } + } + if = { + limit = { has_trait = hunchbacked } + subtract = { + value = 15 + desc = trait_hunchbacked + } + } + if = { + limit = { has_trait = lisping } + subtract = { + value = 20 + desc = trait_lisping + } + } + if = { + limit = { + OR = { + has_trait = inbred + has_trait = spindly + has_trait = scaly + has_trait = albino + has_trait = wheezing + has_trait = bleeder + has_trait_with_flag = age_related_ailment + } + } + subtract = { + value = 50 + desc = negative_trait_succession + } + } + if = { + limit = { + has_trait = incapable + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_incapable + } + } + if = { + limit = { + has_trait = blind + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_blind + } + } + if = { + limit = { + has_trait = eunuch_1 + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_eunuch + } + } + if = { + limit = { + has_trait = beardless_eunuch + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1500 + desc = trait_beardless_eunuch + } + } + if = { + limit = { + has_trait = disinherited + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_disinherited + } + } + if = { + limit = { has_trait = gallivanter } + subtract = { + value = 1000 + desc = trait_gallivanter + } + } + if = { + limit = { + government_has_flag = government_is_ecclesiastical + } + subtract = { + value = 8000 + desc = ecclesiastical_government + } + } + if = { + limit = { + government_has_flag = government_is_theocracy + } + subtract = { + value = 8000 + desc = theocracy_government + } + } + + # COUNCIL POSITIONS + if = { + limit = { + top_liege ?= { + legitimacy_level >= 3 + any_councillor ?= { this = root } + } + } + add = { + value = 20 + desc = councillor_position_desc + } + } + else_if = { + limit = { + top_liege ?= { + any_councillor ?= { this = root } + } + } + add = { + value = 10 + desc = councillor_position_desc + } + } + + # COURT POSITIONS + if = { + limit = { + top_liege ?= { + legitimacy_level >= 3 + any_court_position_holder ?= { + this = root + } + } + } + add = { + value = 10 + desc = court_position_succession_desc + } + } + else_if = { + limit = { + top_liege ?= { + any_court_position_holder ?= { + this = root + } + } + } + add = { + value = 5 + desc = court_position_succession_desc + } + } + + # RITE HOSTILITY + if = { + limit = { + top_liege.primary_title.state_rite ?= { + this != root.rite + rite_hostility_level = { + target = root.rite + value = faith_fully_accepted_level + } + } + } #Change to faith acceptance + subtract = { + value = 5 + desc = accepted_faith_succession_desc + } + } + else_if = { + limit = { + top_liege.primary_title.state_rite ?= { + rite_hostility_level = { + target = root.rite + value = faith_astray_level + } + } + } #Change to faith acceptance + subtract = { + value = 20 + desc = astray_faith_succession_desc + } + } + else_if = { + limit = { + top_liege.primary_title.state_rite ?= { + rite_hostility_level = { + target = root.rite + value = faith_hostile_level + } + } + } #Change to faith acceptance + subtract = { + value = 50 + desc = hostile_faith_succession_desc + } + } + else_if = { + limit = { + top_liege.primary_title.state_rite ?= { + rite_hostility_level = { + target = root.rite + value >= faith_evil_level + } + } + } #Change to faith acceptance + subtract = { + value = 100 + desc = evil_faith_sucession_desc + } + } + + if = { # Score for house members of the emperor is affected by the capital's popular opinion + limit = { + exists = top_liege.house + house ?= top_liege.house + } + add = { + value = top_liege.capital_county.county_holder_opinion + desc = popular_opinion_in_capital_desc + } + } + + # LIFESTYLE PERKS + if = { + limit = { has_perk = dignitas_perk } + add = { + value = 30 + desc = dignitas_perk_name + } + } + + # TITLE TIER + if = { + limit = { + is_landed = yes + highest_held_title_tier = tier_duchy + } + add = { + value = 10 + desc = duchy_tier_desc + } + } + if = { + limit = { + is_landed = yes + highest_held_title_tier = tier_kingdom + } + add = { + value = 20 + desc = kingdom_tier_desc + } + } + + # DIFFERENT CULTURE FROM IMPERIAL CAPITAL + if = { + limit = { + root.top_liege.capital_county.culture ?= { + this != root.culture + cultural_acceptance = { + target = root.culture + value = 0 + } + } + } + subtract = { + value = 50 + desc = no_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + this != root.culture + cultural_acceptance = { + target = root.culture + value <= 20 + } + } + } + subtract = { + value = 40 + desc = terrible_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + this != root.culture + cultural_acceptance = { + target = root.culture + value <= 40 + } + } + } + subtract = { + value = 30 + desc = poor_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + this != root.culture + cultural_acceptance = { + target = root.culture + value <= 60 + } + } + } + subtract = { + value = 20 + desc = mediocre_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + this != root.culture + cultural_acceptance = { + target = root.culture + value <= 80 + } + } + } + subtract = { + value = 10 + desc = accepted_foreign_culture + } + } + + # ELDEST ELIGIBLE CHILD OF EMPEROR + if = { + limit = { + scope:title.holder = { + OR = { + has_realm_law = male_preference_law + has_realm_law = male_only_law + } + } + is_male = yes + is_child_of = scope:title.holder + is_eunuch_trigger = no + NOT = { has_trait = bastard } + any_sibling = { + count = 0 + is_male = yes + age > prev.age + is_eunuch_trigger = no + NOT = { has_trait = bastard } + } + } + add = { + value = 30 + multiply = scope:title.holder.legitimacy_level + desc = eldest_imperial_son_desc + } + } + else_if = { + limit = { + scope:title.holder = { + OR = { + has_realm_law = female_preference_law + has_realm_law = female_only_law + } + } + is_female = yes + is_child_of = scope:title.holder + NOT = { has_trait = bastard } + any_sibling = { + count = 0 + is_female = yes + age > prev.age + NOT = { has_trait = bastard } + } + } + add = { + value = 30 + multiply = scope:title.holder.legitimacy_level + desc = eldest_imperial_daughter_desc + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = equal_law + } + is_eunuch_trigger = no + NOT = { has_trait = bastard } + is_child_of = scope:title.holder + any_sibling = { + count = 0 + age > prev.age + is_eunuch_trigger = no + NOT = { has_trait = bastard } + } + } + add = { + value = 30 + multiply = scope:title.holder.legitimacy_level + desc = eldest_imperial_child_desc + } + } + # CLOSE FAMILY + else_if = { + limit = { + is_close_family_of = scope:title.holder + } + add = { + value = 20 + multiply = scope:title.holder.legitimacy_level + desc = imperial_close_family_desc + } + } + # EXTENDED FAMILY + else_if = { + limit = { + is_close_or_extended_family_of = scope:title.holder + } + add = { + value = 15 + multiply = scope:title.holder.legitimacy_level + desc = imperial_close_extended_family_desc + } + } + # SAME HOUSE + else_if = { + limit = { + house = top_liege.house + } + add = { + value = 10 + multiply = scope:title.holder.legitimacy_level + desc = imperial_same_house_desc + } + } + + # SPOUSE AND THEIR FAMILY + if = { + limit = { + is_spouse_of = scope:title.holder + } + add = { + value = 4 + multiply = scope:title.holder.legitimacy_level + desc = spouse_of_emperor_desc + } + } + if = { + limit = { + scope:title.holder = { + any_spouse = { is_close_family_of = root } + NOT = { is_close_family_of = root } + } + } + add = { + value = 4 + multiply = scope:title.holder.legitimacy_level + desc = close_family_married_to_holder_desc + } + } + + # FRIENDS OF THE EMPEROR + if = { + limit = { + has_relation_friend = scope:title.holder + } + add = { + value = scope:title.holder.legitimacy_level + multiply = 4 + desc = imperial_friend_desc + } + } + if = { + limit = { + has_relation_best_friend = scope:title.holder + } + add = { + value = scope:title.holder.legitimacy_level + multiply = 8 + desc = imperial_best_friend_desc + } + } + if = { + limit = { + has_relation_ward = scope:title.holder + } + add = { + value = scope:title.holder.legitimacy_level + multiply = 8 + desc = imperial_guardian_desc + } + } + if = { + limit = { + exists = house + } + # All get to use their Family Rating + add = { + value = house.house_power_score + multiply = 0.5 + desc = "[powerful_family_rating|E]" + } + } + + # MODIFIERS + if = { + limit = { + has_character_flag = patriarch_support_2030 + } + add = { + value = 10 + desc = patriarch_support_2030_desc + } + } + + if = { + limit = { has_character_modifier = restored_greek_theme_modifier } + add = { + value = 50 + desc = restored_greek_theme_modifier + } + } + if = { + limit = { + has_character_flag = decried_weakness_score + } + add = { + value = 20 + desc = decried_weakness_score_desc + } + } + if = { + limit = { + has_character_flag = insulted_trait_candidate_score + } + add = { + value = 15 + desc = insulted_trait_score_desc + } + } + if = { + limit = { + has_character_flag = boosted_by_sycophant_score + } + add = { + value = 15 + desc = boosted_by_sycophant_score_desc + } + } + + # Renounced imperial aspriations (from decision) + if = { + limit = { + OR = { + has_character_modifier = ep3_admin_renounce_throne_personal + house ?= { has_house_modifier = ep3_admin_renounce_throne_house } + } + } + add = { + value = -1000 + desc = admin_renounced_throne + } + } + + add = appointment_score_final_factors + # ROUND THE NUMBER + divide = 1 + ceiling = yes + multiply = 1 + } + } +} diff --git a/common/succession_appointment/admin_governor.txt b/common/succession_appointment/admin_governor.txt new file mode 100644 index 000000000..9a269e40e --- /dev/null +++ b/common/succession_appointment/admin_governor.txt @@ -0,0 +1,78 @@ +admin_governor = { + default_candidates = { holder_close_family } + + candidate_score = { + value = { + # Base - Based on skills + add = { + value = martial + add = diplomacy + add = stewardship + add = intrigue + add = learning + multiply = 1 + desc = sum_of_skills_desc + } + + add = appointment_score_base + add = appointment_score_non_military + add = appointment_score_non_merit + add = appointment_score_governor + + if = { + limit = { + government_has_flag = government_is_ecclesiastical + } + subtract = { + value = 8000 + desc = ecclesiastical_government + } + } + if = { + limit = { + government_has_flag = government_is_theocracy + } + subtract = { + value = 8000 + desc = theocracy_government + } + } + # PIETY LEVEL (from admin family attribute) + if = { + limit = { + piety_level >= 1 + house ?= { + OR = { + has_house_aspiration_parameter = candidate_score_per_piety_level_1 + has_house_aspiration_parameter = candidate_score_per_piety_level_2 + has_house_aspiration_parameter = candidate_score_per_piety_level_3 + } + } + } + add = { + value = 0 + add = { + if = { + limit = { + house ?= { has_house_aspiration_parameter = candidate_score_per_piety_level_3 } + } + add = candidate_score_per_piety_level_3_value + } + else_if = { + limit = { + house ?= { has_house_aspiration_parameter = candidate_score_per_piety_level_2 } + } + add = candidate_score_per_piety_level_2_value + } + else = { + add = candidate_score_per_piety_level_1_value + } + } + multiply = piety_level + desc = "family_attribute_desc" + } + } + add = appointment_score_final_factors + } + } +}