From 24bd24e747287af7f14a93b1adefea7c8601c2d0 Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Sun, 1 Nov 2026 23:08:12 +0000 Subject: [PATCH 1/3] fix --- .../NEOW_grant_titles_interaction.txt | 1497 +++++++++++++++++ common/governments/00_government_types.txt | 2 +- .../scripted_rules/01_grant_title_rules.txt | 307 ++++ .../zz_NEOW_council_stuff_l_english.yml | 12 + 4 files changed, 1817 insertions(+), 1 deletion(-) create mode 100644 common/character_interactions/NEOW_grant_titles_interaction.txt create mode 100644 common/scripted_rules/01_grant_title_rules.txt diff --git a/common/character_interactions/NEOW_grant_titles_interaction.txt b/common/character_interactions/NEOW_grant_titles_interaction.txt new file mode 100644 index 000000000..3ea568e30 --- /dev/null +++ b/common/character_interactions/NEOW_grant_titles_interaction.txt @@ -0,0 +1,1497 @@ +# Be aware that the actual granting of the title happens in code! +# Extra custom Grant Titles functionality: +# - scope:government_type may be set when a specific government type will be switched to with the title grant (not set = default government type) +# +# Related scripted rules: +# - allowed_to_be_granted_titles_by: checked outside of the interaction for candidates +# - is_grant_government_shown: checks if a government type should be shown as possible granting government type (for any recipient) - hidden in interface if not true +# - is_grant_government_valid: checks if a government type is valid to be given to a specific recipient (will create tooltip) +# Government Type database: +# - possible_grant_vassal_governments = {..} - list of base government types a government could possibly grant +# - grant_vassal_ai_will_do = {} - scoring of each possible government type to grant (after filtered by 'possible_grant_vassal_governments', 'is_grant_government_shown' and 'is_grant_government_valid' + +# Be aware that the actual granting of the title happens in code! +# See 'grant_titles_interaction' for functionality of granting different government types. +grant_hereditary_title_admin_interaction = { + icon = icon_found_despotate + category = interaction_category_vassal + common_interaction = yes + + desc = grant_governorship_interaction_desc + + special_interaction = grant_governorship_interaction + interface = grant_titles + target_type = title + target_source = puppet_or_actor + target_filter = domain_titles + interface_priority = 60 + + # actor character giving the titles + # recipient character receiving the titles + + is_shown = { + scope:puppet_or_actor != scope:recipient + scope:puppet_or_actor ?= { + NOT = { + government_has_flag = cannot_be_vassal_or_liege + } + } + scope:actor = { + government_has_mechanic = administrative + } + scope:recipient = { + OR = { + target_is_liege_or_above = scope:puppet_or_actor + is_pool_guest_of = scope:puppet_or_actor + AND = { + scope:puppet_or_actor.faith.religious_head ?= scope:recipient + top_liege ?= this + } + } + } + trigger_if = { + limit = { + scope:puppet_or_actor = { government_has_flag = government_is_nomadic } + } + scope:recipient = { NOT = { government_has_flag = government_is_herder } } + } + } + + is_valid_showing_failures_only = { + scope:recipient = { + custom_tooltip = { + text = can_be_granted_titles_interaction_tt + OR = { + can_be_granted_titles_by = { RULER = scope:puppet_or_actor } + can_be_granted_theocratic_titles_by = { RULER = scope:puppet_or_actor } + AND = { + is_diarch_of_target = scope:puppet_or_actor + scope:puppet_or_actor = { has_diarchy_active_parameter = diarchy_is_co_rulership } + } + } + } + NOT = { is_at_war_with = scope:puppet_or_actor } + OR = { # Monks are disinherited from secular land; the exemption keys on the granter's government because the titles are picked after this check + NOT = { has_trait = devoted } + scope:puppet_or_actor = { government_has_flag = government_is_theocracy } + } + bp2_valid_for_standard_interactions_trigger = yes + trigger_if = { + limit = { is_ruler = no } + is_imprisoned = no + } + # DON'T TAKE OTHER PLAYERS' ACCLAIMED KNIGHTS + custom_description = { + text = grant_title_stealing_acclaimed_knight + subject = scope:recipient + NOR = { + AND = { + is_acclaimed = yes + liege ?= { + is_ai = no + this != scope:puppet_or_actor + } + } + AND = { + is_acclaimed = yes + scope:actor = { is_ai = yes } + } + } + } + # Gallivanters won't accept additional responsibilities. + NOT = { has_trait = gallivanter } + # TGP JAPAN + tgp_japan_grant_titles_restriction_trigger = { + GRANTER = scope:puppet_or_actor + GRANTEE = scope:recipient + } + } + custom_description = { + text = is_not_theocratic_court_chaplain + subject = scope:recipient + NAND = { + scope:puppet_or_actor.rite = { + rite_has_doctrine = doctrine_theocracy_temporal + } + scope:puppet_or_actor = { NOT = { government_has_flag = government_is_theocracy } } + scope:recipient = { + rite = { + rite_has_doctrine = doctrine_theocracy_temporal + } + has_council_position = councillor_court_chaplain + } + scope:puppet_or_actor.faith.religious_head != scope:recipient + } + } + scope:puppet_or_actor = { + any_held_title = { + count > 1 + } + } + } + + can_send = { + trigger_if = { + limit = { + scope:puppet_or_actor = { + highest_held_title_tier >= tier_kingdom + has_diarchy_active_parameter = primeminister_requires_duchy + diarch = scope:recipient + } + } + custom_tooltip = { + text = primeminister_requires_duchy.tt.blocked_grant + any_in_list = { + list = target_titles + tier >= tier_duchy + } + } + } + } + + can_be_picked_title = { + scope:target = { + is_leased_out = no + + trigger_if = { + limit = { is_noble_family_title = yes } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_NOBLE_FAMILY + always = no + } + } + + trigger_if = { + limit = { + scope:puppet_or_actor = { + NOT = { + has_government = nomad_government + } + } + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + scope:recipient = { + is_ruler = no + } + } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_NOMADIC_TITLES_TO_NON_NOMADS_TITLE + always = no + } + } + + trigger_if = { + limit = { is_nomad_title = yes } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_NOMAD_TITLE + always = no + } + } + + trigger_if = { + limit = { + is_head_of_faith = yes + scope:recipient.faith.religious_head != scope:puppet_or_actor.faith.religious_head + } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_HEAD_OF_FAITH_TO_INFIDEL + scope:recipient.faith.religious_head = scope:puppet_or_actor.faith.religious_head + } + } + + trigger_if = { + limit = { + scope:recipient = scope:puppet_or_actor.player_heir + scope:puppet_or_actor = { has_partition_succession_realm_law_trigger = yes } + } + custom_description = { + text = partition_primary_heir_unfair + subject = scope:recipient + object = scope:puppet_or_actor + current_heir = scope:recipient + } + } + trigger_if = { + limit = { scope:target = title:k_fashion } + NOT = { scope:target = title:k_fashion } + } + custom_tooltip = { + text = cannot_grant_ceremonial_title + NOT = { exists = var:ceremonial_title } + } + + trigger_if = { + limit = { has_clerical_region = yes } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_CLERICAL_TITLE + always = no + } + } + + trigger_if = { + limit = { pam_title_is_clerical_elector_trigger = yes } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_CLERICAL_ELECTOR + always = no + } + } + + trigger_if = { + limit = { pam_title_is_antipope_office_trigger = yes } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_ANTIPOPE_TITLE + always = no + } + } + + trigger_if = { + limit = { + exists = situation:the_christian_church + this = title:k_papal_state + } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_HEAD_OF_FAITH + always = no + } + } + } + + custom_description = { + text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch + subject = scope:puppet_or_actor.diarch + 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_children_not_allowed_temple + subject = scope:recipient + NOR = { + AND = { + scope:recipient = { + is_adult = no + } + scope:target = { + tier = tier_barony + title_province = { has_building_with_flag = temple } + } + } + AND = { + scope:recipient = { + is_adult = no + } + scope:target = { + tier = tier_county + + title_province = { + is_county_capital = yes + has_building_with_flag = temple + } + } + } + } + } + + custom_description = { + text = grant_titles_interaction_title_being_wagered + NOT = { + scope:target = { has_variable = wagered_county } + } + } + } + + auto_accept = yes + + on_auto_accept = { + scope:recipient = { + trigger_event = char_interaction.0110 + } + } + + on_accept = { + if = { + limit = { + scope:puppet_or_actor = { + government_has_flag = government_is_nomadic + vassal_limit_available <= 0 + is_independent_ruler = yes + scope:recipient = { + NOT = { is_vassal_of = scope:puppet_or_actor } + } + } + } + custom_tooltip = grant_title_nomad_and_at_vassal_limit + } + scope:recipient = { + add_character_flag = { + flag = domicile_culture_and_faith_check + days = 1 + } + } + if = { + limit = { + scope:recipient = { + is_acclaimed = yes + liege = { + this = scope:puppet_or_actor + } + } + scope:target = { + tier > tier_barony + } + } + custom_tooltip = grant_title_landing_acclaimed_knight_warning + } + + grant_title_holy_order_patronage_warning_effect = yes + scope:recipient = { + if = { + limit = { + top_liege = this + save_temporary_scope_as = recipient_is_independent + } + } + if = { + limit = { + NOT = { + has_relation_friend = scope:puppet_or_actor + } + } + if = { + # then verify the right struggle phase + limit = { + is_diff_faith_or_culture_trigger = { + CHAR = scope:puppet_or_actor + STATUS = involved + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_to_leads_to_friendship + } + } + progress_towards_friend_effect = { + REASON = friend_granted_title + CHARACTER = scope:puppet_or_actor + OPINION = 0 + } + } + } + } + + if = { + limit = { + OR = { + any_in_list = { + list = target_titles + tier = tier_county + culture = scope:recipient.culture + NOR = { + culture = scope:puppet_or_actor.culture + recent_history = { + type = granted + years = 10 + } + } + } + any_in_list = { + list = target_titles + tier >= tier_duchy + title_capital_county = { + culture != scope:puppet_or_actor.culture + culture = scope:recipient.culture + } + NOT = { + recent_history = { + type = granted + years = 10 + } + } + } + } + } + scope:recipient.culture = { + change_cultural_acceptance = { + target = scope:puppet_or_actor.culture + value = grant_title_cultural_acceptance_impact + desc = cultural_acceptance_gain_granted_title + } + } + } + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_county + } + scope:puppet_or_actor.culture = { has_cultural_parameter = grants_to_lowborns_bonuses } + scope:recipient = { + is_lowborn = yes + } + } + every_in_list = { + list = target_titles + limit = { tier = tier_county } + change_county_control = 30 + } + scope:recipient = { + add_trait = peasant_leader + } + } + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_county + } + scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_give_prestige } + exists = scope:puppet_or_actor.house + exists = scope:recipient.house + scope:puppet_or_actor.house = scope:recipient.house + } + scope:puppet_or_actor = { + add_prestige = { + value = 0 + every_in_list = { + list = target_titles + limit = { tier = tier_hegemony } + add = monumental_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_empire } + add = massive_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = major_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = medium_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = minor_prestige_gain + } + } + } + } + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_county + } + scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_gives_renown } + exists = scope:puppet_or_actor.house + exists = scope:recipient.house + scope:puppet_or_actor.house = scope:recipient.house + } + scope:puppet_or_actor.dynasty = { + add_dynasty_prestige = { + value = 0 + every_in_list = { + list = target_titles + limit = { tier = tier_hegemony } + add = scope:puppet_or_actor.dynasty.monumental_dynasty_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_empire } + add = scope:puppet_or_actor.dynasty.massive_dynasty_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = scope:puppet_or_actor.dynasty.major_dynasty_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = scope:puppet_or_actor.dynasty.medium_dynasty_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_county } + add = scope:puppet_or_actor.dynasty.minor_dynasty_prestige_gain + } + } + } + } + + # Iterate over all given titles + # - Add opinion modifiers + # - Collect titles that discontent reduction can later be derived from + every_in_list = { + list = target_titles + save_temporary_scope_as = this_title + if = { + limit = { + exists = scope:landed_title + } + scope:recipient = { + if = { + limit = { + scope:this_title.tier = tier_barony + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_barony + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier = tier_county + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_county + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + if = { + limit = { + scope:actor = { is_ai = no } + } + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -5 + } + } + } + else = { # Can't really stop the AI from landing lowborns, so throttle it a bit so that great conquerors don't annihilate their opinion + random = { + chance = 25 + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -5 + } + } + } + } + } + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier = tier_duchy + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_duchy + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -20 + } + } + } + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier = tier_kingdom + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_kingdom + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -50 + } + } + } + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier >= tier_empire + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_empire + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -80 + } + } + } + } + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = -60 + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + } + + #Promised a vassal this title they had a claim on (vassal.2901) + if = { + limit = { + scope:puppet_or_actor = { + exists = var:was_promised_title + var:was_promised_title = scope:recipient + } + } + if = { + limit = { + scope:recipient = { + exists = var:promised_title + } + scope:landed_title = scope:recipient.var:promised_title + } + scope:puppet_or_actor = { + trigger_event = { + id = vassal.2910 + days = { 7 14 } + } + } + } + } + } + if = { + limit = { + scope:recipient = { + has_trait = bastard + } + } + custom_tooltip = grant_title_to_bastard_dynasty_warning + } + } # every_in_list + + + # The accumulated discontent reduction of the recipient + scope:recipient = { + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = grant_title_opinion_sum_discontent_calc + } + } + + # Viziers may be booted from their job. + scope:puppet_or_actor = { + if = { + limit = { + # Assuming this is relevant at all. + diarch ?= scope:recipient + # And that scope:puppet_or_actor can do without a supervisor atm. + can_leave_diarchy_trigger = yes + # Aaaaand that their diarchy supports this type of thing. + OR = { + has_diarchy_parameter = primeminister_requires_county + has_diarchy_parameter = primeminister_requires_duchy + } + } + # Is this a duchy? + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_duchy + } + } + custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.duchy_sufficient + end_diarchy = yes + } + # Is this a county? + else_if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_county + } + } + # Is that insufficient? + if = { + limit = { has_diarchy_active_parameter = primeminister_requires_duchy } + custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.county_insufficient + } + # Is that sufficient? + else = { + custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.county_sufficient + end_diarchy = yes + } + } + # Is this a barony? + else_if = { + limit = { + any_in_list = { + list = target_titles + count = all + tier = tier_barony + } + } + custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.barony_doesnt_end + } + } + } + + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_empire + } + } + custom_tooltip = grant_title_modifier_stack_empires + } + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_kingdom + } + } + custom_tooltip = grant_title_modifier_stack_kingdoms + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_duchy + } + } + custom_tooltip = grant_title_modifier_stack_duchies + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_county + } + } + custom_tooltip = grant_title_modifier_stack_counties + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_barony + } + } + custom_tooltip = grant_title_modifier_stack_baronies + } + if = { + limit = { + trigger_if = { + limit = { scope:actor = { is_ai = no } } + scope:puppet_or_actor = { + any_vassal = { + vassal_stance = courtly + } + } + } + scope:recipient = { + is_lowborn = yes + } + any_in_list = { + list = titles_to_grant + tier >= tier_county + } + } + custom_tooltip = grant_title_modifier_courtly_lowborn_grant_penalty + } + if = { + limit = { + scope:recipient = { is_a_faction_member = yes } + } + custom_tooltip = grant_title_modifier_stack_discontent + } + + # Jealousy check + if = { + limit = { + any_in_list = { + list = titles_to_grant + any_claimant = { grant_title_rivalry_trigger = yes } + } + } + hidden_effect = { + random = { + chance = 25 + ordered_in_list = { + list = titles_to_grant + limit = { + any_claimant = { grant_title_rivalry_trigger = yes } + } + order_by = tier + save_scope_as = claim_title + ordered_claimant = { + limit = { grant_title_rivalry_trigger = yes } + order_by = primary_title.tier + save_scope_as = claim_vassal + if = { + limit = { + scope:recipient = { is_lowborn = yes } + } + scope:recipient = { save_scope_as = lowborn_scope } + } + else_if = { + limit = { + scope:recipient = { has_claim_on = scope:claim_title } + } + scope:recipient = { save_scope_as = claimant_scope } + } + scope:puppet_or_actor = { + trigger_event = { + id = bp1_yearly.8070 + days = 5 + } + } + } + } + } + } + } + + #Stress impact + scope:puppet_or_actor = { + if = { + limit = { + any_in_list = { + list = target_titles + trigger_if = { + limit = { tier = tier_barony } + title_province.barony = { + has_wrong_holding_type = no + } + } + count >= 1 + } + } + + # Generous characters enjoy giving away titles + if = { + limit = { + has_trait = generous + } + add_stress = generous_title_grant_value + } + + # Gnostics lose stress for giving away titles. + if = { + limit = { + scope:puppet_or_actor.rite = { + rite_has_parameter = granting_titles_gives_stress + } + } + scope:puppet_or_actor = { + add_stress = { + value = 0 + + # Base stress value scaled on title tier. + every_in_list = { + list = target_titles + + add = { + value = 0 + + if = { + limit = { this.tier = tier_county } + add = minor_stress_loss # 10 base + } + else_if = { + limit = { this.tier = tier_duchy } + add = { + value = medium_stress_loss + multiply = 1.25 # 25 base + } + } + else_if = { + limit = { this.tier = tier_kingdom } + add = { + value = major_stress_loss + multiply = 2 # 80 base + } + } + else_if = { + limit = { this.tier >= tier_empire } + add = { + value = monumental_stress_loss + multiply = 2 # 200 base + } + } + + # Lose more stress for giving away titles of your primary tier; lose less stress for giving away titles far below your primary in tier. + multiply = { + value = this.tier + add = 1 + divide = scope:puppet_or_actor.primary_title.tier + } + + # Round to the nearest multiple of 5. + divide = 5 + round = yes + multiply = 5 + + # For a Duke, this will be x1.25 for Duchies (-30) and x1 for Counties(-10) + # For a King, this will be x1.25 for a Kingdom (-100), x1 for a Duchy (-25) and x0.75 for Counties(-10) + # For an Emperor, this will be x1.25 for an Empire(-200), x1 for a Kingdom(-80), x0.75 for a Duchy(-20) and x0.4 for a Counties (-5) + } + } + } + } + } + + # Greedy & ambitious ruler gain stress for giving away titles if they would normally be able to keep them. + if = { + limit = { + # Pre-filter + OR = { + has_trait = greedy + has_trait = ambitious + } + domain_size <= domain_limit # Not over my domain limit + any_in_list = { + list = target_titles + tier <= tier_county # At least 1 selected title counts toward domain limit + } + + # Special exemption for lieges who are over their held duchy limit, which are giving away that duchy (and associated counties) specifically + trigger_if = { + limit = { + has_too_many_held_duchies_trigger = yes + } + NOT = { + # Granting at least 1 duchy + any_in_list = { + list = target_titles + title_counts_towards_too_many_duchies_trigger = yes + save_temporary_scope_as = granted_duchy + + # All counties being granted are De Jure part of the duchy that is being granted + any_in_list = { + list = target_titles + count = all + trigger_if = { + limit = { tier = tier_county } + de_jure_liege = scope:granted_duchy + } + } + } + } + } + } + # Actual stress gain effects + if = { + limit = { + domain_size = domain_limit + } + stress_and_fulfillment_impact = { + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } + else_if = { + limit = { + domain_size < domain_limit + } + stress_and_fulfillment_impact = { + greedy = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + + # Maintenance for runestones + if = { + limit = { + # Use expanded version if we have FP1. + has_fp1_dlc_trigger = yes + fp1_remove_stele_new_holder_trigger = { + TITLE = scope:target + PREVIOUS_HOLDER = scope:puppet_or_actor + NEW_HOLDER = scope:recipient + } + } + # Actually removed in fp1_other_decisions.0113 + custom_tooltip = runestone_grant_title_warning + } + else_if = { + limit = { + scope:target = { + exists = var:ancestor_to_bury + has_county_modifier = county_raised_runestone_modifier + } + NOT = { scope:recipient.dynasty = var:ancestor_to_bury.dynasty } #We only have to change something if the new holder is of a different dynasty + } + # Actually removed in religious_decision.0312 + custom_tooltip = runestone_grant_title_warning + } + if = { # Maintenance for khachkar decision + limit = { + has_pam_dlc_trigger = yes + scope:target = { + exists = var:pam_khachkar_ancestor + has_county_modifier = pam_khachkar_ancestral_county + } + NOT = { scope:recipient.dynasty = scope:target.var:pam_khachkar_ancestor.dynasty } + } + custom_tooltip = pam_khachkar_grant_title_warning + } + + if = { + limit = { + exists = scope:puppet_or_actor.dynasty + scope:puppet_or_actor.dynasty = { + has_dynasty_perk = ep1_culture_legacy_3 + } + scope:recipient = { + is_playable_character = no + culture != scope:puppet_or_actor.culture + any_in_list = { + list = target_titles + OR = { + tier = tier_county + tier = tier_barony + } + culture = scope:recipient.culture + } + } + } + scope:puppet_or_actor = { + if = { + limit = { + can_add_hook = { + target = scope:recipient + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = scope:recipient + } + } + } + } + + #Feedback for actor + hidden_effect = { + if = { + limit = { + government_has_flag = government_is_nomadic + vassal_limit_available <= 0 + is_independent_ruler = yes + scope:recipient = { + NOT = { is_vassal_of = scope:puppet_or_actor } + } + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect_7 + } + } + else_if = { + limit = { + any_in_list = { + list = target_titles + count = 1 + NOT = { tier = scope:puppet_or_actor.highest_held_title_tier } + } + NOT = { exists = scope:recipient_is_independent } + scope:recipient = { + any_held_title = { + title_tier > barony + NOT = { + is_in_list = target_titles + } + } + } + } + random_in_list = { + list = target_titles + save_temporary_scope_as = loc_title + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect_2 + if = { + limit = { + exists = dynasty + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige + + } + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + + } + } + } + else_if = { + limit = { + any_in_list = { + list = target_titles + count > 1 + NOT = { tier = scope:puppet_or_actor.highest_held_title_tier } + } + NOT = { exists = scope:recipient_is_independent } + scope:recipient = { + any_held_title = { + title_tier > barony + NOT = { + is_in_list = target_titles + } + } + } + } + random_in_list = { + list = target_titles + save_temporary_scope_as = loc_title + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect_3 + } + } + else_if = { + limit = { + exists = scope:recipient_is_independent + } + + random_in_list = { + list = target_titles + save_temporary_scope_as = loc_title + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect_6 + } + } + else_if = { + limit = { + scope:recipient = { + any_in_list = { #Became independent from you, but still have the same liege + list = target_titles + tier = scope:puppet_or_actor.highest_held_title_tier + } + top_liege = scope:puppet_or_actor.top_liege + } + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect_5 + } + } + else_if = { + limit = { + scope:recipient = { + any_in_list = { #Became independent + list = target_titles + tier = scope:puppet_or_actor.highest_held_title_tier + } + } + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect_4 + } + } + else = { + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_titles_interaction_notification + + left_icon = scope:puppet_or_actor + right_icon = scope:recipient + + custom_tooltip = grant_titles_interaction_notification_effect + } + } + } + } + + hidden_effect = { + # Struggle Catalyst + if = { + limit = { + scope:puppet_or_actor = { + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + } + scope:puppet_or_actor = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal + character = scope:puppet_or_actor + } + } + } + } + } + + # Achievements. + scope:actor = { + if = { + limit = { + has_variable_list = candidate_a_knights_tale_achievement + is_target_in_variable_list = { + name = candidate_a_knights_tale_achievement + target = scope:recipient + } + } + set_global_variable = { + name = finished_a_knights_tale_achievement + value = yes + } + } + } + + # Government type grant cooldown: prevents rapidly granting multiple government-type vassals. + if = { + limit = { + exists = scope:government_type + } + scope:puppet_or_actor = { + set_variable = { + name = grant_vassal_government_cooldown + value = yes + days = 800 + } + } + } + #Opinion loss with underlings who think they should get the title you're granting + if = { + limit = { + #AI will usually grant title to de jure holders, it's players who could use this steering + scope:actor = { + is_ai = no + } + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + any_claimant = { + this = scope:recipient + } + } + } + ordered_in_list = { + order_by = tier + list = titles_to_grant + limit = { + any_claimant = { + this = scope:recipient + } + } + save_scope_as = highest_claim + } + scope:recipient = { claimant_jealousy_immunity_effect = yes } + } + every_in_list = { + list = titles_to_grant + save_scope_as = title_granted + scope:puppet_or_actor = { + title_granting_controversy_effect = { + TITLE = scope:title_granted + INTERACTION = grant_titles_interaction + } + } + } + every_in_list = { + list = strong_claimants + limit = { + NOT = { this = scope:recipient } + } + save_scope_as = claimer + ordered_in_list = { + order_by = tier + list = titles_to_grant + limit = { + any_claimant = { + this = scope:claimer + } + } + save_scope_as = highest_denied_claim + } + claimant_rivalry_mercy_effect = yes + } + } + scope:actor = { + if = { + limit = { + any_in_list = { + list = target_titles + count > 1 + title_tier == empire + } + } + change_influence = monumental_influence_gain + } + else_if = { + limit = { + any_in_list = { + list = target_titles + count > 1 + title_tier == kingdom + } + } + change_influence = massive_influence_gain + } + else_if = { + limit = { + any_in_list = { + list = target_titles + count > 1 + title_tier == duchy + } + } + change_influence = major_influence_gain + } + else_if = { + limit = { + any_in_list = { + list = target_titles + count > 1 + title_tier == county + } + } + change_influence = medium_influence_gain + } + else = { + change_influence = minor_influence_value + } + } + scope:recipient = { assign_feudal_governments_effect = yes } + } +} diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 9e11684dd..59538bf06 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -577,7 +577,7 @@ administrative_government = { mechanic_type = administrative is_mechanic_type_default = yes - possible_grant_vassal_governments = { theocracy_government ecclesiastical_government } + possible_grant_vassal_governments = { theocracy_government ecclesiastical_government feudal_government clan_government } color = { 72 6 92 } realm_mask_offset = { 0.0 0.01 } diff --git a/common/scripted_rules/01_grant_title_rules.txt b/common/scripted_rules/01_grant_title_rules.txt new file mode 100644 index 000000000..f44d38540 --- /dev/null +++ b/common/scripted_rules/01_grant_title_rules.txt @@ -0,0 +1,307 @@ +# Determines if a character is allowed to be granted specific title by another character +# Root is the target character +# scope:liege is the granter +# scope:landed_title is the title in question +# scope:government_type the government type to be switched to (not set: default government type) +allowed_to_be_granted_titles_by = { + trigger_if = { + limit = { + scope:landed_title = { + tier <= tier_county + title_province = { has_holding_type = church_holding } + } + scope:liege.rite = { + NOT = { rite_has_parameter = lay_clergy } + } + } + custom_tooltip = { + text = grant_title_clerical_gender_tt + can_be_granted_theocratic_titles_by = { RULER = scope:liege } + } + } + trigger_else = { + can_be_granted_titles_by = { RULER = scope:liege } + } +} + +# Rules for the Grant Title government type selection feature. +# These rules control which government types can be selected when granting a county or higher title +# to an unlanded character. + +# Determines whether a specific government type appears in the picker in the Grant Titles interface. +# Called once per candidate government type. Recipient and county-tier checks are enforced in Code. +# Root is scope:actor (the granting ruler). +# scope:landed_title is the highest-tier title being granted. +# scope:government_type is the candidate government type being evaluated. +# scope:target_titles lists all titles being granted in this offer. +is_grant_government_shown = { + # Can only grant theocratic government type if that is your faith's theocratic government type + trigger_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_theocracy + } + } + faith.faith_theocratic_goverment_type = scope:government_type + } + # lock all DLC government types in case they are allowed in modded government + trigger_else_if = { + limit = { + scope:government_type = government_type:administrative_government + } + has_ep3_dlc_trigger = yes + } + trigger_else_if = { + limit = { + OR = { + scope:government_type = government_type:nomad_government + scope:government_type = government_type:herder_government + } + } + has_mpo_dlc_trigger = yes + } + trigger_else_if = { + limit = { + OR = { + scope:government_type = government_type:wanua_government + scope:government_type = government_type:celestial_government + scope:government_type = government_type:mandala_government + scope:government_type = government_type:steppe_admin_government + scope:government_type = government_type:meritocratic_government + scope:government_type = government_type:japan_administrative_government + scope:government_type = government_type:japan_feudal_government + } + } + has_tgp_dlc_trigger = yes + } + trigger_else = { + always = yes + } +} + +# Determines whether a specific government type is a valid choice for the grant. +# Called once per candidate government type. +# Root is scope:actor (the granting ruler). +# scope:recipient is the character receiving the title. +# scope:government_type is the candidate government type being evaluated. +# scope:landed_title is the highest-tier title being granted. +# scope:target_titles lists all titles being granted in this offer. +is_grant_government_valid = { + # Theocratic grants: faith doctrines, tier gate (AI county-only / player up to duchy), + # realm theocratic-share cap, and shared cooldown. + trigger_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_theocracy + } + } + rite = { + rite_has_doctrine = doctrine_theocracy_temporal + } + scope:recipient = { + faith = root.faith + rite = { + rite_has_doctrine = doctrine_theocracy_temporal + } + is_adult = yes + trigger_if = { + limit = { + is_clergy = no # If your child is somehow already clergy it's fine to grant them a Theocracy + root = { is_clergy = no } # If dad is clergy he can grant his kiddos theocracies, yay nepotism + } + NOR = { + is_child_of = root + is_grandchild_of = root + is_great_grandchild_of = root + } + } + } + # Tier gate: AI may only grant theocratic counties; players are capped at duchy. + trigger_if = { + limit = { is_ai = yes } + scope:landed_title = { tier = tier_county } + } + trigger_else = { + custom_description = { + text = grant_government_kingdom_blocked_tt + scope:landed_title = { tier <= tier_duchy } + } + } + custom_description = { + text = grant_government_too_many_theocratic_vassals_tt + trigger_if = { + limit = { is_ai = yes } + realm_theocratic_county_share_ai_below_cap_trigger = yes + } + trigger_else = { + realm_theocratic_county_share_player_below_cap_trigger = yes + } + } + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } + # holding type san check + trigger_else_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_republic + } + } + scope:recipient = { + is_adult = yes + NOR = { + is_child_of = root + is_grandchild_of = root + is_great_grandchild_of = root + } + } + any_in_list = { + list = target_titles + tier = tier_county + title_province ?= { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + } + } + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } + trigger_else_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_feudal + } + } + any_in_list = { + list = target_titles + tier = tier_county + title_province ?= { + has_holding_type = castle_holding + } + } + # cooldown if you can't use the holding + trigger_if = { + limit = { + government_has_flag = government_is_settled + NOT = { government_has_flag = government_is_tribal } + } + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } + } + trigger_else_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_clan + } + ep3_is_clan_inclined_trigger = no + } + scope:recipient = { ep3_is_clan_inclined_trigger = yes } + any_in_list = { + list = target_titles + tier = tier_county + title_province ?= { + has_holding_type = castle_holding + } + } + # cooldown if you can't use the holding + trigger_if = { + limit = { + government_has_flag = government_is_settled + NOT = { government_has_flag = government_is_tribal } + } + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } + } + trigger_else_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_tribal + } + } + any_in_list = { + list = target_titles + tier = tier_county + title_province ?= { + has_holding_type = tribal_holding + } + } + # cooldown if you can't use the holding + trigger_if = { + limit = { government_has_flag = government_is_tribal } + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } + } + trigger_else_if = { + limit = { + scope:government_type = { + OR = { + government_type_has_flag = government_is_nomadic + government_type_has_flag = government_is_herder + } + } + } + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + any_in_list = { + list = target_titles + tier = tier_county + title_province ?= { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + trigger_else_if = { + limit = { + scope:government_type = { + government_type_has_flag = government_is_settled + } + } + any_in_list = { + list = target_titles + tier = tier_county + title_province ?= { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + has_holding_type = church_holding + } + } + } + trigger_if = { + limit = { + government_has_flag = government_is_settled + NOT = { government_has_flag = government_is_tribal } + } + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } + } + trigger_else = { + custom_description = { + text = grant_government_cooldown_tt + NOT = { has_variable = grant_vassal_government_cooldown } + } + } +} diff --git a/localization/english/replace/zz_NEOW_council_stuff_l_english.yml b/localization/english/replace/zz_NEOW_council_stuff_l_english.yml index aa3a8714b..8cf275935 100644 --- a/localization/english/replace/zz_NEOW_council_stuff_l_english.yml +++ b/localization/english/replace/zz_NEOW_council_stuff_l_english.yml @@ -1,4 +1,16 @@ l_english: + grant_hereditary_title_admin:0 "Grant Hereditary Office" + grant_hereditary_title_admin_interaction:0 "Grant Hereditary Office" + grant_hereditary_title_admin_interaction_desc: "Grant one or more of [puppet_or_actor.GetShortUINamePossessive] personally held [titles|E] to [recipient.GetShortUINameNoTooltip] for influence." + grant_title_to_bastard_dynasty_warning:1 "As a [bastard|E], [recipient.GetShortUINameNoTooltip] will found a new [dynasty|E]" + grant_hereditary_title_admin_interaction_notification:0 "Granted Title" + grant_hereditary_title_admin_interaction_notification_effect: "[recipient.GetUINameNotMe] became [puppet_or_actor.GetShortUINamePossessive] [vassal|E]" + grant_hereditary_title_admin_interaction_notification_effect_2: "[puppet_or_actor.GetShortUINamePossessive|U] [vassal|E] [recipient.GetShortUINameNotMe] now holds the [loc_title.GetBaseName]" + grant_hereditary_title_admin_interaction_notification_effect_3: "[puppet_or_actor.GetShortUINamePossessive|U] [vassal|E] [recipient.GetShortUINameNotMe] now holds the [loc_title.GetBaseName] and other [titles|E]" + grant_hereditary_title_admin_interaction_notification_effect_4:0 "[recipient.GetUINameNotMe] is now an [independent|E] [ruler|E]" + grant_hereditary_title_admin_interaction_notification_effect_5:0 "[recipient.GetUINameNotMe] is now a fellow vassal" + grant_hereditary_title_admin_interaction_notification_effect_6:0 "[recipient.GetUINameNotMe] now holds the [loc_title.GetBaseName]" + grant_hereditary_title_admin_interaction_notification_effect_7: "[recipient.GetUINameNotMe] became [puppet_or_actor.GetShortUINamePossessive] [tributary|E]" councillor_court_chaplain_orthodox_clerical_region_archbishop: "Archbishop" councillor_court_chaplain_orthodox_clerical_region_archbishop_female: "Archbishop" From 0a01d592832ba9c9c62b96bbac0e7b39c80e055b Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Mon, 2 Nov 2026 14:23:58 +0000 Subject: [PATCH 2/3] sell off your admin realm --- .../00_grant_titles_interaction.txt | 264 +-- .../NEOW_grant_titles_interaction.txt | 1497 ----------------- common/governments/00_government_types.txt | 312 ++++ .../02_theocratic_government_types.txt | 312 ++++ common/on_action/title_on_actions.txt | 2 +- .../scripted_rules/01_grant_title_rules.txt | 20 +- events/NEOW_grant_titles_events.txt | 67 + .../zz_NEOW_council_stuff_l_english.yml | 4 +- 8 files changed, 846 insertions(+), 1632 deletions(-) delete mode 100644 common/character_interactions/NEOW_grant_titles_interaction.txt create mode 100644 events/NEOW_grant_titles_events.txt diff --git a/common/character_interactions/00_grant_titles_interaction.txt b/common/character_interactions/00_grant_titles_interaction.txt index dfdcb30a0..46efcbdb2 100644 --- a/common/character_interactions/00_grant_titles_interaction.txt +++ b/common/character_interactions/00_grant_titles_interaction.txt @@ -371,24 +371,24 @@ grant_titles_interaction = { has_relation_friend = scope:puppet_or_actor } } -# if = { -# # then verify the right struggle phase -# limit = { -# is_diff_faith_or_culture_trigger = { -# CHAR = scope:puppet_or_actor -# STATUS = involved -# } -# any_character_struggle = { -# involvement = involved -# has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_to_leads_to_friendship -# } -# } -# progress_towards_friend_effect = { -# REASON = friend_granted_title -# CHARACTER = scope:puppet_or_actor -# OPINION = 0 -# } -# } + if = { + # then verify the right struggle phase + limit = { + is_diff_faith_or_culture_trigger = { + CHAR = scope:puppet_or_actor + STATUS = involved + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_to_leads_to_friendship + } + } + progress_towards_friend_effect = { + REASON = friend_granted_title + CHARACTER = scope:puppet_or_actor + OPINION = 0 + } + } } } @@ -1200,24 +1200,24 @@ grant_titles_interaction = { right_icon = scope:recipient custom_tooltip = grant_titles_interaction_notification_effect_2 -# if = { -# limit = { -# exists = dynasty -# is_diff_faith_or_culture_trigger = { -# CHAR = scope:recipient -# STATUS = involved -# } -# any_character_struggle = { -# involvement = involved -# has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige -# -# } -# } -# dynasty = { -# add_dynasty_prestige = minor_dynasty_prestige_gain -# } -# -# } + if = { + limit = { + exists = dynasty + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige + + } + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + + } } } else_if = { @@ -1323,41 +1323,41 @@ grant_titles_interaction = { } } -# hidden_effect = { -# # Struggle Catalyst -# if = { -# limit = { -# scope:puppet_or_actor = { -# is_diff_faith_or_culture_trigger = { -# CHAR = scope:recipient -# STATUS = involved -# } -# any_character_struggle = { -# involvement = involved -# activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { -# CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal -# CHAR = scope:recipient -# } -# } -# } -# } -# scope:puppet_or_actor = { -# every_character_struggle = { -# involvement = involved -# limit = { -# activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { -# CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal -# CHAR = scope:recipient -# } -# } -# activate_struggle_catalyst = { -# catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal -# character = scope:puppet_or_actor -# } -# } -# } -# } -# } + hidden_effect = { + # Struggle Catalyst + if = { + limit = { + scope:puppet_or_actor = { + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + } + scope:puppet_or_actor = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal + character = scope:puppet_or_actor + } + } + } + } + } # Achievements. scope:actor = { @@ -1447,6 +1447,7 @@ grant_titles_interaction = { claimant_rivalry_mercy_effect = yes } } + custom_tooltip = influence_award_notification } } @@ -2243,17 +2244,17 @@ grant_governorship_interaction = { # Actually removed in religious_decision.0312 custom_tooltip = runestone_grant_title_warning } -# if = { -# limit = { -# has_pam_dlc_trigger = yes -# scope:target = { -# exists = var:pam_khachkar_ancestor -# has_county_modifier = pam_khachkar_ancestral_county -# } -# NOT = { scope:recipient.dynasty = scope:target.var:pam_khachkar_ancestor.dynasty } -# } -# custom_tooltip = pam_khachkar_grant_title_warning -# } + if = { + limit = { + has_pam_dlc_trigger = yes + scope:target = { + exists = var:pam_khachkar_ancestor + has_county_modifier = pam_khachkar_ancestral_county + } + NOT = { scope:recipient.dynasty = scope:target.var:pam_khachkar_ancestor.dynasty } + } + custom_tooltip = pam_khachkar_grant_title_warning + } if = { limit = { @@ -2354,61 +2355,61 @@ grant_governorship_interaction = { custom_tooltip = grant_titles_interaction_notification_effect_5 } else = { custom_tooltip = grant_titles_interaction_notification_effect } -# if = { -# limit = { -# exists = dynasty -# is_diff_faith_or_culture_trigger = { -# CHAR = scope:recipient -# STATUS = involved -# } -# any_character_struggle = { -# involvement = involved -# has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige -# } -# } -# dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } -# } + if = { + limit = { + exists = dynasty + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige + } + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + } remove_variable = lower_count } } } } -# hidden_effect = { -# # Struggle Catalyst -# if = { -# limit = { -# scope:puppet_or_actor = { -# is_diff_faith_or_culture_trigger = { -# CHAR = scope:recipient -# STATUS = involved -# } -# any_character_struggle = { -# involvement = involved -# activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { -# CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal -# CHAR = scope:recipient -# } -# } -# } -# } -# scope:puppet_or_actor = { -# every_character_struggle = { -# involvement = involved -# limit = { -# activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { -# CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal -# CHAR = scope:recipient -# } -# } -# activate_struggle_catalyst = { -# catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal -# character = scope:puppet_or_actor -# } -# } -# } -# } -# } + hidden_effect = { + # Struggle Catalyst + if = { + limit = { + scope:puppet_or_actor = { + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + } + scope:puppet_or_actor = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal + character = scope:puppet_or_actor + } + } + } + } + } # Achievements. scope:actor = { @@ -2525,5 +2526,6 @@ grant_governorship_interaction = { claimant_rivalry_mercy_effect = yes } } + custom_tooltip = influence_award_notification } } diff --git a/common/character_interactions/NEOW_grant_titles_interaction.txt b/common/character_interactions/NEOW_grant_titles_interaction.txt deleted file mode 100644 index 3ea568e30..000000000 --- a/common/character_interactions/NEOW_grant_titles_interaction.txt +++ /dev/null @@ -1,1497 +0,0 @@ -# Be aware that the actual granting of the title happens in code! -# Extra custom Grant Titles functionality: -# - scope:government_type may be set when a specific government type will be switched to with the title grant (not set = default government type) -# -# Related scripted rules: -# - allowed_to_be_granted_titles_by: checked outside of the interaction for candidates -# - is_grant_government_shown: checks if a government type should be shown as possible granting government type (for any recipient) - hidden in interface if not true -# - is_grant_government_valid: checks if a government type is valid to be given to a specific recipient (will create tooltip) -# Government Type database: -# - possible_grant_vassal_governments = {..} - list of base government types a government could possibly grant -# - grant_vassal_ai_will_do = {} - scoring of each possible government type to grant (after filtered by 'possible_grant_vassal_governments', 'is_grant_government_shown' and 'is_grant_government_valid' - -# Be aware that the actual granting of the title happens in code! -# See 'grant_titles_interaction' for functionality of granting different government types. -grant_hereditary_title_admin_interaction = { - icon = icon_found_despotate - category = interaction_category_vassal - common_interaction = yes - - desc = grant_governorship_interaction_desc - - special_interaction = grant_governorship_interaction - interface = grant_titles - target_type = title - target_source = puppet_or_actor - target_filter = domain_titles - interface_priority = 60 - - # actor character giving the titles - # recipient character receiving the titles - - is_shown = { - scope:puppet_or_actor != scope:recipient - scope:puppet_or_actor ?= { - NOT = { - government_has_flag = cannot_be_vassal_or_liege - } - } - scope:actor = { - government_has_mechanic = administrative - } - scope:recipient = { - OR = { - target_is_liege_or_above = scope:puppet_or_actor - is_pool_guest_of = scope:puppet_or_actor - AND = { - scope:puppet_or_actor.faith.religious_head ?= scope:recipient - top_liege ?= this - } - } - } - trigger_if = { - limit = { - scope:puppet_or_actor = { government_has_flag = government_is_nomadic } - } - scope:recipient = { NOT = { government_has_flag = government_is_herder } } - } - } - - is_valid_showing_failures_only = { - scope:recipient = { - custom_tooltip = { - text = can_be_granted_titles_interaction_tt - OR = { - can_be_granted_titles_by = { RULER = scope:puppet_or_actor } - can_be_granted_theocratic_titles_by = { RULER = scope:puppet_or_actor } - AND = { - is_diarch_of_target = scope:puppet_or_actor - scope:puppet_or_actor = { has_diarchy_active_parameter = diarchy_is_co_rulership } - } - } - } - NOT = { is_at_war_with = scope:puppet_or_actor } - OR = { # Monks are disinherited from secular land; the exemption keys on the granter's government because the titles are picked after this check - NOT = { has_trait = devoted } - scope:puppet_or_actor = { government_has_flag = government_is_theocracy } - } - bp2_valid_for_standard_interactions_trigger = yes - trigger_if = { - limit = { is_ruler = no } - is_imprisoned = no - } - # DON'T TAKE OTHER PLAYERS' ACCLAIMED KNIGHTS - custom_description = { - text = grant_title_stealing_acclaimed_knight - subject = scope:recipient - NOR = { - AND = { - is_acclaimed = yes - liege ?= { - is_ai = no - this != scope:puppet_or_actor - } - } - AND = { - is_acclaimed = yes - scope:actor = { is_ai = yes } - } - } - } - # Gallivanters won't accept additional responsibilities. - NOT = { has_trait = gallivanter } - # TGP JAPAN - tgp_japan_grant_titles_restriction_trigger = { - GRANTER = scope:puppet_or_actor - GRANTEE = scope:recipient - } - } - custom_description = { - text = is_not_theocratic_court_chaplain - subject = scope:recipient - NAND = { - scope:puppet_or_actor.rite = { - rite_has_doctrine = doctrine_theocracy_temporal - } - scope:puppet_or_actor = { NOT = { government_has_flag = government_is_theocracy } } - scope:recipient = { - rite = { - rite_has_doctrine = doctrine_theocracy_temporal - } - has_council_position = councillor_court_chaplain - } - scope:puppet_or_actor.faith.religious_head != scope:recipient - } - } - scope:puppet_or_actor = { - any_held_title = { - count > 1 - } - } - } - - can_send = { - trigger_if = { - limit = { - scope:puppet_or_actor = { - highest_held_title_tier >= tier_kingdom - has_diarchy_active_parameter = primeminister_requires_duchy - diarch = scope:recipient - } - } - custom_tooltip = { - text = primeminister_requires_duchy.tt.blocked_grant - any_in_list = { - list = target_titles - tier >= tier_duchy - } - } - } - } - - can_be_picked_title = { - scope:target = { - is_leased_out = no - - trigger_if = { - limit = { is_noble_family_title = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_NOBLE_FAMILY - always = no - } - } - - trigger_if = { - limit = { - scope:puppet_or_actor = { - NOT = { - has_government = nomad_government - } - } - title_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - scope:recipient = { - is_ruler = no - } - } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_NOMADIC_TITLES_TO_NON_NOMADS_TITLE - always = no - } - } - - trigger_if = { - limit = { is_nomad_title = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_NOMAD_TITLE - always = no - } - } - - trigger_if = { - limit = { - is_head_of_faith = yes - scope:recipient.faith.religious_head != scope:puppet_or_actor.faith.religious_head - } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_HEAD_OF_FAITH_TO_INFIDEL - scope:recipient.faith.religious_head = scope:puppet_or_actor.faith.religious_head - } - } - - trigger_if = { - limit = { - scope:recipient = scope:puppet_or_actor.player_heir - scope:puppet_or_actor = { has_partition_succession_realm_law_trigger = yes } - } - custom_description = { - text = partition_primary_heir_unfair - subject = scope:recipient - object = scope:puppet_or_actor - current_heir = scope:recipient - } - } - trigger_if = { - limit = { scope:target = title:k_fashion } - NOT = { scope:target = title:k_fashion } - } - custom_tooltip = { - text = cannot_grant_ceremonial_title - NOT = { exists = var:ceremonial_title } - } - - trigger_if = { - limit = { has_clerical_region = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_CLERICAL_TITLE - always = no - } - } - - trigger_if = { - limit = { pam_title_is_clerical_elector_trigger = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_CLERICAL_ELECTOR - always = no - } - } - - trigger_if = { - limit = { pam_title_is_antipope_office_trigger = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_ANTIPOPE_TITLE - always = no - } - } - - trigger_if = { - limit = { - exists = situation:the_christian_church - this = title:k_papal_state - } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_HEAD_OF_FAITH - always = no - } - } - } - - custom_description = { - text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch - subject = scope:puppet_or_actor.diarch - 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_children_not_allowed_temple - subject = scope:recipient - NOR = { - AND = { - scope:recipient = { - is_adult = no - } - scope:target = { - tier = tier_barony - title_province = { has_building_with_flag = temple } - } - } - AND = { - scope:recipient = { - is_adult = no - } - scope:target = { - tier = tier_county - - title_province = { - is_county_capital = yes - has_building_with_flag = temple - } - } - } - } - } - - custom_description = { - text = grant_titles_interaction_title_being_wagered - NOT = { - scope:target = { has_variable = wagered_county } - } - } - } - - auto_accept = yes - - on_auto_accept = { - scope:recipient = { - trigger_event = char_interaction.0110 - } - } - - on_accept = { - if = { - limit = { - scope:puppet_or_actor = { - government_has_flag = government_is_nomadic - vassal_limit_available <= 0 - is_independent_ruler = yes - scope:recipient = { - NOT = { is_vassal_of = scope:puppet_or_actor } - } - } - } - custom_tooltip = grant_title_nomad_and_at_vassal_limit - } - scope:recipient = { - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - } - if = { - limit = { - scope:recipient = { - is_acclaimed = yes - liege = { - this = scope:puppet_or_actor - } - } - scope:target = { - tier > tier_barony - } - } - custom_tooltip = grant_title_landing_acclaimed_knight_warning - } - - grant_title_holy_order_patronage_warning_effect = yes - scope:recipient = { - if = { - limit = { - top_liege = this - save_temporary_scope_as = recipient_is_independent - } - } - if = { - limit = { - NOT = { - has_relation_friend = scope:puppet_or_actor - } - } - if = { - # then verify the right struggle phase - limit = { - is_diff_faith_or_culture_trigger = { - CHAR = scope:puppet_or_actor - STATUS = involved - } - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_to_leads_to_friendship - } - } - progress_towards_friend_effect = { - REASON = friend_granted_title - CHARACTER = scope:puppet_or_actor - OPINION = 0 - } - } - } - } - - if = { - limit = { - OR = { - any_in_list = { - list = target_titles - tier = tier_county - culture = scope:recipient.culture - NOR = { - culture = scope:puppet_or_actor.culture - recent_history = { - type = granted - years = 10 - } - } - } - any_in_list = { - list = target_titles - tier >= tier_duchy - title_capital_county = { - culture != scope:puppet_or_actor.culture - culture = scope:recipient.culture - } - NOT = { - recent_history = { - type = granted - years = 10 - } - } - } - } - } - scope:recipient.culture = { - change_cultural_acceptance = { - target = scope:puppet_or_actor.culture - value = grant_title_cultural_acceptance_impact - desc = cultural_acceptance_gain_granted_title - } - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_county - } - scope:puppet_or_actor.culture = { has_cultural_parameter = grants_to_lowborns_bonuses } - scope:recipient = { - is_lowborn = yes - } - } - every_in_list = { - list = target_titles - limit = { tier = tier_county } - change_county_control = 30 - } - scope:recipient = { - add_trait = peasant_leader - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_county - } - scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_give_prestige } - exists = scope:puppet_or_actor.house - exists = scope:recipient.house - scope:puppet_or_actor.house = scope:recipient.house - } - scope:puppet_or_actor = { - add_prestige = { - value = 0 - every_in_list = { - list = target_titles - limit = { tier = tier_hegemony } - add = monumental_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_empire } - add = massive_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_kingdom } - add = major_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_duchy } - add = medium_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_county } - add = minor_prestige_gain - } - } - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_county - } - scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_gives_renown } - exists = scope:puppet_or_actor.house - exists = scope:recipient.house - scope:puppet_or_actor.house = scope:recipient.house - } - scope:puppet_or_actor.dynasty = { - add_dynasty_prestige = { - value = 0 - every_in_list = { - list = target_titles - limit = { tier = tier_hegemony } - add = scope:puppet_or_actor.dynasty.monumental_dynasty_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_empire } - add = scope:puppet_or_actor.dynasty.massive_dynasty_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_kingdom } - add = scope:puppet_or_actor.dynasty.major_dynasty_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_duchy } - add = scope:puppet_or_actor.dynasty.medium_dynasty_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_county } - add = scope:puppet_or_actor.dynasty.minor_dynasty_prestige_gain - } - } - } - } - - # Iterate over all given titles - # - Add opinion modifiers - # - Collect titles that discontent reduction can later be derived from - every_in_list = { - list = target_titles - save_temporary_scope_as = this_title - if = { - limit = { - exists = scope:landed_title - } - scope:recipient = { - if = { - limit = { - scope:this_title.tier = tier_barony - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_barony - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier = tier_county - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_county - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - if = { - limit = { - scope:actor = { is_ai = no } - } - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -5 - } - } - } - else = { # Can't really stop the AI from landing lowborns, so throttle it a bit so that great conquerors don't annihilate their opinion - random = { - chance = 25 - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -5 - } - } - } - } - } - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier = tier_duchy - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_duchy - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -20 - } - } - } - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier = tier_kingdom - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_kingdom - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -50 - } - } - } - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier >= tier_empire - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_empire - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -80 - } - } - } - } - if = { - limit = { - is_a_faction_member = yes - } - add_joined_faction_discontent = -60 - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - } - - #Promised a vassal this title they had a claim on (vassal.2901) - if = { - limit = { - scope:puppet_or_actor = { - exists = var:was_promised_title - var:was_promised_title = scope:recipient - } - } - if = { - limit = { - scope:recipient = { - exists = var:promised_title - } - scope:landed_title = scope:recipient.var:promised_title - } - scope:puppet_or_actor = { - trigger_event = { - id = vassal.2910 - days = { 7 14 } - } - } - } - } - } - if = { - limit = { - scope:recipient = { - has_trait = bastard - } - } - custom_tooltip = grant_title_to_bastard_dynasty_warning - } - } # every_in_list - - - # The accumulated discontent reduction of the recipient - scope:recipient = { - if = { - limit = { - is_a_faction_member = yes - } - add_joined_faction_discontent = grant_title_opinion_sum_discontent_calc - } - } - - # Viziers may be booted from their job. - scope:puppet_or_actor = { - if = { - limit = { - # Assuming this is relevant at all. - diarch ?= scope:recipient - # And that scope:puppet_or_actor can do without a supervisor atm. - can_leave_diarchy_trigger = yes - # Aaaaand that their diarchy supports this type of thing. - OR = { - has_diarchy_parameter = primeminister_requires_county - has_diarchy_parameter = primeminister_requires_duchy - } - } - # Is this a duchy? - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_duchy - } - } - custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.duchy_sufficient - end_diarchy = yes - } - # Is this a county? - else_if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_county - } - } - # Is that insufficient? - if = { - limit = { has_diarchy_active_parameter = primeminister_requires_duchy } - custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.county_insufficient - } - # Is that sufficient? - else = { - custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.county_sufficient - end_diarchy = yes - } - } - # Is this a barony? - else_if = { - limit = { - any_in_list = { - list = target_titles - count = all - tier = tier_barony - } - } - custom_tooltip = grant_titles_interaction.tt.primeminister_title_grant.barony_doesnt_end - } - } - } - - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_empire - } - } - custom_tooltip = grant_title_modifier_stack_empires - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_kingdom - } - } - custom_tooltip = grant_title_modifier_stack_kingdoms - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - tier = tier_duchy - } - } - custom_tooltip = grant_title_modifier_stack_duchies - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - tier = tier_county - } - } - custom_tooltip = grant_title_modifier_stack_counties - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - tier = tier_barony - } - } - custom_tooltip = grant_title_modifier_stack_baronies - } - if = { - limit = { - trigger_if = { - limit = { scope:actor = { is_ai = no } } - scope:puppet_or_actor = { - any_vassal = { - vassal_stance = courtly - } - } - } - scope:recipient = { - is_lowborn = yes - } - any_in_list = { - list = titles_to_grant - tier >= tier_county - } - } - custom_tooltip = grant_title_modifier_courtly_lowborn_grant_penalty - } - if = { - limit = { - scope:recipient = { is_a_faction_member = yes } - } - custom_tooltip = grant_title_modifier_stack_discontent - } - - # Jealousy check - if = { - limit = { - any_in_list = { - list = titles_to_grant - any_claimant = { grant_title_rivalry_trigger = yes } - } - } - hidden_effect = { - random = { - chance = 25 - ordered_in_list = { - list = titles_to_grant - limit = { - any_claimant = { grant_title_rivalry_trigger = yes } - } - order_by = tier - save_scope_as = claim_title - ordered_claimant = { - limit = { grant_title_rivalry_trigger = yes } - order_by = primary_title.tier - save_scope_as = claim_vassal - if = { - limit = { - scope:recipient = { is_lowborn = yes } - } - scope:recipient = { save_scope_as = lowborn_scope } - } - else_if = { - limit = { - scope:recipient = { has_claim_on = scope:claim_title } - } - scope:recipient = { save_scope_as = claimant_scope } - } - scope:puppet_or_actor = { - trigger_event = { - id = bp1_yearly.8070 - days = 5 - } - } - } - } - } - } - } - - #Stress impact - scope:puppet_or_actor = { - if = { - limit = { - any_in_list = { - list = target_titles - trigger_if = { - limit = { tier = tier_barony } - title_province.barony = { - has_wrong_holding_type = no - } - } - count >= 1 - } - } - - # Generous characters enjoy giving away titles - if = { - limit = { - has_trait = generous - } - add_stress = generous_title_grant_value - } - - # Gnostics lose stress for giving away titles. - if = { - limit = { - scope:puppet_or_actor.rite = { - rite_has_parameter = granting_titles_gives_stress - } - } - scope:puppet_or_actor = { - add_stress = { - value = 0 - - # Base stress value scaled on title tier. - every_in_list = { - list = target_titles - - add = { - value = 0 - - if = { - limit = { this.tier = tier_county } - add = minor_stress_loss # 10 base - } - else_if = { - limit = { this.tier = tier_duchy } - add = { - value = medium_stress_loss - multiply = 1.25 # 25 base - } - } - else_if = { - limit = { this.tier = tier_kingdom } - add = { - value = major_stress_loss - multiply = 2 # 80 base - } - } - else_if = { - limit = { this.tier >= tier_empire } - add = { - value = monumental_stress_loss - multiply = 2 # 200 base - } - } - - # Lose more stress for giving away titles of your primary tier; lose less stress for giving away titles far below your primary in tier. - multiply = { - value = this.tier - add = 1 - divide = scope:puppet_or_actor.primary_title.tier - } - - # Round to the nearest multiple of 5. - divide = 5 - round = yes - multiply = 5 - - # For a Duke, this will be x1.25 for Duchies (-30) and x1 for Counties(-10) - # For a King, this will be x1.25 for a Kingdom (-100), x1 for a Duchy (-25) and x0.75 for Counties(-10) - # For an Emperor, this will be x1.25 for an Empire(-200), x1 for a Kingdom(-80), x0.75 for a Duchy(-20) and x0.4 for a Counties (-5) - } - } - } - } - } - - # Greedy & ambitious ruler gain stress for giving away titles if they would normally be able to keep them. - if = { - limit = { - # Pre-filter - OR = { - has_trait = greedy - has_trait = ambitious - } - domain_size <= domain_limit # Not over my domain limit - any_in_list = { - list = target_titles - tier <= tier_county # At least 1 selected title counts toward domain limit - } - - # Special exemption for lieges who are over their held duchy limit, which are giving away that duchy (and associated counties) specifically - trigger_if = { - limit = { - has_too_many_held_duchies_trigger = yes - } - NOT = { - # Granting at least 1 duchy - any_in_list = { - list = target_titles - title_counts_towards_too_many_duchies_trigger = yes - save_temporary_scope_as = granted_duchy - - # All counties being granted are De Jure part of the duchy that is being granted - any_in_list = { - list = target_titles - count = all - trigger_if = { - limit = { tier = tier_county } - de_jure_liege = scope:granted_duchy - } - } - } - } - } - } - # Actual stress gain effects - if = { - limit = { - domain_size = domain_limit - } - stress_and_fulfillment_impact = { - greedy = minor_stress_impact_gain - ambitious = minor_stress_impact_gain - } - } - else_if = { - limit = { - domain_size < domain_limit - } - stress_and_fulfillment_impact = { - greedy = medium_stress_impact_gain - ambitious = medium_stress_impact_gain - } - } - } - } - - # Maintenance for runestones - if = { - limit = { - # Use expanded version if we have FP1. - has_fp1_dlc_trigger = yes - fp1_remove_stele_new_holder_trigger = { - TITLE = scope:target - PREVIOUS_HOLDER = scope:puppet_or_actor - NEW_HOLDER = scope:recipient - } - } - # Actually removed in fp1_other_decisions.0113 - custom_tooltip = runestone_grant_title_warning - } - else_if = { - limit = { - scope:target = { - exists = var:ancestor_to_bury - has_county_modifier = county_raised_runestone_modifier - } - NOT = { scope:recipient.dynasty = var:ancestor_to_bury.dynasty } #We only have to change something if the new holder is of a different dynasty - } - # Actually removed in religious_decision.0312 - custom_tooltip = runestone_grant_title_warning - } - if = { # Maintenance for khachkar decision - limit = { - has_pam_dlc_trigger = yes - scope:target = { - exists = var:pam_khachkar_ancestor - has_county_modifier = pam_khachkar_ancestral_county - } - NOT = { scope:recipient.dynasty = scope:target.var:pam_khachkar_ancestor.dynasty } - } - custom_tooltip = pam_khachkar_grant_title_warning - } - - if = { - limit = { - exists = scope:puppet_or_actor.dynasty - scope:puppet_or_actor.dynasty = { - has_dynasty_perk = ep1_culture_legacy_3 - } - scope:recipient = { - is_playable_character = no - culture != scope:puppet_or_actor.culture - any_in_list = { - list = target_titles - OR = { - tier = tier_county - tier = tier_barony - } - culture = scope:recipient.culture - } - } - } - scope:puppet_or_actor = { - if = { - limit = { - can_add_hook = { - target = scope:recipient - type = favor_hook - } - } - add_hook = { - type = favor_hook - target = scope:recipient - } - } - } - } - - #Feedback for actor - hidden_effect = { - if = { - limit = { - government_has_flag = government_is_nomadic - vassal_limit_available <= 0 - is_independent_ruler = yes - scope:recipient = { - NOT = { is_vassal_of = scope:puppet_or_actor } - } - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect_7 - } - } - else_if = { - limit = { - any_in_list = { - list = target_titles - count = 1 - NOT = { tier = scope:puppet_or_actor.highest_held_title_tier } - } - NOT = { exists = scope:recipient_is_independent } - scope:recipient = { - any_held_title = { - title_tier > barony - NOT = { - is_in_list = target_titles - } - } - } - } - random_in_list = { - list = target_titles - save_temporary_scope_as = loc_title - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect_2 - if = { - limit = { - exists = dynasty - is_diff_faith_or_culture_trigger = { - CHAR = scope:recipient - STATUS = involved - } - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige - - } - } - dynasty = { - add_dynasty_prestige = minor_dynasty_prestige_gain - } - - } - } - } - else_if = { - limit = { - any_in_list = { - list = target_titles - count > 1 - NOT = { tier = scope:puppet_or_actor.highest_held_title_tier } - } - NOT = { exists = scope:recipient_is_independent } - scope:recipient = { - any_held_title = { - title_tier > barony - NOT = { - is_in_list = target_titles - } - } - } - } - random_in_list = { - list = target_titles - save_temporary_scope_as = loc_title - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect_3 - } - } - else_if = { - limit = { - exists = scope:recipient_is_independent - } - - random_in_list = { - list = target_titles - save_temporary_scope_as = loc_title - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect_6 - } - } - else_if = { - limit = { - scope:recipient = { - any_in_list = { #Became independent from you, but still have the same liege - list = target_titles - tier = scope:puppet_or_actor.highest_held_title_tier - } - top_liege = scope:puppet_or_actor.top_liege - } - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect_5 - } - } - else_if = { - limit = { - scope:recipient = { - any_in_list = { #Became independent - list = target_titles - tier = scope:puppet_or_actor.highest_held_title_tier - } - } - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect_4 - } - } - else = { - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_titles_interaction_notification - - left_icon = scope:puppet_or_actor - right_icon = scope:recipient - - custom_tooltip = grant_titles_interaction_notification_effect - } - } - } - } - - hidden_effect = { - # Struggle Catalyst - if = { - limit = { - scope:puppet_or_actor = { - is_diff_faith_or_culture_trigger = { - CHAR = scope:recipient - STATUS = involved - } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal - CHAR = scope:recipient - } - } - } - } - scope:puppet_or_actor = { - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal - CHAR = scope:recipient - } - } - activate_struggle_catalyst = { - catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal - character = scope:puppet_or_actor - } - } - } - } - } - - # Achievements. - scope:actor = { - if = { - limit = { - has_variable_list = candidate_a_knights_tale_achievement - is_target_in_variable_list = { - name = candidate_a_knights_tale_achievement - target = scope:recipient - } - } - set_global_variable = { - name = finished_a_knights_tale_achievement - value = yes - } - } - } - - # Government type grant cooldown: prevents rapidly granting multiple government-type vassals. - if = { - limit = { - exists = scope:government_type - } - scope:puppet_or_actor = { - set_variable = { - name = grant_vassal_government_cooldown - value = yes - days = 800 - } - } - } - #Opinion loss with underlings who think they should get the title you're granting - if = { - limit = { - #AI will usually grant title to de jure holders, it's players who could use this steering - scope:actor = { - is_ai = no - } - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - any_claimant = { - this = scope:recipient - } - } - } - ordered_in_list = { - order_by = tier - list = titles_to_grant - limit = { - any_claimant = { - this = scope:recipient - } - } - save_scope_as = highest_claim - } - scope:recipient = { claimant_jealousy_immunity_effect = yes } - } - every_in_list = { - list = titles_to_grant - save_scope_as = title_granted - scope:puppet_or_actor = { - title_granting_controversy_effect = { - TITLE = scope:title_granted - INTERACTION = grant_titles_interaction - } - } - } - every_in_list = { - list = strong_claimants - limit = { - NOT = { this = scope:recipient } - } - save_scope_as = claimer - ordered_in_list = { - order_by = tier - list = titles_to_grant - limit = { - any_claimant = { - this = scope:claimer - } - } - save_scope_as = highest_denied_claim - } - claimant_rivalry_mercy_effect = yes - } - } - scope:actor = { - if = { - limit = { - any_in_list = { - list = target_titles - count > 1 - title_tier == empire - } - } - change_influence = monumental_influence_gain - } - else_if = { - limit = { - any_in_list = { - list = target_titles - count > 1 - title_tier == kingdom - } - } - change_influence = massive_influence_gain - } - else_if = { - limit = { - any_in_list = { - list = target_titles - count > 1 - title_tier == duchy - } - } - change_influence = major_influence_gain - } - else_if = { - limit = { - any_in_list = { - list = target_titles - count > 1 - title_tier == county - } - } - change_influence = medium_influence_gain - } - else = { - change_influence = minor_influence_value - } - } - scope:recipient = { assign_feudal_governments_effect = yes } - } -} diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 59538bf06..20be813e3 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -59,6 +59,162 @@ feudal_government = { } add = 10 } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = greedy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = shy + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = arrogant + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = paranoid + } + subtract = 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 + } + subtract = 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 + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = content + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = zealous + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold > 1000 + } + subtract = 40 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level > 2 + } + subtract = 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 = hsv{ 0.67 1.00 0.78 } @@ -189,6 +345,162 @@ clan_government = { } add = 10 } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = greedy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = shy + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = arrogant + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = paranoid + } + subtract = 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 + } + subtract = 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 + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = content + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = zealous + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold > 1000 + } + subtract = 40 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level > 2 + } + subtract = 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 = hsv{ 0.39 0.93 0.54 } diff --git a/common/governments/02_theocratic_government_types.txt b/common/governments/02_theocratic_government_types.txt index 78501de41..7daf96216 100644 --- a/common/governments/02_theocratic_government_types.txt +++ b/common/governments/02_theocratic_government_types.txt @@ -37,6 +37,162 @@ theocracy_government = { } always = no } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = greedy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = shy + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = arrogant + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = paranoid + } + subtract = 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 + } + subtract = 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 + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = content + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = zealous + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold > 1000 + } + subtract = 40 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level > 2 + } + subtract = 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 + } } vassal_contract_group = theocracy_vassal @@ -168,6 +324,162 @@ ecclesiastical_government = { } add = 10 } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = greedy + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = shy + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = arrogant + } + subtract = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = paranoid + } + subtract = 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 + } + subtract = 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 + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = content + } + subtract = 15 + } + if = { + limit = { + government_has_flag = government_is_administrative + has_trait = zealous + } + add = 5 + } + if = { + limit = { + government_has_flag = government_is_administrative + gold > 1000 + } + subtract = 40 + } + if = { + limit = { + government_has_flag = government_is_administrative + influence_level > 2 + } + subtract = 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 = hsv{ 0.00 0.00 0.38 } diff --git a/common/on_action/title_on_actions.txt b/common/on_action/title_on_actions.txt index d71329e86..01539b934 100644 --- a/common/on_action/title_on_actions.txt +++ b/common/on_action/title_on_actions.txt @@ -254,7 +254,6 @@ on_title_destroyed = { # scope:previous_holder = previous holder. Might be dead on_title_gain = { effect = { - ################ N3OW Dynamic Titles ################## if = { limit = { @@ -3397,6 +3396,7 @@ on_title_gain = { roman_restoration.0199 #Restoring the Pentarchy. title_event.0021 # Rename/recolor Britannia based on founder's culture; applied immediately on creation delay = { days = 1 } + NEOW_grant_title.001 realm_maintenance.2001 #Big notification about inheriting emperor tier title british_isles.1032 # Danelaw-England partition calc. title_event.0001 # Rename West Francia to France diff --git a/common/scripted_rules/01_grant_title_rules.txt b/common/scripted_rules/01_grant_title_rules.txt index f44d38540..49a758993 100644 --- a/common/scripted_rules/01_grant_title_rules.txt +++ b/common/scripted_rules/01_grant_title_rules.txt @@ -47,9 +47,25 @@ is_grant_government_shown = { # lock all DLC government types in case they are allowed in modded government trigger_else_if = { limit = { - scope:government_type = government_type:administrative_government + scope:government_type = { + OR = { + this = government_type:feudal_government + this = government_type:clan_government + this = government_type:tribal_government + } + } + } + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + AND = { + scope:government_type = { this = government_type:feudal_government } + OR = { + government_has_flag = government_is_administrative + government_has_flag = government_is_theocracy + } + } } - has_ep3_dlc_trigger = yes } trigger_else_if = { limit = { diff --git a/events/NEOW_grant_titles_events.txt b/events/NEOW_grant_titles_events.txt new file mode 100644 index 000000000..6735889c6 --- /dev/null +++ b/events/NEOW_grant_titles_events.txt @@ -0,0 +1,67 @@ +namespace = NEOW_grant_title + +NEOW_grant_title.001 = { # The Great Event + hidden = yes + trigger = { + scope:previous_holder ?= { + government_has_flag = government_is_administrative + } + } + immediate = { + if = { + limit = { + root = { OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan government_has_flag = government_is_theocracy } } + OR = { + scope:transfer_type = flag:granted + scope:transfer_type = flag:appointment + } + scope:previous_holder ?= { + government_has_flag = government_is_administrative + } + } + if = { + limit = { + scope:title.tier = tier_empire + } + scope:previous_holder = { change_influence = monumental_influence_gain } + scope:previous_holder = { + change_influence = monumental_influence_gain + add_gold = monumental_gold_max_value + } + } + else_if = { + limit = { + scope:title.tier = tier_kingdom + } + scope:previous_holder = { change_influence = massive_influence_gain } + scope:previous_holder = { + change_influence = massive_influence_gain + add_gold = massive_gold_max_value + } + } + else_if = { + limit = { + scope:title.tier = tier_duchy + } + scope:previous_holder = { change_influence = major_influence_gain } + scope:previous_holder = { + change_influence = major_influence_gain + add_gold = major_gold_max_value + } + } + else_if = { + limit = { + scope:title.tier = tier_county + } + scope:previous_holder = { + change_influence = medium_influence_gain + add_gold = medium_gold_max_value + } + } + else = { + } + } + else = { + } + } +} \ No newline at end of file diff --git a/localization/english/replace/zz_NEOW_council_stuff_l_english.yml b/localization/english/replace/zz_NEOW_council_stuff_l_english.yml index 8cf275935..b7592868f 100644 --- a/localization/english/replace/zz_NEOW_council_stuff_l_english.yml +++ b/localization/english/replace/zz_NEOW_council_stuff_l_english.yml @@ -3,7 +3,7 @@ grant_hereditary_title_admin_interaction:0 "Grant Hereditary Office" grant_hereditary_title_admin_interaction_desc: "Grant one or more of [puppet_or_actor.GetShortUINamePossessive] personally held [titles|E] to [recipient.GetShortUINameNoTooltip] for influence." grant_title_to_bastard_dynasty_warning:1 "As a [bastard|E], [recipient.GetShortUINameNoTooltip] will found a new [dynasty|E]" - grant_hereditary_title_admin_interaction_notification:0 "Granted Title" + grant_hereditary_title_admin_interaction_notification:0 "Granted Office" grant_hereditary_title_admin_interaction_notification_effect: "[recipient.GetUINameNotMe] became [puppet_or_actor.GetShortUINamePossessive] [vassal|E]" grant_hereditary_title_admin_interaction_notification_effect_2: "[puppet_or_actor.GetShortUINamePossessive|U] [vassal|E] [recipient.GetShortUINameNotMe] now holds the [loc_title.GetBaseName]" grant_hereditary_title_admin_interaction_notification_effect_3: "[puppet_or_actor.GetShortUINamePossessive|U] [vassal|E] [recipient.GetShortUINameNotMe] now holds the [loc_title.GetBaseName] and other [titles|E]" @@ -20,6 +20,8 @@ councillor_court_chaplain_orthodox_clerical_region_exarch_female: "Exarch" councillor_court_chaplain_orthodox_clerical_region_exarch_possessive: "Exarch's" councillor_court_chaplain_orthodox_clerical_region_exarch_female_possessive: "Exarch's" + influence_award_notification: "As an Administrative ruler grants [influence_i][influence|E] proportionate to title rank if granted as feudal or theocratic:\n-[influence_i] 250 [influence|E] for Empire tier.\n-[influence_i] 150 [influence|E] for Kingdom tier.\n-[influence_i] 100 [influence|E] for Duchy tier.\n-[influence_i] 60 [influence|E] for County tier.\n\nAs an Administrative ruler grants [gold_i][gold|E] proportionate to title rank if granted as feudal or theocratic:\n-[gold_i] a monumental volume of [gold|E] for Empire tier.\n-[gold_i] a massive volume of [gold|E] for Kingdom tier.\n-[gold_i] a major volume of [gold|E] for Duchy tier.\n-[gold_i] a moderate volume of [gold|E] for County tier. " + COURT_CHAPLAIN_CONVERSION_HARDER_TO_CONVERT_FAITH_AWAY_IN_HILLS_FORESTS_MALUS_MODIFIER:0 "[councillor_liege.GetFaith.GetName] — [GetFaithDoctrine('against_all_odds').GetBaseName] in Hills and Forests" From 66682c2354a65b302dc57e2b9e68fef62169cac6 Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Mon, 2 Nov 2026 15:09:47 +0000 Subject: [PATCH 3/3] missed a spot --- .../ep_3/06_ep3_admin_decisions.txt | 47 ++++++++++++++++--- common/governments/00_government_types.txt | 32 ++++++------- .../02_theocratic_government_types.txt | 32 ++++++------- 3 files changed, 72 insertions(+), 39 deletions(-) diff --git a/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt b/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt index ef006377d..b90b5ef0c 100644 --- a/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt +++ b/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt @@ -901,7 +901,7 @@ convert_to_administrative_decision = { limit = { has_treasury = no } - add = 800 + add = 1000 if = { limit = { is_ai = no } #Realm size @@ -968,12 +968,6 @@ convert_to_administrative_decision = { max = 3000 - if = { # Much cheaper for vassals wanting to adopt their admin liege's government - limit = { - is_independent_ruler = no - } - multiply = 0.1 - } } } treasury = { @@ -1238,6 +1232,45 @@ convert_to_administrative_decision = { # } # add = 100 # } + modifier = { + add = -20 + } + modifier = { + add = -20 + has_trait = content + } + modifier = { + add = -20 + has_trait = ambitious + } + modifier = { + add = -20 + has_trait = arrogant + } + modifier = { + add = -20 + has_trait = paranoid + } + modifier = { + add = -20 + has_trait = greedy + } + modifier = { + add = -20 + has_trait = shrewd + } + modifier = { + add = -20 + has_trait = intellect_good_1 + } + modifier = { + add = -20 + has_trait = intellect_good_2 + } + modifier = { + add = -20 + has_trait = intellect_good_3 + } modifier = { culture = { OR = { diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 20be813e3..acf7a3456 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -71,21 +71,21 @@ feudal_government = { government_has_flag = government_is_administrative has_trait = shy } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = arrogant } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = paranoid } - subtract = 5 + add = -5 } if = { limit = { @@ -99,7 +99,7 @@ feudal_government = { government_has_flag = government_is_administrative has_trait = just } - subtract = 5 + add = -5 } if = { limit = { @@ -164,14 +164,14 @@ feudal_government = { government_has_flag = government_is_administrative has_trait = ambitious } - subtract = 15 + add = -15 } if = { limit = { government_has_flag = government_is_administrative has_trait = content } - subtract = 15 + add = -15 } if = { limit = { @@ -185,14 +185,14 @@ feudal_government = { government_has_flag = government_is_administrative gold > 1000 } - subtract = 40 + add = -40 } if = { limit = { government_has_flag = government_is_administrative influence_level > 2 } - subtract = 15 + add = -15 } if = { limit = { @@ -357,21 +357,21 @@ clan_government = { government_has_flag = government_is_administrative has_trait = shy } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = arrogant } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = paranoid } - subtract = 5 + add = -5 } if = { limit = { @@ -385,7 +385,7 @@ clan_government = { government_has_flag = government_is_administrative has_trait = just } - subtract = 5 + add = -5 } if = { limit = { @@ -450,14 +450,14 @@ clan_government = { government_has_flag = government_is_administrative has_trait = ambitious } - subtract = 15 + add = -15 } if = { limit = { government_has_flag = government_is_administrative has_trait = content } - subtract = 15 + add = -15 } if = { limit = { @@ -471,14 +471,14 @@ clan_government = { government_has_flag = government_is_administrative gold > 1000 } - subtract = 40 + add = -40 } if = { limit = { government_has_flag = government_is_administrative influence_level > 2 } - subtract = 15 + add = -15 } if = { limit = { diff --git a/common/governments/02_theocratic_government_types.txt b/common/governments/02_theocratic_government_types.txt index 7daf96216..8ad1e25c4 100644 --- a/common/governments/02_theocratic_government_types.txt +++ b/common/governments/02_theocratic_government_types.txt @@ -49,21 +49,21 @@ theocracy_government = { government_has_flag = government_is_administrative has_trait = shy } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = arrogant } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = paranoid } - subtract = 5 + add = -5 } if = { limit = { @@ -77,7 +77,7 @@ theocracy_government = { government_has_flag = government_is_administrative has_trait = just } - subtract = 5 + add = -5 } if = { limit = { @@ -142,14 +142,14 @@ theocracy_government = { government_has_flag = government_is_administrative has_trait = ambitious } - subtract = 15 + add = -15 } if = { limit = { government_has_flag = government_is_administrative has_trait = content } - subtract = 15 + add = -15 } if = { limit = { @@ -163,14 +163,14 @@ theocracy_government = { government_has_flag = government_is_administrative gold > 1000 } - subtract = 40 + add = -40 } if = { limit = { government_has_flag = government_is_administrative influence_level > 2 } - subtract = 15 + add = -15 } if = { limit = { @@ -336,21 +336,21 @@ ecclesiastical_government = { government_has_flag = government_is_administrative has_trait = shy } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = arrogant } - subtract = 5 + add = -5 } if = { limit = { government_has_flag = government_is_administrative has_trait = paranoid } - subtract = 5 + add = -5 } if = { limit = { @@ -364,7 +364,7 @@ ecclesiastical_government = { government_has_flag = government_is_administrative has_trait = just } - subtract = 5 + add = -5 } if = { limit = { @@ -429,14 +429,14 @@ ecclesiastical_government = { government_has_flag = government_is_administrative has_trait = ambitious } - subtract = 15 + add = -15 } if = { limit = { government_has_flag = government_is_administrative has_trait = content } - subtract = 15 + add = -15 } if = { limit = { @@ -450,14 +450,14 @@ ecclesiastical_government = { government_has_flag = government_is_administrative gold > 1000 } - subtract = 40 + add = -40 } if = { limit = { government_has_flag = government_is_administrative influence_level > 2 } - subtract = 15 + add = -15 } if = { limit = {