Pretty good

This commit is contained in:
Fishedotjpg 2026-02-26 22:06:19 +00:00
parent 095c30fddf
commit a739d2c92a
25 changed files with 80404 additions and 2 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,388 @@
# Interaction used to convert people when you hybridize or diverge culture
# Note that it will only be applied to vassals of the parent culture(s)
# Acceptance is checked *before* culture conversion happens so that it'll be correct in the UI
# This has the culture traits available in the traits list:
# modifier = {
# add = 10
# desc = TEST
# culture_pillar:ethos_bellicose = { is_in_list = traits }
# }
request_culture_conversion_interaction = {
category = interaction_category_religion
special_interaction = request_culture_conversion_interaction
popup_on_receive = yes
desc = ask_for_conversion_interaction_desc
hidden = yes
is_shown = {
scope:actor.culture != scope:recipient.culture
scope:recipient.liege = scope:actor
NOT = { scope:recipient = { government_has_flag = government_is_landless_minority } }
}
is_valid_showing_failures_only = {
}
ai_accept = {
base = -10
opinion_modifier = {
opinion_target = scope:actor
who = scope:recipient
multiplier = 1
}
modifier = {
desc = ASK_FOR_CONVERSION_SAME_CULTURE_PRESTIGE_LEVEL
add = {
value = 10
multiply = scope:actor.prestige_level
}
scope:actor.prestige_level > 0
scope:recipient.culture = scope:actor.culture
}
modifier = {
desc = ASK_FOR_CONVERSION_RECIPIENT_DIPLOMACY
add = {
value = scope:actor.diplomacy
subtract = scope:recipient.diplomacy
multiply = 5
}
}
modifier = {
desc = ASK_FOR_CONVERSION_RECIPIENT_IS_CYNICAL
add = 30
scope:recipient = {
has_trait = cynical
}
}
modifier = {
desc = ASK_FOR_CONVERSION_RECIPIENT_IS_STUBBORN
add = -30
scope:recipient = {
has_trait = stubborn
}
}
modifier = {
add = intimidated_external_reason_value
scope:recipient = {
has_dread_level_towards = {
target = scope:actor
level = 1
}
}
desc = INTIMIDATED_REASON
}
modifier = {
add = cowed_external_reason_value
scope:recipient = {
has_dread_level_towards = {
target = scope:actor
level = 2
}
}
desc = COWED_REASON
}
# Unity modifiers
evaluate_action_increasing_house_unity = {
VALUE = 100
}
}
ai_min_reply_days = 1
ai_max_reply_days = 5
on_accept = {
new_culture_created_vassal_conversion_effect = {
CONVERTEE = scope:recipient
CONVERTER = scope:actor
CULTURE = scope:actor.culture
}
}
}
ai_cultural_hybridization_interaction = {
hidden = yes
auto_accept = yes
ai_potential = {
has_dlc_feature = hybridize_culture
OR = {
top_liege = this
highest_held_title_tier >= tier_kingdom
}
sub_realm_size >= 4
is_physically_able_adult = yes
is_at_war = no
NOT = {
has_game_rule = none_hybrid_culture_ai_frequency
}
}
is_shown = {
scope:actor = {
is_ai = yes
}
}
has_valid_target = {
exists = scope:target
}
ai_set_target = {
scope:actor = {
if = {
limit = {
any_sub_realm_county = {
culture != scope:actor.culture
culture = {
cultural_acceptance = { target = scope:actor.culture value >= hybridization_ai_threshold_value }
scope:actor = {
can_hybridize = prev
}
}
}
}
every_sub_realm_county = {
limit = {
culture != scope:actor.culture
culture = {
cultural_acceptance = { target = scope:actor.culture value >= hybridization_ai_threshold_value }
scope:actor = {
can_hybridize = prev
}
}
}
culture = {
add_to_list = culture_list
}
}
ordered_in_list = {
list = culture_list
limit = { culture_realm_size >= 3 }
order_by = culture_realm_size
save_scope_as = target
}
}
}
}
on_accept = {
# Global cooldowns for the lower frequency game rule settings
if = {
limit = {
has_game_rule = less_common_hybrid_culture_ai_frequency
}
set_global_variable = { name = has_ai_hybrid_event_cooldown value = yes days = 3650 }
}
scope:actor = {
create_hybrid_culture_with_side_effects = scope:target
}
}
ai_targets = {
ai_recipients = self
}
ai_frequency_by_tier = {
barony = 0
county = 120
duchy = 60
kingdom = 60
empire = 60
hegemony = 60
}
ai_will_do = {
base = 100
# Unity modifiers
evaluate_action_increasing_house_unity = {
VALUE = 100
}
modifier = {
factor = 0.2
has_game_rule = less_common_hybrid_culture_ai_frequency
}
modifier = {
factor = 0
exists = global_var:has_ai_hybrid_event_cooldown
}
modifier = {
factor = 0
culture = {
has_cultural_parameter = harder_to_hybridize
}
}
modifier = { # The AI should only want to hybridize if they're the second ruler of their culture for their primary title
factor = 0
OR = {
NOT = {
exists = primary_title.previous_holder
}
AND = {
exists = primary_title.previous_holder
primary_title.previous_holder.culture != scope:actor.culture
}
}
}
modifier = { # The AI doesn't want to hybridize if their culture is more than X% bigger than the targeted culture within the same realm (unless it's in the capital, and the capital is the De Jure capital of the primary title)
factor = 0
scope:actor.culture.culture_realm_size > scope:target.culture_realm_size_larger_30_percent
NAND = {
scope:actor.primary_title.title_capital_county = scope:actor.capital_county
scope:actor.capital_county.culture = scope:target
}
}
modifier = { # Do not hybridize if 30% or more of your vassals of the relevant culture/s dislike you
factor = 0
scope:actor = {
any_vassal = {
percent >= 0.3
OR = {
culture = scope:actor.culture
culture = scope:target
}
highest_held_title_tier >= tier_county
opinion = {
target = scope:actor
value <= 0
}
}
}
}
modifier = { # The AI does not want to create multiple hybrids from the same cultures
factor = 0
any_in_global_list = {
variable = hybrid_cultures
any_parent_culture = { this = scope:target }
any_parent_culture = { this = scope:actor.culture }
}
}
# Loose requirements
modifier = { # The AI does not want to create a hybrid with a hybrid culture that has the same roots
factor = 0
has_game_rule = very_relaxed_hybrid_culture_ai_restrictions
scope:target = { is_hybrid_culture = yes }
scope:actor.culture = {
is_hybrid_culture = yes
any_parent_culture = {
save_temporary_scope_as = parent_culture_check
scope:target = {
any_parent_culture = {
this = scope:parent_culture_check
}
}
}
}
}
modifier = { # The AI does not want to create a hybrid with a hybrid culture (unless a historical hybrid)
factor = 0
has_game_rule = relaxed_hybrid_culture_ai_restrictions
scope:target = {
is_hybrid_culture = yes
culture_is_not_historical_hybrid_trigger = yes
}
scope:actor.culture = {
is_hybrid_culture = yes
culture_is_not_historical_hybrid_trigger = yes
}
}
modifier = { # The AI does not want to create a hybrid with a hybrid culture or if the target is a hybrid (unless a historical hybrid)
factor = 0
has_game_rule = default_hybrid_culture_ai_restrictions
OR = {
scope:target = {
is_hybrid_culture = yes
culture_is_not_historical_hybrid_trigger = yes
}
scope:actor.culture = {
is_hybrid_culture = yes
culture_is_not_historical_hybrid_trigger = yes
}
}
}
modifier = { # The AI does not want to create a hybrid with a hybrid culture that their culture is a parent of, or share heritage of
factor = 0
scope:target = {
is_hybrid_culture = yes
any_parent_culture = {
OR = {
this = scope:actor.culture
has_same_culture_heritage = scope:actor.culture
}
}
}
}
modifier = { # The AI does not want to create a hybrid if their culture is a hybrid of the target culture, or share heritage of
factor = 0
scope:actor.culture = {
is_hybrid_culture = yes
any_parent_culture = {
OR = {
this = scope:target
has_same_culture_heritage = scope:target
}
}
}
}
modifier = { # Avoid hybridizing if your realm is of a significant size and elective, we don't want the HRE Emperor to hybdridize in ugly ways...
factor = 0
primary_title = {
has_order_of_succession = election
tier >= tier_kingdom
}
realm_size >= 50
any_vassal = {
highest_held_title_tier >= tier_county
culture != scope:actor.culture
}
}
modifier = { # Theocrats such as the Pope shouldn't hybridize; they have an influx of different cultures, it's just weird
factor = 0
government_has_flag = government_is_theocracy
}
modifier = { # Block for Scots and Gaelic specifically
factor = 0
scope:actor.culture = {
OR = {
this = culture:scottish
this = culture:gaelic
}
}
scope:target = {
OR = {
this = culture:scottish
this = culture:gaelic
}
}
}
# Note: As we're checking if we can hybridize with a culture *right now*, a suboptimal culture might be checked. A buffer of 10 acceptance is used by the AI to alleviate this.
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,492 @@
# Character Interactions for EP1
##################
# Fund someone's inspiration
# by Linnéa Thimrén
##################
fund_inspiration_interaction = {
icon = inspiration
interface_priority = 30
common_interaction = yes
category = interaction_category_vassal
desc = fund_inspiration_interaction_desc
is_shown = {
scope:recipient = {
is_ruler = no
inspiration ?= {
NOT = {
exists = inspiration_sponsor
}
}
}
scope:actor = {
any_courtier_or_guest = {
this = scope:recipient
}
}
}
is_highlighted = {
always = yes
}
is_valid_showing_failures_only = {
scope:recipient = {
is_physically_able = yes
is_ruler = no
trigger_if = {
limit = {
NOT = { is_courtier_of = scope:actor }
}
can_recruit_character_to_court_trigger = {
RECRUITER = scope:actor
RECRUITEE = scope:recipient
}
}
}
scope:actor = {
can_sponsor_inspiration = scope:recipient.inspiration
gold >= scope:recipient.inspiration.base_inspiration_gold_cost
}
}
on_accept = {
fund_inspiration_effect = yes
if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = weapon_inspiration } }
custom_description_no_bullet = { text = weapon_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = armor_inspiration } }
custom_description_no_bullet = { text = armor_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = book_inspiration } }
custom_description_no_bullet = { text = book_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = weaver_inspiration } }
custom_description_no_bullet = { text = weaver_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = adventure_inspiration } }
custom_description_no_bullet = { text = adventure_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = artisan_inspiration } }
custom_description_no_bullet = { text = artisan_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = smith_inspiration } }
custom_description_no_bullet = { text = smith_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = alchemy_inspiration } }
custom_description_no_bullet = { text = alchemy_inspiration_cost_tt }
}
else_if = {
limit = { scope:recipient.inspiration = { has_inspiration_type = bow_inspiration } }
custom_description_no_bullet = { text = bow_inspiration_cost_tt }
}
# Add a flag on AI to have an extra cooldown of 3 years
if = {
limit = {
scope:actor = {
is_ai = yes
NOT = {
gold >= 1000
}
OR = {
short_term_gold < ai_inspiration_desired_gold_value
ai_greed >= 50
}
}
}
scope:actor = {
add_character_flag = {
flag = recently_fund_inspiration
years = 3
}
}
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = miniscule_unity_gain
DESC = clan_unity_inspo.desc
REVERSE_NON_HOUSE_TARGET = no
}
#Mandala Creation Aspect
scope:actor = {
if = {
limit = { government_has_flag = government_is_mandala }
increment_variable_effect = {
VAR = num_commissioned_artifacts
VAL = 1
}
}
}
}
auto_accept = {
custom_description = {
text = auto_accept_interaction_ai
object = scope:recipient
scope:recipient = {
is_ai = yes
}
}
}
ai_frequency_by_tier = {
barony = 0
county = 0
duchy = 0
kingdom = 10
empire = 10
hegemony = 10
}
ai_targets = {
ai_recipients = guests
ai_recipients = courtiers
}
ai_target_quick_trigger = {
adult = yes
}
ai_potential = {
is_at_war = no
OR = {
has_royal_court = yes
OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority }
}
gold > ai_inspiration_desired_gold_value
NOT = { has_character_flag = recently_fund_inspiration }
NOT = { has_variable = conqueror }
ai_should_focus_on_building_in_their_capital = no
}
ai_will_do = {
base = 100
modifier = { # Not as likely to fund inspirations if they already have some going (max three for very prestigious courts)
add = {
if = {
limit = {
highest_held_title_tier >= tier_empire
any_sponsored_inspiration = {
count >= 3
}
}
add = -50
}
else_if = {
limit = {
highest_held_title_tier >= tier_kingdom
any_sponsored_inspiration = {
count >= 2
}
}
add = -50
}
}
}
# Do not pointlessly fund inspirations you do not need
modifier = { # Weapons
factor = 0
scope:recipient.inspiration = {
has_inspiration_type = weapon_inspiration
}
OR = {
any_character_artifact = { # Has a fantastic item already
artifact_slot_type = primary_armament
rarity = illustrious
}
AND = { # Have a lot of artifacts already, and the inspired person isn't even very good
scope:recipient = {
weapon_inspiration_average_skill_value < 15
}
any_character_artifact = {
count >= 2
artifact_slot_type = primary_armament
}
}
}
}
modifier = { # Armor
factor = 0
scope:recipient.inspiration = {
has_inspiration_type = armor_inspiration
}
OR = {
any_character_artifact = { # Has a fantastic item already
artifact_slot_type = armor
rarity = illustrious
}
AND = { # Have a lot of artifacts already, and the inspired person isn't even very good
scope:recipient = {
armor_inspiration_average_skill_value < 15
}
any_character_artifact = {
count >= 2
artifact_slot_type = armor
}
}
}
}
modifier = { # Warlike AI's only sponsor if they've been at peace for a long time
factor = 0
ai_has_warlike_personality = yes
days_of_continuous_peace < 1825 # 5 years
}
modifier = { # Cautious AI's only sponsor if they feel safe enough
factor = 0
ai_has_cautious_personality = yes
war_chest_gold < cautious_ai_minimum_war_chest_gold
}
}
}
##################
# Indebt Guest
# by Ewan Cowhig Croft
##################
indebt_guest_interaction = {
icon = icon_hostile
interface_priority = 120
common_interaction = yes
ai_max_reply_days = 0
cooldown = { years = 5 }
category = interaction_category_hostile
ai_maybe = yes
desc = indebt_guest_interaction_desc
greeting = negative
pre_answer_maybe_key = ANSWER_MIGHT_SUCCEED
pre_answer_no_key = ANSWER_CANT_SUCCEED
pre_answer_yes_key = ANSWER_WILL_SUCCEED
pre_answer_maybe_breakdown_key = ANSWER_SUM_CHANCE
ai_potential = {
# Repeat some is_shown triggers for performance gains.
indebt_guest_interaction_basic_checks_trigger = { ACTOR = this }
}
is_shown = {
scope:actor != scope:recipient
# Repeat some ai_potential triggers for performance gains.
indebt_guest_interaction_basic_checks_trigger = { ACTOR = scope:actor }
# Scope:recipient must be a guest.
scope:recipient = { is_pool_guest_of = scope:actor }
}
is_valid_showing_failures_only = {
scope:actor = { is_imprisoned = no }
scope:actor = { is_commanding_army = no }
# Scope:actor can't have a hook of any kind on scope:recipient already.
NOT = {
scope:actor = { has_hook = scope:recipient }
}
# Scope:actor must be able to afford the cost of the decision going wrong.
scope:actor.court_grandeur_current >= indebt_guest_interaction_lost_test_grandeur_cost_value
}
can_send = {
scope:actor = {
custom_description = {
text = "character_interactions_hostile_actions_disabled_delay"
NOT = { has_character_flag = flag_hostile_actions_disabled_delay }
}
}
}
on_send = {
scope:actor = {
add_character_flag = {
flag = flag_hostile_actions_disabled_delay
days = 10
}
}
}
on_accept = {
scope:actor = {
# On accept, you gain a hook & lose some opinion.
## Which we only show as a tooltip for now, since it's applied in the event.
show_as_tooltip = { indebt_guest_interaction_accepted_effect = yes }
# Pop the event.
trigger_event = ep1_character_interaction.0001
# Reminder that you'll have a chance to direct where they go.
custom_tooltip = indebt_guest_interaction.tt.direct_indebted_guest
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = miniscule_unity_loss
DESC = clan_unity_indebt_guest.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
on_decline = {
# Send a toast.
scope:actor = {
send_interface_toast = {
type = event_toast_effect_bad
title = indebt_guest_interaction.tt.failure
left_icon = scope:recipient
# On decline, scope:recipient leaves your court...
scope:recipient = { select_and_move_to_pool_effect = yes }
# ... and you lose a bit of extra grandeur for your audacity.
change_current_court_grandeur = indebt_guest_interaction_lost_test_grandeur_cost_value
}
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = miniscule_unity_loss
DESC = clan_unity_indebt_guest_failure.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
auto_accept = no
ai_accept = {
base = 50
# Standard intrigue duel.
modifier = {
add = {
value = scope:actor.intrigue
multiply = 2
}
desc = INDEBT_GUEST_INTRIGUE_ACTOR
}
modifier = {
add = {
value = scope:recipient.intrigue
multiply = -1
}
desc = INDEBT_GUEST_INTRIGUE_RECIPIENT
}
# Weight it a bit more in your favour for every point of excess CGV you have.
modifier = {
add = scope:actor.current_cgv_above_expected_exact_value
desc = INDEBT_GUEST_CURRENT_CGV_ABOVE_EXPECTED
scope:actor.current_cgv_above_expected_exact_value >= 1
}
# Some traits may also affect the chances for scope:actor...
modifier = {
add = 10
scope:actor = { has_trait = schemer }
}
modifier = {
add = 10
scope:actor = { has_trait = education_intrigue }
}
modifier = {
add = 5
scope:actor = { has_trait = deceitful }
}
modifier = {
add = 5
scope:actor = { has_trait = vengeful }
}
modifier = {
add = -10
scope:actor = { has_trait = honest }
}
modifier = {
add = -5
scope:actor = { has_trait = forgiving }
}
# ... or else for scope:recipient.
modifier = {
add = -10
scope:recipient = { has_trait = schemer }
}
modifier = {
add = -5
scope:recipient = { has_trait = education_intrigue }
}
modifier = {
add = -5
scope:recipient = { has_trait = deceitful }
}
modifier = {
add = 10
scope:recipient = { has_trait = honest }
}
}
# AI
ai_targets = {
ai_recipients = guests
chance = 0.5
}
ai_frequency_by_tier = {
barony = 0
county = 0
duchy = 0
kingdom = 10
empire = 10
hegemony = 10
}
ai_will_do = {
base = -100
# This is a silly way for the AI to spend its CGV, so we keep 'em off it most of the time.
# Unless they've got a scheme on the go at their nemesis' court...
modifier = {
add = 100
scope:actor = {
any_relation = { type = nemesis }
any_scheme = {
count >= 1
scheme_target_character = {
any_relation = {
type = nemesis
count >= 1
this = scope:actor
}
}
}
}
}
# ... *and* they're likely to win due to having higher intrigue, but without scope:recipient being too terrible.
modifier = {
add = 25
indebt_guest_interaction_get_intrigue_difference_value >= indebt_guest_interaction_likely_success_control_value
scope:recipient = { intrigue >= high_skill_rating }
}
modifier = {
add = 25
indebt_guest_interaction_get_intrigue_difference_value >= indebt_guest_interaction_likely_success_control_value
scope:recipient = { intrigue >= very_high_skill_rating }
}
modifier = {
add = 50
indebt_guest_interaction_get_intrigue_difference_value >= indebt_guest_interaction_likely_success_control_value
scope:recipient = { intrigue >= extremely_high_skill_rating }
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff