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

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