From 568b018fc50fa526f4e01a8c4e45b84b0bf1dfc3 Mon Sep 17 00:00:00 2001 From: Thakia Date: Sat, 21 Nov 2026 17:46:42 -0300 Subject: [PATCH] character interactions updating (again) --- .../00_artifact_interactions.txt | 1146 ++++++++++++----- .../00_ce1_interactions.txt | 8 + .../00_character_interactions.txt | 119 +- .../00_courtier_and_guest_interactions.txt | 253 ++-- .../00_culture_interactions.txt | 2 + .../00_diarch_interactions.txt | 48 +- .../00_dynast_interactions.txt | 97 +- .../00_fp3_interactions.txt | 338 ++--- common/character_interactions/00_gift.txt | 29 +- .../00_grant_titles_interaction.txt | 308 ++++- .../00_lover_interactions.txt | 2 +- .../00_modifiy_vassal_contract.txt | 101 +- .../00_prison_interactions.txt | 499 ++++--- .../00_puppet_interactions.txt | 48 +- .../00_religious_interactions.txt | 289 +++-- .../00_revoke_title_interaction.txt | 152 ++- .../00_scheme_interactions.txt | 598 +++++++-- .../00_tradition_interactions.txt | 4 +- .../00_tribal_interactions.txt | 6 +- .../00_tributary_interactions.txt | 186 ++- .../00_vassal_interactions.txt | 129 +- .../02_ep1_interactions.txt | 28 +- .../03_fp2_interactions.txt | 223 ++-- .../05_bp2_interactions.txt | 128 +- .../06_ep3_interactions.txt | 205 +-- .../06_ep3_laamp_interactions.txt | 353 ++--- .../09_mpo_interactions.txt | 116 +- .../10_tgp_test_interactions.txt | 9 +- .../pam_interactions.txt | 486 +++++-- 29 files changed, 4043 insertions(+), 1867 deletions(-) diff --git a/common/character_interactions/00_artifact_interactions.txt b/common/character_interactions/00_artifact_interactions.txt index 6950a87b8..2d31d357a 100644 --- a/common/character_interactions/00_artifact_interactions.txt +++ b/common/character_interactions/00_artifact_interactions.txt @@ -19,6 +19,7 @@ gift_artifact_interaction = { ai_targets = { ai_recipients = scripted_relations ai_recipients = liege + ai_recipients = suzerain ai_recipients = spouses max = 10 } @@ -47,13 +48,14 @@ gift_artifact_interaction = { } can_be_picked_artifact = { - scope:target = { - is_equipped = no + trigger_if = { + limit = { + scope:actor = { is_ai = no } + } + scope:target = { is_equipped = no } } scope:puppet_or_actor = { - any_character_artifact = { - this = scope:target - } + any_character_artifact = { this = scope:target } trigger_if = { limit = { involved_activity ?= { @@ -76,13 +78,13 @@ gift_artifact_interaction = { } is_available = { - has_any_unequipped_artifact = yes trigger_if = { limit = { is_ai = yes } + has_any_unequipped_artifact = yes OR = { AND = { - ai_greed <= high_positive_ai_value is_adult = yes + ai_greed <= high_positive_ai_value # the AI shouldn't give away equipped artifacts NOT = { has_trait = greedy @@ -100,8 +102,24 @@ gift_artifact_interaction = { #You can't give yourself a gift, even if it should count as self-care is_shown = { - scope:puppet_or_actor ?= { - this != scope:recipient + scope:recipient != scope:puppet_or_actor + scope:puppet_or_actor = { + trigger_if = { + limit = { exists = involved_activity } + NOT = { + involved_activity ?= { #do not give out anything during coronation + has_activity_type = activity_coronation + activity_host = scope:puppet_or_actor + } + } + } + trigger_if = { # show gift on non-rulers as a merchant + limit = { is_landless_merchant = yes } + scope:recipient = { is_ruler = no } + } + trigger_else = { # only totally hide this interaction for non-merchants + has_any_artifact = yes + } } } @@ -112,6 +130,13 @@ gift_artifact_interaction = { is_at_war_with = scope:recipient } is_imprisoned = no + trigger_if = { + limit = { is_ai = no } + custom_description = { + text = "any_unequipped_artifact_tt" + any_character_artifact = { is_equipped = no } + } + } } # keep this since a bit stricter than common rule trigger_if = { @@ -127,6 +152,32 @@ gift_artifact_interaction = { } on_accept = { + # End current story cycles for Merchant Chars + hidden_effect = { + if = { + limit = { + gdp_menagerie_artifact_has_active_story_trigger = { CHARACTER = scope:actor ARTIFACT = scope:target } + } + scope:actor = { + random_owned_story = { + limit = { + story_type = story_cycle_menagerie + var:artifact_type ?= scope:target + } + save_scope_as = menagerie_story + } + } + if = { + limit = { + scope:recipient = { is_landless_merchant = yes } + } + scope:menagerie_story = { make_story_owner = scope:recipient } + } + else = { + scope:menagerie_story = { end_story = yes } + } + } + } # Warning for multiple gifts if = { limit = { @@ -206,7 +257,7 @@ gift_artifact_interaction = { value = yes days = 1 } - set_variable = { name = gifted_artifact value = yes days = 9125 } + set_variable = { name = gifted_artifact value = scope:puppet_or_actor days = 9125 } } scope:recipient = { # Verify that they could become friend @@ -238,15 +289,48 @@ gift_artifact_interaction = { else = { show_as_tooltip = { house = { remove_house_artifact_claim = scope:target } } } } } + + scope:target = { + # Save scopes for loc purposes + set_variable = { + name = og_owner + value = artifact_owner + } + if = { + limit = { exists = var:og_owner } + ## Supress startup errors + } + save_scope_as = artifact + # Transfer artifact + if = { + limit = { + artifact_type = creature + scope:recipient = { + NOT = { domicile ?= { is_domicile_type = merchant_company } } + } + } + hidden_effect = { set_owner = scope:recipient } + } + else = { set_owner = scope:recipient } + # We reforge domicile artifacts unless the recipient has a company domicile + reforge_transferred_artifact_effect = { RECEIVER = scope:recipient } + } - scope:target = { set_owner = scope:recipient } - - + scope:recipient = { + if = { + limit = { + scope:target = { artifact_type = creature } + NOT = { domicile ?= { is_domicile_type = merchant_company } } + } + custom_tooltip = artifact_creature_reforged_tt + } + } + if = { limit = { scope:target = { is_unique = yes } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -260,7 +344,7 @@ gift_artifact_interaction = { } else_if = {# Unity goes here, too! limit = { scope:target = { rarity = masterwork } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -274,7 +358,7 @@ gift_artifact_interaction = { } else_if = { limit = { scope:target = { rarity = famed } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -288,7 +372,7 @@ gift_artifact_interaction = { } else_if = { limit = { scope:target = { rarity = illustrious } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -300,8 +384,11 @@ gift_artifact_interaction = { generous = major_stress_impact_loss } } + # Opinion if = { - limit = { scope:recipient = { is_ai = yes } } + limit = { + scope:recipient = { is_ai = yes } + } reverse_add_opinion = { target = scope:recipient modifier = gift_artifact_opinion @@ -417,6 +504,9 @@ gift_artifact_interaction = { scope:recipient = { NOT = { can_equip_artifact = scope:target } } + scope:target = { + NOT = { artifact_type = creature } + } } custom_tooltip = artifact_gift_equip_tt } @@ -429,11 +519,17 @@ gift_artifact_interaction = { custom_tooltip = artifact_gift_benefit_tt } if = { - limit = { scope:recipient.liege = scope:puppet_or_actor } + limit = { + scope:recipient = { is_ai = yes } + scope:recipient.liege = scope:puppet_or_actor + } custom_tooltip = artifact_gift_vassal_tt } if = { - limit = { scope:recipient = scope:puppet_or_actor.faith.religious_head } + limit = { + scope:recipient = { is_ai = yes } + scope:recipient = scope:puppet_or_actor.faith.religious_head + } custom_tooltip = artifact_gift_religious_head_tt } } @@ -446,7 +542,18 @@ gift_artifact_interaction = { right_icon = scope:target show_as_tooltip = { - scope:target = { set_owner = scope:recipient } + scope:target = { + set_owner = scope:recipient + if = { + limit = { + artifact_type = creature + scope:recipient = { + NOT = { domicile ?= { is_domicile_type = merchant_company } } + } + } + reforge_creature_artifact_effect = yes + } + } if = { limit = { is_ai = yes } add_opinion = { @@ -459,7 +566,7 @@ gift_artifact_interaction = { # Unity stuff, scales with tier # If we're a clan this interaction affects unity if = { # In a better world, this would be a switch limit = { scope:target = { rarity = Masterwork } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -469,7 +576,7 @@ gift_artifact_interaction = { } else_if = { limit = { scope:target = { rarity = Famed } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -479,7 +586,7 @@ gift_artifact_interaction = { } else_if = { limit = { scope:target = { rarity = Illustrious } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_gain @@ -492,266 +599,13 @@ gift_artifact_interaction = { if = { limit = { is_ruler = no - trigger_if = { - limit = { - scope:target = { - artifact_slot_type = primary_armament - } - } - OR = { - NOT = { - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - } - } - AND = { - scope:target = { - rarity = illustrious - } - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - NOT = { - rarity = illustrious - } - } - } - AND = { - scope:target = { - rarity = famed - } - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - NOR = { - rarity = illustrious - rarity = famed - } - } - } - AND = { - scope:target = { - rarity = masterwork - } - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - } - } - } - AND = { - scope:target = { - rarity = common - } - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - rarity = common - } - } - } - } - } - trigger_if = { - limit = { - scope:target = { - artifact_slot_type = armor - } - } - OR = { - NOT = { - any_equipped_character_artifact = { - artifact_slot_type = armor - } - } - AND = { - scope:target = { - rarity = illustrious - } - any_equipped_character_artifact = { - artifact_slot_type = armor - NOT = { - rarity = illustrious - } - } - } - AND = { - scope:target = { - rarity = famed - } - any_equipped_character_artifact = { - artifact_slot_type = armor - NOR = { - rarity = illustrious - rarity = famed - } - } - } - AND = { - scope:target = { - rarity = masterwork - } - any_equipped_character_artifact = { - artifact_slot_type = armor - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - } - } - } - AND = { - scope:target = { - rarity = common - } - any_equipped_character_artifact = { - artifact_slot_type = armor - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - rarity = common - } - } - } - } - } - trigger_if = { - limit = { - scope:target = { - artifact_slot_type = regalia - } - } - OR = { - NOT = { - any_equipped_character_artifact = { - artifact_slot_type = regalia - } - } - AND = { - scope:target = { - rarity = illustrious - } - any_equipped_character_artifact = { - artifact_slot_type = regalia - NOT = { - rarity = illustrious - } - } - } - AND = { - scope:target = { - rarity = famed - } - any_equipped_character_artifact = { - artifact_slot_type = regalia - NOR = { - rarity = illustrious - rarity = famed - } - } - } - AND = { - scope:target = { - rarity = masterwork - } - any_equipped_character_artifact = { - artifact_slot_type = regalia - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - } - } - } - AND = { - scope:target = { - rarity = common - } - any_equipped_character_artifact = { - artifact_slot_type = regalia - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - rarity = common - } - } - } - } - } - trigger_if = { - limit = { - scope:target = { - artifact_slot_type = helmet - } - } - OR = { - NOT = { - any_equipped_character_artifact = { - artifact_slot_type = helmet - } - } - AND = { - scope:target = { - rarity = illustrious - } - any_equipped_character_artifact = { - artifact_slot_type = helmet - NOT = { - rarity = illustrious - } - } - } - AND = { - scope:target = { - rarity = famed - } - any_equipped_character_artifact = { - artifact_slot_type = helmet - NOR = { - rarity = illustrious - rarity = famed - } - } - } - AND = { - scope:target = { - rarity = masterwork - } - any_equipped_character_artifact = { - artifact_slot_type = helmet - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - } - } - } - AND = { - scope:target = { - rarity = common - } - any_equipped_character_artifact = { - artifact_slot_type = helmet - NOR = { - rarity = illustrious - rarity = famed - rarity = masterwork - rarity = common - } - } - } - } - } - } - scope:target = { - equip_artifact_to_owner_replace = yes + can_equip_artifact = scope:target + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = primary_armament } + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = armor } + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = regalia } + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = helmet } } + scope:target = { equip_artifact_to_owner_replace = yes } } } } @@ -761,22 +615,48 @@ gift_artifact_interaction = { ai_accept = { base = 0 + modifier = { + add = -1 + scope:target = { + has_variable = { + name = ai_to_ai_destroy_in_sieges + name = unwanted_artifact + } + } + desc = ARTIFACT_TRASH_REASON + } modifier = { add = 100 + scope:target = { + has_none_of_variables = { + name = ai_to_ai_destroy_in_sieges + name = unwanted_artifact + } + } desc = ARTIFACT_REASON } modifier = { - add = -80 - NOT = { - can_equip_artifact = scope:target + add = -200 + scope:target = { + has_variable = cursed_artifact } + desc = ARTIFACT_CURSED_REASON + } + modifier = { + add = -80 + scope:target = { + OR = { + artifact_slot_type = throne + artifact_slot_type = wall_big + artifact_slot_type = sculpture + } + } + has_royal_court = no desc = ARTIFACT_NOT_EQUIPPABLE_REASON } modifier = { add = -40 - NOT = { - can_benefit_from_artifact = scope:target - } + NOT = { can_benefit_from_artifact = scope:target } desc = ARTIFACT_NOT_BENEFIT_REASON } modifier = { @@ -797,9 +677,7 @@ gift_artifact_interaction = { limit = { exists = scope:target.var:banner_dynasty } scope:target.var:banner_dynasty != scope:recipient.dynasty } - trigger_else = { - scope:target.var:banner_house != scope:recipient.house - } + trigger_else = { scope:target.var:banner_house != scope:recipient.house } desc = ARTIFACT_USELESS_BANNER_REASON } # Struggle motive @@ -807,9 +685,7 @@ gift_artifact_interaction = { desc = AI_STRUGGLE_INTENT scope:recipient = { top_liege = this - any_character_struggle = { - involvement = involved - } + any_character_struggle = { involvement = involved } } add = { value = 0 @@ -827,9 +703,7 @@ gift_artifact_interaction = { else_if = { limit = { scope:recipient = { - any_character_struggle = { - phase_has_catalyst = catalyst_gift_independent_ruler - } + any_character_struggle = { phase_has_catalyst = catalyst_gift_independent_ruler } } } add = 200 @@ -841,7 +715,7 @@ gift_artifact_interaction = { VALUE = 100 } } - + ai_min_reply_days = 0 ai_max_reply_days = 0 @@ -879,7 +753,9 @@ gift_artifact_interaction = { } } } - + + scope:target = { is_equipped = no } + scope:recipient = { OR = { AND = { # Players like nice gifts @@ -994,9 +870,7 @@ gift_artifact_interaction = { scope:actor = { OR = { has_royal_court = no - any_equipped_character_artifact = { - artifact_slot_type = throne - } + any_equipped_character_artifact = { artifact_slot_type = throne } } } NOT = { @@ -1147,23 +1021,17 @@ gift_artifact_interaction = { modifier = { factor = 2 - scope:recipient = { - is_ai = no - } + scope:recipient = { is_ai = no } } modifier = { factor = 0.25 - scope:recipient = { - highest_held_title_tier = tier_barony - } + scope:recipient = { highest_held_title_tier = tier_barony } } modifier = { # Unlanded characters do not equip artifacts, no point in giving them artifacts factor = 0 - scope:recipient = { - is_ruler = no - } + scope:recipient = { is_ruler = no } } modifier = { @@ -1172,21 +1040,22 @@ gift_artifact_interaction = { has_relation_rival = scope:actor } } - + modifier = { factor = 0 - scope:target = { - has_variable = gifted_artifact - } + scope:target = { is_equipped = yes } + } + + modifier = { + factor = 0 + scope:target = { has_variable = gifted_artifact } } modifier = { # So that the AI doesn't give player toys factor = 0 scope:recipient = { is_ai = no - NOT = { - can_equip_artifact = scope:target - } + NOT = { can_equip_artifact = scope:target } } } @@ -1212,12 +1081,576 @@ gift_artifact_interaction = { exists = scope:target.var:banner_dynasty } scope:recipient = { - NOT = { - can_benefit_from_artifact = scope:target + NOT = { can_benefit_from_artifact = scope:target } + } + } + + modifier = { + add = 100 + exists = scope:target.var:banner_dynasty + exists = scope:recipient.dynasty + scope:recipient = scope:target.var:banner_dynasty.dynast + NOT = { + scope:actor = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:recipient } } } } + modifier = { + factor = 2 + scope:actor.house.house_confederation ?= { + has_cohesion_level_parameter = bloc_members_send_leader_gifts + leading_house.house_head ?= scope:recipient + } + } + + modifier = { # could sell + scope:puppet_or_actor = { is_landless_merchant = yes } + scope:recipient = { is_ruler = yes } + add = { + value = gdp_merchant_sell_artifact_value + multiply = -0.5 + } + } + } +} + +# Sell an artifact (merchant) +sell_artifact_interaction = { + category = interaction_category_friendly + common_interaction = no + interface_priority = 30 + desc = sell_artifact_interaction_desc + icon = artisan_inspiration + + target_type = artifact + target_filter = actor_artifacts + show_all_targets = no + + greeting = positive + notification_text = SELL_ARTIFACT_PROPOSAL + + answer_accept_key = GIFT_ARTIFACT_ACCEPT + answer_reject_key = GIFT_ARTIFACT_REJECT + + ai_targets = { + ai_recipients = suzerain + } + ai_targets = { + ai_recipients = scripted_relations + ai_recipients = neighboring_rulers + ai_recipients = nearby_domicile_owners + max = 10 + } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { + barony = 0 + county = 60 # merchant tier + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } + + can_be_picked_artifact = { + trigger_if = { + limit = { + scope:actor = { is_ai = no } + } + scope:target = { is_equipped = no } + } + scope:puppet_or_actor = { + any_character_artifact = { this = scope:target } + } + #Artifacts locked from being giftable by a variable + scope:target = { + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:recipient } + } + } + + is_available = { + is_landless_merchant = yes + trigger_if = { + limit = { is_ai = yes } + has_any_unequipped_artifact = yes + } + } + + #You can't give yourself a gift, even if it should count as self-care + is_shown = { + scope:recipient != scope:puppet_or_actor + scope:recipient = { + is_ruler = yes + } + } + + is_valid_showing_failures_only = { + # needs to have an artifact to give away + scope:puppet_or_actor = { + NOT = { is_at_war_with = scope:recipient } + is_imprisoned = no + trigger_if = { + limit = { is_ai = no } + custom_description = { + text = "any_unequipped_artifact_tt" + any_character_artifact = { is_equipped = no } + } + } + } + # Is within diplo range + gdp_merchant_diplo_range_trigger = { + TARGET = scope:recipient + MERCHANT = scope:actor + } + trigger_if = { + limit = { exists = scope:target } + scope:recipient = { gold >= gdp_merchant_sell_artifact_value } + } + } + + on_accept = { + # End current story cycles for Merchant Chars + hidden_effect = { + if = { + limit = { + gdp_menagerie_artifact_has_active_story_trigger = { CHARACTER = scope:actor ARTIFACT = scope:target } + } + scope:actor = { + random_owned_story = { + limit = { + story_type = story_cycle_menagerie + var:artifact_type ?= scope:target + } + save_scope_as = menagerie_story + } + } + if = { + limit = { + scope:recipient = { is_landless_merchant = yes } + } + scope:menagerie_story = { make_story_owner = scope:recipient } + } + else = { + scope:menagerie_story = { end_story = yes } + } + } + } + scope:target = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { name = sold_artifact value = scope:actor days = 9125 } + } + scope:puppet_or_actor = { + send_interface_toast = { + type = event_toast_effect_good + title = sell_artifact_interaction_notification + left_icon = scope:recipient + right_icon = scope:target + scope:recipient = { + if = { + limit = { scope:target = { can_be_claimed_by = scope:recipient } } + if = { + limit = { any_personal_claimed_artifact = { this = scope:target } } + show_as_tooltip = { remove_personal_artifact_claim = scope:target } + } + else = { show_as_tooltip = { house = { remove_house_artifact_claim = scope:target } } } + } + } + + # Gold + scope:recipient = { + pay_short_term_gold = { + gold = gdp_merchant_sell_artifact_value + target = scope:puppet_or_actor + } + } + # XP + scope:puppet_or_actor = { + add_trait_xp = { + trait = lifestyle_merchant + track = artisan + value = { + value = gdp_merchant_sell_artifact_value + divide = 20 + max = 10 + } + } + if = { + limit = { has_realm_law = company_purpose_artisan } + domicile ?= { add_acumen = gdp_merchant_sell_artifact_value } + } + } + scope:target = { + # Save scopes for loc purposes + set_variable = { + name = og_owner + value = artifact_owner + } + if = { + limit = { exists = var:og_owner } + ## Supress startup errors + } + save_scope_as = artifact + # Transfer artifact + if = { + limit = { + artifact_type = creature + scope:recipient = { + NOT = { domicile ?= { is_domicile_type = merchant_company } } + } + } + hidden_effect = { set_owner = scope:recipient } + } + else = { set_owner = scope:recipient } + # We reforge domicile artifacts unless the recipient has a company domicile + reforge_transferred_artifact_effect = { RECEIVER = scope:recipient } + } + + scope:recipient = { + if = { + limit = { + scope:target = { artifact_type = creature } + NOT = { domicile ?= { is_domicile_type = merchant_company } } + } + custom_tooltip = artifact_creature_reforged_tt + } + } + } + + # Warning for low opinion gain + if = { + limit = { + scope:target = { + OR = { + AND = { + artifact_max_durability >= define:NInventory|ARTIFACT_DEFAULT_MAX_DURABILITY + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + AND = { #Check %durability left instead of fixed durability + artifact_max_durability < define:NInventory|ARTIFACT_DEFAULT_MAX_DURABILITY + artifact_durability_percent <= { + value = define:NInventory|ARTIFACT_LOW_DURABILITY + divide = 100 + } + } + } + } + } + custom_tooltip = artifact_gift_low_durability_tt + } + else_if = { + limit = { + scope:target = { + OR = { + AND = { + artifact_max_durability >= define:NInventory|ARTIFACT_DEFAULT_MAX_DURABILITY + artifact_durability <= define:NInventory|ARTIFACT_VERY_LOW_DURABILITY + } + AND = { #Check %durability left instead of fixed durability + artifact_max_durability < define:NInventory|ARTIFACT_DEFAULT_MAX_DURABILITY + artifact_durability_percent <= { + value = define:NInventory|ARTIFACT_VERY_LOW_DURABILITY + divide = 100 + } + } + } + } + } + custom_tooltip = artifact_gift_very_low_durability_tt + } + if = { + limit = { + scope:recipient = { + NOT = { can_benefit_from_artifact = scope:target } + } + } + custom_tooltip = artifact_gift_benefit_tt + } + } + scope:recipient = { + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = buy_artifact_interaction_notification + left_icon = scope:puppet_or_actor + right_icon = scope:target + show_as_tooltip = { + # Gold + pay_short_term_gold = { + gold = gdp_merchant_sell_artifact_value + target = scope:puppet_or_actor + } + scope:target = { + set_owner = scope:recipient + if = { + limit = { + artifact_type = creature + scope:recipient = { + NOT = { domicile ?= { is_domicile_type = merchant_company } } + } + } + reforge_creature_artifact_effect = yes + } + } + } + } + if = { + limit = { + is_ruler = no + can_equip_artifact = scope:target + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = primary_armament } + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = armor } + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = regalia } + no_or_worse_equipped_artifact_type_trigger = { SLOT_TYPE = helmet } + } + scope:target = { equip_artifact_to_owner_replace = yes } + } + } + } + } + + send_option = { + flag = haggle + localization = SELL_ARTIFACT_HAGGLE + current_description = SELL_ARTIFACT_HAGGLE_DESC + } + send_options_exclusive = no + + auto_accept = no + + ai_accept = { + base = 0 + modifier = { + add = -1 + scope:target = { + has_variable = { + name = ai_to_ai_destroy_in_sieges + name = unwanted_artifact + } + } + desc = ARTIFACT_TRASH_REASON + } + modifier = { + add = -1000 + scope:recipient.gold < gdp_merchant_sell_artifact_value + desc = SELL_CLAIM_CANNOT_AFFORD_REASON + } + modifier = { + add = -200 + scope:target = { + has_variable = cursed_artifact + } + desc = ARTIFACT_CURSED_REASON + } + modifier = { + scope:target = { + has_none_of_variables = { + name = ai_to_ai_destroy_in_sieges + name = unwanted_artifact + } + } + add = { + value = 20 + if = { + limit = { + scope:target = { rarity = masterwork } + } + add = 20 + } + else_if = { + limit = { + scope:target = { rarity = famed } + } + add = 40 + } + else_if = { + limit = { + scope:target = { rarity = illustrious } + } + add = 60 + } + } + desc = ARTIFACT_REASON + } + modifier = { + add = -20 + scope:recipient.gold < scope:recipient.major_gold_value + scope:recipient.gold >= gdp_merchant_sell_artifact_value + desc = AI_RECIPIENT_GOLD_REASON + } + modifier = { + add = -80 + has_royal_court = no + scope:target = { + OR = { + artifact_slot_type = throne + artifact_slot_type = wall_big + artifact_slot_type = sculpture + } + } + desc = ARTIFACT_NOT_EQUIPPABLE_REASON + } + modifier = { + add = -80 + NOT = { can_equip_artifact = scope:target } + scope:target = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = regalia + artifact_slot_type = helmet + artifact_slot_type = miscellaneous + } + } + desc = ARTIFACT_NOT_EQUIPPABLE_REASON + } + modifier = { + add = -40 + NOT = { can_benefit_from_artifact = scope:target } + desc = ARTIFACT_NOT_BENEFIT_REASON + } + modifier = { + add = 100 + exists = scope:target.var:banner_dynasty + exists = scope:recipient.dynasty + scope:recipient = scope:target.var:banner_dynasty.dynast + desc = ARTIFACT_DYNASTY_BANNER_REASON + } + modifier = { + add = -200 + OR = { + exists = scope:target.var:banner_dynasty + exists = scope:target.var:banner_house + } + exists = scope:recipient.house + trigger_if = { + limit = { exists = scope:target.var:banner_dynasty } + scope:target.var:banner_dynasty != scope:recipient.dynasty + } + trigger_else = { scope:target.var:banner_house != scope:recipient.house } + desc = ARTIFACT_USELESS_BANNER_REASON + } + modifier = { + scope:actor = { is_landless_merchant = yes } + add = { + value = gdp_merchant_sell_artifact_value + multiply = -0.5 + } + desc = ARTIFACT_PRICE_REASON + } + modifier = { + scope:actor = { + has_trait_xp = { trait = lifestyle_merchant track = artisan value >= 30 } + } + add = { + value = 15 + if = { + limit = { + scope:actor = { + has_trait_xp = { trait = lifestyle_merchant track = artisan value >= 65 } + } + } + add = 20 + } + if = { + limit = { + scope:actor = { + has_trait_xp = { trait = lifestyle_merchant track = artisan value >= 100 } + } + } + add = 45 + } + } + desc = ARTIFACT_ARTISAN_REASON + } + opinion_modifier = { + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.5 + desc = AI_OPINION_REASON + } + } + + ai_min_reply_days = 0 + ai_max_reply_days = 0 + + ai_will_do = { + base = 25 + + modifier = { + factor = 2 + scope:recipient = { is_ai = no } + } + + modifier = { + factor = 0.25 + scope:recipient = { highest_held_title_tier = tier_barony } + } + + modifier = { + factor = 0 + scope:recipient = { has_relation_rival = scope:actor } + } + + modifier = { + factor = 0 + scope:target = { is_equipped = yes } + } + + modifier = { + factor = 0 + OR = { + scope:target.var:gifted_artifact ?= scope:recipient + scope:target.var:sold_artifact ?= scope:recipient + } + can_equip_artifact = scope:target + } + + modifier = { + factor = 0 + can_equip_artifact = scope:target + } + + modifier = { # So that the AI doesn't give player toys + factor = 0 + scope:recipient = { + is_ai = no + NOT = { can_equip_artifact = scope:target } + } + } + + modifier = { + factor = 0 + scope:target = { exists = var:relic_religion } + scope:actor = { + has_religion = scope:target.var:relic_religion + } + } + + modifier = { + factor = 0 + scope:target = { + is_holy_relic_for = scope:actor.faith + } + } + + modifier = { + factor = 0 + OR = { + exists = scope:target.var:banner_house + exists = scope:target.var:banner_dynasty + } + scope:recipient = { + NOT = { can_benefit_from_artifact = scope:target } + } + } + modifier = { add = 100 exists = scope:target.var:banner_dynasty @@ -1447,7 +1880,7 @@ demand_artifact_interaction = { } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -2169,7 +2602,7 @@ challenge_for_artifact_interaction = { INVALIDATION_EVENT = fp1_tbc.0021 } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = major_unity_loss @@ -2179,7 +2612,7 @@ challenge_for_artifact_interaction = { } on_decline = { - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -2349,8 +2782,8 @@ challenge_for_artifact_interaction = { # Unity modifiers evaluate_action_decreasing_house_unity = { - VALUE = 100 - } + VALUE = 100 + } } ai_target_quick_trigger = { @@ -2953,9 +3386,8 @@ start_stealing_back_artifact = { } } - trigger_if = { #In range for LAAMP + trigger_if = { # special diplo range checks limit = { - scope:puppet_or_actor = { is_landless_adventurer = yes } scope:recipient = { NOT = { any_character_artifact = { @@ -2964,9 +3396,9 @@ start_stealing_back_artifact = { } } } - ep3_laamp_diplo_range_trigger = { + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor TARGET = scope:recipient - LAAMP = scope:puppet_or_actor } } } @@ -3037,6 +3469,8 @@ start_stealing_back_artifact = { honest = minor_stress_impact_gain just = minor_stress_impact_loss } +# #Guelphs & Ghibellines +# gg_hostile_scheme_catalyst_warning_effect = yes } hidden_effect = { scope:puppet_or_actor = { @@ -3669,6 +4103,7 @@ buy_artifact_claim = { is_available_ai_adult = yes } is_landless_adventurer = no + NOT = { government_has_flag = government_is_merchant } } is_shown = { @@ -3951,7 +4386,7 @@ buy_artifact_claim = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -4090,11 +4525,12 @@ demand_dynasty_banner_interaction = { } is_shown = { - exists = scope:actor.dynasty - NOT = { #Landless have no court in which to display such a banner, and no real authority over a landed relative - scope:actor = { government_has_flag = government_is_landless_adventurer } - } scope:recipient != scope:actor + NOR = { #Landless have no court in which to display such a banner, and no real authority over a landed relative + scope:actor = { government_has_flag = government_is_landless_adventurer } + scope:actor = { government_has_flag = government_is_merchant } + } + exists = scope:actor.dynasty exists = scope:recipient.dynasty scope:recipient.dynasty ?= scope:actor.dynasty scope:recipient = { @@ -4175,7 +4611,7 @@ demand_dynasty_banner_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -4233,7 +4669,7 @@ demand_dynasty_banner_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -4387,7 +4823,17 @@ destroy_artifact_interaction = { common_interaction = yes icon = artifact category = interaction_category_friendly - desc = destroy_artifact_interaction_desc + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { is_landless_merchant = yes } + } + desc = destroy_artifact_interaction_sell_desc + } + desc = destroy_artifact_interaction_desc + } + } target_type = artifact target_filter = actor_artifacts @@ -4494,6 +4940,30 @@ destroy_artifact_interaction = { } on_accept = { + if = { + limit = { + gdp_menagerie_artifact_has_active_story_trigger = { CHARACTER = scope:actor ARTIFACT = scope:target } + } + scope:actor = { + random_owned_story = { + limit = { + story_type = story_cycle_menagerie + var:artifact_type ?= scope:target + } + end_story = yes + } + } + } + scope:actor = { + if = { + limit = { is_landless_merchant = yes } + add_trait_xp = { + trait = lifestyle_merchant + track = artisan + value = lifestyle_merchant_xp_gain_miniscule_value + } + } + } destroy_artifact_aniconist_effect = { ARTIFACT = scope:target DESTROYER = scope:actor diff --git a/common/character_interactions/00_ce1_interactions.txt b/common/character_interactions/00_ce1_interactions.txt index ee5f71004..8f32f3852 100644 --- a/common/character_interactions/00_ce1_interactions.txt +++ b/common/character_interactions/00_ce1_interactions.txt @@ -37,6 +37,7 @@ ce1_ask_to_promote_legend_interaction = { text = recipient_already_promoting_legend_tt NOT = { exists = promoted_legend } } + NOT = { is_at_war_with = scope:puppet_or_actor } } custom_tooltip = { text = recipient_close_or_neighbor_tt @@ -95,6 +96,13 @@ ce1_ask_to_promote_legend_interaction = { } desc = TIER_REASON_EMPEROR } + modifier = { + add = -40 + scope:recipient.primary_title = { + tier = 6 + } + desc = TIER_REASON_HEGEMON + } ## Legend # How cool is the legend? modifier = { diff --git a/common/character_interactions/00_character_interactions.txt b/common/character_interactions/00_character_interactions.txt index 691737fee..489ba174a 100644 --- a/common/character_interactions/00_character_interactions.txt +++ b/common/character_interactions/00_character_interactions.txt @@ -5,6 +5,8 @@ offer_vassalization_interaction = { icon = icon_vassal desc = offer_vassalization_interaction_desc + greeting = positive + notification_text = OFFER_VASSALIZATION_INTERACTION_NOTIFICATION ai_targets = { ai_recipients = neighboring_rulers @@ -122,9 +124,6 @@ offer_vassalization_interaction = { } } - greeting = positive - notification_text = OFFER_VASSALIZATION_INTERACTION_NOTIFICATION - cost = { influence = { value = 0 @@ -260,7 +259,7 @@ offer_vassalization_interaction = { ceiling = yes } } - + # TRAITS/PERSONALITY modifier = { # Ambitious desc = TAKE_THE_VOWS_AMBITIOUS @@ -396,6 +395,16 @@ offer_vassalization_interaction = { opinion_target = scope:actor multiplier = 1 } + + #GG modifier + modifier = { + add = -50 + OR = { + gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:actor SECOND = scope:recipient } + scope:recipient = { is_gg_undecided_trigger = yes } + } + desc = RECIPIENT_IS_NOT_YOUR_GG + } } # Low starting obligations @@ -1149,7 +1158,7 @@ force_vote_in_succession_election_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -1159,6 +1168,82 @@ force_vote_in_succession_election_interaction = { } } +force_assembly_vote_interaction = { + category = interaction_category_diplomacy + filter_tags = { assembly_interaction } + special_interaction = force_assembly_vote + icon = scroll_scales + + greeting = positive + notification_text = FORCE_ASSEMBLY_VOTE_INTERACTION_NOTIFICATION + force_notification = yes + + desc = force_assembly_vote_interaction_desc + + auto_accept = yes + + is_valid_showing_failures_only = { + custom_description = { + text = must_have_usable_hook_blocker + subject = scope:actor + object = scope:recipient + + scope:actor = { + has_usable_hook = scope:recipient + } + } + + custom_description = { + text = must_have_ongoing_session + + scope:actor = { + ongoing_voting_session = yes + } + } + + custom_description = { + text = target_already_forced + object = scope:recipient + + scope:recipient = { + is_forced_voter = no + } + } + + custom_description = { + text = target_not_law_proposer + object = scope:recipient + + NOT = { scope:actor.law_proposer ?= scope:recipient } + } + } + + is_highlighted = { + scope:actor = { + has_usable_hook = scope:recipient + ongoing_voting_session = yes + } + } + + should_use_extra_icon = { + scope:actor = { has_usable_hook = scope:recipient } + } + extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" + + on_accept = { + scope:actor = { + send_interface_message = { + type = event_title_good + title = force_assembly_vote_interaction + right_icon = scope:recipient + + use_hook = scope:recipient + custom_tooltip = msg_force_assembly_vote_message + } + } + } +} + set_primary_spouse_interaction = { category = interaction_category_diplomacy desc = set_primary_spouse_interaction_desc @@ -1610,7 +1695,7 @@ grant_independence_interaction = { # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -1723,6 +1808,10 @@ expose_secret_interaction = { every_known_secret = { limit = { secret_owner = scope:recipient + NOR = { + secret_target ?= scope:puppet_or_actor + any_secret_participant = { this = scope:puppet_or_actor } + } } expose_secret = scope:puppet_or_actor } @@ -1793,7 +1882,7 @@ expose_secret_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -1924,6 +2013,22 @@ expose_secret_interaction = { evaluate_action_decreasing_house_unity = { VALUE = 100 } + + modifier = { + NOT = { exists = scope:target } + scope:recipient = { + NOT = { + any_secret = { + is_known_by = scope:puppet_or_actor + NOR = { + secret_target ?= scope:puppet_or_actor + any_secret_participant = { this = scope:puppet_or_actor } + } + } + } + } + factor = 0 + } } } diff --git a/common/character_interactions/00_courtier_and_guest_interactions.txt b/common/character_interactions/00_courtier_and_guest_interactions.txt index 595ffdfb3..54d6a5043 100644 --- a/common/character_interactions/00_courtier_and_guest_interactions.txt +++ b/common/character_interactions/00_courtier_and_guest_interactions.txt @@ -182,6 +182,15 @@ empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 108 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -324,8 +333,6 @@ has_relation_lover = scope:actor has_relation_friend = scope:actor has_secret_relation_lover = scope:actor - has_relation_soulmate = scope:actor - has_relation_best_friend = scope:actor is_child_of = scope:actor } } @@ -597,6 +604,7 @@ invite_to_court_interaction = { desc = invite_to_court_interaction_desc is_shown = { + scope:actor = { is_ruler = yes } scope:recipient = { NOR = { is_courtier_of = scope:actor @@ -665,17 +673,13 @@ invite_to_court_interaction = { #Pay som gold to persuade a wandering character to come to your court send_option = { - is_shown = { - exists = scope:recipient - } + is_shown = { exists = scope:recipient } flag = cover_travel_expenses localization = COVER_TRAVEL_EXPENSES } send_option = { # EP3 Influence is_shown = { # Actor must have a government that uses influence - scope:actor = { - government_has_flag = government_has_influence - } + scope:actor = { government_has_flag = government_has_influence } } is_valid = { # Actor has enough influence @@ -688,9 +692,7 @@ invite_to_court_interaction = { } send_option = { is_valid = { - scope:actor = { - has_usable_hook = scope:recipient - } + scope:actor = { has_usable_hook = scope:recipient } } flag = hook localization = SCHEME_HOOK @@ -714,58 +716,91 @@ invite_to_court_interaction = { } on_accept = { - hidden_effect = { - scope:recipient = { - set_variable = { - name = invite_to_court_cooldown - years = 5 - } + scope:recipient = { + set_variable = { + name = invite_to_court_cooldown + years = 5 } - - if = { - limit = { - exists = scope:recipient.liege - } - scope:recipient.liege = { + # Message relevant parties + liege ?= { + if = { + limit = { + NOT = { government_has_flag = government_is_merchant } + } send_interface_message = { type = event_generic_neutral title = msg_courtier_left_court_interaction_title - right_icon = scope:recipient - - show_as_tooltip = { - remove_courtier_or_guest = scope:recipient + show_as_tooltip = { remove_courtier_or_guest = scope:recipient } + } + } + else = { + send_interface_message = { + type = event_generic_bad + title = msg_courtier_left_court_interaction_merchant_title + right_icon = scope:recipient + show_as_tooltip = { remove_courtier_or_guest = scope:recipient } + } + } + # House Relation impact + if = { # Only change house relations w vassals or below + limit = { this != scope:actor.liege } + house ?= { + if = { + limit = { this != scope:actor.house } + if = { + limit = { + NOT = { has_house_relation_with = scope:actor.house } + } + set_house_relation = { + target = scope:actor.house + level = quarrel + description = house_relation_poached_talent_desc + } + } + else = { + change_house_relation_effect = { + HOUSE = scope:actor.house + VALUE = house_relation_damage_minor_value + REASON = poached_talent + CHAR = scope:actor + TARGET_CHAR = scope:recipient.liege + TITLE = scope:dummy_gender + } + } } } } } } - scope:actor = { send_interface_message = { type = event_generic_neutral title = invite_to_court_interaction_notification right_icon = scope:recipient - scope:recipient = { every_traveling_family_member = { scope:actor = { add_courtier = prev } - hidden_effect = { - return_to_court = yes - } + hidden_effect = { return_to_court = yes } } } - if = { limit = { always = scope:hook } - scope:actor = { - use_hook = scope:recipient + scope:actor = { use_hook = scope:recipient } + } + if = { + limit = { government_has_flag = government_uses_company_sentiment } + house ?= { + add_unity_value = { + value = minor_unity_loss + character = scope:recipient + desc = merchant_invite_associate_loss + } } } } } - - + if = { limit = { always = scope:cover_travel_expenses } scope:actor = { @@ -784,7 +819,7 @@ invite_to_court_interaction = { } ai_accept = { - base = -50 + base = -80 #Opinions opinion_modifier = { @@ -964,18 +999,14 @@ invite_to_court_interaction = { add = -50 desc = AI_INSPIRED inspiration ?= { - NOT = { - exists = inspiration_sponsor - } + NOT = { exists = inspiration_sponsor } } } modifier = { add = -500 desc = AI_SPONSORED_INSPIRATION - inspiration ?= { - exists = inspiration_sponsor - } + inspiration ?= { exists = inspiration_sponsor } } modifier = { @@ -991,9 +1022,7 @@ invite_to_court_interaction = { is_adult = no any_memory = { memory_type = family_castration_fled_memory - memory_participant:castrator ?= { - this = scope:actor - } + memory_participant:castrator ?= { this = scope:actor } } } @@ -1011,9 +1040,7 @@ invite_to_court_interaction = { add = scope:actor.diplomacy if = { - limit = { - faith = scope:actor.faith - } + limit = { faith = scope:actor.faith } add = 10 } else_if = { @@ -1029,16 +1056,12 @@ invite_to_court_interaction = { add = 5 } if = { - limit = { - culture = scope:actor.culture - } + limit = { culture = scope:actor.culture } add = 10 } else_if = { limit = { - culture = { - has_same_culture_heritage = scope:actor.culture - } + culture = { has_same_culture_heritage = scope:actor.culture } } add = 5 } @@ -1074,15 +1097,11 @@ invite_to_court_interaction = { add = { value = 20 if = { - limit = { - has_trait = greedy - } + limit = { has_trait = greedy } multiply = 1.5 } else_if = { - limit = { - has_trait = generous - } + limit = { has_trait = generous } multiply = 0.5 } } @@ -1108,7 +1127,7 @@ invite_to_court_interaction = { if = { limit = { scope:actor = { - amenity_level = { target = court_lodging_standards value >= very_high_amenity_level } + amenity_level = { target = court_lodging_standards value >= very_high_amenity_level } } } add = 10 @@ -1116,7 +1135,7 @@ invite_to_court_interaction = { if = { limit = { scope:actor = { - amenity_level = { target = court_lodging_standards value >= max_amenity_level } + amenity_level = { target = court_lodging_standards value >= max_amenity_level } } } add = 20 @@ -1174,15 +1193,47 @@ invite_to_court_interaction = { multiply = 0.5 } desc = AI_HOUSE_UNITY - scope:actor = { government_has_flag = government_is_clan } - exists = house - exists = scope:actor.house - house = scope:actor.house - house = { - OR = { - has_house_unity_stage = harmonious - has_house_unity_stage = friendly - } + scope:actor = { + government_has_flag = government_uses_house_unity + exists = house + } + house ?= { + this = scope:actor.house + house_unity_is_positive_trigger = yes + } + } + + modifier = { + add = { + value = scope:actor.house.house_unity_value + multiply = 0.5 + } + desc = AI_COMPANY_DIRECTION + scope:actor = { + government_has_flag = government_uses_company_sentiment + exists = house + } + house ?= { + this = scope:actor.house + house_unity_is_positive_trigger = yes + } + } + + modifier = { + add = 50 + desc = AI_RECIPIENT_COMPANY_SENTIMENT + scope:recipient.liege ?= { + government_has_flag = government_is_merchant + house ?= { has_house_unity_stage = rapacious_cs } + } + } + + modifier = { + add = 20 + desc = AI_RECIPIENT_COMPANY_SENTIMENT_OPPORTUNISTIC + scope:recipient.liege ?= { + government_has_flag = government_is_merchant + house ?= { has_house_unity_stage = opportunistic_cs } } } @@ -1238,9 +1289,7 @@ invite_to_court_interaction = { } modifier = { - scope:actor.culture = { - has_cultural_parameter = invite_courtiers_reasons - } + scope:actor.culture = { has_cultural_parameter = invite_courtiers_reasons } add = 15 desc = invite_courtiers_additional_reason } @@ -1254,7 +1303,57 @@ invite_to_court_interaction = { add = -200 desc = cid_1010_no_invite_var_desc } - } + +# #Guelphs & Ghibellines +# modifier = { +# scope:recipient = { +# has_opinion_modifier = { +# modifier = banished_me +# target = scope:actor +# } +# } +# add = -500 +# desc = RECIPIENT_WAS_BANISHED_BY_ACTOR +# } +# modifier = { +# scope:actor = { is_ghibelline_trigger = yes } +# scope:recipient = { exists = var:displaced_ghibelline_ruler } +# add = 100 +# desc = RECIPIENT_WAS_GHIBELLINE_SIDE +# } +# modifier = { +# scope:actor = { is_guelph_trigger = yes } +# scope:recipient = { exists = var:displaced_guelph_ruler } +# add = 100 +# desc = RECIPIENT_WAS_GUELPH_SIDE +# } +# modifier = { +# scope:actor = { is_ghibelline_trigger = yes } +# scope:recipient = { exists = var:displaced_guelph_ruler } +# add = -200 +# desc = RECIPIENT_WAS_GUELPH_SIDE +# } +# modifier = { +# scope:actor = { is_guelph_trigger = yes } +# scope:recipient = { exists = var:displaced_ghibelline_ruler } +# add = -200 +# desc = RECIPIENT_WAS_GHIBELLINE_SIDE +# } +# modifier = { +# OR = { +# AND = { +# scope:actor = { is_guelph_trigger = yes } +# scope:recipient.var:displaced_ghibelline_ruler ?= scope:actor +# } +# AND = { +# scope:actor = { is_ghibelline_trigger = yes } +# scope:recipient.var:displaced_guelph_ruler ?= scope:actor +# } +# } +# add = -1000 +# desc = RECIPIENT_WAS_DISPLACED_BY_ACTOR +# } +# } auto_accept = { custom_description = { diff --git a/common/character_interactions/00_culture_interactions.txt b/common/character_interactions/00_culture_interactions.txt index 41b4be10b..c3c671a00 100644 --- a/common/character_interactions/00_culture_interactions.txt +++ b/common/character_interactions/00_culture_interactions.txt @@ -15,6 +15,8 @@ request_culture_conversion_interaction = { desc = ask_for_conversion_interaction_desc + notification_text = ask_for_culture_conversion_interaction_notice + hidden = yes is_shown = { diff --git a/common/character_interactions/00_diarch_interactions.txt b/common/character_interactions/00_diarch_interactions.txt index 05e756c48..9c620ceb9 100644 --- a/common/character_interactions/00_diarch_interactions.txt +++ b/common/character_interactions/00_diarch_interactions.txt @@ -75,6 +75,9 @@ diarch_revoke_title_interaction = { prompt = RETRACT_VASSAL_SELECT_VASSAL_TO_RETRACT is_available = { + liege ?= { + has_diarchy_parameter = unlock_diarch_revoke_title_interaction + } trigger_if = { limit = { is_ai = yes } is_diarch = yes @@ -82,9 +85,6 @@ diarch_revoke_title_interaction = { # Loyal diarchs don't engage in skullduggery. diarch_loyalty < diarch_loyalty_visibly_loyal_threshold } - liege ?= { - has_diarchy_parameter = unlock_diarch_revoke_title_interaction - } # If you're not in a diarchy, we don't care. OR = { is_designated_diarch = yes @@ -1828,6 +1828,7 @@ diarch_imprison_interaction = { desc = AI_PRISON_FEUDAL_COMPLEX_PERK scope:actor = { has_perk = prison_feudal_complex_perk + NOT = { government_has_flag = government_is_merchant } } } modifier = { #I am a King! @@ -3153,6 +3154,7 @@ diarch_syphon_treasury_interaction = { } # Loyal diarchs don't engage in skullduggery. diarch_loyalty < diarch_loyalty_visibly_loyal_threshold + liege ?= { has_diarchy_active_parameter = unlock_syphon_treasury_interaction } } liege ?= { has_diarchy_parameter = unlock_syphon_treasury_interaction } # If you're not in a diarchy, we don't care. @@ -3306,13 +3308,13 @@ diarch_syphon_treasury_interaction = { min = 10 desc = diarch_syphon_treasury_interaction.tt.success # Inform scope:actor what type of embezzlement they'll be pursuing. - ## Very high stewardship characters syphon development growth from a few counties. + ## Very high stewardship characters syphon prosperity growth from a few counties. if = { limit = { stewardship >= syphon_treasury_stewardship_very_high NOT = { government_has_flag = government_is_nomadic } } - custom_tooltip = diarch_syphon_treasury_interaction.tt.success.syphon_development_growth + custom_tooltip = diarch_syphon_treasury_interaction.tt.success.syphon_prosperity_growth } ## Alternatively, herd for nomadic rulers else_if = { @@ -3380,28 +3382,28 @@ diarch_syphon_treasury_interaction = { } ## Plus the maluses for the liege. scope:recipient = { - # Very high stewardship characters syphon development growth from a few counties. + # Very high stewardship characters syphon prosperity growth from a few counties. if = { limit = { scope:actor.stewardship >= syphon_treasury_stewardship_very_high } # Gold transfer was... ## Very high. if = { limit = { always = scope:diarch_syphon_treasury_sum_huge } - diarch_syphon_treasury_interaction_syphon_development_growth_effect = { LOSS = massive_development_progress_loss } + diarch_syphon_treasury_interaction_syphon_prosperity_growth_effect = { LOSS = massive_prosperity_progress_loss } } ## High. else_if = { limit = { always = scope:diarch_syphon_treasury_sum_large } - diarch_syphon_treasury_interaction_syphon_development_growth_effect = { LOSS = major_development_progress_loss } + diarch_syphon_treasury_interaction_syphon_prosperity_growth_effect = { LOSS = major_prosperity_progress_loss } } ## Medium. else_if = { limit = { always = scope:diarch_syphon_treasury_sum_medium } - diarch_syphon_treasury_interaction_syphon_development_growth_effect = { LOSS = medium_development_progress_loss } + diarch_syphon_treasury_interaction_syphon_prosperity_growth_effect = { LOSS = medium_prosperity_progress_loss } } ## Low. else = { - diarch_syphon_treasury_interaction_syphon_development_growth_effect = { LOSS = minor_development_progress_loss } + diarch_syphon_treasury_interaction_syphon_prosperity_growth_effect = { LOSS = minor_prosperity_progress_loss } } } # Alternatively, for nomadic rulers, we steal some herd @@ -4983,6 +4985,7 @@ diarch_coup_liege_interaction = { pre_answer_yes_breakdown_key = diarch_coup_liege_interaction_pre_answer_yes_breakdown_key desc = diarch_coup_liege_interaction_desc + notification_text = diarch_coup_liege_interaction_notification # First, grab every other powerful vassal of your liege & plonk them in a list. populate_recipient_list = { @@ -6512,7 +6515,7 @@ swing_scales_currency_interaction = { is_shown = { # Filter out for the liege in vizierates - they can mulct the vizier, so we don't give them the chance to spend that gold back. interaction_actor_is_liege_with_vizierate_trigger = no - NOT = { religious_head_or_challenger ?= scope:recipient } + NOT = { scope:actor.religious_head_or_challenger ?= scope:recipient } } is_valid = { diarch_swing_scales_valid_shared_hof_trigger = yes @@ -6865,16 +6868,13 @@ diarch_swing_scales_currency_interaction = { interface_priority = 20 is_available = { - trigger_if = { - limit = { is_ai = yes } - # Double check due to some irritating errors. - is_diarch = yes - # Loyal diarchs don't engage in skullduggery. - diarch_loyalty < diarch_loyalty_visibly_loyal_threshold - liege ?= { has_active_diarchy = yes } - } + is_ai = yes is_playable_character = no - is_ai = yes + # Double check due to some irritating errors. + is_diarch = yes + liege ?= { has_active_diarchy = yes } + # Loyal diarchs don't engage in skullduggery. + diarch_loyalty < diarch_loyalty_visibly_loyal_threshold } is_shown = { @@ -7097,7 +7097,7 @@ diarch_swing_scales_currency_interaction = { } # HoF send_option = { - is_shown = { NOT = { religious_head_or_challenger ?= scope:recipient } } + is_shown = { NOT = { scope:actor.religious_head_or_challenger ?= scope:recipient } } is_valid = { diarch_swing_scales_valid_shared_hof_trigger = yes } # Top of the prio order for enablement. starts_enabled = { diarch_swing_scales_valid_shared_hof_trigger = yes } @@ -8413,9 +8413,9 @@ liege_dismiss_vizier_interaction = { has_trait = vengeful can_set_relation_rival_trigger = { CHARACTER = scope:actor } } - set_relation_rival = { - target = scope:actor - reason = rival_dismissed_me_from_vizierate + set_relation_rival_effect = { + TARGET = scope:actor + REASON = rival_dismissed_me_from_vizierate } add_opinion = { target = scope:actor diff --git a/common/character_interactions/00_dynast_interactions.txt b/common/character_interactions/00_dynast_interactions.txt index 43c177155..a744ca03e 100644 --- a/common/character_interactions/00_dynast_interactions.txt +++ b/common/character_interactions/00_dynast_interactions.txt @@ -38,8 +38,9 @@ disinherit_interaction = { } scope:recipient = { - NOT = { + NOR = { has_trait = disinherited + has_trait = adopted_no_inheritance } } } @@ -184,7 +185,7 @@ disinherit_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -335,10 +336,7 @@ disinherit_interaction = { modifier = { add = 100 scope:recipient = { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } @@ -438,10 +436,7 @@ disinherit_interaction = { modifier = { factor = 0 scope:recipient = { - OR = { - has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor - } + has_relation_friend = scope:puppet_or_actor } } @@ -484,8 +479,9 @@ disinherit_children_interaction = { has_dynasty_perk = fp2_coterie_legacy_5 } scope:recipient = { - NOT = { + NOR = { has_trait = disinherited + has_trait = adopted_no_inheritance } } } @@ -592,7 +588,7 @@ disinherit_children_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -654,10 +650,7 @@ disinherit_children_interaction = { modifier = { add = 100 scope:recipient = { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } @@ -757,10 +750,7 @@ disinherit_children_interaction = { modifier = { factor = 0 scope:recipient = { - OR = { - has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor - } + has_relation_friend = scope:puppet_or_actor } } @@ -795,7 +785,10 @@ restore_inheritance_interaction = { } scope:recipient = { - has_trait = disinherited + OR = { + has_trait = disinherited + has_trait = adopted_no_inheritance + } } } @@ -836,7 +829,7 @@ restore_inheritance_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -877,10 +870,7 @@ restore_inheritance_interaction = { modifier = { add = 100 scope:recipient = { - OR = { - has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor - } + has_relation_friend = scope:puppet_or_actor } } @@ -902,10 +892,7 @@ restore_inheritance_interaction = { modifier = { factor = 0 scope:recipient = { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } } @@ -1017,7 +1004,7 @@ denounce_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -1107,10 +1094,7 @@ denounce_interaction = { modifier = { add = 100 scope:recipient = { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } @@ -1195,10 +1179,7 @@ denounce_interaction = { modifier = { factor = 0 scope:recipient = { - OR = { - has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor - } + has_relation_friend = scope:puppet_or_actor } } } @@ -1266,7 +1247,7 @@ forgive_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -1307,10 +1288,7 @@ forgive_interaction = { modifier = { add = 100 scope:recipient = { - OR = { - has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor - } + has_relation_friend = scope:puppet_or_actor } } @@ -1332,10 +1310,7 @@ forgive_interaction = { modifier = { factor = 0 scope:recipient = { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } } @@ -1790,7 +1765,7 @@ dynast_claim_title_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -1970,7 +1945,7 @@ dynast_legitimize_bastard_interaction = { # category = interaction_category_friendly # interface_priority = 60 # icon = send_to_varangian_guard_interaction -# + # desc = send_to_varangian_guard_interaction_desc # use_diplomatic_range = no # common_interaction = yes @@ -1982,7 +1957,7 @@ dynast_legitimize_bastard_interaction = { # dynasty ?= { # has_dynasty_perk = fp1_adventure_legacy_1 # } -# + # NOR = { # faith ?= { # has_doctrine_parameter = pacifist @@ -1991,15 +1966,15 @@ dynast_legitimize_bastard_interaction = { # is_at_war_with = title:e_byzantium.holder # has_truce = title:e_byzantium.holder # } -# + # exists = title:e_byzantium.holder # is_at_war = no # } # } -# + # is_shown = { # scope:recipient != scope:puppet_or_actor -# + # scope:puppet_or_actor ?= { # is_dynast = yes # dynasty ?= scope:recipient.dynasty @@ -2021,7 +1996,7 @@ dynast_legitimize_bastard_interaction = { # } # # cooldown = { years = 2 } -# + # is_valid_showing_failures_only = { # scope:puppet_or_actor = { # is_at_war = no @@ -2096,7 +2071,7 @@ dynast_legitimize_bastard_interaction = { # send_interface_toast = { # type = event_toast_effect_neutral # title = send_to_varangian_guard_interaction_toast -# + # left_icon = scope:recipient # right_icon = scope:emperor # @@ -2113,16 +2088,16 @@ dynast_legitimize_bastard_interaction = { # send_interface_toast = { # type = event_toast_effect_neutral # title = send_to_varangian_guard_interaction_toast -# + # left_icon = scope:recipient # right_icon = scope:emperor -# + # custom_tooltip = send_to_varangian_guard_interaction_toast_desc # } # } # } # } -# + # scope:recipient = { # save_scope_as = varangian_candidate # @@ -2144,7 +2119,7 @@ dynast_legitimize_bastard_interaction = { # } # # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:puppet_or_actor # TARGET = scope:recipient # VALUE = miniscule_unity_loss @@ -2164,7 +2139,7 @@ dynast_legitimize_bastard_interaction = { # } # # auto_accept = yes -# + # ai_targets = { # ai_recipients = children # max = 10 diff --git a/common/character_interactions/00_fp3_interactions.txt b/common/character_interactions/00_fp3_interactions.txt index fbb1f2455..88281bb7f 100644 --- a/common/character_interactions/00_fp3_interactions.txt +++ b/common/character_interactions/00_fp3_interactions.txt @@ -1,4 +1,4 @@ -# As a Supporter, demand that a Muslim ruler recognize your authority +# As a Supporter, demand that a Muslim ruler recognize your authority # Success makes the Strengthen the Caliphate struggle decision easier to take #fp3_demand_submission_interaction = { # icon = demand_submission @@ -8,7 +8,7 @@ # can_send_despite_rejection = yes # ai_maybe = yes # desc = fp3_demand_submission_interaction_desc -# + # greeting = positive # notification_text = DEMAND_SUBMISSION_NOTIFICATION # @@ -18,7 +18,7 @@ # is_physically_able = yes # } # } -# + # is_shown = { # scope:actor != scope:recipient # struggle:persian_struggle ?= { has_struggle_phase_parameter = demand_submission_interaction_unlocked } @@ -29,9 +29,9 @@ # any_character_struggle = { this = struggle:persian_struggle } # } # } -# + # cooldown_against_recipient = { years = 10 } -# + # ai_min_reply_days = 2 # ai_max_reply_days = 7 # @@ -178,7 +178,7 @@ # desc = COWED_REASON # } # } -# + # on_accept = { # scope:actor = { # if = { @@ -201,9 +201,9 @@ # add_piety = massive_piety_gain # } # } -# + # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = medium_unity_gain @@ -211,7 +211,7 @@ # REVERSE_NON_HOUSE_TARGET = no # } # } -# + # on_decline = { # scope:recipient = { # custom_tooltip = DEMAND_SUBMISSION_INSTALL_LOYALIST_WARNING @@ -228,9 +228,9 @@ # scope:actor = { # trigger_event = fp3_misc_decisions.0011 # Letter event informing player of failure # } -# + # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = medium_unity_loss @@ -238,18 +238,18 @@ # REVERSE_NON_HOUSE_TARGET = no # } # } -# + # # Use piety to increase acceptance # send_option = { # flag = piety_cost_reduction # localization = TRADE_PIETY_FOR_BETTER_AI_ACCEPTANCE # } # send_options_exclusive = no -# + # ai_targets = { # ai_recipients = neighboring_rulers # } -# + # ai_frequency_by_tier = { # barony = 0 # county = 0 @@ -341,7 +341,7 @@ # } # } #} -# + #################################### ## Request Turkic invasion (can_request_incursion_interaction) ## By Hugo Cortell @@ -351,10 +351,10 @@ # common_interaction = yes # category = interaction_category_hostile # cooldown_against_recipient = { years = 2 } -# + # icon = request_mercenary # desc = fp3_request_turkic_invasion_interaction_desc -# + # is_available = { # OR = { # AND = { @@ -382,7 +382,7 @@ # is_at_war = no # } # } -# + # is_shown = { # scope:recipient = { # is_playable_character = yes @@ -403,16 +403,16 @@ # title:d_sunni.holder ?= this # } # top_liege ?= this -# + # } # is_ai = yes # } # scope:actor != scope:recipient # } -# + # is_valid_showing_failures_only = { # } -# + # populate_recipient_list = { # scope:actor.top_liege = { # every_independent_ruler = { @@ -481,7 +481,7 @@ # } # # send_options_exclusive = no -# + # send_option = { # flag = war_support # localization = fp3_request_turkic_invasion_interaction_option_join_war @@ -498,7 +498,7 @@ # } # } # } -# + # send_option = { # flag = financial_support # localization = fp3_request_turkic_invasion_interaction_option_more_gold @@ -511,7 +511,7 @@ # } # } # } -# + # cost = { # gold = { # value = { @@ -534,11 +534,11 @@ # } # } # } -# + # on_accept = { # if = { # limit = { exists = scope:secondary_recipient } -# + # scope:recipient = { # if = { # limit = { @@ -653,7 +653,7 @@ # } # # scope:invasion_target_title.duchy = { save_scope_as = text_title } -# + # hidden_effect = { # Not worth cluttering the UI with # add_opinion = { # modifier = fp3_incited_conflict @@ -665,7 +665,7 @@ # } # } # } -# + # scope:secondary_recipient = { # add_gold = { # value = { @@ -806,12 +806,12 @@ # } # } # } -# + # use_diplomatic_range = yes -# + # ai_accept = { # base = 0 -# + # # Relationships: actor -> recipient / We avoid more relationship checks for balance reasons (and because important decisions tend to care little for relationships) # modifier = { # Rivalry modifier. # desc = offer_vassalization_interaction_aibehavior_rival_tt_2 @@ -841,14 +841,14 @@ # } # add = 10 # } -# + # # Compare Opinion modifier # opinion_modifier = { # who = scope:secondary_recipient # opinion_target = scope:actor # multiplier = 0.25 # } -# + # # Pledged to help in invasion # modifier = { # add = { @@ -859,7 +859,7 @@ # desc = HAS_YOUR_SUPPORT_REASON # scope:war_support = yes # } -# + # # Relative power (taken from PT interaction) # modifier = { # A lot less levies than scope:secondary_recipient # add = -100 @@ -889,7 +889,7 @@ # scope:secondary_recipient.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_far_stronger_value # desc = fp3_RTI_AI_RECIPIENT_IS_MUCH_STRONGER # } -# + # # AI who are in debt will take whatever windfalls they can. # modifier = { # add = { @@ -900,7 +900,7 @@ # debt_level >= 0 # desc = PT_AI_IS_IN_DEBT # } -# + # # Pacifist AI don't like raiding # modifier = { # add = -25 @@ -930,14 +930,14 @@ # scope:actor.var:movement_power >= very_high_movement_power_value # desc = ACTOR_HIGH_MOVEMENT_POWER # } -# + # # Offered proportional gold # modifier = { # add = 85 # scope:financial_support = yes # desc = GOLD_REASON # } -# + # # AI value mod # ai_value_modifier = { # ai_greed = 0.5 @@ -955,13 +955,22 @@ # empire = 24 # hegemony = 24 # } +# ai_frequency_by_tier_government_override = { +# government = merchant_government +# barony = 0 +# county = 216 +# duchy = 0 +# kingdom = 0 +# empire = 0 +# hegemony = 0 +# } # ai_targets = { # ai_recipients = neighboring_rulers # ai_recipients = liege # } # ai_will_do = { # base = 0 -# + # modifier = { # add = 50 # scope:recipient = { @@ -969,31 +978,31 @@ # scope:recipient.max_military_strength >= scope:actor.max_military_strength # } # } -# + # modifier = { # add = 50 # title:d_sunni.holder ?= scope:recipient # } -# + # modifier = { # add = 100 # scope:recipient = { # has_relation_rival = scope:actor # } # } -# + # modifier = { # factor = 0.1 # scope:actor.liege ?= scope:recipient # } -# + # modifier = { # factor = 0 # scope:recipient = { # has_character_flag = incursion_ai_pacing # } # } -# + # modifier = { # factor = 0 # scope:recipient = { @@ -1001,7 +1010,7 @@ # is_ai = no # } # } -# + # modifier = { # factor = 0 # scope:recipient = { @@ -1009,7 +1018,7 @@ # is_liege_or_above_of = scope:actor # } # } -# + # modifier = { # factor = 0 # scope:recipient = { @@ -1025,7 +1034,7 @@ # } # } #} -# + #################################### ## Challenge House Head ## By Hugo Cortell @@ -1040,11 +1049,11 @@ # popup_on_receive = yes # pause_on_receive = yes # use_diplomatic_range = no -# +# can_send_despite_rejection = yes # interface_priority = 107 -# + # desc = fp3_challenge_house_head_interaction_desc -# + # notification_text = { # first_valid = { # triggered_desc = { @@ -1056,11 +1065,11 @@ # } # # greeting = positive -# + # ai_maybe = yes # # cooldown_against_recipient = { years = 10 } -# + # is_available = { # OR = { # government_has_flag = government_is_clan @@ -1072,24 +1081,30 @@ # is_physically_able = yes # } # } -# + # is_shown = { -# has_fp3_dlc_trigger = yes # scope:actor = { # this != scope:recipient # house ?= { # house_head ?= scope:recipient # OR = { -# has_house_unity_parameter = unity_can_challenge_house_head -# house_head ?= { government_is_japanese_trigger = yes } +# OR = { +# has_house_unity_parameter = unity_can_challenge_house_head +# has_house_unity_parameter = unity_much_more_likely_to_challenge_house_head +# has_house_unity_parameter = unity_more_likely_to_challenge_house_head +# } # scope:actor = { # any_character_struggle = { has_struggle_phase_parameter = unlocks_challenge_house_head_for_clans } # } +# AND = { +# scope:actor = { government_is_japanese_trigger = yes } +# house_head = { government_is_japanese_trigger = yes } +# } # } # } # } # } -# + # is_valid_showing_failures_only = { # scope:actor = { # is_at_war = no @@ -1098,12 +1113,17 @@ # scope:recipient = { # is_at_war = no # is_available_adult = yes -# # Stop challenges from barons and counts against kings -# custom_tooltip = { -# text = fp3_challenge_house_head_interaction_tier_tt -# tier_difference = { -# target = scope:actor -# value <= 1 +# trigger_if = { +# limit = { +# scope:actor = { is_landed = yes } +# } +# # Stop challenges from barons and counts against kings +# custom_tooltip = { +# text = fp3_challenge_house_head_interaction_tier_tt +# tier_difference = { +# target = scope:actor +# value <= 1 +# } # } # } # # Give some respite after a recent challenge @@ -1165,7 +1185,7 @@ # } # } # } -# + # on_send = { # scope:recipient = { # add_character_flag = { # stop multiple challenges at same time @@ -1178,7 +1198,7 @@ # } # } # } -# + # on_accept = { # scope:recipient = { save_scope_as = house_head } # if = { @@ -1203,7 +1223,7 @@ # trigger_event = fp3_misc_decisions.0026 # scope:house_head = { custom_tooltip = fp3_challenge_house_head_interaction_tooltip_recipient.diplomacy } # house = { -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:house_challenger # TARGET = scope:house_head # VALUE = minor_unity_loss @@ -1218,7 +1238,7 @@ # custom_tooltip = fp3_challenge_house_head_interaction_tooltip_actor.a # scope:house_head = { custom_tooltip = fp3_challenge_house_head_interaction_tooltip_recipient.b } # house = { -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:house_challenger # TARGET = scope:house_head # VALUE = minor_unity_loss @@ -1231,7 +1251,7 @@ # custom_tooltip = fp3_challenge_house_head_interaction_tooltip_actor.a.lethal # scope:house_head = { custom_tooltip = fp3_challenge_house_head_interaction_tooltip_recipient.b.lethal } # house = { -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:house_challenger # TARGET = scope:house_head # VALUE = major_unity_loss @@ -1273,7 +1293,7 @@ # } # } # } -# + # on_decline = { # Get letter of rejection, to further escalate the situation if the player wills it # scope:actor = { trigger_event = fp3_misc_decisions.0025 } # scope:recipient = { @@ -1281,7 +1301,7 @@ # remove_character_flag = ongoing_house_head_challenge_flag # } # } -# + # send_option = { # flag = diplomacy # localization = CHALLENGE_HOUSE_HEAD_DIPLOMACY_DUEL @@ -1323,7 +1343,7 @@ # should_use_extra_icon = { scope:actor = { has_usable_hook = scope:recipient } } # extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" # send_options_exclusive = no -# + # # AI # ai_accept = { # base = 25 @@ -1415,6 +1435,12 @@ # opinion_target = scope:actor # multiplier = 0.5 # } +# modifier = { +# add = -150 +# scope:actor = { is_ruler = no } +# scope:recipient = { is_ruler = yes } +# desc = AI_NOT_A_RULER +# } # } # # ai_frequency_by_tier = { @@ -1435,14 +1461,14 @@ # ai_recipients = family # max = 10 # } -# + # ai_targets = { # ai_recipients = liege # ai_recipients = head_of_faith # ai_recipients = hooked_characters # ai_recipients = scripted_relations # } -# + # ai_targets = { # ai_recipients = peer_vassals # ai_recipients = vassals @@ -1559,6 +1585,15 @@ # scope:recipient = { is_faith_dominant_gender = no } # factor = 2 # } +# # Low Unity +# modifier = { +# scope:actor.house = { has_house_unity_parameter = unity_more_likely_to_challenge_house_head } +# factor = 1.5 +# } +# modifier = { +# scope:actor.house = { has_house_unity_parameter = unity_much_more_likely_to_challenge_house_head } +# factor = 2 +# } # # Stop AI constantly challenging players # modifier = { # scope:recipient = { has_character_flag = ai_cooldown_house_head_challenge_flag } @@ -1577,8 +1612,8 @@ # } # } #} -# -# + + #################################### ## Change struggle allegiance #################################### @@ -1606,17 +1641,17 @@ # } # } # icon = change_allegiance -# + # greeting = positive # notification_text = fp3_change_allegiance_notification -# + # should_use_extra_icon = { scope:actor = { has_usable_hook = scope:recipient } } # extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" -# + # send_options_exclusive = no -# + # ai_maybe = yes -# + # is_available = { # any_character_struggle = { is_struggle_type = persian_struggle } # trigger_if = { @@ -1628,7 +1663,7 @@ # primary_title.tier >= tier_duchy # } # } -# + # is_shown = { # has_fp3_dlc_trigger = yes # # There has to be a caliph around to sway on. @@ -1668,7 +1703,7 @@ # NOT = { this = title:d_sunni.holder } # } # } -# + # is_valid_showing_failures_only = { # scope:recipient = { # # We want to disable some stuff for supporters who can't be persuaded away from the caliph. @@ -1728,7 +1763,7 @@ # } # scope:actor = { is_available_adult = yes } # } -# + # auto_accept = { # custom_description = { # text = "spending_hook" @@ -1737,10 +1772,10 @@ # scope:hook = yes # } # } -# + # ai_accept = { # base = 0 -# + # # Those who already have a stance are more set in their ways. # ## Detractors # modifier = { @@ -1756,7 +1791,7 @@ # scope:recipient = { has_trait = fp3_struggle_supporter } # desc = INTERACTION_SUPPORTER # } -# + # # Opinions # ## Opinion of you # opinion_modifier = { @@ -1844,11 +1879,11 @@ # desc = INTERACTION_DIPLOMACY_RECIPIENT # } # } -# + # cost = { # prestige = medium_prestige_value # } -# + # # Use hook # send_option = { # flag = hook @@ -1859,7 +1894,7 @@ # } # localization = GENERIC_SPEND_A_HOOK # } -# + # on_accept = { # # Use our hook if we have to. # if = { @@ -1869,7 +1904,7 @@ # } # } # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = medium_unity_gain @@ -1882,7 +1917,7 @@ # type = event_toast_effect_good # title = recipient_joined_your_side_title # left_icon = scope:recipient -# + # scope:recipient = { # if = { # limit = { scope:actor = { has_trait = fp3_struggle_detractor } } @@ -1891,7 +1926,7 @@ # remove_trait = fp3_struggle_supporter # } # add_trait_force_tooltip = fp3_struggle_detractor -# + # # Catalyst # hidden_effect = { # if = { @@ -1920,7 +1955,7 @@ # remove_trait = fp3_struggle_detractor # } # add_trait_force_tooltip = fp3_struggle_supporter -# + # # Catalyst # hidden_effect = { # if = { @@ -1954,9 +1989,9 @@ # } # } # } -# + # on_decline = { -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = medium_unity_loss @@ -2007,7 +2042,7 @@ # empire = 120 # hegemony = 120 # } -# + # ai_targets = { # ai_recipients = liege # ai_recipients = neighboring_rulers @@ -2016,14 +2051,14 @@ # ai_recipients = top_realm_domicile_owners # max = 10 # } -# + # ai_will_do = { # base = -50 # Let's limit it to specific character to avoid pure chaos -# + # ############### # ## BASE # ############### -# + # # AI Values # ## Detractors run off of lacking zeal # modifier = { @@ -2043,7 +2078,7 @@ # has_trait = fp3_struggle_supporter # ai_zeal >= 1 # } -# + # # The caliph wants to use this all the time. # modifier = { # has_title = title:d_sunni @@ -2053,35 +2088,35 @@ # ############### # ## TRAITS # ############### -# + # # schemer # modifier = { # add = 15 # has_trait = schemer # } -# + # # theologian # modifier = { # add = 25 # has_trait = theologian # } -# + # # intrigue education # modifier = { # add = 15 # has_trait = education_intrigue # } -# + # # learning education # modifier = { # add = 25 # has_trait = education_learning # } -# + # ################ # ## RELATIONSHIP # ################ -# + # # more likely to do it against friend and lover # modifier = { # add = 50 @@ -2089,12 +2124,10 @@ # OR = { # has_relation_friend = scope:actor # has_relation_lover = scope:actor -# has_relation_soulmate = scope:actor -# has_relation_best_friend = scope:actor # } # } # } -# + # # boost against liege for Ambitious # modifier = { # add = 50 @@ -2103,22 +2136,19 @@ # is_vassal_of = scope:recipient # } # } -# + # # never target your rivals # modifier = { # add = -1000 # scope:recipient = { -# OR = { -# has_relation_rival = scope:actor -# has_relation_nemesis = scope:actor -# } +# has_relation_rival = scope:actor # } # } -# + # ################ # ## STRUGGLE # ################ -# + # modifier = { # add = 100 # OR = { @@ -2146,8 +2176,8 @@ # } # } #} -# -# + + #################################### ## Request honorary titles #################################### @@ -2157,13 +2187,13 @@ # common_interaction = yes # desc = fp3_request_honorary_titles_interaction_desc # icon = honorary_titles -# + # greeting = positive -# + # auto_accept = yes -# + # cooldown = { years = 10 } -# + # cost = { # piety = { # value = major_piety_value @@ -2181,7 +2211,7 @@ # } # } # } -# + # is_available = { # trigger_if = { # limit = { is_ai = yes } @@ -2192,11 +2222,11 @@ # } # } # } -# + # is_shown = { # fp3_reward_from_vassalization_ending = yes # } -# + # is_valid = { # # honorary titles should be unique # custom_tooltip = { @@ -2210,7 +2240,7 @@ # any_house_member = { # has_character_modifier = fp3_honorary_title_scholarship_modifier # } -# + # any_house_member = { # has_character_modifier = fp3_honorary_title_stewardship_modifier # } @@ -2231,7 +2261,7 @@ # } # } # } -# + # send_option = { # flag = intrigue_option # localization = fp3_honorary_title_intrigue_modifier @@ -2247,7 +2277,7 @@ # } # } # } -# + # send_option = { # flag = scholarship_option # localization = fp3_honorary_title_scholarship_modifier @@ -2263,7 +2293,7 @@ # } # } # } -# + # send_option = { # flag = stewardship_option # localization = fp3_honorary_title_stewardship_modifier @@ -2279,7 +2309,7 @@ # } # } # } -# + # send_option = { # flag = diplomacy_option # localization = fp3_honorary_title_diplomacy_modifier @@ -2295,7 +2325,7 @@ # } # } # } -# + # send_option = { # flag = piety_option # localization = fp3_honorary_title_piety_modifier @@ -2311,7 +2341,7 @@ # } # } # } -# + # send_option = { # flag = prestige_option # localization = fp3_honorary_title_prestige_modifier @@ -2327,7 +2357,7 @@ # } # } # } -# + # send_option = { # flag = martial_option # localization = fp3_honorary_title_martial_modifier @@ -2343,14 +2373,14 @@ # } # } # } -# + # on_accept = { # scope:actor = { # send_interface_toast = { # type = event_toast_effect_good # title = new_honorary_title_acquired_title # left_icon = scope:recipient -# + # switch = { # trigger = yes # scope:intrigue_option = { @@ -2392,7 +2422,7 @@ # } # } # } -# + # ai_frequency_by_tier = { # barony = 0 # county = 0 @@ -2401,17 +2431,17 @@ # empire = 60 # hegemony = 60 # } -# + # ai_targets = { # ai_recipients = vassals # } -# + # ai_will_do = { # base = 100 # } #} -# -# + + #################################### ## Request house unity interference #################################### @@ -2421,18 +2451,18 @@ # common_interaction = yes # desc = fp3_request_house_unity_change_interaction_desc # icon = unity_harmonious -# + # greeting = positive -# -# + + # auto_accept = yes -# + # cooldown = { years = 10 } -# + # cost = { # piety = medium_piety_value # } -# + # is_available = { # government_has_flag = government_is_clan # trigger_if = { @@ -2444,11 +2474,11 @@ # } # } # } -# + # is_shown = { # fp3_reward_from_vassalization_ending = yes # } -# + # is_valid = { # # only valid for the actual liege # custom_tooltip = { @@ -2463,18 +2493,18 @@ # } # } # } -# + # send_option = { # flag = unity_gain # localization = INCREASE_HOUSE_UNITY # starts_enabled = { always = yes } # } -# + # send_option = { # flag = unity_loss # localization = DECREASE_HOUSE_UNITY # } -# + # on_accept = { # scope:recipient = { save_scope_as = unity_target } # scope:actor = { @@ -2497,7 +2527,7 @@ # } # } # } -# + # ai_frequency_by_tier = { # barony = 0 # county = 0 @@ -2506,12 +2536,12 @@ # empire = 60 # hegemony = 60 # } -# + # ai_targets = { # # For the AI, we limit it to neighboring_rulers # ai_recipients = vassals # } -# + # ai_will_do = { # base = 100 # } diff --git a/common/character_interactions/00_gift.txt b/common/character_interactions/00_gift.txt index 63d7ec566..51af19391 100644 --- a/common/character_interactions/00_gift.txt +++ b/common/character_interactions/00_gift.txt @@ -37,6 +37,15 @@ gift_interaction = { empire = 36 hegemony = 36 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 180 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } is_available = { trigger_if = { @@ -56,12 +65,11 @@ gift_interaction = { # Prioritize paying back loans first scope:puppet_or_actor ?= { this != scope:recipient - trigger_if = { - limit = { - exists = var:loan_amount_owed - exists = var:loan_holder + NOT = { + any_owned_story = { + type = story_cycle_loan + var:lender = scope:recipient } - NOT = { var:loan_holder = scope:recipient } } # A landless puppet has nothing to gift that is not already the puppeteer's trigger_if = { @@ -336,7 +344,7 @@ gift_interaction = { target = scope:puppet_or_actor.culture value = { value = 20 - multiply = scope:recipient.capital_province.county.development_level + multiply = scope:recipient.capital_province.county.prosperity_level divide = 100 } desc = cultural_acceptance_gain_gift_dynasty_perk @@ -652,9 +660,7 @@ gift_interaction = { } has_secret_relation_lover = scope:puppet_or_actor has_relation_lover = scope:puppet_or_actor - has_relation_soulmate = scope:puppet_or_actor has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor } gold < 0 } @@ -663,9 +669,7 @@ gift_interaction = { OR = { has_secret_relation_lover = scope:puppet_or_actor has_relation_lover = scope:puppet_or_actor - has_relation_soulmate = scope:puppet_or_actor has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor } scope:puppet_or_actor = { OR = { @@ -696,7 +700,6 @@ gift_interaction = { OR = { scope:puppet_or_actor.liege ?= this has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor is_allied_to = scope:puppet_or_actor is_close_or_extended_family_of = scope:puppet_or_actor } @@ -724,7 +727,7 @@ gift_interaction = { target = scope:puppet_or_actor value < 0 } - NOT ={ + NOT = { has_opinion_modifier = { target = scope:puppet_or_actor modifier = gift_opinion @@ -734,7 +737,7 @@ gift_interaction = { AND = { # Factioneering vassals should be considered is_vassal_of = scope:puppet_or_actor is_a_faction_member = yes - NOT ={ + NOT = { has_opinion_modifier = { target = scope:puppet_or_actor modifier = gift_opinion diff --git a/common/character_interactions/00_grant_titles_interaction.txt b/common/character_interactions/00_grant_titles_interaction.txt index 46fd6c09f..f5da69faf 100644 --- a/common/character_interactions/00_grant_titles_interaction.txt +++ b/common/character_interactions/00_grant_titles_interaction.txt @@ -1,4 +1,9 @@ -# Be aware that the actual granting of the title happens in code! +# Interactions for players granting titles to their vassals. +# +# Implementation note: +# NPC/AI does not invoke 'grant_titles_interaction' or 'grant_governorship_interaction' by traditional means. +# Granting titles is instead handled by custom C++ code which picks the appropriate one given character properties. +# # 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) # @@ -30,9 +35,8 @@ grant_titles_interaction = { is_shown = { scope:puppet_or_actor != scope:recipient scope:puppet_or_actor ?= { - NOT = { - government_has_flag = cannot_be_vassal_or_liege - } + is_landless_adventurer = no + is_landless_merchant = no } scope:recipient = { OR = { @@ -75,6 +79,7 @@ grant_titles_interaction = { limit = { is_ruler = no } is_imprisoned = no } + NOT = { is_imprisoned_by = scope:puppet_or_actor } # DON'T TAKE OTHER PLAYERS' ACCLAIMED KNIGHTS custom_description = { text = grant_title_stealing_acclaimed_knight @@ -142,6 +147,78 @@ grant_titles_interaction = { } } } + + # When republics grant titles to other republics + trigger_if = { + limit = { + scope:actor = { government_has_flag = government_is_republic } + scope:recipient = { government_has_flag = government_is_republic } + scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary + } + # Republic governors can only hold titles neighboring any existing titles + scope:recipient = { + # Landed being granted additional land + trigger_if = { + limit = { + is_landed = yes + scope:target = { is_noble_family_title = no } + } + # Grant County + trigger_if = { + limit = { scope:target.tier = tier_county } + republic_can_grant_county_to_landed_trigger = yes + } + # Grant Duchy+ + trigger_else = { republic_can_grant_duchy_or_higher_to_landed_trigger = yes } + } + # Landless being granted land for first time + trigger_else = { + # Duchy+ must be de jure above selected counties + trigger_if = { + limit = { scope:target.tier > tier_county } + republic_can_grant_duchy_or_higher_to_landless_trigger = yes + } + # County must be neighbor or de jure below selected titles + trigger_else = { + custom_tooltip = { + text = republic_title_must_be_neighboring_desc + trigger_if = { + limit = { + any_in_list = { + list = target_titles + count > 1 + } + } + any_in_list = { + list = target_titles + count = all + trigger_if = { + limit = { tier = tier_barony } + de_jure_liege = { is_in_list = target_titles } + } + trigger_else_if = { + limit = { tier = tier_county } + OR = { + any_title_to_title_neighboring_county = { is_in_list = target_titles } + any_in_de_jure_hierarchy = { + tier = tier_barony + is_in_list = target_titles + } + } + } + trigger_else = { + any_in_de_jure_hierarchy = { + tier = tier_county + is_in_list = target_titles + } + } + } + } + } + } + } + } + } } can_be_picked_title = { @@ -178,6 +255,16 @@ grant_titles_interaction = { always = no } } + trigger_if = { + limit = { + tier > tier_county + scope:recipient = { government_has_flag = government_is_herder } + } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_ABOVE_COUNTY_TO_HERDER + always = no + } + } trigger_if = { limit = { is_nomad_title = yes } @@ -258,6 +345,7 @@ grant_titles_interaction = { custom_description = { text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch subject = scope:puppet_or_actor.diarch + object = scope:puppet_or_actor NAND = { # Only applies if we have an active diarchy. scope:puppet_or_actor = { has_active_diarchy = yes } @@ -303,10 +391,75 @@ grant_titles_interaction = { custom_description = { text = grant_titles_interaction_title_being_wagered + subject = scope:puppet_or_actor NOT = { scope:target = { has_variable = wagered_county } } } + + # When republics grant titles to other republics + trigger_if = { + limit = { + scope:actor = { government_has_flag = government_is_republic } + scope:recipient = { government_has_flag = government_is_republic } + scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary + } + # Republic governors can only hold titles neighboring any existing titles + scope:recipient = { + # Landed being granted additional land + trigger_if = { + limit = { + is_landed = yes + scope:target = { is_noble_family_title = no } + } + # Grant County + trigger_if = { + limit = { scope:target.tier = tier_county } + republic_can_grant_county_to_landed_trigger = yes + } + # Grant Duchy+ + trigger_else = { republic_can_grant_duchy_or_higher_to_landed_trigger = yes } + } + # Landless being granted land for first time + trigger_else = { + # Duchy+ must be de jure above selected counties + trigger_if = { + limit = { scope:target.tier > tier_county } + republic_can_grant_duchy_or_higher_to_landless_trigger = yes + } + # County must be neighbor or de jure below selected titles + trigger_else = { + custom_tooltip = { + text = republic_title_must_be_neighboring_desc + trigger_if = { + limit = { + any_in_list = { + list = target_titles + count > 0 + } + } + OR = { + scope:target = { + OR = { + is_in_list = target_titles + any_title_to_title_neighboring_county = { is_in_list = target_titles } + trigger_if = { + limit = { tier = tier_barony } + de_jure_liege = { is_in_list = target_titles } + } + } + } + any_in_list = { + list = target_titles + is_de_jure_liege_or_above_target = scope:target + } + } + } + } + } + } + } + } } auto_accept = yes @@ -2301,6 +2454,153 @@ grant_governorship_interaction = { } can_be_picked_title = { + scope:target = { + is_leased_out = no + + scope:recipient = { + trigger_if = { # Governors can only be appointed to certain titles + limit = { + is_governor = yes + scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary + } + custom_tooltip = { # Only one province of highest rank + text = only_one_province_of_highest_rank_tt + NAND = { + highest_held_title_tier = scope:target.tier + scope:target.tier >= main_administrative_tier + trigger_if = { + limit = { + scope:target.tier >= tier_duchy + } + scope:target = { # We make an exception if recipient controls at least one de jure county + any_de_jure_county = { + count < 1 + OR = { + holder = scope:recipient + holder = { is_vassal_or_below_of = scope:recipient } + } + } + } + } + } + } + custom_tooltip = { + text = admin_must_be_de_jure_or_neighboring + any_held_title = { + OR = { + # The target title is part of your de jure structure + is_de_jure_liege_or_above_target = scope:target + target_is_de_jure_liege_or_above = scope:target + # Or is a neighboring county which de jure duchy is not part of your realm + AND = { + tier >= tier_county + any_title_to_title_neighboring_county = { this = scope:target } + scope:target = { + tier = tier_county + duchy = { + OR = { + NOT = { exists = holder } + holder = { + NOR = { + is_vassal_or_below_of = scope:puppet_or_actor + this = scope:puppet_or_actor + } + } + } + } + } + } + } + } + } + } + trigger_if = { # If recipient is landless and only have a family title, target title must be a duchy or above + limit = { + is_landless_ruler = yes + any_held_title = { is_noble_family_title = yes } + scope:target.tier < min_appointment_tier + } + primary_title.tier <= scope:target.tier + } + trigger_if = { # If recipient is a count, they can get only get counties within the same duchy + limit = { + highest_held_title_tier = tier_county + main_administrative_tier > tier_county + is_landed = yes + scope:target.tier = tier_county + } + custom_tooltip = { + text = admin_count_grant_only_counties + any_held_title = { duchy = scope:target.duchy } + } + } + tgp_is_ceremonial_liege_trigger = no + } + + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_ADMIN_PRIMARY + this != scope:puppet_or_actor.capital_province.duchy + } + + trigger_if = { + limit = { is_noble_family_title = yes } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_NOBLE_FAMILY + always = no + } + } + trigger_if = { + limit = { exists = var:ceremonial_title } + custom_tooltip = { + text = GRANT_TITLES_ITEM_CANT_GIVE_CEREMONIAL_TITLE + always = no + } + } + + trigger_if = { + limit = { + list_size:target_titles > 0 + } + custom_tooltip = { + text = GRANT_TITLES_ITEM_ADMIN_CANT_GIVE_MORE_THAN_ONE + any_in_list = { + list = target_titles + scope:target ?= this + } + } + } + + trigger_if = { + limit = { scope:target = title:k_fashion } + NOT = { scope:target = title:k_fashion } + } + } + + custom_description = { + text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch + subject = scope:puppet_or_actor.diarch + object = scope:puppet_or_actor + NAND = { + # Only applies if we have an active diarchy. + scope:puppet_or_actor = { has_active_diarchy = yes } + # Now, prevent us from giving away our diarch's land to invalidate them... + scope:target = { + any_dejure_vassal_title_holder = { this = scope:puppet_or_actor.diarch } + # ... _unless_ we're giving it _to_ the diarch. + scope:recipient != scope:puppet_or_actor.diarch + # Plus we only care if the title is below our tier. + tier < scope:puppet_or_actor.highest_held_title_tier + } + } + } + + custom_description = { + text = grant_titles_interaction_title_being_wagered + subject = scope:puppet_or_actor + NOT = { + scope:target = { has_variable = wagered_county } + } + } } auto_accept = yes diff --git a/common/character_interactions/00_lover_interactions.txt b/common/character_interactions/00_lover_interactions.txt index c9653442e..7b15e9178 100644 --- a/common/character_interactions/00_lover_interactions.txt +++ b/common/character_interactions/00_lover_interactions.txt @@ -33,7 +33,7 @@ break_up_with_lover_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = miniscule_unity_loss diff --git a/common/character_interactions/00_modifiy_vassal_contract.txt b/common/character_interactions/00_modifiy_vassal_contract.txt index a2536eaa5..690dd6d2e 100644 --- a/common/character_interactions/00_modifiy_vassal_contract.txt +++ b/common/character_interactions/00_modifiy_vassal_contract.txt @@ -247,7 +247,22 @@ title = modify_vassal_contract_interaction_notification right_icon = scope:recipient # Add tyranny for each level increased. Can spend one hook to avoid one level of tyranny hit. - add_tyranny = vassal_obligation_increase_tyranny_gain + add_tyranny = { + value = vassal_obligation_increase_tyranny_gain + #HRE should not revoke titles from North Italians + if = { + limit = { + gg_hre_causes_additional_tyranny_trigger = { TARGET = scope:recipient } + } + multiply = 2 + } + } + if = { + limit = { + gg_hre_causes_additional_tyranny_trigger = { TARGET = scope:recipient } + } + gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_imperial_overreach } + } if = { limit = { vassal_obligation_increase_tyranny_gain != 0 } stress_and_fulfillment_impact = { @@ -391,6 +406,21 @@ vassal_modify_vassal_contract_interaction = { } } trigger_else = { + trigger_if = { + limit = { + scope:puppet_or_actor = { government_has_flag = government_is_republic } + } + custom_description = { + text = "vassal_modify_vassal_contract_republic_requires_hook" + subject = scope:puppet_or_actor + object = scope:recipient + OR = { + always = scope:hook + always = scope:diarch + } + } + } + scope:puppet_or_actor = { has_changed_contract_obligation_trigger = yes } @@ -1425,6 +1455,7 @@ admin_vassal_modify_vassal_contract_interaction = { send_option = { is_shown = { scope:puppet_or_actor = { is_diarch_of_target = scope:recipient } + scope:recipient = { has_diarchy_parameter = diarch_gets_a_free_change_on_vassal_contract } } is_valid = { scope:puppet_or_actor = { @@ -1438,6 +1469,7 @@ admin_vassal_modify_vassal_contract_interaction = { } } } + scope:recipient = { has_diarchy_active_parameter = diarch_gets_a_free_change_on_vassal_contract } } flag = diarch localization = CALL_IN_DIARCH_RIGHTS @@ -1937,6 +1969,7 @@ nomad_vassal_modify_vassal_contract_interaction = { send_option = { is_shown = { scope:puppet_or_actor = { is_diarch_of_target = scope:recipient } + scope:recipient = { has_diarchy_parameter = diarch_gets_a_free_change_on_vassal_contract } } is_valid = { scope:puppet_or_actor = { @@ -1950,6 +1983,7 @@ nomad_vassal_modify_vassal_contract_interaction = { } } } + scope:recipient = { has_diarchy_active_parameter = diarch_gets_a_free_change_on_vassal_contract } } flag = diarch localization = CALL_IN_DIARCH_RIGHTS @@ -2341,6 +2375,13 @@ subject_modify_tributary_contract_interaction = { limit = { always = scope:hook } use_hook = scope:recipient } + else_if = { + limit = { always = scope:gold } + pay_short_term_gold = { + target = scope:recipient + gold = 100 + } + } else = { if = { limit = { subject_standing < 0 } # this means we don't use subject standing @@ -2355,9 +2396,14 @@ subject_modify_tributary_contract_interaction = { } } else = { - pay_short_term_gold = { - target = scope:recipient - gold = major_gold_value + if = { + limit = { + NOT = { government_has_flag = government_is_merchant } + } + pay_short_term_gold = { + target = scope:recipient + gold = major_gold_value + } } } } @@ -2432,6 +2478,7 @@ subject_modify_tributary_contract_interaction = { send_option = { is_shown = { scope:puppet_or_actor = { is_diarch_of_target = scope:recipient } + scope:recipient = { has_diarchy_parameter = diarch_gets_a_free_change_on_vassal_contract } } is_valid = { scope:puppet_or_actor = { @@ -2445,10 +2492,25 @@ subject_modify_tributary_contract_interaction = { } } } + scope:recipient = { has_diarchy_active_parameter = diarch_gets_a_free_change_on_vassal_contract } } flag = diarch localization = CALL_IN_DIARCH_RIGHTS } + send_option = { + is_shown = { + scope:actor = { + government_has_flag = government_is_merchant + } + } + is_valid = { + scope:actor = { + + } + } + flag = gold + localization = REQUEST_CONTRACT_CHANGE_GOLD + } should_use_extra_icon = { scope:puppet_or_actor = { has_usable_hook = scope:recipient } } @@ -2460,12 +2522,21 @@ subject_modify_tributary_contract_interaction = { # Opinion Factor opinion_modifier = { + trigger = { NOT = { scope:actor = { government_has_flag = government_is_merchant } } } who = scope:recipient opinion_target = scope:puppet_or_actor multiplier = 1 desc = AI_OPINION_REASON } + opinion_modifier = { + trigger = { scope:actor = { government_has_flag = government_is_merchant } } + who = scope:recipient + opinion_target = scope:actor + multiplier = 0.75 + desc = AI_OPINION_REASON + } + modifier = { add = { add = scope:new_value @@ -2482,9 +2553,31 @@ subject_modify_tributary_contract_interaction = { } multiply = 0.5 } + if = { # For merchants, it is a bit rougher making a difference, to see if we can force them to use gold + limit = { + scope:actor = { + has_subject_contract_group = tributary_merchant + } + } + multiply = 3 + } } desc = AI_CONTRACT_BALANCE } + modifier = { + scope:gold = yes + add = 20 + desc = AI_GOLD_BALANCE + } + + modifier = { + add = 15 + desc = exclusive_contracts_perk_acceptance + scope:actor = { + government_has_flag = government_is_merchant + has_perk = forced_vassalage_perk + } + } } } diff --git a/common/character_interactions/00_prison_interactions.txt b/common/character_interactions/00_prison_interactions.txt index 17e1bede0..615f8c5d9 100644 --- a/common/character_interactions/00_prison_interactions.txt +++ b/common/character_interactions/00_prison_interactions.txt @@ -168,6 +168,13 @@ } } } + trigger_if = { + limit = { + government_has_flag = government_is_republic + scope:recipient = { government_has_flag = government_is_republic } + } + has_imprisonment_reason = scope:recipient + } } imprison_neutral_is_valid_showing_failures_only_triggers_trigger = yes trigger_if = { @@ -320,9 +327,7 @@ on_auto_accept = { # the rest of the necessary logic is covered by auto_accept also triggering on_accept below - scope:recipient = { - trigger_event = char_interaction.0233 - } + scope:recipient = { trigger_event = char_interaction.0233 } } on_accept = { @@ -346,16 +351,12 @@ } scope:puppet_or_actor = { if = { - limit = { - has_title = title:e_minister_of_justice - } + limit = { has_title = title:e_minister_of_justice } if = { limit = { NOR = { has_imprisonment_reason = scope:recipient - scope:recipient.liege = { - has_imprisonment_reason = scope:recipient - } + scope:recipient.liege = { has_imprisonment_reason = scope:recipient } scope:hook = yes } any_character_situation = { @@ -375,18 +376,14 @@ } } if = { - limit = { - government_allows = merit - } + limit = { government_allows = merit } change_merit = { value = minor_merit_gain multiply = scope:recipient.highest_held_title_tier } } if = { - limit = { - government_has_flag = government_has_influence - } + limit = { government_has_flag = government_has_influence } change_influence = { value = minor_influence_gain multiply = scope:recipient.highest_held_title_tier @@ -399,6 +396,23 @@ } } } +# #Guelphs & Ghibellines +# if = { +# limit = { +# scope:recipient = { +# NOR = { +# is_guelph_leader_trigger = yes +# is_ghibelline_leader_trigger = yes +# } +# } +# } +# gg_triggered_catalyst_effect = { +# ACTOR = scope:actor +# RECIPIENT = scope:recipient +# CATALYST = catalyst_attempt_imprison_opposite_party +# } +# } +# gg_involvement_catalyst_effect = yes } if = { limit = { scope:hook = yes } @@ -425,9 +439,7 @@ scope:puppet_or_actor = { trigger_event = char_interaction.0231 if = { - limit = { - has_imprisonment_reason = scope:recipient - } + limit = { has_imprisonment_reason = scope:recipient } stress_and_fulfillment_impact = { compassionate = minor_stress_impact_gain forgiving = minor_stress_impact_gain @@ -439,7 +451,7 @@ compassionate = medium_stress_impact_gain } if = { - limit = { exists = scope:retaliating_faction} + limit = { exists = scope:retaliating_faction } scope:retaliating_faction = { imprisonment_retribution_start_faction_war_if_valid = yes } @@ -459,7 +471,7 @@ NOT = { scope:puppet_or_actor = { has_imprisonment_reason = scope:recipient } } scope:recipient = { is_landed_or_landless_administrative_or_theocratic = yes } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -472,7 +484,7 @@ NOT = { scope:puppet_or_actor = { has_imprisonment_reason = scope:recipient } } scope:recipient = { is_landed_or_landless_administrative_or_theocratic = no } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -481,7 +493,7 @@ } } else = { # If you have a valid reason, you lose only a tiny bit of unity (criminal or not, they are still family) - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -800,6 +812,14 @@ } remove_character_flag = flag_hostile_actions_disabled_delay } + + #Guelphs & Ghibellines + gg_triggered_catalyst_effect = { + ACTOR = scope:actor + RECIPIENT = scope:recipient + CATALYST = catalyst_attempt_imprison_opposite_party + } + gg_involvement_catalyst_effect = yes } # If we're a clan this interaction affects unity @@ -810,7 +830,7 @@ } scope:recipient = { is_landed_or_landless_administrative_or_theocratic = yes } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -825,7 +845,7 @@ } scope:recipient = { is_landed_or_landless_administrative_or_theocratic = no } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -834,7 +854,7 @@ } } else = { # If you have a valid reason, you lose only a tiny bit of unity (criminal or not, they are still family) - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = miniscule_unity_loss @@ -991,6 +1011,7 @@ add = 50 scope:puppet_or_actor = { has_perk = prison_feudal_complex_perk + NOT = { government_has_flag = government_is_merchant } } desc = AI_PRISON_FEUDAL_COMPLEX_PERK } @@ -1240,6 +1261,15 @@ scope:recipient = { has_character_modifier = ach_intent_imprisonment_modifier } desc = ach_host_intent_imprison_reason } + #GG modifier + modifier = { + add = -50 + OR = { + gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:actor SECOND = scope:recipient } + scope:recipient = { is_gg_undecided_trigger = yes } + } + desc = RECIPIENT_IS_NOT_YOUR_GG + } } # AI @@ -1260,6 +1290,15 @@ empire = 10 hegemony = 10 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 108 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = -100 @@ -1319,7 +1358,10 @@ intrigue > scope:recipient.intrigue intrigue >= 12 } - has_perk = prison_feudal_complex_perk + AND = { + has_perk = prison_feudal_complex_perk + NOT = { government_has_flag = government_is_merchant } + } scope:recipient = { has_dread_level_towards = { target = scope:puppet_or_actor @@ -1373,9 +1415,7 @@ OR = { has_secret_relation_lover = scope:recipient has_relation_lover = scope:recipient - has_relation_soulmate = scope:recipient has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient opinion = { target = scope:recipient value > very_high_positive_opinion @@ -1388,9 +1428,8 @@ modifier = { # Don't imprison your own children... unless they're your rival/nemesis scope:recipient = { is_child_of = scope:puppet_or_actor - NOR = { + NOT = { has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor } } add = -1000 @@ -1401,7 +1440,6 @@ is_spouse_of = scope:puppet_or_actor NOR = { has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } } } @@ -1420,7 +1458,6 @@ } is_a_faction_member = yes has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } scope:puppet_or_actor = { # Scheme Agents should be imprisoned indiscriminately any_targeting_scheme = { @@ -1648,6 +1685,10 @@ # } # } + evaluate_action_decreasing_house_unity = { + VALUE = 100 + } + # TGP Be more careful with blocs generally house_bloc_tyranny_war_modifiers = yes @@ -1674,8 +1715,11 @@ scope:recipient = { government_has_flag = government_is_landless_adventurer } } - evaluate_action_decreasing_house_unity = { - VALUE = 100 + modifier = { + scope:actor = { + gg_hre_causes_additional_tyranny_trigger = { TARGET = scope:recipient } + } + factor = 0 } } } @@ -1755,7 +1799,7 @@ move_to_dungeon_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -2305,8 +2349,6 @@ ransom_interaction = { has_relation_lover = scope:secondary_recipient has_relation_friend = scope:secondary_recipient has_secret_relation_lover = scope:secondary_recipient - has_relation_soulmate = scope:secondary_recipient - has_relation_best_friend = scope:secondary_recipient is_parent_of = scope:secondary_recipient } } @@ -2344,18 +2386,6 @@ ransom_interaction = { has_relation_best_friend = scope:secondary_recipient is_parent_of = scope:secondary_recipient } - NOR = { - is_spouse_of = scope:secondary_recipient - AND = { - NOT = { - is_parent_of = scope:secondary_recipient - } - is_close_or_extended_family_of = scope:secondary_recipient - } - has_relation_lover = scope:secondary_recipient - has_relation_friend = scope:secondary_recipient - has_secret_relation_lover = scope:secondary_recipient - } } desc = "DEAR_TO_ME_REASON" } @@ -2381,12 +2411,10 @@ ransom_interaction = { is_spouse_of = scope:secondary_recipient is_close_or_extended_family_of = scope:secondary_recipient has_relation_lover = scope:secondary_recipient - has_relation_soulmate = scope:secondary_recipient has_secret_relation_lover = scope:secondary_recipient } - NOR = { + NOT = { has_relation_rival = scope:secondary_recipient - has_relation_nemesis = scope:secondary_recipient } } scope:recipient.dynasty = scope:secondary_recipient.dynasty @@ -2598,16 +2626,12 @@ pay_ransom_interaction = { is_imprisoned_by = scope:recipient OR = { liege ?= scope:puppet_or_actor # You can ransom anyone you have in your court - is_close_family_of = scope:puppet_or_actor # And anyone who is your close family - dynasty ?= { # And anyone from your Dynasty - this ?= scope:puppet_or_actor.dynasty - } - any_spouse = { # And anyone married to one of your close kin or dynasty members + is_close_or_extended_family_of = scope:puppet_or_actor # And anyone who is your close or extended family + dynasty ?= { scope:puppet_or_actor.dynasty ?= this } # And anyone from your Dynasty + any_spouse = { # And anyone married to one of your close or extended kin or dynasty members OR = { - is_close_family_of = scope:puppet_or_actor - dynasty ?= { - this ?= scope:puppet_or_actor.dynasty - } + is_close_or_extended_family_of = scope:puppet_or_actor + dynasty ?= { scope:puppet_or_actor.dynasty ?= this } } } has_relation_lover = scope:puppet_or_actor # And Lovers @@ -2672,50 +2696,18 @@ pay_ransom_interaction = { custom_tooltip = has_person_haggler_decrease_ransom_cost } # Stress impacts - if = { - limit = { - scope:prisoner = { # Stress impact for random courtiers - NOR = { - is_vassal_of = scope:puppet_or_actor - is_consort_of = scope:puppet_or_actor - is_close_family_of = scope:puppet_or_actor - dynasty ?= { - this ?= scope:puppet_or_actor.dynasty - } - any_spouse = { - OR = { - is_close_family_of = scope:puppet_or_actor - dynasty ?= { - this ?= scope:puppet_or_actor.dynasty - } - } - } - has_relation_lover = scope:puppet_or_actor - has_relation_friend = scope:puppet_or_actor - } - } - } - stress_and_fulfillment_impact = { - compassionate = minor_stress_impact_loss - generous = medium_stress_impact_loss - } - } - else_if = { # Stress impact for 'relevant' ransoms; in other words, everyone but random courtiers + if = { # Stress impact for 'relevant' ransoms; in other words, everyone but random courtiers limit = { scope:prisoner = { OR = { is_vassal_of = scope:puppet_or_actor is_consort_of = scope:puppet_or_actor is_close_family_of = scope:puppet_or_actor - dynasty ?= { - this ?= scope:puppet_or_actor.dynasty - } + dynasty ?= { scope:puppet_or_actor.dynasty ?= this } any_spouse = { OR = { is_close_family_of = scope:puppet_or_actor - dynasty ?= { - this ?= scope:puppet_or_actor.dynasty - } + dynasty ?= { scope:puppet_or_actor.dynasty ?= this } } } has_relation_lover = scope:puppet_or_actor @@ -2729,6 +2721,12 @@ pay_ransom_interaction = { just = minor_stress_impact_loss } } + else = { # Stress impact for random courtiers + stress_and_fulfillment_impact = { + compassionate = minor_stress_impact_loss + generous = medium_stress_impact_loss + } + } if = { # Lustful characters want their lovers back limit = { @@ -2758,7 +2756,7 @@ pay_ransom_interaction = { if = { # Family should be free! limit = { scope:prisoner = { - is_close_family_of = scope:payer + is_close_or_extended_family_of = scope:payer } } stress_and_fulfillment_impact = { @@ -2899,7 +2897,7 @@ pay_ransom_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:prisoner VALUE = medium_unity_gain @@ -3187,7 +3185,7 @@ pay_ransom_interaction = { } desc = "RIVAL_TO_ME_REASON" } - modifier = { # Say no to rivals + modifier = { # Say no to nemeses add = -300 scope:recipient = { has_relation_nemesis = scope:secondary_recipient @@ -3203,14 +3201,7 @@ pay_ransom_interaction = { } modifier = { # At war add = -300 - scope:recipient = { - is_at_war = yes - any_primary_war_enemy = { - scope:secondary_recipient = { - liege ?= prev - } - } - } + scope:secondary_recipient = { character_is_prisoner_of_war = yes } desc = "IS_POW_REASON" } modifier = { # At war @@ -3316,6 +3307,15 @@ pay_ransom_interaction = { empire = 6 hegemony = 6 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 18 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_target_quick_trigger = { prison = yes @@ -4302,6 +4302,10 @@ release_from_prison_interaction = { scope:castrate = no scope:demand_admin = no scope:gain_hook = no + scope:become_executioner = no + scope:change_prison = no + scope:make_puppet = no + scope:demand_patrician_house_support = no } desc = RELEASE_PRISONER_OFFER } @@ -4430,6 +4434,9 @@ release_from_prison_interaction = { modifier = banished_me target = scope:puppet_or_actor } + scope:puppet_or_actor = { + gdp_consume_banishment_approval_effect = { TARGET = scope:recipient } + } } # Banish Unlanded Character else_if = { @@ -4491,6 +4498,9 @@ release_from_prison_interaction = { modifier = banished_me target = scope:puppet_or_actor } + scope:puppet_or_actor = { + gdp_consume_banishment_approval_effect = { TARGET = scope:recipient } + } } # 'Banish' Pool Character else_if = { @@ -4513,6 +4523,9 @@ release_from_prison_interaction = { modifier = banished_me target = scope:puppet_or_actor } + scope:puppet_or_actor = { + gdp_consume_banishment_approval_effect = { TARGET = scope:recipient } + } } # Recruit Character @@ -4749,7 +4762,7 @@ release_from_prison_interaction = { } } #Save an archabbot - save_most_suitable_monastic_leader_effect = yes + scope:puppet_or_actor.faith = { save_most_suitable_monastic_leader_effect = yes } scope:puppet_or_actor = { send_child_to_monastic_order_effect = yes @@ -4908,7 +4921,7 @@ release_from_prison_interaction = { # If we're a clan this interaction affects unity if = { limit = { scope:puppet_or_actor.culture = { has_cultural_parameter = merciful_blinding } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -4917,7 +4930,7 @@ release_from_prison_interaction = { } } else = { - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -4963,7 +4976,7 @@ release_from_prison_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -5002,6 +5015,32 @@ release_from_prison_interaction = { } } + # GDP - Republic: Executions grants prestige and renown + if = { + limit = { + scope:banish = yes + scope:puppet_or_actor = { + house ?= { has_house_aspiration_parameter = ambition_execute_and_banish_provide_bonuses } + } + } + scope:puppet_or_actor = { + gdp_ambition_execute_and_banish_bonus_effect = yes + } + } + + # GDP - Demand Patrician Family Support + if = { + limit = { + scope:demand_patrician_house_support = yes + } + scope:recipient = { + gdp_provide_patrician_house_support_effect = { + SUPPORT_PROVIDER = scope:recipient + SUPPORT_GAINEE = scope:puppet_or_actor + } + } + } + # No Demands Added if = { limit = { @@ -5016,6 +5055,9 @@ release_from_prison_interaction = { scope:blind = no scope:castrate = no scope:demand_admin = no + scope:change_prison = no + scope:make_puppet = no + scope:demand_patrician_house_support = no } # Notification to the imprisoner scope:puppet_or_actor = { @@ -5194,7 +5236,7 @@ release_from_prison_interaction = { } # If we're a clan (and not making any demands) this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -5205,8 +5247,10 @@ release_from_prison_interaction = { # LEGITIMACY GAIN FROM RELEASING DUKES AND ABOVE if = { limit = { + scope:puppet_or_actor = { has_legitimacy = yes } exists = scope:recipient.primary_title scope:recipient.primary_title.tier >= tier_duchy + scope:puppet_or_actor = { has_legitimacy = yes } } # Minus 2, since we want Duchy to be 1, and it's normally 3 save_scope_value_as = { @@ -5453,23 +5497,23 @@ release_from_prison_interaction = { scope:recipient = { OR = { AND = { - is_playable_character = no is_ruler = no + is_playable_character = no gold > scope:puppet_or_actor.gold gold > scope:puppet_or_actor.medium_gold_value scope:puppet_or_actor.ai_greed > low_negative_ai_value } AND = { - is_playable_character = no is_ruler = no + is_playable_character = no gold > 0 scope:puppet_or_actor = { has_banish_reason = scope:recipient } } AND = { - is_playable_character = no is_ruler = no + is_playable_character = no gold > 100 scope:puppet_or_actor.ai_greed >= high_positive_ai_value } @@ -5514,6 +5558,16 @@ release_from_prison_interaction = { } } } + is_valid = { + scope:puppet_or_actor = { + trigger_if = { + limit = { + gdp_is_assembly_head_trigger = yes + } + gdp_republic_banishment_allowed_trigger = { TARGET = scope:recipient } + } + } + } } send_option = { @@ -5547,6 +5601,7 @@ release_from_prison_interaction = { localization = "RELEASE_TAKE_VOWS" is_shown = { scope:puppet_or_actor = { take_vows_available_trigger = yes } + scope:recipient = { is_ruler = no } # Rulers cannot be moved into the abbot's court } is_valid = { #Handle AI @@ -5773,6 +5828,7 @@ release_from_prison_interaction = { flag = become_executioner localization = "RELEASE_AS_EXECUTIONER" is_shown = { + scope:actor = { is_ai = no } # ai_will_do ignores this option has_ep1_court_positions_dlc_trigger = yes scope:puppet_or_actor = { has_royal_court = yes @@ -5821,10 +5877,8 @@ release_from_prison_interaction = { } scope:recipient = { OR = { - has_relation_best_friend = scope:puppet_or_actor has_relation_friend = scope:puppet_or_actor has_relation_lover = scope:puppet_or_actor - has_relation_soulmate = scope:puppet_or_actor has_secret_relation_lover = scope:puppet_or_actor is_heir_of = scope:puppet_or_actor } @@ -5981,6 +6035,52 @@ release_from_prison_interaction = { } } + send_option = { + flag = demand_patrician_house_support + localization = "GENERIC_DEMAND_PATRICIAN_HOUSE_SUPPORT" + is_shown = { + scope:puppet_or_actor = { + gdp_is_patrician_trigger = yes + is_house_head = yes + } + scope:recipient = { + gdp_is_patrician_trigger = yes + is_house_head = yes + highest_liege_matching_rule:uses_assembly = scope:puppet_or_actor.highest_liege_matching_rule:uses_assembly # Same republic + } + } + is_valid = { + scope:puppet_or_actor = { + gdp_can_get_patrician_house_support_trigger = { TARGET_CHAR = scope:recipient } + } + } + } + + cost = { + prestige = { + value = 0 + if = { + limit = { + scope:make_puppet = yes + scope:puppet_or_actor = { has_puppet_type = external_ruler_puppet } + scope:recipient = { + is_landed = yes + is_ruler = yes + is_clergy = no + } + } + add = { + value = minor_prestige_value + multiply = { + value = scope:recipient.highest_held_title_tier + subtract = 1 + } + desc = PRESTIGE_INTERACTION_ACCEPTANCE_SEND_OPTION + } + } + } + } + send_options_exclusive = no auto_accept = { @@ -5994,6 +6094,10 @@ release_from_prison_interaction = { scope:blind = no scope:castrate = no scope:demand_admin = no + scope:become_executioner = no + scope:change_prison = no + scope:make_puppet = no + scope:demand_patrician_house_support = no } ai_accept = { @@ -6454,6 +6558,34 @@ release_from_prison_interaction = { # } # } # } + # Demand Patrician Family Support + modifier = { + add = { + value = -60 + if = { + limit = { + house ?= { has_house_aspiration_parameter = republic_communal } + } + add = 20 + } + else_if = { + limit = { + house ?= { has_house_aspiration_parameter = republic_aggrandizement } + } + add = -20 + } + else_if = { + limit = { + house ?= { has_house_aspiration_parameter = republic_signorial } + } + add = -15 + } + } + trigger = { + scope:demand_patrician_house_support = yes + } + desc = "DEMAND_PATRICIAN_HOUSE_SUPPORT_REASON" + } } # AI @@ -6491,6 +6623,15 @@ release_from_prison_interaction = { add = 50 scope:banish = yes } + modifier = { + add = 40 + scope:banish = yes + gg_target_house_head_is_opposite_side_trigger = { + ACTOR = scope:puppet_or_actor + TARGET = scope:recipient + } + desc = HOUSE_HEAD_IS_OPPOSING_GG + } modifier = { add = 30 scope:take_vows = yes @@ -6521,8 +6662,7 @@ release_from_prison_interaction = { scope:recipient = { OR = { has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - scope:recipient = { + AND = { is_spouse_of = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } } @@ -6540,8 +6680,7 @@ release_from_prison_interaction = { scope:recipient = { OR = { has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - scope:recipient = { + AND = { is_spouse_of = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } } @@ -6593,6 +6732,11 @@ release_from_prison_interaction = { } modifier = { # Most AI characters will let family out... add = 10 + scope:recipient = { + is_playable_character = no + is_close_family_of = scope:puppet_or_actor + time_in_prison = { years > 1 } + } scope:puppet_or_actor = { is_at_war = no OR = { @@ -6606,22 +6750,17 @@ release_from_prison_interaction = { } } } - scope:recipient = { - time_in_prison = { years > 1 } - is_playable_character = no - is_close_family_of = scope:puppet_or_actor - } } modifier = { # Almost all will let their own children out add = 40 - scope:puppet_or_actor = { - is_at_war = no - ai_compassion >= very_high_negative_ai_value - } scope:recipient = { is_playable_character = no is_child_of = scope:puppet_or_actor } + scope:puppet_or_actor = { + is_at_war = no + ai_compassion >= very_high_negative_ai_value + } } # Struggle # modifier = { @@ -6707,6 +6846,12 @@ release_from_prison_interaction = { has_character_flag = being_prisonbroken_by_laamp } } + + # GDP - Demand Patrician Family Support + modifier = { + add = 25 + scope:demand_patrician_house_support = yes + } } } @@ -6798,7 +6943,6 @@ execute_prisoner_interaction = { ai_vengefulness >= medium_positive_ai_value OR = { has_relation_rival = scope:recipient # Execute rivals - has_relation_nemesis = scope:recipient # Execute rivals scope:recipient = { is_spouse_of = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } @@ -6821,7 +6965,6 @@ execute_prisoner_interaction = { ai_vengefulness >= very_high_positive_ai_value OR = { has_relation_rival = scope:recipient # Execute rivals - has_relation_nemesis = scope:recipient # Execute rivals scope:recipient = { is_spouse_of = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } @@ -6831,13 +6974,20 @@ execute_prisoner_interaction = { } #Scope:target has caused internal strife in the realm character_hates_scope_due_to_strife_modifier = { TARGET = scope:recipient } + modifier = { + add = 40 + gg_target_house_head_is_opposite_side_trigger = { + ACTOR = scope:puppet_or_actor + TARGET = scope:recipient + } + desc = HOUSE_HEAD_IS_OPPOSING_GG + } modifier = { factor = 0 scope:puppet_or_actor = { NOR = { # Do not execute unless you have some sort of reason to do it has_execute_reason = scope:recipient has_relation_rival = scope:recipient # Execute rivals - has_relation_nemesis = scope:recipient # Execute rivals scope:recipient = { is_spouse_of = scope:puppet_or_actor exposed_cheating_on_spouse_trigger = { SPOUSE = scope:puppet_or_actor } @@ -7061,6 +7211,14 @@ execute_prisoner_interaction = { } is_valid_showing_failures_only = { + scope:puppet_or_actor = { + trigger_if = { + limit = { + gdp_is_assembly_head_trigger = yes + } + gdp_republic_execution_allowed_trigger = { TARGET = scope:recipient } + } + } scope:recipient = { NOT = { has_strong_hook = scope:puppet_or_actor } } scope:recipient = { custom_description = { @@ -7199,6 +7357,13 @@ execute_prisoner_interaction = { value = yes } } +# #Guelphs & Ghibellines +# gg_triggered_catalyst_effect = { +# ACTOR = scope:actor +# RECIPIENT = scope:recipient +# CATALYST = catalyst_execute_opposite_party +# } +# gg_involvement_catalyst_would_invalidate_situation_tooltip_effect = yes } # Now, the rest of it. if = { @@ -7562,6 +7727,9 @@ execute_prisoner_interaction = { EXECUTIONER = scope:puppet_or_actor } } + scope:puppet_or_actor = { + gdp_consume_execution_approval_effect = { TARGET = scope:recipient } + } if = { limit = { always = scope:execution_devour } @@ -7590,6 +7758,18 @@ execute_prisoner_interaction = { } } + # GDP - Republic: Executions grants prestige and renown + if = { + limit = { + scope:puppet_or_actor = { + house ?= { has_house_aspiration_parameter = ambition_execute_and_banish_provide_bonuses } + } + } + scope:puppet_or_actor = { + gdp_ambition_execute_and_banish_bonus_effect = yes + } + } + scope:puppet_or_actor = { hidden_effect = { send_interface_message = { @@ -7922,6 +8102,13 @@ torture_interaction = { TITLE = scope:dummy_gender } } +# #Guelphs & Ghibellines +# gg_triggered_catalyst_effect = { +# ACTOR = scope:actor +# RECIPIENT = scope:recipient +# CATALYST = catalyst_torture_opposite_party +# } +# scope:actor = { gg_involvement_catalyst_effect = yes } } auto_accept = yes @@ -8070,7 +8257,7 @@ castrate_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -8089,6 +8276,13 @@ castrate_interaction = { TITLE = scope:dummy_gender } } +# #Guelphs & Ghibellines +# gg_triggered_catalyst_effect = { +# ACTOR = scope:actor +# RECIPIENT = scope:recipient +# CATALYST = catalyst_maim_opposite_party +# } +# scope:actor = { gg_involvement_catalyst_effect = yes } } auto_accept = yes @@ -8256,7 +8450,7 @@ blind_interaction = { # If we're a clan this interaction affects unity if = { limit = { scope:puppet_or_actor.culture = { has_cultural_parameter = merciful_blinding } } # If actor's culture has Merciful Blindings, they lose less unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -8265,7 +8459,7 @@ blind_interaction = { } } else = { - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -8285,6 +8479,13 @@ blind_interaction = { TITLE = scope:dummy_gender } } +# #Guelphs & Ghibellines +# gg_triggered_catalyst_effect = { +# ACTOR = scope:actor +# RECIPIENT = scope:recipient +# CATALYST = catalyst_maim_opposite_party +# } +# scope:actor = { gg_involvement_catalyst_effect = yes } } auto_accept = yes @@ -8589,23 +8790,23 @@ systematically_maim_character_interaction = { scope:recipient = { OR = { AND = { - is_playable_character = no is_ruler = no + is_playable_character = no gold > scope:puppet_or_actor.gold gold > scope:puppet_or_actor.medium_gold_value scope:puppet_or_actor.ai_greed > low_negative_ai_value } AND = { - is_playable_character = no is_ruler = no + is_playable_character = no gold > 0 scope:puppet_or_actor ?= { has_banish_reason = scope:recipient } } AND = { - is_playable_character = no is_ruler = no + is_playable_character = no gold > 100 scope:puppet_or_actor.ai_greed >= high_positive_ai_value } @@ -8644,6 +8845,11 @@ systematically_maim_character_interaction = { } } } + is_valid = { + scope:puppet_or_actor = { + gdp_republic_banishment_allowed_trigger = { TARGET = scope:recipient } + } + } } send_option = { @@ -8845,7 +9051,7 @@ systematically_maim_character_interaction = { days = 1 } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -8885,7 +9091,7 @@ systematically_maim_character_interaction = { limit = { scope:puppet_or_actor.culture = { has_cultural_parameter = merciful_blinding } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -8894,7 +9100,7 @@ systematically_maim_character_interaction = { } } else = { - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -8919,7 +9125,7 @@ systematically_maim_character_interaction = { days = 1 } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -8947,7 +9153,7 @@ systematically_maim_character_interaction = { days = 1 } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -8975,7 +9181,7 @@ systematically_maim_character_interaction = { days = 1 } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -9073,6 +9279,9 @@ systematically_maim_character_interaction = { } release_from_prison = yes } + scope:puppet_or_actor = { + gdp_consume_banishment_approval_effect = { TARGET = scope:recipient } + } } # Renounce Claims scope:renounce_claims = { diff --git a/common/character_interactions/00_puppet_interactions.txt b/common/character_interactions/00_puppet_interactions.txt index 5201c1977..588c7c2d4 100644 --- a/common/character_interactions/00_puppet_interactions.txt +++ b/common/character_interactions/00_puppet_interactions.txt @@ -22,17 +22,36 @@ ai_instant_response = yes desc = make_clerical_puppet_interaction_desc + notification_text = make_clerical_puppet_interaction_notification is_available = { can_have_realm_priest_puppet_trigger = yes - is_incapable = no - trigger_if = { - limit = { - is_ai = yes - } - NOT = { - exists = puppet:theological_agent_puppet - } + is_incapable = no + trigger_if = { + limit = { + is_ai = yes + } + NOT = { + exists = puppet:theological_agent_puppet + } + cp:councillor_court_chaplain ?= { + is_available_quick = { + ai = yes + adult = yes + incapable = no + } + NOT = { exists = puppeteer } + } + OR = { + piety_level >= 2 + has_hook = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } } } @@ -128,7 +147,7 @@ hidden_effect = { send_interface_toast = { type = event_toast_effect_good - title = make_clerical_puppet_interaction_notification + title = make_clerical_puppet_interaction_toast left_icon = scope:actor right_icon = scope:recipient set_puppet = { @@ -259,6 +278,7 @@ make_external_clerical_puppet_interaction = { use_diplomatic_range = no desc = make_external_clerical_puppet_interaction_desc + notification_text = make_clerical_puppet_interaction_notification is_available = { is_adult = yes @@ -445,7 +465,9 @@ make_external_clerical_puppet_interaction = { on_accept = { scope:actor = { trigger_event = pam_interactions_events.0120 - pam_generic_set_puppet_interaction_side_effects = yes + show_as_tooltip = { + pam_generic_set_puppet_interaction_side_effects = yes + } } scope:recipient = { custom_tooltip = set_external_clerical_puppet_tt @@ -686,6 +708,8 @@ make_external_ruler_puppet_interaction = { desc = make_external_ruler_puppet_interaction_desc + notification_text = make_external_ruler_puppet_interaction_greetings + is_available = { is_ai = no trigger_if = { @@ -965,7 +989,9 @@ make_external_ruler_puppet_interaction = { on_accept = { scope:actor = { trigger_event = pam_interactions_events.0121 - pam_generic_set_puppet_interaction_side_effects = yes + show_as_tooltip = { + pam_generic_set_puppet_interaction_side_effects = yes + } } scope:recipient = { custom_tooltip = set_external_ruler_puppet_tt diff --git a/common/character_interactions/00_religious_interactions.txt b/common/character_interactions/00_religious_interactions.txt index 7e8e4da7b..10685a659 100644 --- a/common/character_interactions/00_religious_interactions.txt +++ b/common/character_interactions/00_religious_interactions.txt @@ -5,6 +5,7 @@ ask_for_conversion_interaction = { popup_on_receive = yes desc = compel_conversion_interaction_desc + notification_text = demand_conversion_minister_rites_interaction_notice hidden = yes @@ -2619,7 +2620,7 @@ seek_indulgences_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -2640,7 +2641,7 @@ seek_indulgences_interaction = { # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -2667,6 +2668,15 @@ seek_indulgences_interaction = { empire = 36 hegemony = 36 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 108 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = -25 @@ -3091,6 +3101,16 @@ declaration_of_repentance_interaction = { evaluate_action_decreasing_house_unity = { VALUE = -100 } + modifier = { + add = 40 + scope:actor = { has_character_modifier = favored_by_pope_modifier } + desc = FAVORED_BY_POPE + } + modifier = { + add = -40 + scope:actor = { has_character_modifier = scorned_pope_modifier } + desc = HAS_SCORNED_POPE + } } ai_min_reply_days = 1 @@ -3114,7 +3134,7 @@ declaration_of_repentance_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -3133,7 +3153,7 @@ declaration_of_repentance_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -3310,7 +3330,10 @@ excommunicate_interaction = { } situation:the_christian_church = { trigger_situation_catalyst = catalyst_excommunicate } } - else = { + else_if = { + limit = { + situation:the_christian_church = { situation_top_has_catalyst = catalyst_excommunicate_minor } + } situation:the_christian_church = { trigger_situation_catalyst = catalyst_excommunicate_minor } } } @@ -3320,7 +3343,6 @@ excommunicate_interaction = { REQUESTING_CHARACTER = scope:puppet_or_actor TARGET_CHARACTER = scope:recipient } - scope:recipient = { # Letter arrives a few days later; gives time for the trait to land before the player reads it. trigger_event = { @@ -3328,9 +3350,8 @@ excommunicate_interaction = { days = 5 } } - # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -3372,7 +3393,6 @@ excommunicate_interaction = { scope:recipient = { NOR = { has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor is_at_war_with = scope:puppet_or_actor has_character_flag = executed_own_hof_unlawfully has_character_flag = executed_senior_cleric_unlawfully @@ -3465,11 +3485,11 @@ lift_excommunication_interaction = { NOT = { religious_head_or_challenger ?= scope:recipient } - } - scope:puppet_or_actor.faith ?= { - has_doctrine = doctrine_spiritual_head - faith_has_sacraments_central_trigger = yes - this = scope:recipient.faith + faith ?= { + has_doctrine = doctrine_spiritual_head + faith_has_sacraments_central_trigger = yes + this = scope:recipient.faith + } } scope:recipient = { has_trait = excommunicated @@ -3488,17 +3508,13 @@ lift_excommunication_interaction = { } is_valid_showing_failures_only = { - trigger_if = { - limit = { scope:is_puppet_action ?= yes } - scope:puppet_or_actor = { + scope:puppet_or_actor = { + trigger_if = { + limit = { scope:is_puppet_action ?= yes } piety >= lift_excommunication_interaction_cost_value } - } - scope:puppet_or_actor = { highest_held_title_tier >= tier_duchy - NOT = { - is_at_war_with = scope:recipient - } + NOT = { is_at_war_with = scope:recipient } custom_tooltip = { text = HOF_INTERACTION_UNREFORMED_FAITH NOT = { @@ -3536,21 +3552,13 @@ lift_excommunication_interaction = { scope:puppet_or_actor = { if = { limit = { - NOT = { - this = scope:recipient - } - any_character_situation = { - situation_type = the_christian_church - } - situation:the_christian_church ?= { - situation_top_has_catalyst = catalyst_lift_excommunication - } + NOT = { this = scope:recipient } + any_character_situation = { situation_type = the_christian_church } + situation:the_christian_church ?= { situation_top_has_catalyst = catalyst_lift_excommunication } } if = { limit = { - scope:recipient = { - highest_held_title_tier >= tier_kingdom - } + scope:recipient = { highest_held_title_tier >= tier_kingdom } } situation:the_christian_church = { trigger_situation_catalyst = catalyst_lift_excommunication } } @@ -3561,7 +3569,7 @@ lift_excommunication_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -3637,7 +3645,6 @@ lift_excommunication_interaction = { scope:recipient = { NOR = { # Only do this for friends has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor is_allied_to = scope:puppet_or_actor has_variable = pam_turned_the_other_cheek_var scope:puppet_or_actor = { # Unless you are in the Concord phase @@ -4042,6 +4049,16 @@ request_excommunication_interaction = { has_trait = consecrated_blood } } + modifier = { + add = 40 + scope:actor = { has_character_modifier = favored_by_pope_modifier } + desc = FAVORED_BY_POPE + } + modifier = { + add = -40 + scope:actor = { has_character_modifier = scorned_pope_modifier } + desc = HAS_SCORNED_POPE + } modifier = { add = 20 scope:puppet_or_actor = { # PAM - Reform phase @@ -4162,7 +4179,7 @@ request_excommunication_interaction = { } } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -4185,7 +4202,7 @@ request_excommunication_interaction = { HOOK = excommunication_hook PIETY_VALUE = massive_piety_value } - } + } } on_decline = { @@ -4201,7 +4218,7 @@ request_excommunication_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = miniscule_unity_gain @@ -4229,6 +4246,15 @@ request_excommunication_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 144 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 25 @@ -4243,7 +4269,6 @@ request_excommunication_interaction = { scope:secondary_recipient = { NOR = { has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor is_at_war_with = scope:puppet_or_actor has_character_flag = executed_own_hof_unlawfully has_character_flag = executed_senior_cleric_unlawfully @@ -4374,6 +4399,7 @@ send_to_holy_order_interaction = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { dynasty ?= { dynasty_prestige >= take_vows_dynasty_prestige_cost_value } + prestige >= take_vows_prestige_cost_value } } scope:recipient = { @@ -4480,6 +4506,13 @@ send_to_holy_order_interaction = { multiply = 0 } } + prestige = { + value = take_vows_prestige_cost_value + if = { + limit = { scope:is_puppet_action ?= yes } + multiply = 0 + } + } } on_send = { @@ -4514,6 +4547,15 @@ send_to_holy_order_interaction = { } } } + if = { + limit = { take_vows_prestige_cost_value > 0 } + add_prestige = { + value = { + value = take_vows_prestige_cost_value + multiply = -1 + } + } + } } } scope:puppet_or_actor = { @@ -4568,12 +4610,17 @@ send_to_holy_order_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { - CHARACTER = scope:puppet_or_actor - TARGET = scope:recipient - VALUE = minor_unity_gain - DESC = clan_unity_send_to_holy_order.desc - REVERSE_NON_HOUSE_TARGET = no + if = { + limit = { + scope:puppet_or_actor = { government_has_flag = government_uses_house_unity } + } + add_house_unity_interaction_effect = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient + VALUE = minor_unity_gain + DESC = clan_unity_send_to_holy_order.desc + REVERSE_NON_HOUSE_TARGET = no + } } } @@ -4632,7 +4679,7 @@ send_to_holy_order_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -4719,8 +4766,6 @@ send_to_holy_order_interaction = { has_relation_lover = scope:puppet_or_actor.cp:councillor_court_chaplain has_relation_friend = scope:puppet_or_actor.cp:councillor_court_chaplain has_secret_relation_lover = scope:puppet_or_actor.cp:councillor_court_chaplain - has_relation_soulmate = scope:puppet_or_actor.cp:councillor_court_chaplain - has_relation_best_friend = scope:puppet_or_actor.cp:councillor_court_chaplain opinion = { target = scope:puppet_or_actor.cp:councillor_court_chaplain value >= very_high_positive_opinion @@ -5018,6 +5063,15 @@ send_to_holy_order_interaction = { empire = 24 hegemony = 24 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 432 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -5030,10 +5084,7 @@ send_to_holy_order_interaction = { modifier = { # Try to send rivals add = 100 scope:puppet_or_actor = { - OR = { - has_relation_rival = scope:recipient - has_relation_nemesis = scope:recipient - } + has_relation_rival = scope:recipient } } @@ -5270,6 +5321,7 @@ take_vows_interaction = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { dynasty ?= { dynasty_prestige >= take_vows_dynasty_prestige_cost_value } + prestige >= take_vows_prestige_cost_value } } scope:recipient = { @@ -5387,6 +5439,13 @@ take_vows_interaction = { multiply = 0 } } + prestige = { + value = take_vows_prestige_cost_value + if = { + limit = { scope:is_puppet_action ?= yes } + multiply = 0 + } + } gold = { value = 0 if = { @@ -5428,6 +5487,15 @@ take_vows_interaction = { } } } + if = { + limit = { take_vows_prestige_cost_value > 0 } + add_prestige = { + value = { + value = take_vows_prestige_cost_value + multiply = -1 + } + } + } } } scope:puppet_or_actor = { @@ -5567,7 +5635,7 @@ take_vows_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -5632,7 +5700,7 @@ take_vows_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -5736,8 +5804,6 @@ take_vows_interaction = { has_relation_lover = scope:puppet_or_actor.cp:councillor_court_chaplain has_relation_friend = scope:puppet_or_actor.cp:councillor_court_chaplain has_secret_relation_lover = scope:puppet_or_actor.cp:councillor_court_chaplain - has_relation_soulmate = scope:puppet_or_actor.cp:councillor_court_chaplain - has_relation_best_friend = scope:puppet_or_actor.cp:councillor_court_chaplain opinion = { target = scope:puppet_or_actor.cp:councillor_court_chaplain value >= very_high_positive_opinion @@ -6204,10 +6270,7 @@ take_vows_interaction = { modifier = { # Try to send rivals add = 100 scope:puppet_or_actor = { - OR = { - has_relation_rival = scope:recipient - has_relation_nemesis = scope:recipient - } + has_relation_rival = scope:recipient } } @@ -6500,7 +6563,7 @@ temporal_condemnation_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -6574,15 +6637,29 @@ host_honored_guest_interaction = { is_available = { trigger_if = { limit = { is_ai = yes } - piety >= major_piety_value + OR = { + AND = { + rite ?= { rite_has_parameter = host_honored_guests_active } + piety >= major_piety_value + } + AND = { + NOT = { rite ?= { rite_has_parameter = host_honored_guests_active } } + prestige >= major_prestige_value + } + } } } is_shown = { scope:recipient != scope:puppet_or_actor scope:puppet_or_actor ?= { - rite ?= { - rite_has_parameter = host_honored_guests_active + is_playable_character = yes + is_adult = yes + OR = { + rite ?= { + rite_has_parameter = host_honored_guests_active + } + culture = { has_cultural_parameter = caravanserai_hospitality } } is_playable_character = yes is_adult = yes @@ -6684,9 +6761,20 @@ host_honored_guest_interaction = { } # Spend piety based on recipient's tier. scope:puppet_or_actor = { - add_piety = { - value = 0 - subtract = scope:recipient.tier_scaled_piety_value + if = { + limit = { + rite = { rite_has_parameter = host_honored_guests_active } + } + add_piety = { + value = 0 + subtract = scope:recipient.tier_scaled_piety_value + } + } + else = { + add_prestige = { + value = 0 + subtract = scope:recipient.tier_scaled_prestige_value + } } } @@ -6710,10 +6798,11 @@ host_honored_guest_interaction = { limit = { OR = { has_trait = cynical - NOT = { + NOR = { rite = { rite_has_parameter = host_honored_guests_active } + culture = { has_cultural_parameter = caravanserai_hospitality } } } } @@ -6732,7 +6821,7 @@ host_honored_guest_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = miniscule_unity_gain @@ -8015,7 +8104,7 @@ hof_ask_for_claim_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:secondary_recipient VALUE = minor_unity_loss @@ -8431,7 +8520,7 @@ sun_trial_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = major_unity_loss @@ -8546,7 +8635,7 @@ literalist_debate_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -9522,6 +9611,7 @@ take_monastic_vows_interaction = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { dynasty ?= { dynasty_prestige >= take_vows_dynasty_prestige_cost_value } + prestige >= take_vows_prestige_cost_value } } scope:recipient = { @@ -9664,6 +9754,13 @@ take_monastic_vows_interaction = { multiply = 0 } } + prestige = { + value = take_vows_prestige_cost_value + if = { + limit = { scope:is_puppet_action ?= yes } + multiply = 0 + } + } gold = { value = 0 if = { @@ -9708,6 +9805,15 @@ take_monastic_vows_interaction = { } } } + if = { + limit = { take_vows_prestige_cost_value > 0 } + add_prestige = { + value = { + value = take_vows_prestige_cost_value + multiply = -1 + } + } + } } } scope:secondary_recipient = { @@ -9779,7 +9885,7 @@ take_monastic_vows_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -9873,7 +9979,7 @@ take_monastic_vows_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -10000,8 +10106,6 @@ take_monastic_vows_interaction = { has_relation_lover = scope:puppet_or_actor.cp:councillor_court_chaplain has_relation_friend = scope:puppet_or_actor.cp:councillor_court_chaplain has_secret_relation_lover = scope:puppet_or_actor.cp:councillor_court_chaplain - has_relation_soulmate = scope:puppet_or_actor.cp:councillor_court_chaplain - has_relation_best_friend = scope:puppet_or_actor.cp:councillor_court_chaplain opinion = { target = scope:puppet_or_actor.cp:councillor_court_chaplain value >= very_high_positive_opinion @@ -10446,6 +10550,15 @@ take_monastic_vows_interaction = { empire = 24 hegemony = 24 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 432 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -10469,10 +10582,7 @@ take_monastic_vows_interaction = { modifier = { # Try to send rivals add = 100 scope:puppet_or_actor = { - OR = { - has_relation_rival = scope:recipient - has_relation_nemesis = scope:recipient - } + has_relation_rival = scope:recipient } } modifier = { # Has cloister to send the child to @@ -10591,6 +10701,7 @@ take_monastic_vows_interaction = { county.holder.top_liege = scope:puppet_or_actor.top_liege } any_leased_title = { + exists = scope:puppet_or_actor.capital_county.kingdom kingdom ?= scope:puppet_or_actor.capital_county.kingdom } } @@ -10687,6 +10798,7 @@ take_monastic_vows_interaction = { empire = scope:target.empire } trigger_else = { + exists = scope:puppet_or_actor.capital_county.empire empire = scope:puppet_or_actor.capital_county.empire } } @@ -11223,6 +11335,15 @@ monastic_donation_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 144 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -11259,6 +11380,7 @@ monastic_donation_interaction = { county.holder.top_liege = scope:puppet_or_actor.top_liege } any_leased_title = { + exists = scope:puppet_or_actor.capital_county kingdom ?= scope:puppet_or_actor.capital_county.kingdom } } @@ -11313,6 +11435,8 @@ monastic_donation_interaction = { modifier = { factor = 1.25 + exists = capital_county.kingdom + exists = scope:recipient.capital_county.kingdom capital_county.kingdom = scope:recipient.capital_county.kingdom } @@ -11351,6 +11475,7 @@ monastic_donation_interaction = { empire = scope:target.empire } trigger_else = { + exists = scope:puppet_or_actor.capital_county empire = scope:puppet_or_actor.capital_county.empire } } @@ -11987,6 +12112,8 @@ lease_title_to_existing_monastic_order_interaction = { modifier = { factor = 1.25 + exists = capital_county.kingdom + exists = scope:recipient.capital_county.kingdom capital_county.kingdom = scope:recipient.capital_county.kingdom } diff --git a/common/character_interactions/00_revoke_title_interaction.txt b/common/character_interactions/00_revoke_title_interaction.txt index c0159fa7c..c40e7ffb1 100644 --- a/common/character_interactions/00_revoke_title_interaction.txt +++ b/common/character_interactions/00_revoke_title_interaction.txt @@ -84,21 +84,12 @@ # Plus make sure there's a legal right to revoke. scope:puppet_or_actor = { trigger_if = { - limit = { government_has_flag = government_is_tribal } - custom_description = { - text = "has_law_allowing_title_revocation_tribal" - has_realm_law_flag = title_revocation_allowed + limit = { + scope:recipient = { + highest_held_title_tier = tier_barony # Can always revoke from barons + } } - } - trigger_else_if = { - limit = { government_is_japanese_trigger = yes } - custom_description = { - text = "has_law_allowing_title_revocation_soryo" - has_realm_law_flag = title_revocation_allowed - } - } - trigger_else_if = { - limit = { government_has_mechanic = administrative } + always = yes } trigger_else_if = { limit = { realm_law_use_church_authority = yes } @@ -108,9 +99,35 @@ } } trigger_else = { - custom_description = { - text = "has_law_allowing_title_revocation_crown" - has_realm_law_flag = title_revocation_allowed + trigger_if = { + limit = { government_has_flag = government_is_tribal } + custom_description = { + text = "has_law_allowing_title_revocation_tribal" + has_realm_law_flag = title_revocation_allowed + } + } + trigger_else_if = { + limit = { government_is_japanese_trigger = yes } + custom_description = { + text = "has_law_allowing_title_revocation_soryo" + has_realm_law_flag = title_revocation_allowed + } + } + trigger_else_if = { + limit = { government_has_mechanic = administrative } + } + trigger_else_if = { + limit = { government_has_flag = government_is_republic } + custom_description = { + text = "has_law_allowing_title_revocation_republic" + has_realm_law_flag = title_revocation_allowed + } + } + trigger_else = { + custom_description = { + text = "has_law_allowing_title_revocation_crown" + has_realm_law_flag = title_revocation_allowed + } } } } @@ -238,6 +255,18 @@ has_clerical_region = yes pam_title_is_clerical_elector_trigger = yes pam_title_is_antipope_office_trigger = yes + AND = { + holder = { government_has_flag = government_is_republic } + gdp_is_republic_title_trigger = yes + } + } + custom_description = { + text = "character_interactions_not_clerical_elector_title" + pam_title_is_clerical_elector_trigger = no + } + custom_description = { + text = "character_interactions_not_antipope_office_title" + pam_title_is_antipope_office_trigger = no } } } @@ -441,6 +470,17 @@ trigger_event = char_interaction.0199 } } + # Code hands the revoked primary title's treasury to the revoker, so empty a baron's treasury first + scope:recipient = { + if = { + limit = { + scope:landed_title.tier = tier_barony + primary_title = scope:landed_title + has_treasury = yes + } + hidden_effect = { empty_treasury_when_abandoning_landed_life_effect = yes } + } + } revoke_title_interaction_effect = yes if = { @@ -612,9 +652,16 @@ } } else = { - war_for_revoke_effect = { - LIEGE = scope:puppet_or_actor - REBEL = scope:recipient + if = { + limit = { + scope:puppet_or_actor = { + NOT = { has_realm_law_flag = republic_vassal_refusal_allowed } + } + } + war_for_revoke_effect = { + LIEGE = scope:puppet_or_actor + REBEL = scope:recipient + } } scope:recipient = { add_opinion = { @@ -956,6 +1003,15 @@ } desc = VASSALS_REFUSAL_indomitable_azatani } + #GG modifier + modifier = { + add = -50 + OR = { + gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:actor SECOND = scope:recipient } + scope:recipient = { is_gg_undecided_trigger = yes } + } + desc = RECIPIENT_IS_NOT_YOUR_GG + } } # AI @@ -964,11 +1020,6 @@ } ai_frequency = 0 # This is handled via code instead; see REVOKE_TITLE_TICK in the AI defines. All the logic for *if* to send a revoke though is scripted below - ai_potential = { - has_realm_law_flag = title_revocation_allowed - primary_title.tier >= tier_county - } - ai_will_do = { base = -1000 @@ -1066,6 +1117,11 @@ # Always revoke preferred capital and capital duchy modifier = { years_from_game_start >= 3 + exists = scope:puppet_or_actor.primary_title.title_capital_county + OR = { + scope:landed_title = scope:puppet_or_actor.primary_title.title_capital_county + scope:landed_title = scope:puppet_or_actor.primary_title.title_capital_county.de_jure_liege + } OR = { scope:puppet_or_actor = { is_at_war = no @@ -1089,11 +1145,6 @@ primary_title = title:e_europa } } - exists = scope:puppet_or_actor.primary_title.title_capital_county - OR = { - scope:landed_title = scope:puppet_or_actor.primary_title.title_capital_county - scope:landed_title = scope:puppet_or_actor.primary_title.title_capital_county.de_jure_liege - } NAND = { # Don't revoke player titles tyranically, it must be possible to play and succeed as Ulm! scope:landed_title.holder = { is_ai = no @@ -1107,6 +1158,9 @@ # If below domain limit, try to revoke counties in your capital duchy despite tyranny, sometimes modifier = { years_from_game_start >= 3 + scope:landed_title.tier = tier_county # Only Counties + exists = scope:puppet_or_actor.primary_title.title_capital_county + scope:landed_title.de_jure_liege = scope:puppet_or_actor.primary_title.title_capital_county.de_jure_liege # Under the same Duchy as your capital OR = { scope:puppet_or_actor = { is_at_war = no @@ -1146,14 +1200,12 @@ } } } - exists = scope:puppet_or_actor.primary_title.title_capital_county OR = { scope:puppet_or_actor.primary_title.title_capital_county.holder = scope:puppet_or_actor # You have your de jure capital already NOT = { scope:puppet_or_actor.primary_title.title_capital_county.holder.top_liege = scope:puppet_or_actor.top_liege # Or your De Jure capital isn't in your realm } } - scope:landed_title.tier = tier_county # Only Counties OR = { # The AI gives away wrong-holding counties almost instantly, so we restrict to counties with holdings they can hold scope:landed_title.title_province = { has_holding_type = castle_holding } # Everyone is valid for castles AND = { @@ -1192,8 +1244,6 @@ } } - scope:landed_title.de_jure_liege = scope:puppet_or_actor.primary_title.title_capital_county.de_jure_liege # Under the same Duchy as your capital - scope:recipient = { # Not from players is_ai = yes } @@ -1289,6 +1339,11 @@ modifier = { scope:puppet_or_actor.faith != scope:recipient.faith scope:recipient.primary_title.tier > tier_barony + scope:puppet_or_actor = { + NOT = { + title_revocation_is_tyrannical_trigger = { VASSAL = scope:recipient } + } + } OR = { scope:puppet_or_actor.faith.religion != scope:recipient.faith.religion scope:puppet_or_actor.ai_zeal >= low_negative_ai_value @@ -1302,9 +1357,9 @@ } NOT = { any_vassal = { + is_imprisoned_by = scope:puppet_or_actor faith != scope:puppet_or_actor.faith primary_title.tier > tier_barony - is_imprisoned_by = scope:puppet_or_actor time_in_prison = { years < 1 } } } @@ -1318,6 +1373,9 @@ has_relation_rival = scope:recipient has_relation_nemesis = scope:recipient } + NOT = { + title_revocation_is_tyrannical_trigger = { VASSAL = scope:recipient } + } } add = 100 } @@ -1330,9 +1388,7 @@ scope:puppet_or_actor = { OR = { has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient has_relation_lover = scope:recipient - has_relation_soulmate = scope:recipient is_parent_of = scope:recipient is_grandparent_of = scope:recipient is_great_grandparent_of = scope:recipient @@ -1409,12 +1465,12 @@ scope:puppet_or_actor = { government_has_flag = government_is_clan exists = house - ai_wants_high_unity = yes } scope:recipient = { government_has_flag = government_is_clan house ?= scope:puppet_or_actor.house } + scope:puppet_or_actor = { ai_wants_high_unity = yes } add = -1000 } # Admin Government: Do not revoke titles from your house unless it's really needed modifier = { @@ -1471,6 +1527,20 @@ } } + # House Unity: Avoid revoking titles from house members if the AI wants to have high unity + modifier = { + scope:puppet_or_actor = { + government_has_flag = government_uses_house_unity + exists = house + } + scope:recipient = { + government_has_flag = government_uses_house_unity + house ?= scope:puppet_or_actor.house + } + scope:puppet_or_actor = { ai_wants_high_unity = yes } + add = -1000 + } + # Don't take a title off anyone when refusing would raise half the realm against us. A prisoner, baron and lawful revocations are exempt, because they don't cause civil wars modifier = { factor = 0 @@ -1553,5 +1623,11 @@ # } # factor = 0 # } + modifier = { + scope:actor = { + gg_hre_causes_additional_tyranny_trigger = { TARGET = scope:recipient } + } + factor = 0 + } } } diff --git a/common/character_interactions/00_scheme_interactions.txt b/common/character_interactions/00_scheme_interactions.txt index 2f0f1622f..907344a68 100644 --- a/common/character_interactions/00_scheme_interactions.txt +++ b/common/character_interactions/00_scheme_interactions.txt @@ -53,17 +53,10 @@ start_murder_interaction = { } } scope:recipient = { NOT = { has_strong_hook = scope:puppet_or_actor } } - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } trigger_if = { limit = { scope:puppet_or_actor = { has_variable = no_scheming_allowed_var } } @@ -129,13 +122,22 @@ start_murder_interaction = { scope:puppet_or_actor = { if = { # Only get stressed/SP penalties if you don't have the parameter limit = { - NOT = { has_fulfillment_parameter = sp_murder_yields_no_sp_or_stress_loss } + NOR = { + has_fulfillment_parameter = sp_murder_yields_no_sp_or_stress_loss + has_variable = recently_troubled_by_murder_plot + } } stress_and_fulfillment_impact = { compassionate = major_stress_impact_gain honest = medium_stress_impact_gain just = medium_stress_impact_gain } + hidden_effect = { + set_variable = { + name = recently_troubled_by_murder_plot + years = 1 + } + } } send_interface_toast = { type = event_toast_effect_neutral @@ -218,14 +220,15 @@ start_murder_interaction = { # Hand over the modifier. random_scheme = { type = murder - limit = { - scheme_target_character = scope:recipient - } + limit = { scheme_target_character = scope:recipient } add_scheme_modifier = { type = feast_learnt_habits_modifier } } # Remove the variable now that we're done with it. remove_variable = feast_events_ewan_0001_bonus_value } +# #Guelphs & Ghibellines +# gg_scheme_catalyst_warning_effect = { SCHEME = murder } +# gg_involvement_scheme_tooltip_effect = yes } if = { limit = { @@ -327,18 +330,10 @@ start_abduct = { } } scope:recipient = { NOT = { has_strong_hook = scope:puppet_or_actor } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } trigger_if = { limit = { scope:puppet_or_actor = { has_variable = no_scheming_allowed_var } } @@ -488,6 +483,9 @@ start_abduct = { } } } + #Guelphs & Ghibellines + gg_scheme_catalyst_warning_effect = { SCHEME = abduct } + gg_involvement_scheme_tooltip_effect = yes } if = { limit = { @@ -582,6 +580,58 @@ start_abduct = { } always = yes } + #The target is quite the GG meddler + modifier = { + add = { + value = 0 + #More weight if they have high involvement, stacking + if = { + limit = { + scope:recipient = { + exists = var:gg_involvement + var:gg_involvement >= gg_involvement_major_value + } + } + add = 25 + } + if = { + limit = { + scope:recipient = { + exists = var:gg_involvement + var:gg_involvement >= gg_involvement_massive_value + } + } + add = 25 + } + if = { + limit = { + scope:recipient = { + exists = var:gg_involvement + var:gg_involvement >= gg_involvement_omega_value + } + } + add = 25 + } + if = { + limit = { + scope:recipient = { + exists = var:gg_involvement + var:gg_involvement >= gg_involvement_capped_value + } + } + add = 25 + } + #Double if the target banished someone from your side + if = { + limit = { + scope:recipient = { has_character_modifier = vilified_ruler_modifier } + } + multiply = 2 + } + } + exists = situation:guelph_ghibelline + gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:actor SECOND = scope:recipient } + } #Promised to abstain from sin modifier = { OR = { @@ -689,18 +739,10 @@ befriend_interaction = { target_character = scope:recipient } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } trigger_if = { limit = { scope:is_puppet_action ?= yes } @@ -1112,6 +1154,15 @@ seduce_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 216 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } is_available = { trigger_if = { @@ -1260,18 +1311,10 @@ seduce_interaction = { } scope:recipient = { primary_spouse = { NOT = { has_strong_hook = scope:puppet_or_actor } } } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } } @@ -1455,10 +1498,7 @@ seduce_interaction = { add = 25 scope:recipient = { primary_spouse ?= { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } } @@ -1922,18 +1962,10 @@ court_interaction = { NOT = { has_character_modifier = clerical_chastity_vow_modifier } } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } } @@ -2258,6 +2290,15 @@ sway_interaction = { empire = 6 hegemony = 6 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 360 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } is_available = { trigger_if = { @@ -2347,18 +2388,10 @@ sway_interaction = { target_character = scope:recipient } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } } @@ -2664,18 +2697,10 @@ learn_language_interaction = { target_character = scope:recipient } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } } @@ -2784,6 +2809,23 @@ learn_language_interaction = { scope:puppet_or_actor.religion = scope:recipient.religion } + modifier = { + add = 50 + scope:puppet_or_actor = { + culture = { + has_cultural_parameter = wants_to_learn_chinese + } + NOT = { + knows_language = language_chinese + } + } + scope:recipient = { + culture = { + has_cultural_pillar = language_chinese + } + } + } + modifier = { add = 25 scope:puppet_or_actor = { @@ -2969,7 +3011,7 @@ learn_language_interaction = { modifier = { add = 100 scope:puppet_or_actor.culture = { - has_cultural_tradition = tradition_loyal_soldiers + has_cultural_parameter = wants_to_learn_liege_language } top_liege != this scope:puppet_or_actor = { @@ -3057,6 +3099,15 @@ study_faith_interaction = { empire = 36 hegemony = 36 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 216 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } is_available = { trigger_if = { @@ -3104,18 +3155,10 @@ study_faith_interaction = { target_character = scope:recipient } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } trigger_if = { limit = { scope:is_puppet_action ?= yes } @@ -3521,3 +3564,350 @@ study_faith_interaction = { } } +influence_house_ambition_interaction = { + icon = influence_house_ambition + category = interaction_category_friendly + common_interaction = yes + + send_name = START_SCHEME + + interface_priority = 75 + + scheme = influence_house_ambition + ignores_pending_interaction_block = yes + + ai_targets = { + ai_recipients = liege + ai_recipients = neighboring_rulers + max = 10 + } + ai_targets = { + ai_recipients = vassals + ai_recipients = peer_vassals + max = 10 + } + ai_frequency_by_tier = { + barony = 0 + county = 120 + duchy = 24 + kingdom = 6 + empire = 6 + hegemony = 6 + } + + is_available = { + government_has_flag = government_is_republic + this = house.house_head + NOT = { + house = { + has_house_aspiration_parameter = republic_no_ambition + } + } + NOR = { + scheme_generic_ai_blocker_trigger = yes + primary_title = { + is_mercenary_company = yes + } + } + } + + is_shown = { + scope:actor != scope:recipient + scope:recipient = { + government_has_flag = government_is_republic + this = house.house_head + } + } + is_valid_showing_failures_only = { + scope:actor = { + can_start_scheme = { + type = sway + target_character = scope:recipient + } + } + custom_tooltip = { + scope:actor.house = { + NOT = { + has_same_house_aspiration_as = scope:recipient.house + } + } + + text = influence_house_ambition_same_ambition + } + } + + desc = scheme_interaction_tt_influence_house_ambition_approved + + on_accept = { + scope:actor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = influence_house_ambition_interaction_notification + + left_icon = scope:actor + right_icon = scope:recipient + + begin_scheme_basic_effect = { + SCHEME_TYPE = influence_house_ambition + TARGET_TYPE = target_character + TARGET_SCOPE = scope:recipient + } + } + } + } + + auto_accept = yes + + ai_will_do = { + base = 10 + + modifier = { # Prefer seducing if you've got the focus for it + add = -20 + scope:actor = { + has_focus = intrigue_temptation_focus + } + } + + modifier = { + add = 10 + scope:recipient = { + is_vassal_of = scope:actor + } + } + + modifier = { # Try to sway those who you might want to vassalize + add = 30 + scope:actor = { + top_liege = this + primary_title.tier >= tier_county + NOT = { + any_targeting_faction = { + exists = yes + OR = { + faction_is_type = liberty_faction + faction_is_type = claimant_faction + faction_is_type = independence_faction + } + } + } + } + scope:recipient = { + top_liege = this + is_playable_character = yes + primary_title.tier < scope:actor.primary_title.tier + OR = { + faith.religion = scope:actor.faith.religion + AND = { + faith = { + has_doctrine = doctrine_pluralism_pluralistic + } + scope:actor.faith = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + } + } + } + + modifier = { + add = 10 + scope:recipient = { + joined_faction ?= { + faction_target = scope:actor + faction_is_type = liberty_faction + faction_is_at_war = no + } + } + } + + modifier = { + add = 20 + scope:recipient = { + joined_faction ?= { + faction_target = scope:actor + faction_is_type = claimant_faction + faction_is_at_war = no + } + } + } + + modifier = { + add = 30 + scope:recipient = { + joined_faction ?= { + faction_target = scope:actor + faction_is_type = independence_faction + faction_is_at_war = no + } + } + } + + modifier = { + factor = 2 + scope:recipient = { + is_a_faction_leader = yes + is_vassal_of = scope:actor + } + } + + modifier = { + factor = 3 + scope:recipient = { + is_vassal_of = scope:actor + opinion = { + target = scope:actor + value < 0 + } + } + } + + modifier = { + factor = 4 + scope:recipient = { + is_powerful_vassal_of = scope:actor + opinion = { + target = scope:actor + value < 0 + } + } + } + + modifier = { + factor = 0.5 + scope:recipient.faith != scope:actor.faith + } + + modifier = { + factor = 0.25 + scope:actor = { + is_ruler = yes + tier_difference = { + target = scope:recipient + value > 2 + } + } + scope:recipient = { + is_theocratic_lessee = no + } + } + modifier = { + factor = 0.5 + scope:actor = { + has_personality_malicious_trigger = yes + } + } + modifier = { + factor = 2 + scope:actor = { + OR = { + has_trait = gregarious + has_trait = diplomat + has_trait = family_first + has_trait = august + } + } + } + modifier = { + factor = 0.75 + scope:recipient = { + is_child_of = scope:actor + } + } + modifier = { + factor = 2 + scope:actor = { + is_child_of = scope:recipient + } + } + modifier = { + factor = 0.25 + scope:recipient = { + any_claim = { + this = scope:actor.primary_title + } + } + } + modifier = { # Butter up the realm priest + factor = 10 + scope:recipient = { + is_theocratic_lessee = yes + opinion = { + target = scope:actor + value <= 50 + } + } + } + modifier = { # Try to make your tax collectors like you + factor = 10 + scope:actor = { + government_has_flag = government_is_clan + } + scope:recipient = { + is_tax_collector = yes + opinion = { + target = scope:actor + value <= 50 + } + } + } + + modifier = { # No point in swaying if opinion is already at 100 + factor = 0 + scope:recipient = { + opinion = { + target = scope:actor + value >= 100 + } + } + } + + modifier = { # Unlanded only if a realm priest, spymaster, or clan tax collector + factor = 0 + scope:recipient = { + is_ruler = no + NOR = { + is_theocratic_lessee = yes + has_council_position = councillor_spymaster + AND = { + is_tax_collector = yes + scope:actor = { government_has_flag = government_is_clan } + } + } + } + } + + modifier = { # Ignore rivals unless forgiving + factor = 0 + scope:actor = { + has_relation_rival = scope:recipient + NOT = { has_trait = forgiving } + } + } + + modifier = { # Ignore non-councillor barons + factor = 0 + scope:recipient = { + primary_title.tier = tier_barony + is_councillor = no + } + } + + modifier = { # Ignore neighboring Kings+ + factor = 0 + scope:recipient = { + top_liege = this + is_playable_character = yes + primary_title.tier >= tier_kingdom + } + } + + modifier = { # Ignore neighboring Herders + factor = 0 + scope:recipient = { + government_has_flag = government_is_herder + } + } + } +} + + diff --git a/common/character_interactions/00_tradition_interactions.txt b/common/character_interactions/00_tradition_interactions.txt index e4232da1f..c66ea745a 100644 --- a/common/character_interactions/00_tradition_interactions.txt +++ b/common/character_interactions/00_tradition_interactions.txt @@ -319,7 +319,7 @@ appoint_podesta_interaction = { any_county_province = { has_holding_type = city_holding } - development_level > 20 + prosperity_level > 20 } } } @@ -412,7 +412,7 @@ appoint_podesta_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain diff --git a/common/character_interactions/00_tribal_interactions.txt b/common/character_interactions/00_tribal_interactions.txt index cb1642738..38990ecf3 100644 --- a/common/character_interactions/00_tribal_interactions.txt +++ b/common/character_interactions/00_tribal_interactions.txt @@ -52,7 +52,7 @@ limit = { tier <= tier_county } title_province = { barony_controller = scope:actor - has_ongoing_construction = no + has_ongoing_holding_construction = no } } } @@ -139,7 +139,7 @@ tribalize_holding_interaction = { limit = { tier <= tier_county } title_province = { barony_controller = scope:actor - has_ongoing_construction = no + has_ongoing_holding_construction = no } } } @@ -290,7 +290,7 @@ support_feudalize_tribal_holding_interaction = { limit = { tier <= tier_county } title_province = { barony_controller = scope:recipient - has_ongoing_construction = no + has_ongoing_holding_construction = no } } } diff --git a/common/character_interactions/00_tributary_interactions.txt b/common/character_interactions/00_tributary_interactions.txt index d3a895c2d..5b9eb9cc0 100644 --- a/common/character_interactions/00_tributary_interactions.txt +++ b/common/character_interactions/00_tributary_interactions.txt @@ -11,9 +11,25 @@ become_tributary_interaction = { desc = become_tributary_interaction_desc + is_available = { + is_landed = yes # Landless have no realm to render tribute from; + is_independent_ruler = yes # You have to be independent - This check exists to prevent a lot of edge-cases where you can change liege + is_confederation_member = no + NOT = { + government_has_flag = cannot_be_vassal_or_liege + } + trigger_if = { + limit = { + is_ai = yes + } + is_at_war = no + is_available_allow_travelling = yes + } + } + is_shown = { scope:recipient = { - is_independent_ruler = yes # while it's possible for tributaries to have their own tributaries, it should not be possible to create a tributary relationship with a non-independent ruler + this = top_liege # while it's possible for tributaries to have their own tributaries, it should not be possible to create a tributary relationship with a non-independent ruler NOR = { this = scope:actor this = scope:actor.suzerain @@ -26,6 +42,18 @@ become_tributary_interaction = { limit = { is_ai = yes } current_military_strength < scope:recipient.one_and_a_half_times_current_military_strength primary_title.tier < scope:recipient.primary_title.tier + # We skip recipients that ai_will_do weights down so far the AI never picks them + scope:recipient = { + OR = { + government_has_flag = government_is_mandala + government_has_flag = government_is_tribal + NOR = { + government_has_mechanic = administrative + government_is_japanese_trigger = yes + government_has_flag = government_is_nomadic + } + } + } } } } @@ -34,7 +62,7 @@ become_tributary_interaction = { #These triggers need to match the Tribute Mission Decision trigger_if = { limit = { - scope:recipient = { primary_title.tier = tier_hegemony } + scope:recipient = { highest_held_title_tier = tier_hegemony } } custom_tooltip = { text = become_tributary_interaction_hegemony_not_neighbor_tt @@ -279,13 +307,6 @@ become_tributary_interaction = { } } - is_available = { - is_landed = yes # Landless have no realm to render tribute from; - top_liege ?= this # You have to be independent - This check exists to prevent a lot of edge-cases where you can change liege - is_confederation_member = no - NOT = { government_has_flag = cannot_be_vassal_or_liege } - } - ai_targets = { ai_recipients = neighboring_rulers_including_tributary_borders max = 5 @@ -414,23 +435,23 @@ become_tributary_interaction = { ### MANDALA ### #Added threshold for Mandalas who already are Tributaries modifier = { - scope:recipient = { is_tributary = yes } - NOT = { scope:recipient.suzerain = scope:actor } - scope:recipient.suzerain = { primary_title.tier = tier_duchy } + scope:actor = { is_tributary = yes } + NOT = { scope:actor.suzerain = scope:recipient } + scope:actor.suzerain = { primary_title.tier = tier_duchy } add = -25 desc = already_tributary_threshold } modifier = { - scope:recipient = { is_tributary = yes } - NOT = { scope:recipient.suzerain = scope:actor } - scope:recipient.suzerain = { primary_title.tier = tier_kingdom } + scope:actor = { is_tributary = yes } + NOT = { scope:actor.suzerain = scope:recipient } + scope:actor.suzerain = { primary_title.tier = tier_kingdom } add = -50 desc = already_tributary_threshold } modifier = { - scope:recipient = { is_tributary = yes } - NOT = { scope:recipient.suzerain = scope:actor } - scope:recipient.suzerain = { primary_title.tier >= tier_empire } + scope:actor = { is_tributary = yes } + NOT = { scope:actor.suzerain = scope:recipient } + scope:actor.suzerain = { primary_title.tier >= tier_empire } add = -75 desc = already_tributary_threshold } @@ -479,7 +500,6 @@ become_tributary_interaction = { modifier = { trigger_if = { limit = { - scope:recipient = { has_unruined_mandala_capital_trigger = yes } scope:actor = { is_tributary = no OR = { @@ -487,6 +507,7 @@ become_tributary_interaction = { government_has_flag = government_is_tribal } } + scope:recipient = { has_unruined_mandala_capital_trigger = yes } } scope:recipient = { OR = { @@ -754,7 +775,7 @@ become_tributary_interaction = { modifier = { # Can't flee the conqueror this way add = -1000 desc = NO_FRIVOLOUS_ACTIVITIES_REASON - scope:actor = { has_variable = conqueror } + scope:recipient = { has_variable = conqueror } } modifier = { # Wide difference in rank @@ -777,6 +798,8 @@ become_tributary_interaction = { any_neighboring_top_liege_realm_owner = { this = scope:recipient } } } + exists = scope:actor.capital_province + exists = scope:recipient.capital_province scope:actor.capital_province = { squared_distance = { target = scope:recipient.capital_province value < squared_distance_major } } } add = -15 @@ -789,6 +812,8 @@ become_tributary_interaction = { any_neighboring_top_liege_realm_owner = { this = scope:recipient } } } + exists = scope:actor.capital_province + exists = scope:recipient.capital_province scope:actor.capital_province = { squared_distance = { target = scope:recipient.capital_province value >= squared_distance_major } } } add = -25 @@ -929,7 +954,7 @@ demand_tributary_interaction = { } is_valid_showing_failures_only = { - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { NOT = { has_truce = scope:recipient } is_available_allow_travelling = yes } @@ -1210,11 +1235,16 @@ demand_tributary_interaction = { } # if the actor is a major threat to the recipient they're more likely to accept - ai_military_threat_modifier_with_cbs = { - SENDER = scope:recipient - RECEIVER = scope:puppet_or_actor - MULTIPLIER = 1 + modifier = { # Casus bellis on target + scope:recipient ?= { NOT = { has_government = herder_government } } # herders don't care + scope:puppet_or_actor ?= { NOT = { has_any_cb_on = scope:recipient } } + add = { + add = dominant_negative_ai_value + multiply = 1 + } + desc = NO_CASUS_BELLI_REASON } + ai_military_threat_modifier = { SENDER = scope:recipient RECEIVER = scope:puppet_or_actor MULTIPLIER = 1 } modifier = { # They are a King desc = tributary_interaction_aibehavior_recipient_tier_tt @@ -1386,7 +1416,10 @@ demand_tributary_interaction = { add = { add = -10 if = { - limit = { scope:puppet_or_actor.culture ?= { has_cultural_pillar = ethos_bellicose } } + limit = { + exists = scope:puppet_or_actor + scope:puppet_or_actor.culture = { has_cultural_pillar = ethos_bellicose } + } add = -10 } } @@ -1495,10 +1528,13 @@ cease_paying_tribute_interaction = { is_available = { trigger_if = { limit = { is_ai = yes } + is_at_war = no + is_migrating = no suzerain ?= { is_migrating = no OR = { + is_landed = no AND = { NOT = { root = { government_has_flag = government_is_herder } } trigger_if = { # Obedience is a hard blocker, but only if suzerain is landed @@ -1513,7 +1549,6 @@ cease_paying_tribute_interaction = { this = root } } - is_landed = no } trigger_if = { limit = { @@ -1533,7 +1568,6 @@ cease_paying_tribute_interaction = { } } } - is_at_war = no trigger_if = { limit = { suzerain = { @@ -1542,7 +1576,6 @@ cease_paying_tribute_interaction = { } subject_standing < 20 } - is_migrating = no } } @@ -1551,6 +1584,7 @@ cease_paying_tribute_interaction = { this != scope:recipient suzerain ?= scope:recipient is_tributary = yes + NOT = { government_has_flag = government_is_merchant } } } @@ -1966,7 +2000,7 @@ cease_paying_tribute_interaction = { government_has_flag = government_is_mandala capital_province = { has_building_with_flag = mandala_capital_building - has_ruined_great_building = no + has_ruined_great_district = no } } add = 50 @@ -1985,7 +2019,7 @@ cease_paying_tribute_interaction = { faith = scope:puppet_or_actor.faith capital_province = { has_building_with_flag = mandala_capital_building - has_ruined_great_building = no + has_ruined_great_district = no } } add = -10 @@ -2041,6 +2075,7 @@ release_tributary_interaction = { scope:recipient = { this != scope:puppet_or_actor suzerain ?= scope:puppet_or_actor + NOT = { government_has_flag = government_is_merchant } OR = { # AI should only ever consider releasing unruly subjects scope:actor = { is_ai = no } NOT = { is_obedient_to = scope:puppet_or_actor } @@ -2287,7 +2322,10 @@ exact_tribute_interaction = { desc = exact_tribute_interaction_desc is_shown = { - scope:recipient = { is_ai = yes } + scope:recipient = { + is_ai = yes + NOT = { government_has_flag = government_is_merchant } + } scope:actor = { OR = { highest_held_title_tier >= tier_hegemony @@ -2773,19 +2811,19 @@ exact_tribute_interaction = { add = 25 if = { limit = { - OR = { - NOT = { scope:recipient.primary_title = title:h_china } - government_has_flag = government_is_meritocratic + NAND = { + primary_title = title:h_china + government_has_flag = government_is_celestial } } add = 25 } } - desc = tributary_interaction_aibehavior_recipient_hegemon_tier_tt + desc = tributary_interaction_aibehavior_actor_hegemon_tier_tt } # Unstable Phase modifier = { - scope:actor = { highest_held_title_tier >= tier_hegemony } + scope:actor = { has_title = title:h_china } situation:dynastic_cycle ?= { OR = { situation_current_phase = situation_dynastic_cycle_phase_instability @@ -2798,7 +2836,7 @@ exact_tribute_interaction = { # Stable Phase modifier = { scope:actor = { - highest_held_title_tier >= tier_hegemony + has_title = title:h_china legitimacy_level < dynastic_cycle_legitimacy_expectation } situation:dynastic_cycle ?= { @@ -2812,7 +2850,7 @@ exact_tribute_interaction = { } modifier = { scope:actor = { - highest_held_title_tier >= tier_hegemony + has_title = title:h_china legitimacy_level > dynastic_cycle_legitimacy_expectation } situation:dynastic_cycle ?= { @@ -2941,7 +2979,10 @@ exact_tribute_player_interaction = { desc = exact_tribute_player_interaction_desc is_shown = { - scope:recipient = { is_ai = no } + scope:recipient = { + is_ai = no + NOT = { government_has_flag = government_is_merchant } + } trigger_if = { limit = { scope:actor = { highest_held_title_tier >= tier_hegemony } @@ -3220,6 +3261,9 @@ offer_courtier_interaction = { is_shown = { scope:actor != scope:recipient + scope:actor = { + NOT = { government_has_flag = government_is_merchant } + } scope:recipient = { is_ruler = yes NOT = { government_has_flag = government_is_herder } @@ -3251,16 +3295,10 @@ offer_courtier_interaction = { } } - trigger_if = { #For adventurers we check range - limit = { - scope:actor = { - is_landless_adventurer = yes - } - } - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:actor + TARGET = scope:recipient } } @@ -3312,15 +3350,15 @@ offer_courtier_interaction = { prowess >= extremely_high_skill_rating AND = { diplomacy >= monumentally_high_skill_rating - scope:actor.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } + scope:recipient.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating - scope:actor.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } + stewardship >= monumentally_high_skill_rating + scope:recipient.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating - scope:actor.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } + intrigue >= monumentally_high_skill_rating + scope:recipient.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } } has_relation_lover = scope:recipient # Shhh, don't tell anyone, of course you're 'skilled'! trigger_if = { @@ -3479,15 +3517,15 @@ offer_courtier_interaction = { exists = inspiration AND = { diplomacy >= monumentally_high_skill_rating - scope:actor.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } + scope:recipient.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating - scope:actor.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } + stewardship >= monumentally_high_skill_rating + scope:recipient.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating - scope:actor.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } + intrigue >= monumentally_high_skill_rating + scope:recipient.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } } trigger_if = { limit = { @@ -3709,11 +3747,11 @@ demand_courtier_interaction = { scope:actor.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating + stewardship >= monumentally_high_skill_rating scope:actor.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating + intrigue >= monumentally_high_skill_rating scope:actor.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } } trigger_if = { @@ -3777,6 +3815,7 @@ demand_courtier_interaction = { is_shown = { scope:actor != scope:recipient scope:recipient = { + NOT = { government_has_flag = government_is_merchant } OR = { trigger_if = { limit = { @@ -3990,11 +4029,11 @@ demand_courtier_interaction = { scope:actor.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating + stewardship >= monumentally_high_skill_rating scope:actor.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating + intrigue >= monumentally_high_skill_rating scope:actor.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } } trigger_if = { @@ -4128,7 +4167,10 @@ demand_courtier_interaction = { } # Use Hook if = { - limit = { scope:hook = yes } + limit = { + scope:hook = yes + has_usable_hook = scope:recipient + } use_hook = scope:recipient } } @@ -4395,11 +4437,11 @@ demand_concubine_interaction = { scope:actor.cp:councillor_chancellor ?= { diplomacy < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating + stewardship >= monumentally_high_skill_rating scope:actor.cp:councillor_steward ?= { stewardship < monumentally_high_skill_rating } } AND = { - diplomacy >= monumentally_high_skill_rating + intrigue >= monumentally_high_skill_rating scope:actor.cp:councillor_spymaster ?= { intrigue < monumentally_high_skill_rating } } has_conventionally_attractive_trigger = yes @@ -4677,7 +4719,10 @@ offer_tributary_status_interaction = { #Embrace as Tributary if = { limit = { is_confederation_member = yes - confederation ?= { is_house_based = no } + confederation ?= { + is_house_based = no + is_title_based = no + } } confederation = { remove_confederation_member = scope:recipient } } @@ -4921,7 +4966,7 @@ offer_tributary_status_interaction = { #Embrace as Tributary trigger = { scope:recipient.capital_province ?= { has_building_with_flag = mandala_capital_building - has_ruined_great_building = no + has_ruined_great_district = no } } add = -200 @@ -4948,7 +4993,7 @@ offer_tributary_status_interaction = { #Embrace as Tributary scope:actor.faith = scope:recipient.faith scope:actor.capital_province = { has_building_with_flag = mandala_capital_building - has_ruined_great_building = no + has_ruined_great_district = no } } add = { @@ -5361,6 +5406,7 @@ reassert_tributary_interaction = { is_shown = { scope:recipient = { is_tributary_of = scope:actor + NOT = { government_has_flag = government_is_merchant } is_ai = yes cease_tribute_payments_ai_chance > 0 } diff --git a/common/character_interactions/00_vassal_interactions.txt b/common/character_interactions/00_vassal_interactions.txt index 1b750f445..8cca21129 100644 --- a/common/character_interactions/00_vassal_interactions.txt +++ b/common/character_interactions/00_vassal_interactions.txt @@ -45,6 +45,14 @@ grant_vassal_interaction = { } } scope:recipient.highest_held_title_tier > tier_barony + scope:actor = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } } is_valid_showing_failures_only = { @@ -266,7 +274,7 @@ grant_vassal_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = miniscule_unity_gain @@ -424,7 +432,7 @@ grant_vassal_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:recipient TARGET = scope:puppet_or_actor VALUE = miniscule_unity_loss @@ -513,6 +521,15 @@ retract_vassal_interaction = { has_realm_law_flag = vassal_retraction_allowed } } + trigger_else_if = { + limit = { + government_has_flag = government_is_republic + } + custom_description = { + text = "has_law_allowing_vassal_retraction_republic" + has_realm_law_flag = vassal_retraction_allowed + } + } trigger_else_if = { limit = { realm_law_use_church_authority = yes @@ -596,10 +613,17 @@ retract_vassal_interaction = { on_decline = { scope:puppet_or_actor = { vassal_revocation_tyranny_effect = yes } - war_for_retraction_effect = { - LIEGE = scope:puppet_or_actor - REBEL = scope:recipient - SUBVASSAL = scope:secondary_recipient + if = { + limit = { + scope:puppet_or_actor = { + NOT = { has_realm_law_flag = republic_vassal_refusal_allowed } + } + } + war_for_retraction_effect = { + LIEGE = scope:puppet_or_actor + REBEL = scope:recipient + SUBVASSAL = scope:secondary_recipient + } } scope:recipient = { add_opinion = { @@ -909,6 +933,15 @@ retract_vassal_interaction = { } desc = VASSALS_REFUSAL_indomitable_azatani } + #GG modifier + modifier = { + add = -50 + OR = { + gg_first_and_second_are_opposite_sides_trigger = { FIRST = scope:actor SECOND = scope:recipient } + scope:recipient = { is_gg_undecided_trigger = yes } + } + desc = RECIPIENT_IS_NOT_YOUR_GG + } } #Use hook @@ -1161,9 +1194,7 @@ retract_vassal_interaction = { scope:puppet_or_actor = { OR = { has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient has_relation_lover = scope:recipient - has_relation_soulmate = scope:recipient is_heir_of = scope:recipient } } @@ -1224,6 +1255,13 @@ retract_vassal_interaction = { } } } + + modifier = { + scope:actor = { + gg_hre_causes_additional_tyranny_trigger = { TARGET = scope:recipient } + } + factor = 0 + } } } @@ -1382,6 +1420,12 @@ create_claimant_faction_against_interaction = { text = "faction_can_join_create_in_another_faction" is_a_faction_member = no } + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } } is_shown = { @@ -1485,7 +1529,7 @@ create_claimant_faction_against_interaction = { trigger_if = { limit = { exists = scope:landed_title - scope:actor.top_liege.primary_title.var:administrative_ui_special_title ?= scope:landed_title + scope:actor.ceremonial_liege_title ?= scope:landed_title } scope:recipient = { tgp_is_in_ceremonial_house_trigger = yes @@ -1611,9 +1655,7 @@ invite_to_council_position_interaction = { first_valid = { triggered_desc = { trigger = { - scope:recipient = { - is_councillor_of = scope:actor - } + scope:recipient = { is_councillor_of = scope:actor } } desc = liege_offer_council_position_exchange } @@ -1641,9 +1683,7 @@ invite_to_council_position_interaction = { } triggered_desc = { trigger = { - scope:recipient = { - is_powerful_vassal_of = scope:actor - } + scope:recipient = { is_powerful_vassal_of = scope:actor } } desc = liege_offer_council_position_powerful } @@ -1666,14 +1706,13 @@ invite_to_council_position_interaction = { } is_valid_showing_failures_only = { + scope:recipient.liege = scope:actor ALL_FALSE = { scope:recipient.council_task = scope:target scope:actor = { is_at_war_with = scope:recipient } } trigger_if = { - limit = { - exists = scope:target.councillor - } + limit = { exists = scope:target.councillor } scope:target = { can_fire_position = yes } NOT = { scope:target.councillor = { @@ -1709,7 +1748,7 @@ invite_to_council_position_interaction = { # If we're a clan this interaction affects unity #if = { # limit = { scope:actor = { NOT = { has_character_flag = fp3_consulted_house } } } - # add_clan_unity_interaction_effect = { + # add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = miniscule_unity_gain @@ -1898,7 +1937,7 @@ force_onto_council = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -2132,8 +2171,6 @@ force_onto_council = { OR = { has_relation_friend = scope:recipient has_relation_lover = scope:recipient - has_relation_best_friend = scope:recipient - has_relation_soulmate = scope:recipient } } } @@ -2245,7 +2282,7 @@ stop_attacker_vassal_war_interaction = { exists = scope:actor.house scope:recipient.house != scope:actor.house } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:target.primary_defender VALUE = medium_unity_gain @@ -2259,7 +2296,7 @@ stop_attacker_vassal_war_interaction = { exists = scope:target.primary_defender.house scope:target.primary_defender.house != scope:actor.house } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -2381,7 +2418,7 @@ stop_defender_vassal_war_interaction = { exists = scope:target.primary_attacker.house scope:target.primary_attacker.house != scope:actor.house } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -2395,7 +2432,7 @@ stop_defender_vassal_war_interaction = { exists = scope:recipient.house scope:recipient.house != scope:actor.house } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:target.primary_attacker VALUE = medium_unity_gain @@ -2552,7 +2589,7 @@ ask_for_pardon_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -2610,7 +2647,7 @@ ask_for_pardon_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:recipient TARGET = scope:actor VALUE = minor_unity_loss @@ -2984,7 +3021,7 @@ pardon_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -3016,9 +3053,7 @@ pardon_interaction = { scope:recipient = { OR = { has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor has_relation_lover = scope:puppet_or_actor - has_relation_soulmate = scope:puppet_or_actor is_primary_heir_of = scope:puppet_or_actor } } @@ -3108,6 +3143,12 @@ vassal_claim_liege_title_interaction = { scope:puppet_or_actor ?= { is_physically_able_adult = yes + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } } scope:recipient = scope:puppet_or_actor.liege @@ -3377,7 +3418,7 @@ vassal_claim_liege_title_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = major_unity_loss @@ -3438,10 +3479,7 @@ vassal_claim_liege_title_interaction = { modifier = { add = 25 scope:recipient = { - OR = { - has_relation_rival = scope:puppet_or_actor - has_relation_nemesis = scope:puppet_or_actor - } + has_relation_rival = scope:puppet_or_actor } } @@ -3566,7 +3604,6 @@ vassal_claim_liege_title_interaction = { scope:recipient = { OR = { has_relation_friend = scope:puppet_or_actor - has_relation_best_friend = scope:puppet_or_actor has_relation_soulmate = scope:puppet_or_actor } } @@ -3618,7 +3655,7 @@ give_vassal_directive_interaction = { } send_option = { - flag = improve_development + flag = improve_prosperity is_shown = { scope:recipient = { government_has_mechanic = administrative @@ -3810,7 +3847,7 @@ give_vassal_directive_interaction = { text = has_any_directive scope:recipient = { has_variable = { - name = vassal_directive_improve_development + name = vassal_directive_improve_prosperity name = vassal_directive_train_commanders name = vassal_directive_build_maa name = vassal_directive_convert_faith @@ -3834,7 +3871,7 @@ give_vassal_directive_interaction = { if = { limit = { has_variable = { - name = vassal_directive_improve_development + name = vassal_directive_improve_prosperity name = vassal_directive_train_commanders name = vassal_directive_build_maa name = vassal_directive_convert_faith @@ -3857,11 +3894,11 @@ give_vassal_directive_interaction = { switch = { trigger = yes - scope:improve_development ?= { + scope:improve_prosperity ?= { custom_tooltip = { - text = vassal_directive_improve_development + text = vassal_directive_improve_prosperity remove_vassal_directives = yes - add_character_flag = vassal_directive_improve_development + add_character_flag = vassal_directive_improve_prosperity } } @@ -3984,11 +4021,11 @@ give_vassal_directive_interaction = { modifier = { add = 100 - scope:improve_development ?= yes + scope:improve_prosperity ?= yes scope:recipient = { has_none_of_variables = { name = vassal_directive_building_focus_economy - name = vassal_directive_improve_development + name = vassal_directive_improve_prosperity } OR = { vassal_contract_has_flag = admin_theme_civilian @@ -4003,7 +4040,7 @@ give_vassal_directive_interaction = { scope:recipient = { has_none_of_variables = { name = vassal_directive_building_focus_economy - name = vassal_directive_improve_development + name = vassal_directive_improve_prosperity } OR = { vassal_contract_has_flag = admin_theme_civilian diff --git a/common/character_interactions/02_ep1_interactions.txt b/common/character_interactions/02_ep1_interactions.txt index af72e7d8b..11f55a8ec 100644 --- a/common/character_interactions/02_ep1_interactions.txt +++ b/common/character_interactions/02_ep1_interactions.txt @@ -30,16 +30,13 @@ fund_inspiration_interaction = { is_shown = { scope:recipient = { is_ruler = no - inspiration ?= { - NOT = { - exists = inspiration_sponsor - } + exists = inspiration + any_inspiration = { + NOT = { exists = inspiration_sponsor } } } scope:actor = { - any_courtier_or_guest = { - this = scope:recipient - } + any_courtier_or_guest = { this = scope:recipient } } } @@ -62,8 +59,17 @@ fund_inspiration_interaction = { } } scope:actor = { - can_sponsor_inspiration = scope:recipient.inspiration gold >= scope:recipient.inspiration.base_inspiration_gold_cost + trigger_if = { + limit = { government_has_flag = government_is_merchant } + has_realm_law = company_purpose_artisan + } + trigger_else = { + custom_description = { + text = needs_inspiration_to_sponsor_tt + can_sponsor_inspiration = scope:recipient.inspiration + } + } } } @@ -134,7 +140,7 @@ fund_inspiration_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = miniscule_unity_gain @@ -344,7 +350,7 @@ indebt_guest_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = miniscule_unity_loss @@ -368,7 +374,7 @@ indebt_guest_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = miniscule_unity_loss diff --git a/common/character_interactions/03_fp2_interactions.txt b/common/character_interactions/03_fp2_interactions.txt index 245d1a3dc..cf1429698 100644 --- a/common/character_interactions/03_fp2_interactions.txt +++ b/common/character_interactions/03_fp2_interactions.txt @@ -368,7 +368,7 @@ share_known_secrets_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -620,7 +620,7 @@ propose_best_friendship_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -669,7 +669,7 @@ propose_best_friendship_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -807,7 +807,7 @@ reaffirm_best_friendship_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -851,7 +851,7 @@ reaffirm_best_friendship_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -978,7 +978,7 @@ synergise_friendship_interaction = { synergise_friendship_interaction_actual_effect = yes # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -1012,7 +1012,7 @@ synergise_friendship_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -1138,18 +1138,10 @@ challenge_to_2p_chess_interaction = { bg_can_start_board_game_is_scope_banned_checks_trigger = no } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:actor + TARGET = scope:recipient } } @@ -1379,7 +1371,7 @@ challenge_to_2p_chess_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = miniscule_unity_loss @@ -1425,7 +1417,7 @@ challenge_to_2p_chess_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:recipient TARGET = scope:actor VALUE = miniscule_unity_loss @@ -2149,18 +2141,10 @@ purchase_truce_interaction = { NOT = { any_truce_holder = { this = scope:recipient } } } } - #limit range for landless adventurers - trigger_if = { - limit = { - scope:puppet_or_actor = { - has_government = landless_adventurer_government - } - } - #Has to be used instead of diplo range checks in laamp to landed interactions - ep3_laamp_diplo_range_trigger = { - TARGET = scope:recipient - LAAMP = scope:puppet_or_actor - } + #limit range for landless adventurers/merchants + exceptional_diplo_range_trigger = { + CHARACTER = scope:puppet_or_actor + TARGET = scope:recipient } } @@ -2234,7 +2218,7 @@ purchase_truce_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -2281,7 +2265,7 @@ purchase_truce_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:recipient TARGET = scope:puppet_or_actor VALUE = minor_unity_loss @@ -2656,6 +2640,15 @@ purchase_truce_interaction = { empire = 0 hegemony = 0 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 180 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -2899,7 +2892,7 @@ incite_revolts_interaction = { any_sub_realm_county = { count > 0 holder = scope:recipient - county_opinion < 0 + popular_opinion < 0 NOR = { has_county_modifier = small_investment_in_revolt_modifier has_county_modifier = medium_investment_in_revolt_modifier @@ -2954,7 +2947,7 @@ incite_revolts_interaction = { has_county_modifier = medium_investment_in_revolt_modifier has_county_modifier = high_investment_in_revolt_modifier } - county_opinion < 0 + popular_opinion < 0 holder = scope:recipient } weight = { @@ -3005,10 +2998,7 @@ incite_revolts_interaction = { if = { limit = { scope:actor = { - OR = { - has_relation_rival = scope:recipient - has_relation_nemesis = scope:recipient - } + has_relation_rival = scope:recipient } } stress_and_fulfillment_impact = { @@ -3183,7 +3173,7 @@ incite_revolts_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_loss @@ -3289,10 +3279,7 @@ incite_revolts_interaction = { modifier = { add = 50 scope:recipient = { - OR = { - has_relation_rival = scope:actor - has_relation_nemesis = scope:actor - } + has_relation_rival = scope:actor } } @@ -3312,8 +3299,6 @@ incite_revolts_interaction = { OR = { has_relation_friend = scope:actor has_relation_lover = scope:actor - has_relation_soulmate = scope:actor - has_relation_best_friend = scope:actor } } } @@ -3333,16 +3318,16 @@ incite_revolts_interaction = { # special_interaction = interfere_in_war_interaction # popup_on_receive = yes # pause_on_receive = yes -# + # ai_maybe = yes # desc = contract_assistance_interaction_desc # icon = icon_gold -# + # greeting = positive # notification_text = contract_assistance_interaction_notification -# + # cooldown_against_recipient = { years = 5 } -# + # is_available = { # trigger_if = { # limit = { is_ai = yes } @@ -3361,7 +3346,7 @@ incite_revolts_interaction = { # } # NOT = { government_has_flag = government_is_herder } # } -# + # is_shown = { # # Recipient is Involved in Struggle, at war, and not at war with Actor # scope:recipient = { @@ -3386,15 +3371,15 @@ incite_revolts_interaction = { # } # } # } -# + # has_valid_target = { # exists = scope:target # } -# + # has_valid_target_showing_failures_only = { # scope:target = { is_war_leader = scope:recipient } # } -# + # is_valid_showing_failures_only = { # scope:recipient = { # # Cannot demand gold from allies @@ -3415,7 +3400,7 @@ incite_revolts_interaction = { # } # } # } -# + # # Recipient is not in (any) war against your liege(s) # trigger_if = { # limit = { exists = scope:actor.liege } @@ -3427,7 +3412,7 @@ incite_revolts_interaction = { # } # } # } -# + # # Cannot join wars with raised armies # scope:actor = { # has_raised_armies = no @@ -3442,13 +3427,13 @@ incite_revolts_interaction = { # } # } # } -# + # # Can only contract one war at a time # custom_tooltip = { # text = contract_assistance_war_already_contracted_tt # scope:actor = { NOT = { has_variable = owed_contract_assistance_war } } # } -# + # # Adventurers can't join wars in places they're exiled from. # custom_tooltip = { # text = the_wake_1 @@ -3459,7 +3444,7 @@ incite_revolts_interaction = { # } # } # } -# + # # Sensible restrictions to keep CulTrads from making this OP. # scope:recipient = { # custom_tooltip = { @@ -3506,7 +3491,7 @@ incite_revolts_interaction = { # # Liege checks # can_join_war_liege_vassal_check_trigger = { WARRIOR = scope:recipient JOINER = scope:actor } # } -# + # is_highlighted = { # scope:actor = { # has_realm_law = camp_purpose_mercenaries @@ -3541,7 +3526,7 @@ incite_revolts_interaction = { # craven = medium_stress_impact_gain # shy = minor_stress_impact_gain # } -# + # # Struggle Catalyst # if = { # limit = { @@ -3587,9 +3572,9 @@ incite_revolts_interaction = { # } # } # } -# + # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = medium_unity_loss @@ -3597,13 +3582,13 @@ incite_revolts_interaction = { # REVERSE_NON_HOUSE_TARGET = no # } # } -# + # on_decline = { # # Refusal notification # scope:actor = { trigger_event = char_interaction.0236 } -# + # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:recipient # TARGET = scope:actor # VALUE = minor_unity_gain @@ -3802,7 +3787,7 @@ incite_revolts_interaction = { # multiplier = 0.25 # desc = AI_OPINION_REASON # } -# + # modifier = { # add = { # value = ai_greed @@ -3811,7 +3796,7 @@ incite_revolts_interaction = { # ai_greed <= 0.5 # desc = AI_VALUE_MODIFIER_GREED # } -# + # modifier = { # add = { # value = ai_boldness @@ -3820,7 +3805,7 @@ incite_revolts_interaction = { # NOT = { ai_boldness = 0 } # desc = AI_VALUE_MODIFIER_BOLDNESS # } -# + # modifier = { # add = 50 # desc = camp_purpose_mercenaries_reason @@ -3834,12 +3819,12 @@ incite_revolts_interaction = { # # WARJOINER = scope:actor # # } # } -# + # ai_target_quick_trigger = { adult = yes } # ai_targets = { # ai_recipients = neighboring_rulers # } -# + # ai_set_target = { # scope:recipient = { # ordered_character_war = { #We offer our services for the war where the character is losing the most @@ -3881,10 +3866,10 @@ incite_revolts_interaction = { # empire = 12 # hegemony = 12 # } -# + # ai_will_do = { # base = 0 -# + # modifier = { # Increase chance if recipient is losing a war # trigger_if = { # limit = { exists = scope:target } @@ -3896,7 +3881,7 @@ incite_revolts_interaction = { # modifier = { # Increase chance with amount of gold of recipient over interaction cost # factor = offer_assistance_interaction_gold_modifier_value # } -# + # modifier = { # Increase chance if likes recipient more than enemy # scope:actor = { # save_temporary_opinion_value_as = { @@ -3919,7 +3904,7 @@ incite_revolts_interaction = { # } # add = 25 # } -# + # modifier = { # Increase chance for family # scope:recipient = { # OR = { @@ -3929,7 +3914,7 @@ incite_revolts_interaction = { # } # add = 25 # } -# + # modifier = { # Decrease chance if army is small # trigger_if = { # limit = { exists = scope:target } @@ -3937,7 +3922,7 @@ incite_revolts_interaction = { # } # add = -50 # } -# + # modifier = { # Increase chance for rivalry # trigger_if = { # limit = { exists = scope:target } @@ -3951,7 +3936,7 @@ incite_revolts_interaction = { # } # add = 25 # } -# + # # Higher chance to target a human player # modifier = { # scope:recipient = { is_ai = no } @@ -3973,16 +3958,16 @@ incite_revolts_interaction = { # special_interaction = call_ally_interaction # popup_on_receive = yes # pause_on_receive = yes -# + # ai_maybe = yes # desc = request_contract_assistance_interaction_desc # icon = icon_gold -# + # greeting = positive # notification_text = request_contract_assistance_interaction_notification -# + # cooldown_against_recipient = { years = 5 } -# + # is_available = { # is_at_war = yes # any_character_struggle = { @@ -3997,7 +3982,7 @@ incite_revolts_interaction = { # is_imprisoned = no # } # } -# + # is_shown = { # # Actor is Involved in Struggle # scope:actor = { @@ -4014,15 +3999,15 @@ incite_revolts_interaction = { # } # } # } -# + # has_valid_target = { # exists = scope:target # } -# + # has_valid_target_showing_failures_only = { # scope:target = { # is_war_leader = scope:actor -# + # # Cannot contract against allies # trigger_if = { # limit = { @@ -4038,7 +4023,7 @@ incite_revolts_interaction = { # } # } # } -# + # # Adventurers can't join wars in places they're exiled from. # trigger_if = { # limit = { @@ -4055,7 +4040,7 @@ incite_revolts_interaction = { # } # } # } -# + # is_valid_showing_failures_only = { # scope:recipient = { # # Cannot demand gold from allies @@ -4074,10 +4059,10 @@ incite_revolts_interaction = { # } # } # } -# + # # Cannot join wars with raised armies # scope:recipient = { has_raised_armies = no } -# + # # Can only contract one war at a time # custom_tooltip = { # text = contract_assistance_war_already_contracted_tt @@ -4086,7 +4071,7 @@ incite_revolts_interaction = { # } # } # } -# + # can_be_picked = { # # Recipient is war leader in chosen war # scope:target = { @@ -4103,7 +4088,7 @@ incite_revolts_interaction = { # # Liege checks # can_join_war_liege_vassal_check_trigger = { WARRIOR = scope:actor JOINER = scope:recipient } # } -# + # on_accept = { # # Add Actor to Recipient's war # scope:target = { @@ -4133,8 +4118,8 @@ incite_revolts_interaction = { # craven = medium_stress_impact_gain # shy = minor_stress_impact_gain # } -# -# + + # # Struggle Catalyst # if = { # limit = { @@ -4180,9 +4165,9 @@ incite_revolts_interaction = { # } # } # } -# + # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:actor # TARGET = scope:recipient # VALUE = medium_unity_loss @@ -4190,13 +4175,13 @@ incite_revolts_interaction = { # REVERSE_NON_HOUSE_TARGET = no # } # } -# + # on_decline = { # # Refusal notification # scope:actor = { trigger_event = char_interaction.0236 } -# + # # If we're a clan this interaction affects unity -# add_clan_unity_interaction_effect = { +# add_house_unity_interaction_effect = { # CHARACTER = scope:recipient # TARGET = scope:actor # VALUE = minor_unity_gain @@ -4204,10 +4189,10 @@ incite_revolts_interaction = { # REVERSE_NON_HOUSE_TARGET = no # } # } -# + # ai_accept = { # base = 0 # Reluctant to spend money without good reason -# + # # Recipient has low cash # modifier = { # add = { @@ -4291,7 +4276,7 @@ incite_revolts_interaction = { # multiplier = 0.25 # desc = AI_OPINION_REASON # } -# + # modifier = { # add = { # value = ai_greed @@ -4300,7 +4285,7 @@ incite_revolts_interaction = { # ai_greed <= 0.5 # desc = AI_VALUE_MODIFIER_GREED # } -# + # modifier = { # add = { # value = ai_boldness @@ -4309,19 +4294,19 @@ incite_revolts_interaction = { # NOT = { ai_boldness = 0 } # desc = AI_VALUE_MODIFIER_BOLDNESS # } -# + # # Allegiances # fp2_contracting_ally_modifier = { # WARMONGER = scope:actor # WARJOINER = scope:recipient # } # } -# + # ai_target_quick_trigger = { adult = yes } # ai_targets = { # ai_recipients = neighboring_rulers # } -# + # ai_set_target = { # scope:actor = { # ordered_character_war = { #We offer our services for the war where the character is losing the most @@ -4350,7 +4335,7 @@ incite_revolts_interaction = { # } # } # } -# + # ai_targets = { # ai_recipients = peer_vassals # } @@ -4362,10 +4347,10 @@ incite_revolts_interaction = { # empire = 36 # hegemony = 0 # } -# + # ai_will_do = { # base = 0 -# + # modifier = { # AI is losing the war # trigger_if = { # limit = { exists = scope:target } @@ -4381,7 +4366,7 @@ incite_revolts_interaction = { # } # add = 15 # } -# + # modifier = { # Increase chance for asking family # scope:recipient = { # OR = { @@ -4391,7 +4376,7 @@ incite_revolts_interaction = { # } # factor = 2 # } -# + # modifier = { # Decrease chance if army is small # trigger_if = { # limit = { exists = scope:target } @@ -4407,7 +4392,7 @@ incite_revolts_interaction = { # } # add = -50 # } -# + # modifier = { # Increase chance for rivalry # trigger_if = { # limit = { exists = scope:target } @@ -4421,7 +4406,7 @@ incite_revolts_interaction = { # } # add = 25 # } -# + # modifier = { # AI is extremely rich # short_term_gold >= ai_war_chest_desired_gold_value # add = 50 @@ -4739,7 +4724,7 @@ enforce_truce_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -4753,7 +4738,7 @@ enforce_truce_interaction = { scope:actor = { trigger_event = char_interaction.0236 } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:recipient TARGET = scope:actor VALUE = medium_unity_loss @@ -5092,7 +5077,7 @@ bargain_fealty_interaction = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -5106,7 +5091,7 @@ bargain_fealty_interaction = { scope:actor = { trigger_event = char_interaction.0236 } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:recipient TARGET = scope:actor VALUE = minor_unity_loss diff --git a/common/character_interactions/05_bp2_interactions.txt b/common/character_interactions/05_bp2_interactions.txt index dfc011831..3dcf23fe7 100644 --- a/common/character_interactions/05_bp2_interactions.txt +++ b/common/character_interactions/05_bp2_interactions.txt @@ -40,11 +40,31 @@ offer_hostage_interaction = { # Only significant rulers use hostages scope:recipient.highest_held_title_tier > tier_barony # Laamps can't do anything with hostages but return/recall them. + scope:actor = { + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + government_has_flag = government_is_herder + } + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } scope:recipient = { NOR = { government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant government_has_flag = government_is_herder } + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } } #Inside a merit realm vassals won't offer hostages except to your top liege. trigger_if = { @@ -253,18 +273,12 @@ offer_hostage_interaction = { } scope:actor = { trigger_event = char_interaction.0330 } # If we're of the same clan this interaction affects unity - if = { - limit = { - scope:actor = { government_has_flag = government_is_clan } - scope:actor.house = scope:recipient.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_hostage.desc - REVERSE_NON_HOUSE_TARGET = no - } + add_house_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_hostage.desc + REVERSE_NON_HOUSE_TARGET = no } } @@ -468,7 +482,25 @@ offer_hostage_interaction = { limit = { is_ai = yes } - NOT = { has_variable = conqueror } + NOR = { + government_has_flag = government_is_merchant + government_has_flag = government_is_herder + government_has_flag = government_is_theocracy + has_variable = conqueror + } + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + OR = { + is_landless_ruler = no + is_landless_administrative = yes + } + any_close_family_member = { + bp2_valid_to_offer_as_hostage_trigger = { SENDER = root } + } } } @@ -649,8 +681,25 @@ demand_hostage_interaction = { # Laamps can't do anything with hostages but return/recall them. NOR = { scope:actor = { government_has_flag = government_is_landless_adventurer } + scope:actor = { government_has_flag = government_is_merchant } scope:recipient = { government_has_flag = government_is_landless_adventurer } } + scope:actor = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } + scope:recipient = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } #Inside a merit realm vassals won't demand hostages. trigger_if = { limit = { @@ -897,18 +946,12 @@ demand_hostage_interaction = { } scope:actor = { trigger_event = char_interaction.0331 } # If we're of the same clan this interaction affects unity - if = { - limit = { - scope:actor = { government_has_flag = government_is_clan } - scope:actor.house = scope:recipient.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = minor_unity_loss - DESC = clan_unity_hostage.desc - REVERSE_NON_HOUSE_TARGET = no - } + add_house_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = minor_unity_loss + DESC = clan_unity_hostage.desc + REVERSE_NON_HOUSE_TARGET = no } } @@ -1353,8 +1396,25 @@ exchange_hostage_interaction = { # Laamps can't do anything with hostages but return/recall them. NOR = { scope:actor = { government_has_flag = government_is_landless_adventurer } + scope:actor = { government_has_flag = government_is_merchant } scope:recipient = { government_has_flag = government_is_landless_adventurer } } + scope:actor = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } + scope:recipient = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } #Inside a merit realm vassals won't exchange hostages. trigger_if = { limit = { @@ -1642,18 +1702,12 @@ exchange_hostage_interaction = { } scope:actor = { trigger_event = char_interaction.0332 } # If we're of the same clan this interaction affects unity - if = { - limit = { - scope:actor = { government_has_flag = government_is_clan } - scope:actor.house = scope:recipient.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_hostage.desc - REVERSE_NON_HOUSE_TARGET = no - } + add_house_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = medium_unity_loss + DESC = clan_unity_hostage.desc + REVERSE_NON_HOUSE_TARGET = no } scope:actor.house = { change_house_relation_effect = { diff --git a/common/character_interactions/06_ep3_interactions.txt b/common/character_interactions/06_ep3_interactions.txt index c4c7a048b..0c0824185 100644 --- a/common/character_interactions/06_ep3_interactions.txt +++ b/common/character_interactions/06_ep3_interactions.txt @@ -1151,10 +1151,9 @@ support_candidacy_interaction = { # No one promoting... ripe for the taking modifier = { + scope:major_influence_option = yes scope:target = { - holder = { - has_realm_law_flag = appointment_type_succession - } + has_order_of_succession = appointment current_heir ?= { NOR = { AND = { @@ -1177,28 +1176,33 @@ support_candidacy_interaction = { # Promote characters we like modifier = { + scope:major_influence_option = yes scope:secondary_recipient ?= house.house_confederation.leading_house.house_head factor = 5 } modifier = { + scope:major_influence_option = yes scope:secondary_recipient ?= { is_close_family_of = scope:actor } factor = 3 } modifier = { + scope:major_influence_option = yes scope:secondary_recipient ?= { is_extended_family_of = scope:actor } factor = 1.5 } modifier = { + scope:major_influence_option = yes scope:actor = { has_relation_friend = scope:secondary_recipient } factor = 2 } modifier = { + scope:major_influence_option = yes scope:actor = { has_relation_best_friend = scope:secondary_recipient } @@ -1207,6 +1211,7 @@ support_candidacy_interaction = { # For the imperial title, we want to promote ourselves modifier = { + scope:major_influence_option = yes scope:target.tier >= tier_empire scope:actor = scope:secondary_recipient factor = 5 @@ -1214,6 +1219,7 @@ support_candidacy_interaction = { # Prefer unlanded relatives modifier = { + scope:major_influence_option = yes scope:target.tier < tier_empire scope:secondary_recipient ?= { is_ruler = no @@ -1223,6 +1229,7 @@ support_candidacy_interaction = { # Prefer titles that are somewhat close to the capital modifier = { + scope:major_influence_option = yes exists = scope:recipient.capital_province # Make sure the top liege has a capital scope:target = { title_capital_county ?= { @@ -1237,6 +1244,7 @@ support_candidacy_interaction = { # Try to avoid promoting the same candidate for multiple titles if they are winning a title already modifier = { + scope:major_influence_option = yes scope:secondary_recipient ?= { any_heir_title = { is_noble_family_title = no @@ -1250,10 +1258,15 @@ support_candidacy_interaction = { # Promote only one house member for each title modifier = { + scope:major_influence_option = yes + scope:target = { has_order_of_succession = appointment } + scope:secondary_recipient ?= { + exists = house + exists = scope:actor.house + house = scope:actor.house + "appointment_candidate_accumulated_score(scope:target)" <= 0 + } scope:target = { - holder = { - has_realm_law_flag = appointment_type_succession - } any_title_heir = { exists = house exists = scope:actor.house @@ -1261,17 +1274,12 @@ support_candidacy_interaction = { "appointment_candidate_accumulated_score(scope:target)" > 0 } } - scope:secondary_recipient ?= { - exists = house - exists = scope:actor.house - house = scope:actor.house - "appointment_candidate_accumulated_score(scope:target)" <= 0 - } factor = 0 } # Don't outcompete our own house/candidate at the top, or someone we like in the top 3 modifier = { + scope:major_influence_option = yes scope:target = { any_title_heir = { save_temporary_scope_as = heir @@ -1283,12 +1291,6 @@ support_candidacy_interaction = { } OR = { AND = { - scope:target = { - place_in_line_of_succession = { - target = scope:heir - value = 1 - } - } OR = { scope:heir = scope:secondary_recipient AND = { @@ -1297,6 +1299,12 @@ support_candidacy_interaction = { scope:heir.house = scope:actor.house } } + scope:target = { + place_in_line_of_succession = { + target = scope:heir + value = 1 + } + } } scope:actor = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:heir } @@ -1309,6 +1317,7 @@ support_candidacy_interaction = { # Don't support someone who has renounced their aspirations for the throne modifier = { + scope:major_influence_option = yes scope:secondary_recipient = { OR = { has_character_modifier = ep3_admin_renounce_throne_personal @@ -1318,6 +1327,12 @@ support_candidacy_interaction = { scope:target.tier = scope:recipient.highest_held_title_tier factor = 0 } + + # The major option always wins because of the factor above, so we don't score the others + modifier = { + scope:major_influence_option = no + factor = 0 + } } } @@ -3898,8 +3913,6 @@ request_council_interaction = { OR = { has_relation_friend = scope:recipient has_relation_lover = scope:recipient - has_relation_best_friend = scope:recipient - has_relation_soulmate = scope:recipient } } } @@ -4162,6 +4175,7 @@ transfer_county_interaction = { custom_description = { text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch subject = scope:actor.diarch + object = scope:actor NAND = { # Only applies if we have an active diarchy. scope:actor = { has_active_diarchy = yes } @@ -4178,6 +4192,7 @@ transfer_county_interaction = { custom_description = { text = grant_titles_interaction_title_being_wagered + subject = scope:actor NOT = { scope:target = { has_variable = wagered_county } } @@ -4752,15 +4767,13 @@ castrate_child_interaction = { scope:actor = { remove_courtier_or_guest = scope:recipient if = { - limit = { - has_hook = scope:recipient - } + limit = { has_hook = scope:recipient } remove_hook = { target = scope:recipient } } scope:recipient = { - set_relation_rival = { - target = scope:actor - reason = rival_attempted_castration + set_relation_rival_effect = { + TARGET = scope:actor + REASON = rival_attempted_castration } add_stress = medium_stress_gain @@ -5789,6 +5802,11 @@ boost_efficiency_interaction = { trigger_if = { limit = { is_ai = yes } government_has_mechanic = administrative + is_adult = yes + trigger_if = { + limit = { exists = top_participant_group:dynastic_cycle } + top_participant_group:dynastic_cycle = { participant_group_type = advancement_movement } + } top_liege ?= { any_vassal = { is_governor = yes @@ -6064,6 +6082,13 @@ damage_efficiency_interaction = { trigger_if = { limit = { is_ai = yes } government_has_mechanic = administrative + is_adult = yes + trigger_if = { + limit = { exists = top_participant_group:dynastic_cycle } + top_participant_group:dynastic_cycle = { + NOT = { participant_group_type = advancement_movement } + } + } top_liege ?= { any_vassal = { is_governor = yes @@ -6597,7 +6622,6 @@ governor_removal_interaction = { house ?= scope:recipient.house } has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient is_allied_to = scope:recipient has_relation_soulmate = scope:recipient is_spouse_of = scope:recipient @@ -6621,7 +6645,6 @@ governor_removal_interaction = { house ?= scope:recipient.house } has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient is_allied_to = scope:recipient has_relation_soulmate = scope:recipient is_spouse_of = scope:recipient @@ -6836,6 +6859,18 @@ force_governor_removal_interaction = { ai_min_reply_days = 4 ai_max_reply_days = 9 + is_available = { + government_has_mechanic = administrative + trigger_if = { + limit = { + is_ai = yes + } + influence > massive_influence_value + } + is_independent_ruler = no + top_liege ?= { government_has_mechanic = administrative } + } + is_shown = { scope:secondary_recipient ?= { is_governor = yes @@ -6847,10 +6882,7 @@ force_governor_removal_interaction = { trigger_if = { limit = { top_liege = { - NAND = { - highest_held_title_tier >= tier_hegemony - government_has_flag = government_is_celestial - } + tgp_has_access_to_ministry_trigger = no } } is_vassal_of = scope:recipient @@ -7346,18 +7378,6 @@ force_governor_removal_interaction = { hegemony = 12 } - is_available = { - government_has_mechanic = administrative - trigger_if = { - limit = { - is_ai = yes - } - influence > massive_influence_value - } - top_liege != this - top_liege ?= { government_has_mechanic = administrative } - } - ai_accept = { base = -50 # SEND OPTIONS @@ -7639,7 +7659,7 @@ force_step_down_interaction = { government_has_mechanic = administrative trigger_if = { limit = { is_ai = yes } - highest_held_title_tier >= tier_duchy + highest_held_title_tier >= main_administrative_tier NOT = { any_scheme = { is_scheme_category = political @@ -7657,6 +7677,7 @@ force_step_down_interaction = { government_has_mechanic = administrative is_governor = yes top_liege ?= scope:actor.top_liege + highest_held_title_tier >= main_administrative_tier } } @@ -7793,10 +7814,12 @@ force_step_down_interaction = { } } if = { - limit = { can_set_relation_rival_trigger = { CHARACTER = scope:actor } } - set_relation_rival = { - target = scope:actor - reason = rival_forced_my_resignation_reason + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:actor } + } + set_relation_rival_effect = { + TARGET = scope:actor + REASON = rival_forced_my_resignation_reason } } house ?= { @@ -7847,10 +7870,12 @@ force_step_down_interaction = { modifier = attempted_force_step_down_opinion } if = { - limit = { can_set_relation_rival_trigger = { CHARACTER = scope:actor } } - set_relation_rival = { - target = scope:actor - reason = rival_attempted_to_force_my_resignation_reason + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:actor } + } + set_relation_rival_effect = { + TARGET = scope:actor + REASON = rival_attempted_to_force_my_resignation_reason } } } @@ -8186,10 +8211,6 @@ request_governorship_interaction = { cooldown_against_recipient = { years = 10 } - redirect = { - scope:recipient = { save_scope_as = secondary_recipient } - } - cost = { influence = { add = { @@ -8199,7 +8220,7 @@ request_governorship_interaction = { } desc = BASE } - # Province Size + # Settlement Size add = { value = 0 if = { @@ -8256,16 +8277,21 @@ request_governorship_interaction = { } is_shown = { - scope:recipient != scope:actor - OR = { - scope:recipient = scope:actor.top_liege - scope:recipient = { - liege ?= scope:actor.top_liege - has_title = title:e_minister_of_personnel - } - } scope:recipient = { government_has_mechanic = administrative + NOT = { this = scope:actor } + } + scope:actor.top_liege = { + OR = { + this = scope:recipient + trigger_if = { + limit = { + tgp_has_access_to_ministry_trigger = yes + exists = cp:minister_personnel + } + cp:minister_personnel = scope:recipient + } + } } } @@ -8273,14 +8299,19 @@ request_governorship_interaction = { if = { limit = { scope:actor.top_liege = { + this = scope:recipient # prevents redirect making this shown for everyone with same top_liege tgp_has_access_to_ministry_trigger = yes exists = cp:minister_personnel } } - title:e_minister_of_personnel.holder ?= { + scope:actor.top_liege.cp:minister_personnel ?= { save_scope_as = recipient + save_scope_as = secondary_recipient } } + else = { + scope:recipient = { save_scope_as = secondary_recipient } + } } is_valid_showing_failures_only = { @@ -8294,6 +8325,10 @@ request_governorship_interaction = { text = is_a_minister_desc tgp_is_any_minister = no } + trigger_if = { + limit = { government_allows = merit } + merit_level >= 3 + } } } @@ -8344,13 +8379,16 @@ request_governorship_interaction = { any_de_jure_county = { holder = scope:actor.top_liege } } } - trigger_if = { limit = { min_appointment_level > 0 } scope:actor = { has_appointment_level_for_title = scope:target } } + custom_tooltip = { # Titles below the holder's primary tier are inherited alongside it, so they cannot be contested on their own + text = follows_other_title_appointment_tt + holder ?= { primary_title.tier = scope:target.tier } + } } } @@ -8440,7 +8478,7 @@ request_governorship_interaction = { } desc = BASE } - # Province Size + # Settlement Size add = { value = 0 if = { @@ -8705,11 +8743,8 @@ request_governorship_interaction = { # Your Efficiency modifier = { add = { - value = { - value = scope:actor.governor_efficiency - multiply = 25 - } - round = yes + value = scope:actor.governor_efficiency_presented + multiply = 0.5 } desc = AI_GOVERNOR_EFFICIENCY } @@ -8722,10 +8757,9 @@ request_governorship_interaction = { } add = { value = { - value = scope:target.current_heir.governor_efficiency - multiply = -50 + value = scope:target.current_heir.governor_efficiency_presented + multiply = -1 } - round = yes } desc = AI_GOVERNOR_EFFICIENCY_HEIR } @@ -11055,7 +11089,7 @@ request_co_emperor_interaction = { desc = declare_me_regent_interaction.tt.actor_is.close_family is_close_family_of = scope:actor # Make sure this isn't cancelled out by the incumbent sharing the relation. - diarchy_successor = { + diarchy_successor ?= { NOT = { is_close_family_of = scope:recipient } } } @@ -11065,7 +11099,7 @@ request_co_emperor_interaction = { desc = declare_me_regent_interaction.tt.actor_is.extended_family is_extended_family_of = scope:actor # Make sure this isn't cancelled out by the incumbent sharing the relation. - diarchy_successor = { + diarchy_successor ?= { NOT = { is_extended_family_of = scope:recipient } } } @@ -11076,7 +11110,7 @@ request_co_emperor_interaction = { house = scope:actor.house NOT = { is_close_or_extended_family_of = scope:actor } # Make sure this isn't cancelled out by the incumbent sharing the relation. - diarchy_successor = { + diarchy_successor ?= { house != scope:recipient.house } } @@ -12799,6 +12833,17 @@ ep3_hof_ask_for_influence_interaction = { } desc = you_have_faithful_nobles_attribute_with_value_desc } + + modifier = { + add = 40 + scope:actor = { has_character_modifier = favored_by_pope_modifier } + desc = FAVORED_BY_POPE + } + modifier = { + add = -40 + scope:actor = { has_character_modifier = scorned_pope_modifier } + desc = HAS_SCORNED_POPE + } secular_to_ecclesiastical_pam_factors_acceptance_modifier = yes modifier = { diff --git a/common/character_interactions/06_ep3_laamp_interactions.txt b/common/character_interactions/06_ep3_laamp_interactions.txt index 4aa698406..0f0e56321 100644 --- a/common/character_interactions/06_ep3_laamp_interactions.txt +++ b/common/character_interactions/06_ep3_laamp_interactions.txt @@ -6,7 +6,6 @@ purchase_land_interaction = { category = interaction_category_laamp icon = purchase_land_interaction - desc = purchase_land_interaction_desc target_type = title target_filter = recipient_de_jure_titles @@ -17,7 +16,7 @@ purchase_land_interaction = { first_valid = { triggered_desc = { trigger = { - scope:recipient = { top_liege != this } + scope:recipient.top_liege != this scope:target = { trigger_if = { limit = { tier = tier_duchy } @@ -61,33 +60,23 @@ purchase_land_interaction = { } is_shown = { - has_ep3_dlc_trigger = yes + scope:actor = { + this != scope:recipient + } scope:recipient = { is_landed = yes # Need to own the land/cannot directly buy a governorship (procure estate first) - NOT = { government_allows = noble_families } + NOR = { + government_allows = noble_families + government_has_flag = government_is_republic # join instead + } } - scope:recipient != scope:actor } has_valid_target = { custom_tooltip = { #prevent unwanted trigger tooltip text = blank_line - scope:target ?= { - is_title_created = yes - holder = { - is_ai = yes - this = scope:recipient - } - OR = { #flatten the selection - tier = tier_duchy - tier = tier_county - } - NOR = { - this = scope:recipient.capital_county - this = scope:recipient.capital_county.duchy - } - } + scope:target ?= { is_purchasable_title_trigger = yes } } } @@ -100,9 +89,7 @@ purchase_land_interaction = { send_option = { flag = hook is_valid = { - scope:actor = { - has_usable_hook = scope:recipient - } + scope:actor = { has_usable_hook = scope:recipient } } localization = GENERIC_SPEND_A_HOOK } @@ -111,9 +98,7 @@ purchase_land_interaction = { flag = offer_hook is_valid = { NOT = { - scope:recipient = { - has_usable_hook = scope:actor - } + scope:recipient = { has_usable_hook = scope:actor } } } localization = purchase_land_interaction_offer_hook @@ -123,53 +108,17 @@ purchase_land_interaction = { send_option = { flag = vassal_obligation is_shown = { - scope:recipient = { - government_has_flag = government_is_feudal - } + scope:recipient = { government_has_flag = government_is_feudal } } localization = purchase_land_interaction_offer_obligations current_description = purchase_land_interaction_offer_obligations_desc } can_be_picked_title = { - custom_tooltip = { - text = purchase_land_tier_tt - scope:target = { - tier >= tier_county - tier <= tier_duchy - } - } - custom_tooltip = { - text = purchase_land_capital_tt - scope:target != scope:recipient.capital_county - } - custom_tooltip = { - text = purchase_land_primary_tt - scope:target != scope:recipient.primary_title - } - custom_tooltip = { - text = purchase_land_duchy_tt - scope:target = { - trigger_if = { - limit = { tier = tier_duchy } - scope:actor = { - prestige_level >= 3 - } - } - } - } - custom_tooltip = { - text = PURCHASE_LAND_COMPLETE_CONTROL_TT - trigger_if = { - limit = { scope:target = { tier = tier_duchy } } - scope:recipient = { - completely_controls = scope:target - } - } - } - trigger_if = { - limit = { exists = scope:target.holder } - scope:target.holder = scope:recipient + is_title_purchasable_shared_trigger = { + TITLE = scope:target + BUYER = scope:actor + SELLER = scope:recipient } } @@ -184,64 +133,17 @@ purchase_land_interaction = { } scope:recipient = { is_contact_of = scope:actor - is_at_war = no - NOT = { has_strong_hook = scope:actor } - } - trigger_if = { # Can't purchase Baronies - limit = { - scope:target ?= { tier = tier_barony } - } - custom_description = { - text = purchase_land_barony_tt - always = no - } - } - trigger_if = { # Can't purchase Kingdoms or Empires - limit = { - scope:target ?= { tier >= tier_kingdom } - } - custom_description = { - text = purchase_land_kingdom_tt - always = no - } - } - trigger_if = { # Can't purchase HoF titles - limit = { - scope:target ?= { is_head_of_faith = yes } - } - custom_description = { - text = purchase_land_religious_tt - always = no - } - } - trigger_if = { # Can't purchase nf titles - limit = { - scope:target ?= { is_noble_family_title = yes } - } - custom_description = { - text = purchase_land_noble_family_tt - always = no - } - } - trigger_if = { # Can't purchase laamp titles - limit = { - scope:target ?= { has_variable = adventurer_creation_reason } - } - custom_description = { - text = purchase_land_landless_adventurer_tt - always = no + custom_tooltip = { + text = purchase_land_no_land_tt + any_held_title = { is_purchasable_title_trigger = yes } } } trigger_if = { - limit = { - scope:recipient = { - any_held_county = { count < 2 } - } - } - custom_description = { - text = purchase_land_minimum_county_tt - object = scope:recipient - always = no + limit = { exists = scope:target } + is_title_purchase_valid_shared_trigger = { + TITLE = scope:target + BUYER = scope:actor + SELLER = scope:recipient } } #Has to be used instead of diplo range checks in laamp to landed interactions @@ -290,102 +192,12 @@ purchase_land_interaction = { } on_accept = { - scope:actor = { save_scope_as = adventurer } - scope:target = { - save_scope_as = purchase_land_target - add_to_list = purchased_titles - if = { - limit = { tier = tier_duchy } - every_de_jure_county = { - limit = { - holder ?= { - OR = { - this = scope:recipient - target_is_liege_or_above = scope:recipient - } - } - } - if = { - limit = { holder = scope:recipient } - add_to_list = purchased_titles - } - else_if = { - limit = { - holder ?= { - highest_held_title_tier < scope:purchase_land_target.tier - NOT = { government_has_flag = government_is_administrative } - target_is_liege_or_above = scope:recipient - } - } - holder = { - if = { - limit = { - NOT = { is_in_list = purchase_land_vassals_taken } - } - add_to_list = purchase_land_vassals_taken - } - } - } - else = { - add_to_list = purchased_titles - } - } - } - } - ordered_in_list = { - list = purchased_titles - order_by = tier - save_scope_as = new_primary_title - } - save_scope_value_as = { - name = purchase_land_cost - value = { - if = { - limit = { scope:target.tier = tier_county } - add = purchase_land_county_cost_value - } - else = { - add = purchase_land_duchy_cost_value - scope:target = { - every_de_jure_county = { - limit = { ep3_purchase_land_valid_county_trigger = yes } - add = purchase_land_county_cost_value - } - } - } - if = { - limit = { - scope:actor = { has_variable = ep3_grace_to_the_family_var } - } - multiply = 0.5 - } - if = { - limit = { scope:offer_gold = yes } - multiply = 2 - } - } - } - save_scope_value_as = { - name = purchase_land_legitimacy_cost - value = { - value = 0 - if = { - limit = { - scope:target.holder != scope:recipient - } - every_in_list = { - list = purchased_titles - if = { - limit = { tier = tier_county } - add = minor_legitimacy_loss - } - else = { add = medium_legitimacy_loss } - } - } - } - } + purchase_land_interaction_save_scopes_effect = yes show_as_tooltip = { - scope:actor = { purchase_land_interaction_effect = yes } + purchase_land_interaction_shortened_effect = { + TITLE_RECEIVER = scope:actor + TITLE_GIVER = scope:recipient + } } if = { limit = { always = scope:hook } @@ -400,10 +212,7 @@ purchase_land_interaction = { } on_decline = { - scope:actor = { - save_scope_as = adventurer - trigger_event = ep3_laamps.0102 - } + scope:actor = { trigger_event = ep3_laamps.0102 } } ai_targets = { @@ -420,7 +229,7 @@ purchase_land_interaction = { ai_frequency_by_tier = { barony = 0 county = 0 - duchy = 60 + duchy = 60 # adventurers are dukes kingdom = 0 empire = 0 hegemony = 0 @@ -464,7 +273,7 @@ purchase_land_interaction = { value = 0 if = { limit = { scope:target.tier = tier_county } - add = scope:target.development_level + add = scope:target.prosperity_level scope:target = { every_county_province = { add = num_buildings } } @@ -473,7 +282,7 @@ purchase_land_interaction = { scope:target = { every_de_jure_county = { limit = { ep3_purchase_land_valid_county_trigger = yes } - add = development_level + add = prosperity_level every_county_province = { add = num_buildings } } } @@ -1113,7 +922,10 @@ purchase_sacred_land_interaction = { } } show_as_tooltip = { - scope:actor = { purchase_land_interaction_effect = yes } + purchase_land_interaction_effect = { + TITLE_RECEIVER = scope:actor + TITLE_GIVER = scope:recipient + } } scope:actor = { if = { @@ -1197,7 +1009,7 @@ purchase_sacred_land_interaction = { value = 0 if = { limit = { exists = scope:target } - add = scope:target.development_level + add = scope:target.prosperity_level scope:target = { every_county_province = { add = num_buildings } } @@ -1420,7 +1232,7 @@ request_laamp_invasion_sponsorship_interaction = { is_shown = { scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } NOT = { scope:actor = { has_realm_law = camp_purpose_legitimists } } - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient = { is_landed = yes } scope:recipient != scope:actor } @@ -1905,7 +1717,7 @@ negotiate_settlement_interaction = { } } is_landed = yes - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes } is_shown = { @@ -2008,6 +1820,15 @@ negotiate_settlement_interaction = { always = no } } + trigger_if = { # Can't purchase merchant titles + limit = { + scope:target ?= { has_variable = merchant_creation_reason } + } + custom_description = { + text = negotiate_settlement_merchant_tt + always = no + } + } trigger_if = { limit = { scope:actor = { government_has_flag = government_is_administrative } @@ -2319,7 +2140,7 @@ negotiate_settlement_interaction = { value = 0 if = { limit = { scope:target.tier = tier_county } - add = scope:target.development_level + add = scope:target.prosperity_level scope:target = { every_county_province = { add = num_buildings } } @@ -2328,7 +2149,7 @@ negotiate_settlement_interaction = { scope:target = { every_de_jure_county = { limit = { ep3_negotiate_settlement_valid_county_trigger = yes } - add = development_level + add = prosperity_level every_county_province = { add = num_buildings } } } @@ -2813,13 +2634,13 @@ negotiate_settlement_interaction = { limit = { scope:target.tier = tier_county } - subtract = scope:target.development_level + subtract = scope:target.prosperity_level } if = { limit = { scope:target.tier > tier_county } - subtract = scope:target.title_capital_county.development_level + subtract = scope:target.title_capital_county.prosperity_level } } } @@ -3221,7 +3042,7 @@ complete_task_contract_interaction = { pause_on_receive = yes is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:actor = { any_character_active_contract = { OR = { @@ -3440,7 +3261,7 @@ contact_list_request_interaction = { # make a request, make_a_request is_shown = { scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:actor != scope:recipient } is_valid_showing_failures_only = { @@ -3450,7 +3271,6 @@ contact_list_request_interaction = { # make a request, make_a_request NOR = { is_at_war_with = scope:actor has_relation_rival = scope:actor - has_relation_nemesis = scope:actor has_opinion_modifier = { target = scope:actor modifier = released_from_prison @@ -3934,7 +3754,7 @@ contact_list_request_interaction = { # make a request, make_a_request name = provisions_transformed_to_gold_value value = { value = scope:provisions_overflow_value - multiply = 0.05 + multiply = 0.02 } } } @@ -3996,7 +3816,7 @@ contact_list_request_interaction = { # make a request, make_a_request name = requested_gold_value value = { value = scope:recipient.gold - divide = 4 + divide = 8 multiply = { value = scope:recipient.ai_greed divide = -300 @@ -4626,6 +4446,7 @@ contact_list_request_interaction = { # make a request, make_a_request } ai_targets = { ai_recipients = contacts } ai_targets = { ai_recipients = hooked_characters } + ai_target_quick_trigger = { adult = yes } auto_accept = { scope:actor = { has_usable_hook = scope:recipient } scope:recipient = { is_ai = yes } @@ -5164,7 +4985,7 @@ reinforce_soldiers_interaction = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient = scope:actor } @@ -5418,15 +5239,33 @@ hire_laamp_mercenaries_interaction = { is_available = { trigger_if = { limit = { is_ai = yes } + debt_level <= 1 any_character_war = { is_war_leader = prev } war_chest_gold >= quarter_ai_war_chest_gold_maximum + any_war_ally = { + count < 3 + has_government = landless_adventurer_government + } + any_character_war = { + count = all + OR = { + AND = { + primary_attacker = root + defender_war_score <= 95 + } + AND = { + primary_defender = root + attacker_war_score <= 95 + } + } + } } } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient = { OR = { has_government = landless_adventurer_government @@ -5479,6 +5318,11 @@ hire_laamp_mercenaries_interaction = { has_government = landless_minority_government } } + custom_tooltip = { + at_mercenary_limit = yes + text = MERCENARY_HIRE_LIMIT_REACHED + } + } } scope:puppet_or_actor = { @@ -5610,7 +5454,7 @@ hire_laamp_mercenaries_interaction = { value = scope:puppet_or_actor } } - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = medium_unity_gain @@ -5654,7 +5498,7 @@ hire_laamp_mercenaries_interaction = { # add = 1 # } #} - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:puppet_or_actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -5686,6 +5530,15 @@ hire_laamp_mercenaries_interaction = { empire = 6 hegemony = 6 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 36 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_targets = { ai_recipients = nearby_domicile_owners } @@ -6161,7 +6014,7 @@ refill_maa_interaction = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient = scope:actor } @@ -6312,7 +6165,7 @@ evict_adventurer_interaction = { is_shown = { scope:puppet_or_actor ?= { is_landed = yes } - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient != scope:puppet_or_actor scope:recipient = { OR = { @@ -6694,7 +6547,7 @@ procure_estate_interaction = { is_shown = { scope:actor = { OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } } - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient = { is_landed = yes government_allows = noble_families @@ -7375,7 +7228,7 @@ request_laamp_legitimist_support = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:recipient = { is_landed = yes is_ai = yes @@ -7404,12 +7257,8 @@ request_laamp_legitimist_support = { NOT = { any_claim = { OR = { - holder = { - this = scope:recipient - } - holder.top_liege = { - this = scope:recipient - } + holder ?= scope:recipient + holder.top_liege ?= scope:recipient } } } @@ -7646,7 +7495,7 @@ task_contract_train_knight_interaction = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes scope:actor = { any_character_active_contract = { task_contract_type = laamp_help_train_commanders_contract diff --git a/common/character_interactions/09_mpo_interactions.txt b/common/character_interactions/09_mpo_interactions.txt index 49816a692..136ff6b79 100644 --- a/common/character_interactions/09_mpo_interactions.txt +++ b/common/character_interactions/09_mpo_interactions.txt @@ -33,6 +33,7 @@ } } age >= 6 + is_imprisoned = no } is_playable_character = yes } @@ -732,6 +733,7 @@ } has_trait = denounced has_trait = disinherited + has_trait = adopted_no_inheritance } } } @@ -1430,7 +1432,7 @@ scope:actor = { custom_tooltip = create_confederation_tt custom_tooltip = confederation_defensive_wars_tt - custom_tooltip = unlock_leave_confederation_interaction_tt + custom_tooltip = unlock_leave_confederation_decision_tt if = { limit = { government_has_flag = government_is_nomadic @@ -2546,6 +2548,7 @@ migration_interaction = { } desc = migration_interaction_desc + notification_text = migration_interaction_notification is_available = { government_has_flag = government_is_nomadic @@ -2563,6 +2566,7 @@ migration_interaction = { is_imprisoned = no is_independent_ruler = yes is_travelling = no + has_raised_armies = no custom_tooltip = { text = no_primary_wars_tt NOT = { @@ -4301,6 +4305,10 @@ mpo_interaction_leverage_khan_authority = { NOT = { has_character_flag = established_paiza_system } + any_character_artifact = { + has_variable = paiza_patron + root = { can_benefit_from_artifact = prev } + } } is_shown = { @@ -4308,8 +4316,12 @@ mpo_interaction_leverage_khan_authority = { is_ai = yes is_gurkhan = no age >= 12 - NOT = { - has_character_flag = established_paiza_system + NOT = { has_character_flag = established_paiza_system } + # Implied by the artifact check below: a paiza only benefits while its patron is the gurkhan + OR = { + top_liege ?= situation:the_great_steppe.situation_top_herd + AND = { is_independent_ruler = yes primary_title.tier < scope:actor.primary_title.tier government_has_flag = government_is_nomadic } + liege ?= { government_has_flag = government_is_nomadic } } } scope:actor = { @@ -4318,19 +4330,10 @@ mpo_interaction_leverage_khan_authority = { scope:actor = { can_benefit_from_artifact = prev } OR = { scope:recipient.top_liege ?= var:paiza_patron - scope:recipient = { - is_independent_ruler = yes - primary_title.tier < scope:actor.primary_title.tier + scope:recipient = { is_independent_ruler = yes primary_title.tier < scope:actor.primary_title.tier government_has_flag = government_is_nomadic } + scope:recipient.liege ?= { government_has_flag = government_is_nomadic } - scope:recipient = { - liege = { - OR = { - government_has_flag = government_is_nomadic - scope:recipient.top_liege ?= prev.var:paiza_patron - } - } - } } } } @@ -4441,20 +4444,35 @@ mpo_interaction_leverage_khan_authority = { } modifier = { add = -10 - var:paiza_patron ?= { - domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_1 } + scope:actor = { + any_character_artifact = { + scope:actor = { can_benefit_from_artifact = prev } + var:paiza_patron ?= { + domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_1 } + } + } } } modifier = { add = -20 - var:paiza_patron ?= { - domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_2 } + scope:actor = { + any_character_artifact = { + scope:actor = { can_benefit_from_artifact = prev } + var:paiza_patron ?= { + domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_2 } + } + } } } modifier = { add = -35 - var:paiza_patron ?= { - domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_3 } + scope:actor = { + any_character_artifact = { + scope:actor = { can_benefit_from_artifact = prev } + var:paiza_patron ?= { + domicile ?= { has_domicile_parameter = nomad_yurt_paiza_abuse_less_likely_lvl_3 } + } + } } } } @@ -4471,17 +4489,21 @@ mpo_interaction_leverage_khan_authority = { title = mpo_interaction_leverage_khan_authority make_obedient_recipient_to_actor_effect = yes scope:recipient = { - pay_short_term_gold = { - target = scope:actor - gold = { - value = current_gold_value - divide = 2 + if = { + limit = { gold > 0 } + pay_short_term_gold = { + target = scope:actor + gold = { + value = current_gold_value + divide = 2 + } } } if = { limit = { government_has_flag = government_is_nomadic - scope:recipient = { + domicile ?= { herd > 0 } + scope:actor = { government_has_flag = government_is_nomadic } } @@ -4508,22 +4530,6 @@ mpo_interaction_leverage_khan_authority = { add_prestige = minor_prestige_value } } - - if = { - limit = { - government_has_flag = government_is_nomadic - scope:recipient = { - government_has_flag = government_is_nomadic - } - } - pay_herd = { - target = scope:actor - value = { - value = domicile.herd - multiply = 0.5 - } - } - } } scope:actor = { @@ -6874,7 +6880,7 @@ mpo_make_blood_brother = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_gain @@ -6954,7 +6960,7 @@ mpo_make_blood_brother = { } # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { + add_house_unity_interaction_effect = { CHARACTER = scope:actor TARGET = scope:recipient VALUE = minor_unity_loss @@ -7176,7 +7182,7 @@ feudalize_nomadic_holding_interaction = { } trigger_else = { custom_description = { - text = "feudalize_nomadic_holding_interaction_title_not_county_or_below" + text = "feudalize_holding_interaction_title_not_county_or_below" always = no } } @@ -7189,7 +7195,7 @@ feudalize_nomadic_holding_interaction = { limit = { tier <= tier_county } title_province = { barony_controller = scope:actor - has_ongoing_construction = no + has_ongoing_holding_construction = no } } } @@ -7319,7 +7325,7 @@ feudalize_herder_holding_interaction = { } trigger_else = { custom_description = { - text = "feudalize_herder_holding_interaction_title_not_county_or_below" + text = "feudalize_holding_interaction_title_not_county_or_below" always = no } } @@ -7332,7 +7338,7 @@ feudalize_herder_holding_interaction = { limit = { tier <= tier_county } title_province = { barony_controller = scope:actor - has_ongoing_construction = no + has_ongoing_holding_construction = no } } } @@ -7498,10 +7504,7 @@ mpo_retrieve_land_from_herder_interaction = { is_vassal_of = scope:actor } } - custom_tooltip = { - text = mpo_retrieve_land_migration_tt - capital_county = { is_migration_target = no } - } + capital_county = { is_migration_target = no } } } @@ -8043,9 +8046,7 @@ mpo_gift_herd_interaction = { } has_secret_relation_lover = scope:actor has_relation_lover = scope:actor - has_relation_soulmate = scope:actor has_relation_friend = scope:actor - has_relation_best_friend = scope:actor } domicile.herd < minor_herd_value_static } @@ -8053,9 +8054,7 @@ mpo_gift_herd_interaction = { OR = { has_secret_relation_lover = scope:actor has_relation_lover = scope:actor - has_relation_soulmate = scope:actor has_relation_friend = scope:actor - has_relation_best_friend = scope:actor } scope:actor = { OR = { @@ -8086,7 +8085,6 @@ mpo_gift_herd_interaction = { OR = { scope:actor.liege ?= this has_relation_friend = scope:actor - has_relation_best_friend = scope:actor is_allied_to = scope:actor is_close_or_extended_family_of = scope:actor } @@ -8361,7 +8359,6 @@ mpo_offer_submission_or_ruin = { ceiling = yes } } - # TRAITS/PERSONALITY modifier = { # Ambitious desc = TAKE_THE_VOWS_AMBITIOUS @@ -9861,6 +9858,7 @@ join_confederation_interaction = { } has_trait = denounced has_trait = disinherited + has_trait = adopted_no_inheritance } } } @@ -10306,7 +10304,7 @@ join_confederation_interaction = { scope:actor = { custom_tooltip = join_confederation_recipient_tt custom_tooltip = confederation_defensive_wars_tt - custom_tooltip = unlock_leave_confederation_interaction_tt + custom_tooltip = unlock_leave_confederation_decision_tt } } if = { diff --git a/common/character_interactions/10_tgp_test_interactions.txt b/common/character_interactions/10_tgp_test_interactions.txt index e54b68eef..a2246d734 100644 --- a/common/character_interactions/10_tgp_test_interactions.txt +++ b/common/character_interactions/10_tgp_test_interactions.txt @@ -1,12 +1,11 @@ ### Apply some impact to the relation between two houses. # debug_impact_house_relation_interaction = { - category = interaction_debug_tgp + category = interaction_debug_extra desc = debug_impact_house_relation_interaction_desc use_diplomatic_range = no ignores_pending_interaction_block = yes icon = debug_chars - common_interaction = yes is_shown = { debug_only = yes @@ -162,10 +161,9 @@ debug_impact_house_relation_interaction = { debug_spawn_natural_disaster = { - category = interaction_debug_tgp + category = interaction_debug_extra use_diplomatic_range = no ignores_pending_interaction_block = yes - common_interaction = yes icon = debug_bad auto_accept = yes is_shown = { @@ -248,10 +246,9 @@ debug_spawn_natural_disaster = { debug_change_bloc_cohesion = { - category = interaction_debug_tgp + category = interaction_debug_extra use_diplomatic_range = no ignores_pending_interaction_block = yes - common_interaction = yes icon = icon_leave_bloc auto_accept = yes is_shown = { diff --git a/common/character_interactions/pam_interactions.txt b/common/character_interactions/pam_interactions.txt index 50e698873..b090e4d1d 100644 --- a/common/character_interactions/pam_interactions.txt +++ b/common/character_interactions/pam_interactions.txt @@ -1,5 +1,4 @@ #designate_theocratic_heir -#filial_piety_request_child_gold #increase_theocratic_heir_candidacy #influence_clerical_candidacy_interaction #support_clerical_candidacy_interaction @@ -26,8 +25,6 @@ #request_ecclesiastical_treasury_interaction #request_enforce_succession_interaction #increase_papabile_score_interaction -#seek_communion_interaction -#pam_destroy_monastic_order_interaction # Appoint Cardinal Interaction @@ -56,6 +53,14 @@ designate_theocratic_heir_interaction = { scope:puppet_or_actor.house ?= house is_close_or_extended_family_of = scope:puppet_or_actor } + NOR = { + is_consort_of = scope:puppet_or_actor + betrothed ?= scope:puppet_or_actor + } + trigger_if = { + limit = { has_game_rule = no_adoption } + is_child_of = scope:puppet_or_actor + } } } @@ -327,7 +332,6 @@ designate_theocratic_heir_interaction = { } } } - filial_piety_request_child_gold_interaction = { category = interaction_category_friendly icon = icon_gold @@ -892,6 +896,27 @@ influence_clerical_candidacy_interaction = { } } pam_clerical_self_candidacy_restriction_trigger = yes + trigger_if = { + limit = { + exists = scope:secondary_recipient + exists = scope:target + scope:secondary_recipient != scope:actor + # Same upward path pam_clerical_self_candidacy_restriction_trigger allows for yourself + NOT = { + scope:target = { + OR = { + this = title:d_et_constantinople + is_head_of_faith = yes + holder ?= { faith.religious_head ?= this } + } + } + } + } + custom_tooltip = { + text = pam_clerical_region_holder_recipient_tt + scope:secondary_recipient = { pam_is_clerical_region_holder_trigger = no } + } + } trigger_if = { limit = { pam_clerical_candidacy_reach_limited_trigger = yes @@ -1198,7 +1223,6 @@ influence_clerical_candidacy_interaction = { } } } - } # Christian Situation Catalysts if = { @@ -1231,6 +1255,16 @@ influence_clerical_candidacy_interaction = { trigger_situation_catalyst = catalyst_clergy_influenced_own_candidacy } } + } + if = { + limit = { + scope:actor = { + is_guelph_or_ghibelline_trigger = yes + NOT = { government_has_flag = government_is_ecclesiastical } + } + } + gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_lay_investiture } + } } } @@ -1251,23 +1285,19 @@ influence_head_of_faith_candidacy_interaction = { is_available = { has_pam_dlc_trigger = yes # Mirrors the religious_head_titles filter, so a faith whose head titles are all filled by conclave or inheritance hides the interaction instead of opening an empty picker - faith ?= { - OR = { - religious_head_title ?= { pam_head_of_faith_candidacy_valid_title_trigger = yes } - any_faith_rite = { - head_of_rite ?= { - is_ruler = yes - primary_title ?= { pam_head_of_faith_candidacy_valid_title_trigger = yes } - } - } + OR = { + faith.religious_head_title ?= { pam_head_of_faith_candidacy_valid_title_trigger = yes } + rite.head_of_rite ?= { + is_ruler = yes + primary_title ?= { pam_head_of_faith_candidacy_valid_title_trigger = yes } } } } is_shown = { scope:secondary_recipient ?= { + faith = scope:actor.faith this != faith.main_rite.head_of_rite - faith ?= scope:actor.faith is_clerical_appointment_valid_base_trigger = { CANDIDATE = scope:secondary_recipient TOP_LIEGE = scope:actor @@ -1295,6 +1325,15 @@ influence_head_of_faith_candidacy_interaction = { TOP_LIEGE = scope:actor } } + trigger_if = { # must be same rite to take head of rite title + limit = { + NOT = { scope:secondary_recipient.faith.religious_head_title ?= scope:target } + } + custom_tooltip = { + text = influence_clerical_candidacy_interaction_same_rite_actor_tt + scope:secondary_recipient.rite = scope:actor.rite + } + } } pam_clerical_self_candidacy_restriction_trigger = yes } @@ -1304,9 +1343,16 @@ influence_head_of_faith_candidacy_interaction = { limit = { exists = scope:secondary_recipient } custom_tooltip = { text = influence_clerical_candidacy_interaction_already_holds_title_tt - scope:target = { - holder != scope:secondary_recipient - } + scope:target.holder != scope:secondary_recipient + } + } + trigger_if = { # must be same rite to take head of rite title + limit = { + NOT = { scope:secondary_recipient.faith.religious_head_title ?= scope:target } + } + custom_tooltip = { + text = influence_clerical_candidacy_interaction_same_rite_target_tt + scope:target.holder.rite ?= scope:secondary_recipient.rite } } influence_head_of_faith_candidacy_target_trigger = yes @@ -1826,6 +1872,15 @@ support_clerical_candidacy_interaction = { } } } + if = { + limit = { + scope:actor = { + is_guelph_or_ghibelline_trigger = yes + NOT = { government_has_flag = government_is_ecclesiastical } + } + } + gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_lay_investiture } + } # Christian Situation Catalysts if = { @@ -3216,6 +3271,15 @@ sway_courtier_to_my_rite_interaction = { empire = 24 hegemony = 24 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 360 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 25 @@ -3692,6 +3756,7 @@ sway_vassal_to_my_rite_interaction = { } } +# Persuade another ruler of the same faith to adopt your rite # Clergy outreach: persuade rulers of your diocese, bordering realms, fellow prelates, or your liege to adopt your rite sway_ruler_to_my_rite_interaction = { category = interaction_category_religion @@ -4733,26 +4798,8 @@ appoint_cardinal_interaction = { } } } - scope:recipient = { - custom_tooltip = { - text = appoint_cardinal_interaction_accept_tt - hidden_effect = { - grant_cardinal_title_effect = { CARDINAL_COUNTY = capital_county } - } - } - } scope:puppet_or_actor = { show_as_tooltip = { add_piety = medium_piety_gain } - hidden_effect = { - send_interface_toast = { - type = event_toast_effect_good - title = appoint_cardinal_interaction_toast - left_icon = scope:recipient - right_icon = scope:cardinalate - custom_tooltip = appoint_cardinal_interaction_accept_title_tt - add_piety = medium_piety_value - } - } if = { limit = { scope:recipient = { pam_is_monastic_order_member_trigger = yes } @@ -4783,6 +4830,26 @@ appoint_cardinal_interaction = { } } } + scope:recipient = { + custom_tooltip = { + text = appoint_cardinal_interaction_accept_tt + hidden_effect = { + grant_cardinal_title_effect = { CARDINAL_COUNTY = capital_county } + } + } + } + scope:puppet_or_actor = { + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = appoint_cardinal_interaction_toast + left_icon = scope:recipient + right_icon = scope:cardinalate + custom_tooltip = appoint_cardinal_interaction_accept_title_tt + add_piety = medium_piety_value + } + } + } if = { limit = { scope:is_puppet_action ?= yes @@ -5041,6 +5108,15 @@ appoint_cardinal_interaction = { any_clerical_elector_title = { count >= 40 } } } + modifier = { + factor = 0.1 + scope:puppet_or_actor = { + is_ghibelline_trigger = no + } + scope:recipient = { + is_ghibelline_or_close_family_of_ghibelline_leader_trigger = yes + } + } modifier = { factor = 0 scope:recipient = { @@ -5225,7 +5301,7 @@ request_court_chaplain_cardinalate_interaction = { } custom_tooltip = { text = request_court_chaplain_cardinalate_becomes_clerical_puppet_tt - scope:actor = { fire_councillor = scope:new_cardinal } + scope:actor = { if = { limit = { scope:new_cardinal = { is_councillor_of = scope:actor } } fire_councillor = scope:new_cardinal } } scope:new_cardinal = { pam_make_clerical_ruler_puppet_effect = { PUPPETEER = scope:actor } } @@ -5234,7 +5310,7 @@ request_court_chaplain_cardinalate_interaction = { else = { custom_tooltip = { text = request_court_chaplain_cardinalate_leaves_council_tt - scope:actor = { fire_councillor = scope:new_cardinal } + scope:actor = { if = { limit = { scope:new_cardinal = { is_councillor_of = scope:actor } } fire_councillor = scope:new_cardinal } } } } scope:new_cardinal = { @@ -5429,6 +5505,18 @@ request_court_chaplain_cardinalate_interaction = { desc = COURT_CHAPLAIN_DEVOTED } + modifier = { + add = -50 + scope:recipient = { + is_ghibelline_trigger = no + } + exists = scope:actor.cp:councillor_court_chaplain + scope:actor.cp:councillor_court_chaplain = { + is_ghibelline_or_close_family_of_ghibelline_leader_trigger = yes + } + desc = COURT_CHAPLAIN_GHIBELLINE_TIES + } + # A chaplain of no standing is not Cardinal material modifier = { add = -25 @@ -5455,7 +5543,6 @@ request_court_chaplain_cardinalate_interaction = { } } } -# Destroy Cardinalate Interaction destroy_cardinalate_interaction = { category = interaction_category_religion icon = cardinal @@ -5670,7 +5757,7 @@ give_cardinal_order_interaction = { } trigger_else = { pam_leads_college_of_cardinals_trigger = yes - #If they are a puppet of their liege the HoF cannot use this interaction + #If they are a compliant puppet to their liege the HoF cannot use this interaction NOT = { scope:recipient.liege.puppet:theological_agent_puppet ?= scope:recipient } @@ -5718,8 +5805,8 @@ give_cardinal_order_interaction = { } } - send_option = { #Improve Development - flag = cardinal_improve_development + send_option = { #Improve Prosperity + flag = cardinal_improve_prosperity is_valid = { scope:recipient = { capital_county ?= { @@ -5771,7 +5858,7 @@ give_cardinal_order_interaction = { text = cardinal_order_increase_control_tt any_county_in_clerical_region = { faith = scope:recipient.faith - county_control < 100 + county_control < county_control_baseline } } } @@ -6092,13 +6179,6 @@ request_legitimacy_interaction = { NOT = { this = scope:actor } } pam_should_bother_clergy_interaction_trigger = { PRIEST = scope:recipient } - # Those under an antipope ask them instead of the real Head of Faith - trigger_if = { - limit = { - scope:recipient ?= scope:puppet_or_actor.faith.religious_head - } - scope:puppet_or_actor ?= { is_following_religious_head_challenger = no } - } } is_highlighted = { @@ -6194,6 +6274,7 @@ request_legitimacy_interaction = { OR = { any_powerful_vassal = { is_ai = yes + liege ?= scope:puppet_or_actor NOT = { scope:puppet_or_actor = { meets_legitimacy_expectation_of = prev @@ -6211,7 +6292,11 @@ request_legitimacy_interaction = { } } } - pam_not_promised_pilgrimage_trigger = { ACTOR = scope:puppet_or_actor } + scope:puppet_or_actor = { + NOT = { + has_character_modifier = promised_pilgrimage_to_clergy_modifier + } + } trigger_if = { limit = { scope:is_puppet_action ?= yes } scope:puppet_or_actor = { @@ -6295,17 +6380,9 @@ request_legitimacy_interaction = { ai_accept = { base = 0 - modifier = { # By God Alone - Secular Faith: the petitioner holds the ear of the clergy - add = 25 - desc = pam_sf_ear_of_clergy_accept_reason - trigger = { - scope:puppet_or_actor = { has_character_modifier = pam_sf_ear_of_clergy_modifier } - } - } - #BIG BONUS FROM NEEDING LEGITIMACY modifier = { - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { OR = { AND = { legitimacy_level = 0 @@ -6329,25 +6406,37 @@ request_legitimacy_interaction = { desc = LOW_LEGITIMACY_REASON } modifier = { - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { legitimacy_level >= 4 } add = -40 desc = HIGH_LEGITIMACY_REASON } modifier = { - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { legitimacy_level = 0 highest_held_title_tier >= tier_kingdom } add = 20 desc = VERY_LOW_LEGITIMACY_REASON } + modifier = { + scope:puppet_or_actor ?= { + rite = { + has_tenet_status = { + tenet = tenet_simony + status = prohibited + } + } + } + add = -50 + desc = SIMONY_IS_PROHIBITED + } #Your gender is scorned by their faith modifier = { OR = { AND = { - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { is_female = yes } scope:recipient = { @@ -6358,7 +6447,7 @@ request_legitimacy_interaction = { } } AND = { - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { is_male = yes } scope:recipient = { @@ -6377,7 +6466,7 @@ request_legitimacy_interaction = { modifier = { scope:use_hook = yes add = 200 - scope:puppet_or_actor = { NOT = { has_strong_hook = scope:recipient } } + scope:puppet_or_actor ?= { NOT = { has_strong_hook = scope:recipient } } desc = SCHEME_WEAK_HOOK_USED } @@ -6387,7 +6476,7 @@ request_legitimacy_interaction = { modifier = { add = { value = 0 - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { every_patroned_holy_order = { limit = { leader = { @@ -6405,7 +6494,7 @@ request_legitimacy_interaction = { modifier = { add = { value = 0 - scope:puppet_or_actor = { + scope:puppet_or_actor ?= { every_held_title = { limit = { tier = tier_county @@ -6414,7 +6503,7 @@ request_legitimacy_interaction = { is_occupied = yes } } - development_level >= 1 + prosperity_level >= 1 } add = 10 max = 60 @@ -6430,6 +6519,7 @@ request_legitimacy_interaction = { multiply = scope:puppet_or_actor.highest_held_title_tier } scope:offer_hook = yes + exists = scope:puppet_or_actor desc = OFFER_HOOK_INTERACTION_OPTION_REASON } modifier = { @@ -6442,6 +6532,7 @@ request_legitimacy_interaction = { multiply = 5 } } + exists = scope:puppet_or_actor scope:donate_faith = yes scope:puppet_or_actor.major_gold_value < scope:recipient.minor_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON @@ -6456,6 +6547,7 @@ request_legitimacy_interaction = { multiply = 5 } } + exists = scope:puppet_or_actor scope:donate_faith = yes scope:puppet_or_actor.major_gold_value < scope:recipient.major_gold_value scope:puppet_or_actor.major_gold_value >= scope:recipient.minor_gold_value @@ -6471,6 +6563,7 @@ request_legitimacy_interaction = { multiply = 5 } } + exists = scope:puppet_or_actor scope:donate_faith = yes scope:puppet_or_actor.major_gold_value >= scope:recipient.major_gold_value scope:puppet_or_actor.major_gold_value < scope:recipient.monumental_gold_value @@ -6486,18 +6579,28 @@ request_legitimacy_interaction = { multiply = 5 } } + exists = scope:puppet_or_actor scope:donate_faith = yes scope:puppet_or_actor.major_gold_value >= scope:recipient.monumental_gold_value desc = DONATE_FAITH_INTERACTION_OPTION_REASON } modifier = { - add = pam_offer_pilgrimage_acceptance_value + add = { + value = 35 + add = { + value = scope:puppet_or_actor.highest_held_title_tier + subtract = 1.5 + multiply = 10 + } + } + exists = scope:puppet_or_actor scope:offer_pilgrimage = yes desc = OFFER_PILGRIMAGE_INTERACTION_OPTION_REASON } #Christian situation modifier = { + exists = scope:puppet_or_actor situation:the_christian_church ?= { any_participant_group = { # Both characters are involved in the situation any_situation_group_participant = { @@ -6531,7 +6634,7 @@ request_legitimacy_interaction = { is_ai = no } } - scope:puppet_or_actor = { is_ai = no } + scope:actor = { is_ai = no } } } flag = use_hook @@ -6552,11 +6655,11 @@ request_legitimacy_interaction = { } trigger_if = { limit = { - scope:puppet_or_actor = { + scope:actor = { is_ai = yes } } - scope:puppet_or_actor = { + scope:actor = { short_term_gold >= major_gold_value } } @@ -6577,17 +6680,17 @@ request_legitimacy_interaction = { is_occupied = yes } } - development_level >= 1 + prosperity_level >= 1 } } } trigger_if = { limit = { - scope:puppet_or_actor = { + scope:actor = { is_ai = yes } } - scope:puppet_or_actor = { + scope:actor = { NOR = { ai_has_economical_boom_personality = yes ai_has_pious_builder_personality = yes @@ -6604,14 +6707,14 @@ request_legitimacy_interaction = { scope:puppet_or_actor = { trigger_if = { limit = { - scope:puppet_or_actor = { + scope:actor = { is_ai = yes } } short_term_gold >= massive_gold_value } trigger_else = { - gold >= medium_gold_value + gold >= major_gold_value } } } @@ -6634,9 +6737,9 @@ request_legitimacy_interaction = { } trigger_if = { limit = { - scope:puppet_or_actor = { is_ai = yes } + scope:actor = { is_ai = yes } } - scope:puppet_or_actor = { legitimacy_level < 1 } + scope:actor = { legitimacy_level < 1 } } } flag = offer_hook @@ -6645,10 +6748,34 @@ request_legitimacy_interaction = { send_option = { is_shown = { - pam_offer_pilgrimage_option_shown_trigger = { ACTOR = scope:puppet_or_actor } + NOT = { + scope:puppet_or_actor.rite = { + rite_has_parameter = forbidden_from_pilgrimage + } + } } is_valid = { - pam_offer_pilgrimage_option_valid_trigger = { ACTOR = scope:puppet_or_actor } + scope:puppet_or_actor = { + custom_tooltip = { + text = can_host_pilgrimage_tt + can_host_activity = activity_pilgrimage + } + gold > 0 + } + scope:actor = { + trigger_if = { + limit = { + is_ai = yes + } + highest_held_title_tier >= tier_kingdom + short_term_gold > monumental_gold_value + NOT = { + any_realm_county = { + has_province_with_epidemic = { intensity >= major } + } + } + } + } } flag = offer_pilgrimage localization = OFFER_PILGRIMAGE_INTERACTION_OPTION @@ -6795,6 +6922,44 @@ strengthen_claim_interaction = { is_available = { has_pam_dlc_trigger = yes + trigger_if = { + limit = { is_ai = yes } + is_ruler = yes + has_legitimacy = yes + NOT = { + government_has_flag = government_is_ecclesiastical + } + is_available_quick = { + incapable = no + imprisoned = no + hostage = no + } + any_claim = { + pressed = no + } + pam_clergy_interactions_faith_trigger = yes + clergy_interaction_generic_piety_level_or_puppet_req_trigger = yes + trigger_if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + legitimacy_level >= 4 + } + trigger_else = { + legitimacy_level >= 3 + } + any_vassal = { + count = all + trigger_if = { + limit = { + is_ai = yes + } + root = { + meets_legitimacy_expectation_of = prev + } + } + } + } } is_shown = { @@ -7437,7 +7602,7 @@ strengthen_claim_interaction = { short_term_gold >= massive_gold_value } trigger_else = { - gold >= major_gold_value + gold >= medium_gold_value } } } @@ -7512,6 +7677,10 @@ strengthen_claim_interaction = { ai_recipients = top_liege } + ai_target_quick_trigger = { + adult = yes + } + ai_frequency_by_tier = { barony = 0 county = 48 @@ -7520,6 +7689,15 @@ strengthen_claim_interaction = { empire = 36 hegemony = 36 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 144 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 10 @@ -7559,7 +7737,7 @@ strengthen_claim_interaction = { highest_held_title_tier = tier_county } scope:target ?= { - title_capital_county = { + title_capital_county ?= { squared_distance = { target = scope:puppet_or_actor.capital_province value >= squared_distance_major @@ -7573,7 +7751,7 @@ strengthen_claim_interaction = { highest_held_title_tier = tier_duchy } scope:target ?= { - title_capital_county = { + title_capital_county ?= { squared_distance = { target = scope:puppet_or_actor.capital_province value >= squared_distance_large @@ -7587,7 +7765,7 @@ strengthen_claim_interaction = { highest_held_title_tier = tier_kingdom } scope:target ?= { - title_capital_county = { + title_capital_county ?= { squared_distance = { target = scope:puppet_or_actor.capital_province value >= squared_distance_huge @@ -7601,7 +7779,7 @@ strengthen_claim_interaction = { highest_held_title_tier >= tier_empire } scope:target ?= { - title_capital_county = { + title_capital_county ?= { squared_distance = { target = scope:puppet_or_actor.capital_province value >= squared_distance_massive @@ -8177,6 +8355,10 @@ ecclesiastic_grant_claim_interaction = { is_shown = { scope:puppet_or_actor ?= { + #Has theocratic head of faith or spiritual clergy + pam_beseech_claims_access_trigger = yes + is_ruler = yes + is_landed = yes trigger_if = { limit = { scope:actor = { is_ai = yes } @@ -8184,16 +8366,12 @@ ecclesiastic_grant_claim_interaction = { piety >= major_piety_value is_playable_character = yes is_at_war = no + NOT = { has_trait = excommunicated } OR = { ai_greed >= medium_positive_ai_value ai_has_warlike_personality = yes } - NOT = { has_trait = excommunicated } } - #Has theocratic head of faith or spiritual clergy - pam_beseech_claims_access_trigger = yes - is_ruler = yes - is_landed = yes NOR = { government_has_mechanic = theocracy is_at_war_with = scope:recipient @@ -8831,7 +9009,7 @@ ecclesiastic_grant_claim_interaction = { short_term_gold >= massive_gold_value } trigger_else = { - gold >= major_gold_value + gold >= medium_gold_value } } } @@ -9069,7 +9247,10 @@ buy_ecclesiastical_title_interaction = { limit = { NOT = { government_has_flag = government_is_theocracy } } - add_to_list = characters + if = { + limit = { is_landless_adventurer = yes } + add_to_list = characters + } if = { limit = { exists = cp:councillor_court_chaplain @@ -9079,6 +9260,12 @@ buy_ecclesiastical_title_interaction = { any_held_title = { has_clerical_region = yes } } } + cp:councillor_court_chaplain = { + OR = { + is_ruler = no + government_has_flag = government_is_theocracy + } + } } cp:councillor_court_chaplain = { add_to_list = characters } } @@ -9336,6 +9523,15 @@ buy_ecclesiastical_title_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 216 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 10 @@ -10530,7 +10726,7 @@ ecclesiastic_transfer_land_interaction = { short_term_gold >= massive_gold_value } trigger_else = { - gold >= major_gold_value + gold >= medium_gold_value } } } @@ -12028,8 +12224,8 @@ grant_ecclesiastical_title_interaction = { trigger_if = { limit = { exists = holder } holder = { - is_ai = yes faith = scope:actor.faith + is_ai = yes this != scope:actor this != scope:recipient pam_is_antipope_trigger = no @@ -12038,6 +12234,10 @@ grant_ecclesiastical_title_interaction = { trigger_else = { title_capital_county.holder.faith = scope:actor.faith } + has_clerical_region = yes + is_head_of_faith = no + # An absorbed region lingers as an empty shell, and granting one mints a landless archbishop + clerical_region_size > 0 trigger_if = { limit = { scope:recipient = { is_landed = yes } @@ -12227,6 +12427,15 @@ petition_antipope_indulgences_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 108 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } is_available = { faith = { @@ -12394,10 +12603,10 @@ petition_antipope_gold_interaction = { } is_shown = { - # Anyone under an antipope or their sponsor petitions that antipope, not the Head of Faith - scope:actor = { is_following_religious_head_challenger = yes } has_pam_dlc_trigger = yes scope:actor != scope:recipient + # Anyone under an antipope or their sponsor petitions that antipope, not the Head of Faith + scope:actor = { is_following_religious_head_challenger = yes } scope:actor.religious_head_or_challenger ?= scope:recipient } @@ -14796,6 +15005,15 @@ influence_papal_vote_interaction = { trigger_situation_catalyst = catalyst_secular_interference_in_papal_election } } + if = { + limit = { + scope:actor = { + is_guelph_or_ghibelline_trigger = yes + NOT = { government_has_flag = government_is_ecclesiastical } + } + } + gg_untargeted_catalyst_effect = { CATALYST = catalyst_gg_papal_election_interference } + } } on_decline = { @@ -15088,7 +15306,10 @@ increase_papabile_score_interaction = { faith ?= { has_doctrine_parameter = has_clerical_electors } pam_pope_is_head_of_faith_or_rite_trigger = yes title:k_papal_state ?= { - any_elector = {} + OR = { + any_elector = {} + holder ?= { primary_title = { any_elector = {} } } + } is_title_created = yes } is_adult = yes @@ -15288,6 +15509,15 @@ increase_papabile_score_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 216 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -15340,8 +15570,6 @@ increase_papabile_score_interaction = { } } } - -# Reform a patroned monastic order's tenet or rite pam_reform_order_interaction = { category = interaction_category_religion icon = reform_order @@ -15397,6 +15625,7 @@ pam_reform_order_interaction = { auto_accept = { custom_description = { text = pam_reform_order_puppet_acceptance_reason + object = scope:recipient scope:recipient.puppeteer ?= scope:actor } } @@ -21398,7 +21627,7 @@ request_enforce_succession_interaction = { value = 0 if = { limit = { scope:donate_faith = yes } - add = major_gold_value + add = scope:puppet_or_actor.major_gold_value } } } @@ -21766,6 +21995,15 @@ request_enforce_succession_interaction = { empire = 24 hegemony = 24 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 144 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -21950,6 +22188,7 @@ request_ecclesiastical_treasury_interaction = { add_piety = minor_piety_value if = { limit = { + is_playable_character = yes # Only playable characters have spiritual fulfillment OR = { AND = { has_trait = generous @@ -22873,7 +23112,6 @@ request_white_peace_interaction = { OR = { has_relation_friend = scope:secondary_recipient has_relation_lover = scope:secondary_recipient - has_relation_best_friend = scope:secondary_recipient } } desc = PAM_CLERGY_ARBITRATION_FRIEND_OF_OPPONENT_REASON @@ -22881,10 +23119,7 @@ request_white_peace_interaction = { modifier = { add = 50 scope:recipient = { - OR = { - has_relation_rival = scope:secondary_recipient - has_relation_nemesis = scope:secondary_recipient - } + has_relation_rival = scope:secondary_recipient } desc = PAM_CLERGY_ARBITRATION_RIVAL_OF_OPPONENT_REASON } @@ -22907,6 +23142,15 @@ request_white_peace_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 72 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -23435,7 +23679,6 @@ request_victory_interaction = { OR = { has_relation_friend = scope:secondary_recipient has_relation_lover = scope:secondary_recipient - has_relation_best_friend = scope:secondary_recipient } } desc = PAM_CLERGY_ARBITRATION_FRIEND_OF_OPPONENT_REASON @@ -23443,10 +23686,7 @@ request_victory_interaction = { modifier = { add = 50 scope:recipient = { - OR = { - has_relation_rival = scope:secondary_recipient - has_relation_nemesis = scope:secondary_recipient - } + has_relation_rival = scope:secondary_recipient } desc = PAM_CLERGY_ARBITRATION_RIVAL_OF_OPPONENT_REASON } @@ -23469,6 +23709,15 @@ request_victory_interaction = { empire = 12 hegemony = 12 } + ai_frequency_by_tier_government_override = { + government = merchant_government + barony = 0 + county = 72 + duchy = 0 + kingdom = 0 + empire = 0 + hegemony = 0 + } ai_will_do = { base = 0 @@ -24644,6 +24893,7 @@ ecclesiastical_bestow_title_interaction = { auto_accept = { custom_description = { text = ecclesiastical_bestow_title_asks_nothing_tt + object = scope:recipient scope:demand_nothing = yes } } @@ -25396,8 +25646,6 @@ ecclesiastical_bestow_title_interaction = { } } } - -#Secular rulers petition the clergy to proclaim an unheld de jure title above their own and crown them with it request_unformed_title_interaction = { category = interaction_category_religion icon = icon_clergy_claim_unformed_kingdom @@ -27647,7 +27895,7 @@ ecclesiastical_de_jure_shifting_interaction = { holder = { target_is_same_character_or_above = scope:puppet_or_actor } - county_control < 100 + county_control < county_control_baseline } } add = { @@ -27658,24 +27906,24 @@ ecclesiastical_de_jure_shifting_interaction = { holder = { target_is_same_character_or_above = scope:puppet_or_actor } - county_control < 100 + county_control < county_control_baseline } add = -1 if = { limit = { - county_control < 75 + county_control < county_control_relative_40 } add = -1 } if = { limit = { - county_control < 50 + county_control < county_control_relative_25 } add = -1 } if = { limit = { - county_control < 25 + county_control < county_control_relative_20 } add = -1 } @@ -29067,7 +29315,6 @@ pam_give_holy_myron_interaction = { } } } - seek_communion_interaction = { category = interaction_category_religion icon = religious @@ -29273,7 +29520,6 @@ seek_communion_interaction = { } } } - pam_destroy_monastic_order_interaction = { category = interaction_category_religion icon = pam_destroy_monastic_order