From e1680574b9c08d2b018dd21a55e8acc7302a6289 Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Wed, 25 Nov 2026 19:35:48 +0000 Subject: [PATCH] fix --- .../00_grant_titles_interaction.txt | 151 +------- common/governments/00_government_types.txt | 346 +++++++++++++++++- .../scripted_rules/01_grant_title_rules.txt | 6 +- 3 files changed, 350 insertions(+), 153 deletions(-) diff --git a/common/character_interactions/00_grant_titles_interaction.txt b/common/character_interactions/00_grant_titles_interaction.txt index f5da69faf..c75a69c15 100644 --- a/common/character_interactions/00_grant_titles_interaction.txt +++ b/common/character_interactions/00_grant_titles_interaction.txt @@ -28,7 +28,6 @@ grant_titles_interaction = { target_filter = domain_titles interface_priority = 60 - ai_frequency = 2 # actor character giving the titles # recipient character receiving the titles @@ -2437,7 +2436,7 @@ grant_governorship_interaction = { target_filter = domain_titles interface_priority = 60 - ai_frequency = 6 + ai_frequency = 0 # actor character giving the titles # recipient character receiving the titles @@ -2454,153 +2453,7 @@ grant_governorship_interaction = { } can_be_picked_title = { - scope:target = { - is_leased_out = no - - scope:recipient = { - trigger_if = { # Governors can only be appointed to certain titles - limit = { - is_governor = yes - scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary - } - custom_tooltip = { # Only one province of highest rank - text = only_one_province_of_highest_rank_tt - NAND = { - highest_held_title_tier = scope:target.tier - scope:target.tier >= main_administrative_tier - trigger_if = { - limit = { - scope:target.tier >= tier_duchy - } - scope:target = { # We make an exception if recipient controls at least one de jure county - any_de_jure_county = { - count < 1 - OR = { - holder = scope:recipient - holder = { is_vassal_or_below_of = scope:recipient } - } - } - } - } - } - } - custom_tooltip = { - text = admin_must_be_de_jure_or_neighboring - any_held_title = { - OR = { - # The target title is part of your de jure structure - is_de_jure_liege_or_above_target = scope:target - target_is_de_jure_liege_or_above = scope:target - # Or is a neighboring county which de jure duchy is not part of your realm - AND = { - tier >= tier_county - any_title_to_title_neighboring_county = { this = scope:target } - scope:target = { - tier = tier_county - duchy = { - OR = { - NOT = { exists = holder } - holder = { - NOR = { - is_vassal_or_below_of = scope:puppet_or_actor - this = scope:puppet_or_actor - } - } - } - } - } - } - } - } - } - } - trigger_if = { # If recipient is landless and only have a family title, target title must be a duchy or above - limit = { - is_landless_ruler = yes - any_held_title = { is_noble_family_title = yes } - scope:target.tier < min_appointment_tier - } - primary_title.tier <= scope:target.tier - } - trigger_if = { # If recipient is a count, they can get only get counties within the same duchy - limit = { - highest_held_title_tier = tier_county - main_administrative_tier > tier_county - is_landed = yes - scope:target.tier = tier_county - } - custom_tooltip = { - text = admin_count_grant_only_counties - any_held_title = { duchy = scope:target.duchy } - } - } - tgp_is_ceremonial_liege_trigger = no - } - - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_ADMIN_PRIMARY - this != scope:puppet_or_actor.capital_province.duchy - } - - trigger_if = { - limit = { is_noble_family_title = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_NOBLE_FAMILY - always = no - } - } - trigger_if = { - limit = { exists = var:ceremonial_title } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_CEREMONIAL_TITLE - always = no - } - } - - trigger_if = { - limit = { - list_size:target_titles > 0 - } - custom_tooltip = { - text = GRANT_TITLES_ITEM_ADMIN_CANT_GIVE_MORE_THAN_ONE - any_in_list = { - list = target_titles - scope:target ?= this - } - } - } - - trigger_if = { - limit = { scope:target = title:k_fashion } - NOT = { scope:target = title:k_fashion } - } - } - - custom_description = { - text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch - subject = scope:puppet_or_actor.diarch - object = scope:puppet_or_actor - NAND = { - # Only applies if we have an active diarchy. - scope:puppet_or_actor = { has_active_diarchy = yes } - # Now, prevent us from giving away our diarch's land to invalidate them... - scope:target = { - any_dejure_vassal_title_holder = { this = scope:puppet_or_actor.diarch } - # ... _unless_ we're giving it _to_ the diarch. - scope:recipient != scope:puppet_or_actor.diarch - # Plus we only care if the title is below our tier. - tier < scope:puppet_or_actor.highest_held_title_tier - } - } - } - - custom_description = { - text = grant_titles_interaction_title_being_wagered - subject = scope:puppet_or_actor - NOT = { - scope:target = { has_variable = wagered_county } - } - } + always = no } auto_accept = yes diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index a9962d26f..40170d536 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -308,6 +308,184 @@ republic_government = { government_uses_military_budget government_locked_to_elective#coa flag } + grant_vassal_ai_will_do = { + value = 0 + if = { + limit = { + pam_nomad_grant_settled_government_trigger = yes + faith = { + NOR = { + religion = religion:islam_religion + has_doctrine_parameter = unreformed + } + } + } + add = 10 + } + if = { + limit = { + government_has_flag = government_is_administrative + is_independent_ruler = no + } + add = -500 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = greedy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = shy + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = arrogant + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = paranoid + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = trusting + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = just + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = gregarious + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = lazy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = diligent + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = craven + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + OR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + } + } + add = 20 + } + if = { + limit = { + government_has_flag = government_is_administrative + OR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + add = 20 + } + if = { + limit = { + government_has_flag = government_is_administrative + OR = { + has_trait = depressed_1 + has_trait = depressed_genetic + } + } + add = 20 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = ambitious + } + add = -15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = content + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = zealous + } + add = -15 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold > 1000 + } + add = -40 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level > 2 + } + add = -15 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold < 100 + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level < 2 + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level < 1 + } + add = 5 + } + } mechanic_type = republic is_mechanic_type_default = yes @@ -1032,8 +1210,174 @@ administrative_government = { mechanic_type = administrative is_mechanic_type_default = yes - possible_grant_vassal_governments = { theocracy_government ecclesiastical_government feudal_government clan_government } + possible_grant_vassal_governments = { administrative_government theocracy_government ecclesiastical_government feudal_government clan_government republic_government } + grant_vassal_ai_will_do = { + value = 0 + if = { + limit = { + government_has_flag = government_is_administrative + is_independent_ruler = no + } + add = -500 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = greedy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = shy + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = arrogant + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = paranoid + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = trusting + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = just + } + add = -5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = gregarious + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = lazy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = diligent + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = craven + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + OR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + } + } + add = 20 + } + if = { + limit = { + government_has_flag = government_is_administrative + OR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + add = 20 + } + if = { + limit = { + government_has_flag = government_is_administrative + OR = { + has_trait = depressed_1 + has_trait = depressed_genetic + } + } + add = 20 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = ambitious + } + add = -15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = content + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = zealous + } + add = -15 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold > 1000 + } + add = -40 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level > 2 + } + add = -15 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold < 100 + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level < 2 + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level < 1 + } + add = 5 + } + } color = { 72 6 92 } realm_mask_offset = { 0.0 0.01 } realm_mask_scale = { 1 1 } diff --git a/common/scripted_rules/01_grant_title_rules.txt b/common/scripted_rules/01_grant_title_rules.txt index 6335061be..88cb6484f 100644 --- a/common/scripted_rules/01_grant_title_rules.txt +++ b/common/scripted_rules/01_grant_title_rules.txt @@ -59,6 +59,7 @@ is_grant_government_shown = { OR = { this = government_type:feudal_government this = government_type:tribal_government + this = government_type:republic_government } } } @@ -70,9 +71,7 @@ is_grant_government_shown = { OR = { government_has_flag = government_is_administrative government_has_flag = government_is_theocracy - } - NOT = { - faith.religion = religion:islam_religion + government_has_flag = government_is_republic } } } @@ -91,6 +90,7 @@ is_grant_government_shown = { OR = { government_has_flag = government_is_administrative government_has_flag = government_is_theocracy + government_has_flag = government_is_republic } faith.religion = religion:islam_religion }