character interactions updating (again)

This commit is contained in:
Thakia 2026-11-21 17:46:42 -03:00
parent 068d323484
commit 568b018fc5
29 changed files with 4043 additions and 1867 deletions

View file

@ -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
}