This commit is contained in:
Magpie490 2025-02-19 22:32:34 +00:00
parent 9767464f98
commit f1a979f473
50 changed files with 104756 additions and 0 deletions

View file

@ -0,0 +1,828 @@
#Interactions relating to the head of the dynasty
adopt_interaction = {
icon = icon_dynasty
category = interaction_category_diplomacy
interface_priority = 60
desc = adopt_interaction_desc
use_diplomatic_range = yes
is_shown = {
OR = {
# Cultures that default with this tradition should still be able to adopt
scope:actor.culture = { has_cultural_parameter = allows_adoption }
NOT = {
has_game_rule = no_adoption
}
}
NOT = {
scope:recipient = scope:actor
}
scope:actor = {
is_adult = yes
OR = {
# Compassionate people like adopting
has_trait = compassionate
# Game rule as an overriding factor
has_game_rule = adoption_always_allowed
# You have no kids and your fertility is low
AND = {
any_child = {
count < 1
}
fertility <= low_fertility
}
# You are married to a same-sex partner
AND = {
is_married = yes
# People in bisexual polygamous spheres are not valid for this
NOT = {
OR = {
AND = {
any_consort = {
is_female = yes
}
is_male = yes
}
AND = {
any_consort = {
is_male = yes
}
is_female = yes
}
}
}
}
# You are unmarried and uninterested in having biological children
AND = {
is_married = no
OR = {
has_sexuality = asexual
has_sexuality = homosexual
}
}
# You have a cultrad that lets you adopt
culture = { has_cultural_parameter = allows_adoption }
}
OR = {
# You are unmarried
is_married = no
# You are the dominant partner in at least one of your marriages
AND = {
is_female = yes
matrilinear_marriage = yes
}
AND = {
is_male = yes
matrilinear_marriage = no
}
# Your marriage is same-sex
NOT = {
OR = {
AND = {
any_consort = {
is_female = yes
}
is_male = yes
}
AND = {
any_consort = {
is_male = yes
}
is_female = yes
}
}
}
}
}
scope:recipient = {
# Children only
is_adult = no
# Landless only (ruler used to catch edge-cases of landless HoF children)
is_ruler = no
# Don't get imprisoned children and so on
is_available = yes
# None of their close relatives are rulers
NOT = {
any_close_or_extended_family_member = { is_ruler = yes }
}
# They don't already belong to your house
NOT = { house = scope:actor.house }
# Don't adopt your own grandkids
NOT = {
any_ancestor = {
this = scope:actor
}
}
# Don't steal the King of France's great nephew
NOT = {
any_liege_or_above = {
prev.dynasty = dynasty
}
}
}
}
is_valid = {}
is_valid_showing_failures_only = {}
send_option = { # EP3 Influence
is_shown = { # Actor must have a government that uses influence
scope:actor = {
government_has_flag = government_has_influence
}
}
is_valid = {
# Actor has enough influence
scope:actor = { influence >= medium_influence_value }
# Both characters are within the same top realm
scope:recipient.top_liege = scope:actor.top_liege
}
flag = influence_send_option
localization = TRADE_INFLUENCE_FOR_BETTER_AI_ACCEPTANCE
}
send_options_exclusive = no
on_accept = {
show_as_tooltip = {
adopt_effect = {
CHILD = scope:recipient
ADOPTER = scope:actor
}
}
hidden_effect = {
scope:actor = { trigger_event = adoption.0001 }
}
}
cost = {
renown = {
value = {
add = medium_dynasty_prestige_value
if = { # Free for free adoption
limit = {
scope:actor = {
OR = {
culture = { has_cultural_parameter = free_adoption }
has_game_rule = adoption_always_allowed
}
}
}
multiply = 0
}
if = { # Free for same-sex couples
limit = {
scope:actor = {
OR = {
AND = {
any_consort = {
is_female = yes
}
is_female = yes
}
AND = {
any_consort = {
is_male = yes
}
is_male = yes
}
}
}
}
multiply = 0
}
}
}
prestige = {
value = {
add = medium_prestige_value
if = {
limit = {
scope:actor = {
OR = {
culture = { has_cultural_parameter = free_adoption }
has_game_rule = adoption_always_allowed
}
}
}
multiply = 0
}
}
}
piety = {
value = {
add = medium_piety_value
if = {
limit = {
scope:actor = {
OR = {
culture = { has_cultural_parameter = free_adoption }
has_game_rule = adoption_always_allowed
}
}
}
multiply = 0
}
# No piety cost for adopting a righteous-faith child
if = {
limit = {
scope:actor.faith = {
faith_hostility_level = {
target = scope:recipient.faith
value < faith_astray_level
}
}
}
multiply = 0
}
else_if = {
limit = {
scope:actor.faith = {
faith_hostility_level = {
target = scope:recipient.faith
value > faith_astray_level
}
}
}
add = minor_piety_value
}
else_if = {
limit = {
scope:actor.faith = {
faith_hostility_level = {
target = scope:recipient.faith
value > faith_hostile_level
}
}
}
add = medium_piety_value
}
}
}
influence = {
value = 0
if = {
limit = { scope:influence_send_option = yes }
add = scope:actor.medium_influence_value
desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION
}
}
}
ai_potential = {
any_child = {
count < 2
}
OR = {
fertility <= low_fertility
AND = {
is_male = yes
NOT = {
any_spouse = {
fertility > low_fertility
is_female = yes
}
}
}
AND = {
is_female = yes
NOT = {
any_spouse = {
fertility > low_fertility
is_male = yes
}
}
}
}
}
ai_targets = {
ai_recipients = courtiers
ai_recipients = guests
# Friends, wards, etc.
ai_recipients = scripted_relations
max = 20
}
ai_accept = {
base = 0
modifier = { # My parents are alive
add = -15
desc = parents_are_alive_tt
OR = {
father ?= { is_alive = yes }
mother ?= { is_alive = yes }
}
}
modifier = { # I hate my mother
add = 10
desc = i_hate_my_mother_tt
exists = mother
mother = { is_alive = yes }
opinion = {
value <= medium_negative_opinion
target = mother
}
}
modifier = { # I hate my father
add = 10
desc = i_hate_my_father_tt
exists = father
father = { is_alive = yes }
opinion = {
value <= medium_negative_opinion
target = father
}
}
modifier = { # I like my mother
add = -10
desc = i_like_my_mother_tt
exists = mother
mother = { is_alive = yes }
opinion = {
value >= medium_positive_opinion
target = mother
}
}
modifier = { # I like my father
add = -10
desc = i_like_my_father_tt
exists = father
father = { is_alive = yes }
opinion = {
value >= medium_positive_opinion
target = father
}
}
modifier = { # I like you
add = {
value = 5
if = {
limit = {
opinion = {
value >= high_positive_opinion
target = scope:actor
}
}
add = 10
}
if = {
limit = {
opinion = {
value >= very_high_positive_opinion
target = scope:actor
}
}
add = 10
}
}
desc = i_like_you_tt
opinion = {
value >= medium_positive_opinion
target = scope:actor
}
}
modifier = { # You're my friend :)
add = 10
desc = youre_my_friend_tt
has_relation_friend = scope:actor
}
modifier = { # You're my guardian
add = 10
desc = youre_my_guardian_tt
has_relation_guardian = scope:actor
}
modifier = { # I have no mother
add = 5
desc = i_want_a_mother_tt
scope:actor = { is_female = yes }
OR = {
NOT = { exists = mother }
mother = { is_alive = no }
}
}
modifier = { # I have no father
add = 5
desc = i_want_a_father_tt
scope:actor = { is_male = yes }
OR = {
NOT = { exists = father }
father = { is_alive = no }
}
}
modifier = { # I am a noble!
add = -15
desc = i_am_noble_tt
has_no_particular_noble_roots_trigger = no
}
modifier = { # We are so alike ^^
add = {
value = 5
if = {
limit = {
number_of_personality_traits_in_common = {
target = scope:actor
value = 2
}
}
multiply = 2
}
else_if = {
limit = {
number_of_personality_traits_in_common = {
target = scope:actor
value = 3
}
}
multiply = 3
}
else_if = {
limit = {
number_of_personality_traits_in_common = {
target = scope:actor
value = 4
}
}
multiply = 4
}
}
desc = we_are_alike_tt
number_of_personality_traits_in_common = {
target = scope:actor
value >= 1
}
}
modifier = { # Yo, you're offering me a place in a landed house? Sick.
add = 10
desc = ambition_tt
has_trait = ambitious
}
modifier = {
add = 25
scope:influence_send_option = yes
desc = INFLUENCE_INTERACTION_ACCEPTANCE_SEND_OPTION
}
}
ai_frequency = 120
ai_will_do = {
base = 50
modifier = { # I am childless and my marriage will never produce heirs
add = 100
scope:actor = {
any_child = {
count < 1
}
OR = {
fertility <= low_fertility
AND = {
is_male = yes
NOT = {
any_spouse = {
fertility > low_fertility
is_female = yes
}
}
}
AND = {
is_female = yes
NOT = {
any_spouse = {
fertility > low_fertility
is_male = yes
}
}
}
}
}
}
modifier = { # I am kind and the child is an orphan
add = 100
scope:actor = {
ai_compassion >= high_positive_compassion
}
NOT = {
exists = scope:recipient.mother
exists = scope:recipient.father
}
}
modifier = { # Traits in common
add = 25
scope:actor = {
number_of_personality_traits_in_common = {
target = scope:recipient
value = 1
}
}
}
modifier = { # Traits in common
add = 25
scope:actor = {
number_of_personality_traits_in_common = {
target = scope:recipient
value = 2
}
}
}
modifier = { # Traits in common
add = 25
scope:actor = {
number_of_personality_traits_in_common = {
target = scope:recipient
value = 3
}
}
}
modifier = { # My culture is into adoption
add = 25
scope:actor = {
OR = {
culture = { has_cultural_parameter = free_adoption }
has_game_rule = adoption_always_allowed
}
}
}
modifier = { # I like the kid
add = 25
scope:actor = {
opinion = {
value >= medium_positive_opinion
target = scope:recipient
}
}
}
modifier = { # The kid is my friend uwu
add = 25
scope:actor = {
has_relation_friend = scope:recipient
}
}
modifier = { # The kid is my ward
add = 25
scope:actor = {
has_relation_guardian = scope:recipient
}
}
modifier = { # I care about bloodlines and dynasties and whatnot
add = -25
scope:actor = {
NOR = {
culture = { has_cultural_parameter = free_adoption }
has_game_rule = adoption_always_allowed
has_trait = humble
has_trait = callous
}
}
}
modifier = { # I will not adopt filthy filthy heretics
factor = 0
faith = {
faith_hostility_level = {
target = scope:recipient.faith
value >= faith_astray_level
}
}
}
}
}
adventurer_adopt_interaction = {
icon = icon_adopt_house_member
category = interaction_category_diplomacy
interface_priority = 60
cooldown = { years = 2 }
desc = adventurer_adopt_interaction_desc
use_diplomatic_range = yes
is_shown = {
scope:actor = { is_landless_adventurer = yes }
scope:recipient = {
is_ruler = no
# They don't already belong to your dynasty
NOT = { dynasty = scope:actor.dynasty }
}
}
is_valid = {}
is_valid_showing_failures_only = {
# Don't get imprisoned children and so on
scope:recipient = {
is_available = yes
is_courtier_of = scope:actor
opinion = {
value >= 40 # sync with define:NDomicile|TEMPERAMENT_THRESHOLD_HIGH
target = scope:actor
}
has_no_particular_noble_roots_trigger = yes
}
scope:recipient = {
NOT = { has_trait = devoted }
}
scope:recipient = {
NOT = { has_trait = gallivanter }
}
}
on_accept = {
show_as_tooltip = {
adventurer_adopt_effect = {
CHILD = scope:recipient
ADOPTER = scope:actor
}
scope:actor = { set_designated_heir = scope:recipient }
}
hidden_effect = {
scope:actor = { trigger_event = adoption.0002 }
}
}
cost = {
prestige = {
value = {
add = medium_prestige_value
if = {
limit = {
scope:actor = {
OR = {
culture = { has_cultural_parameter = free_adoption }
has_game_rule = adoption_always_allowed
}
}
}
multiply = 0
}
}
}
}
ai_accept = {
base = 0
modifier = { # My parents are alive
add = -15
desc = parents_are_alive_tt
OR = {
father ?= { is_alive = yes }
mother ?= { is_alive = yes }
}
}
modifier = { # I hate my mother
add = 10
desc = i_hate_my_mother_tt
exists = mother
mother = { is_alive = yes }
opinion = {
value <= medium_negative_opinion
target = mother
}
}
modifier = { # I hate my father
add = 10
desc = i_hate_my_father_tt
exists = father
father = { is_alive = yes }
opinion = {
value <= medium_negative_opinion
target = father
}
}
modifier = { # I like my mother
add = -10
desc = i_like_my_mother_tt
exists = mother
mother = { is_alive = yes }
opinion = {
value >= medium_positive_opinion
target = mother
}
}
modifier = { # I like my father
add = -10
desc = i_like_my_father_tt
exists = father
father = { is_alive = yes }
opinion = {
value >= medium_positive_opinion
target = father
}
}
modifier = { # I like you
add = {
value = 5
if = {
limit = {
opinion = {
value >= high_positive_opinion
target = scope:actor
}
}
add = 10
}
if = {
limit = {
opinion = {
value >= very_high_positive_opinion
target = scope:actor
}
}
add = 10
}
}
desc = i_like_you_tt
opinion = {
value >= medium_positive_opinion
target = scope:actor
}
}
modifier = { # You're my friend :)
add = 10
desc = youre_my_friend_tt
has_relation_friend = scope:actor
}
modifier = { # You're my guardian
add = 10
desc = youre_my_guardian_tt
has_relation_guardian = scope:actor
}
modifier = { # I have no mother
add = 5
desc = i_want_a_mother_tt
scope:actor = { is_female = yes }
OR = {
NOT = { exists = mother }
mother = { is_alive = no }
}
}
modifier = { # I have no father
add = 5
desc = i_want_a_father_tt
scope:actor = { is_male = yes }
OR = {
NOT = { exists = father }
father = { is_alive = no }
}
}
modifier = { # I am a noble!
add = -15
desc = i_am_noble_tt
has_no_particular_noble_roots_trigger = no
}
modifier = { # We are so alike ^^
add = {
value = 5
if = {
limit = {
number_of_personality_traits_in_common = {
target = scope:actor
value = 2
}
}
multiply = 2
}
else_if = {
limit = {
number_of_personality_traits_in_common = {
target = scope:actor
value = 3
}
}
multiply = 3
}
else_if = {
limit = {
number_of_personality_traits_in_common = {
target = scope:actor
value = 4
}
}
multiply = 4
}
}
desc = we_are_alike_tt
number_of_personality_traits_in_common = {
target = scope:actor
value >= 1
}
}
modifier = { # Yo, you're offering me a place in a landed house? Sick.
add = 10
desc = ambition_tt
has_trait = ambitious
}
}
}

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,518 @@
blackmail_interaction = {
category = interaction_category_hostile
common_interaction = yes
interface = blackmail
popup_on_receive = yes
icon = secret
ai_maybe = yes
desc = blackmail_interaction_desc
on_decline_summary = blackmail_decline_summary
is_shown = {
scope:recipient = {
NOT = { this = scope:actor }
age > 10
}
scope:recipient = {
any_secret = {
is_known_by = scope:actor
}
}
}
is_valid_showing_failures_only = {
scope:recipient = {
is_busy_in_events_localised = yes
}
#Not at war with them
NOT = {
scope:actor = { is_at_war_with = scope:recipient }
}
#Already have a strong hook
custom_description = {
text = "already_strong_hook"
subject = scope:actor
object = scope:recipient
NOT = {
scope:actor = { has_strong_hook = scope:recipient }
}
}
#No appropriate secret
custom_description = {
scope:recipient = {
any_secret = {
is_blackmailable_secret_trigger = {
BLACKMAILER = scope:actor
PARTICIPANT = scope:recipient
}
}
}
text = "no_blackmailable_secret"
}
}
is_highlighted = {
scope:recipient = {
any_secret = {
is_known_by = scope:actor
is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = scope:recipient }
}
}
scope:actor = {
NOR = {
has_hook_of_type = {
target = scope:recipient
type = weak_blackmail_hook
}
has_hook_of_type = {
target = scope:recipient
type = strong_blackmail_hook
}
}
}
}
has_valid_target_showing_failures_only = {
exists = scope:target
scope:target = {
is_known_by = scope:actor
is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = scope:recipient }
}
}
can_send = {
custom_description = { # Exploit prevention
text = "has_sent_interaction_already"
subject = scope:recipient
scope:actor = {
NOT = { exists = var:currently_blackmailing }
}
}
}
on_send = {
hidden_effect = {
# Block sending another interaction while rejection event is active
scope:actor = {
set_variable = {
name = currently_blackmailing
value = scope:recipient
days = 30
}
}
scope:target = {
if = {
limit = {
exists = secret_target
}
secret_target = {
save_scope_as = secret_target
}
}
if = {
limit = {
secret_type = secret_disputed_heritage
}
secret_target.father = {
save_scope_as = father
}
secret_target.real_father = {
save_scope_as = real_father
}
}
if = {
limit = {
scope:target = {
secret_type = secret_disputed_heritage
}
}
secret_target.father = {
save_scope_as = father
}
secret_target.real_father = {
save_scope_as = real_father
}
}
}
}
}
on_accept = {
scope:actor = {
remove_variable = currently_blackmailing
play_music_cue = mx_cue_murder
}
blackmail_interaction_effect = yes #Adds strong or weak hook + opinion penalty
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = medium_unity_loss
DESC = clan_unity_blackmail.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
on_decline = {
#Return event about exposing the secret
#AI will always expose
if = {
limit = {
scope:actor = { is_ai = no }
}
scope:recipient = {
custom_tooltip = BLACKMAIL_INTERACTION_HUMAN_TT
}
}
show_as_tooltip = {
if = {
limit = { exists = scope:secret }
scope:secret = {
expose_secret = scope:actor
}
}
if = {
limit = { exists = scope:target }
scope:target = {
expose_secret = scope:actor
}
}
}
scope:actor = { trigger_event = blackmail.0001 }
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = minor_unity_loss
DESC = clan_unity_blackmail.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
on_blocked_effect = {
scope:actor = { remove_variable = currently_blackmailing }
}
ai_accept = {
base = 0
modifier = {
add = 80
desc = BLACKMAIL_INTERACTION_BASE_ACCEPTANCE
}
modifier = {
add = -20
scope:recipient = {
has_trait = brave
}
desc = BLACKMAIL_INTERACTION_BRAVE_ACCEPTANCE
}
modifier = {
add = -20
scope:recipient = {
has_trait = arrogant
}
desc = BLACKMAIL_INTERACTION_ARROGANT_ACCEPTANCE
}
modifier = {
add = 10
scope:recipient = {
has_trait = craven
}
desc = BLACKMAIL_INTERACTION_CRAVEN_ACCEPTANCE
}
modifier = {
add = 50
scope:recipient = {
has_trait = paranoid
}
desc = BLACKMAIL_INTERACTION_PARANOID_ACCEPTANCE
}
# Unity modifiers
evaluate_action_decreasing_house_unity = {
VALUE = 25
}
opinion_modifier = {
trigger = {
scope:recipient = {
opinion = {
target = scope:actor
value < 0
}
}
}
opinion_target = scope:recipient
who = scope:actor
multiplier = 0.3
desc = BLACKMAIL_INTERACTION_OPINION_ACCEPTANCE
}
modifier = {
add = -20
scope:recipient = {
has_opinion_modifier = {
target = scope:actor
modifier = trust_opinion
value < 0
}
}
desc = BLACKMAIL_INTERACTION_DISTRUST_ACCEPTANCE
}
modifier = {
add = 30
any_secret = {
is_known_by = scope:actor
is_criminal_for = scope:recipient
}
desc = BLACKMAIL_MAJOR_SECRET_ACCEPTANCE
}
modifier = {
add = intimidated_reason_value
scope:recipient = {
has_dread_level_towards = {
target = scope:actor
level = 1
}
}
desc = INTIMIDATED_REASON
}
modifier = {
add = cowed_reason_value
scope:recipient = {
has_dread_level_towards = {
target = scope:actor
level = 2
}
}
desc = COWED_REASON
}
}
ai_min_reply_days = 1
ai_max_reply_days = 5
notification_text = {
triggered_desc = {
trigger = {
scope:actor = {
opinion = {
target = scope:recipient
value > 0
}
}
}
desc = BLACKMAIL_NOTIFICATION_OPENING
}
first_valid = {
triggered_desc = {
trigger = { scope:target = { secret_type = secret_deviant } }
desc = BLACKMAIL_NOTIFICATION_SECRET_DEVIANT
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_homosexual } }
desc = BLACKMAIL_NOTIFICATION_SECRET_HOMOSEXUAL
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_murder } }
desc = BLACKMAIL_NOTIFICATION_SECRET_MURDER
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_murder_attempt } }
desc = BLACKMAIL_NOTIFICATION_SECRET_MURDER_ATTEMPT
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_cannibal } }
desc = BLACKMAIL_NOTIFICATION_SECRET_CANNIBAL
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_lover } }
desc = BLACKMAIL_NOTIFICATION_SECRET_LOVER
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_non_believer } }
desc = BLACKMAIL_NOTIFICATION_SECRET_NON_BELIEVER
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_incest } }
desc = BLACKMAIL_NOTIFICATION_SECRET_INCEST
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_witch } }
desc = BLACKMAIL_NOTIFICATION_SECRET_WITCH
}
triggered_desc = {
trigger = { scope:target = { secret_type = secret_crypto_religionist } }
desc = BLACKMAIL_NOTIFICATION_SECRET_CRYPTO_RELIGIONIST
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_disputed_heritage
secret_target.real_father = scope:actor
secret_target.mother = scope:recipient
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_ILLEGITIMATE_CHILD_ACTOR
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_disputed_heritage
secret_target.mother = scope:recipient
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_ILLEGITIMATE_CHILD_OTHER
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_disputed_heritage
secret_target.real_father = scope:actor
secret_target = {
OR = {
this = scope:recipient
is_twin_of = scope:recipient
}
}
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_ILLEGITIMATE_CHILD_TARGET_ACTOR
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_disputed_heritage
secret_target = {
OR = {
this = scope:recipient
is_twin_of = scope:recipient
}
}
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_ILLEGITIMATE_CHILD_TARGET_OTHER
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_unmarried_illegitimate_child
secret_target.real_father = scope:actor
secret_target.mother = scope:recipient
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_UNMARRIED_ILLEGITIMATE_CHILD_ACTOR
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_unmarried_illegitimate_child
secret_target.mother = scope:recipient
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_UNMARRIED_ILLEGITIMATE_CHILD_OTHER
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_unmarried_illegitimate_child
secret_target.real_father = scope:actor
secret_target = {
OR = {
this = scope:recipient
is_twin_of = scope:recipient
}
}
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_UNMARRIED_ILLEGITIMATE_CHILD_TARGET_ACTOR
}
triggered_desc = {
trigger = {
scope:target = {
secret_type = secret_unmarried_illegitimate_child
secret_target = {
OR = {
this = scope:recipient
is_twin_of = scope:recipient
}
}
}
}
desc = BLACKMAIL_NOTIFICATION_SECRET_UNMARRIED_ILLEGITIMATE_CHILD_TARGET_OTHER
}
desc = BLACKMAIL_NOTIFICATION_SECRET_FALLBACK
}
desc = BLACKMAIL_NOTIFICATION_THREAT
}
# AI
ai_targets = {
ai_recipients = known_secrets
}
ai_target_quick_trigger = {
adult = yes
}
ai_frequency = 6
ai_will_do = {
base = 100
# Unity modifiers
evaluate_action_decreasing_house_unity = {
VALUE = 100
}
modifier = {
factor = 0
scope:actor.ai_honor >= 75
}
modifier = {
factor = 0.1
scope:actor.ai_honor >= 30
}
modifier = {
factor = 0
scope:actor.ai_honor >= -30
scope:recipient = {
has_relation_lover = scope:actor
}
}
modifier = {
factor = 0
scope:recipient = {
OR = {
has_relation_friend = scope:actor
has_relation_best_friend = scope:actor
has_relation_soulmate = scope:actor
}
}
}
}
ai_set_target = {
scope:recipient = {
random_secret = {
limit = {
is_known_by = scope:actor
is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = scope:recipient }
}
save_scope_as = target
}
}
}
}

View file

@ -0,0 +1,353 @@
# Ask to Promote your Legend
ce1_ask_to_promote_legend_interaction = {
icon = icon_contract_modification_single
category = interaction_category_diplomacy
popup_on_receive = yes
pause_on_receive = yes
can_send_despite_rejection = yes
ai_maybe = yes
interface_priority = 5
desc = ce1_ask_to_promote_legend_interaction_desc
greeting = positive
notification_text = PROMOTE_LEGEND_NOTIFICATION
is_shown = {
scope:actor.promoted_legend.legend_owner ?= scope:actor
NOT = { scope:actor = scope:recipient }
scope:recipient = {
is_landed = yes
age >= 12
is_physically_able = yes
}
}
is_valid_showing_failures_only = {
scope:recipient = {
custom_tooltip = {
text = recipient_already_promoting_legend_tt
NOT = { exists = promoted_legend }
}
}
custom_tooltip = {
text = recipient_close_or_neighbor_tt
OR = {
scope:recipient.dynasty = scope:actor.dynasty
scope:recipient = { knows_language_of_culture = scope:actor.culture }
scope:actor = {
has_friendly_relationship_with_character_trigger = { CHARACTER = scope:recipient }
}
scope:recipient = {
any_character_to_title_neighboring_county = {
any_county_province = {
any_province_legend = {
this = scope:actor.promoted_legend
}
}
}
}
}
}
}
cooldown_against_recipient = { years = 5 }
ai_min_reply_days = 2
ai_max_reply_days = 7
ai_accept = {
base = -10
## Tier
modifier = {
add = -5
scope:recipient.primary_title = {
tier = 2
}
desc = TIER_REASON_COUNT
}
modifier = {
add = -10
scope:recipient.primary_title = {
tier = 3
}
desc = TIER_REASON_DUKE
}
modifier = {
add = -20
scope:recipient.primary_title = {
tier = 4
}
desc = TIER_REASON_KING
}
modifier = {
add = -30
scope:recipient.primary_title = {
tier = 5
}
desc = TIER_REASON_EMPEROR
}
## Legend
# How cool is the legend?
modifier = {
add = 10
desc = REASON_ILLUSTRIOUS_LEGEND
scope:actor = {
promoted_legend = {
legend_quality = illustrious
}
}
}
modifier = {
add = 20
desc = REASON_MYTHICAL_LEGEND
scope:actor = {
promoted_legend = {
legend_quality = mythical
}
}
}
# Are you using a hook?
modifier = {
trigger = {
scope:hook ?= yes
}
add = 100
desc = LEGEND_HOOK_USED
}
# Are you using Gold?
modifier = {
trigger = {
scope:gold_cost ?= yes
}
add = 40
desc = TRADE_GOLD_FOR_BETTER_AI_ACCEPTANCE_TT
}
## Opinion
# Do they like you?
opinion_modifier = {
who = scope:recipient
opinion_target = scope:actor
multiplier = 1
desc = AI_OPINION_REASON
}
## Personality
# Are they ambitious?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_AMBITIOUS #re-using these
add = -15
scope:recipient = {
has_trait = ambitious
}
}
# Are they content?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_CONTENT
add = 5
scope:recipient = { has_trait = content }
}
# Are they stubborn?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_STUBBORN
add = -10
scope:recipient = { has_trait = stubborn }
}
# Are they arrogant?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_ARROGANT
add = -10
scope:recipient = { has_trait = arrogant }
}
# Are they humble?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_HUMBLE
add = 10
scope:recipient = { has_trait = humble }
}
# Are they trusting?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_TRUSTING
add = 15
scope:recipient = { has_trait = trusting }
}
# Are they paranoid?
modifier = {
desc = DEMAND_SUBMISSION_RECIPIENT_IS_PARANOID
add = -10
scope:recipient = { has_trait = paranoid }
}
## Dread
modifier = {
add = intimidated_halved_reason_value
scope:recipient = {
has_dread_level_towards = {
target = scope:actor
level = 1
}
}
desc = INTIMIDATED_REASON
}
modifier = {
add = cowed_halved_reason_value
scope:recipient = {
has_dread_level_towards = {
target = scope:actor
level = 2
}
}
desc = COWED_REASON
}
## War
modifier = {
add = -50
scope:recipient = {
is_at_war = yes
}
desc = HOSTAGE_AT_WAR_REASON
}
## Low Gold
modifier = {
add = -100
scope:actor.promoted_legend = {
legend_quality = famed
}
scope:recipient = {
monthly_character_income < famed_legend_promoter_cost
}
desc = TOO_HIGH_PROMOTER_MAINTENANCE_REASON
}
modifier = {
add = -100
scope:actor.promoted_legend = {
legend_quality = illustrious
}
scope:recipient = {
monthly_character_income < illustrious_legend_promoter_cost
}
desc = TOO_HIGH_PROMOTER_MAINTENANCE_REASON
}
modifier = {
add = -100
scope:actor.promoted_legend = {
legend_quality = mythical
}
scope:recipient = {
monthly_character_income < mythical_legend_promoter_cost
}
desc = TOO_HIGH_PROMOTER_MAINTENANCE_REASON
}
modifier = {
add = 25
scope:recipient = {
is_contact_of = scope:actor
}
desc = IS_CONTACT_REASON
}
}
on_accept = {
scope:actor.promoted_legend = {
save_scope_as = promoted_legend
}
scope:actor = {
send_interface_toast = {
type = event_toast_effect_good
title = ce1_ask_to_promote_legend_acceptance_tt
left_icon = scope:actor
right_icon = scope:recipient
if = {
limit = { always = scope:hook }
scope:actor = {
use_hook = scope:recipient
}
}
if = {
limit = { always = scope:gold_cost }
scope:actor = {
pay_short_term_gold = {
target = scope:recipient
gold = medium_gold_value
}
}
promoted_legend = { # To prevent gold exploits
add_to_variable_list = {
name = accepted_promote_legend_var
target = scope:recipient
years = 10
}
}
}
scope:recipient = {
set_promoted_legend = scope:actor.promoted_legend
}
}
}
}
on_decline = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_bad
title = ce1_ask_to_promote_legend_decline_tt
left_icon = scope:actor
right_icon = scope:recipient
}
}
}
# Use gold to increase acceptance
send_option = {
flag = gold_cost
localization = TRADE_GOLD_FOR_BETTER_AI_ACCEPTANCE
}
send_option = {
flag = hook
is_valid = {
scope:actor = {
has_usable_hook = scope:recipient
}
}
localization = GENERIC_SPEND_A_HOOK
}
send_options_exclusive = no
ai_potential = {
is_physically_able = yes
}
ai_targets = {
ai_recipients = neighboring_rulers
}
ai_frequency = 12
# Very similar to ai_accept, but ignores effects that are < 10 in value for brevity's sake
ai_will_do = {
base = 0
## Legends
modifier = {
add = 25
exists = promoted_legend
}
modifier = {
add = 25
promoted_legend = {
legend_quality = mythical
}
}
## Gold
modifier = {
add = -100
debt_level >= 0
}
modifier = {
add = -50
gold <= major_gold_value
}
## Personality
modifier = {
add = 25
has_trait = arrogant
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,170 @@
# Pick a favorite child to pre-select when choosing your destiny
choose_favorite_interaction = {
category = interaction_category_friendly
icon = designate_favorite
desc = choose_favorite_interaction_desc
is_shown = {
scope:actor = { is_ai = no }
scope:recipient.dynasty = scope:actor.dynasty
NOT = { scope:actor = scope:recipient }
}
is_valid_showing_failures_only = {
scope:actor = { is_alive = yes }
scope:recipient = { is_favorite_child = no }
scope:recipient = {
custom_tooltip = {
text = cant_be_another_player_tt
is_ai = yes
}
custom_tooltip = {
text = must_be_direct_descendant_tt
OR = {
is_child_of = scope:actor
is_grandchild_of = scope:actor
is_great_grandchild_of = scope:actor
}
}
custom_tooltip = {
text = favorite_child_must_be_in_good_health_tt
NOR = {
has_trait = incapable
health <= 2.5
}
}
custom_tooltip = {
text = cant_be_hostage_tt
is_hostage = no
}
custom_tooltip = {
text = cant_already_be_your_heir
NOT = {
this = scope:actor.player_heir
}
}
custom_tooltip = {
text = no_republic_or_theocracy_tt
NOR = {
government_has_flag = government_is_republic
government_has_flag = government_is_theocracy
}
}
trigger_if = {
limit = {
is_ruler = yes
}
custom_tooltip = {
text = not_baron_holy_order_merc_tt
highest_held_title_tier >= tier_county
primary_title = {
is_mercenary_company = no
is_holy_order = no
}
}
}
}
}
on_auto_accept = {
scope:recipient = {
send_interface_message = {
title = choose_favorite_interaction_notification
left_icon = scope:actor
show_as_tooltip = {
scope:actor = {
set_relation_favorite_child = { reason = favorite_child_chosen target = scope:recipient }
}
}
}
}
}
on_accept = {
assign_favourite_child_effect = {
ACTOR = scope:actor
RECIPIENT = scope:recipient
}
}
auto_accept = yes
}
remove_favorite_interaction = {
category = interaction_category_friendly
icon = designate_favorite
desc = remove_favorite_interaction_desc
is_shown = {
scope:actor = { is_ai = no }
scope:recipient.dynasty = scope:actor.dynasty
NOT = { scope:actor = scope:recipient }
}
is_valid_showing_failures_only = {
scope:actor = { is_alive = yes }
scope:recipient = { is_favorite_child = yes }
}
on_auto_accept = {
scope:recipient = {
send_interface_message = {
title = remove_favorite_interaction_notification
left_icon = scope:actor
show_as_tooltip = {
scope:actor = {
remove_relation_favorite_child = scope:recipient
}
}
}
}
}
on_accept = {
scope:actor = {
random_relation = {
type = favorite_child
save_scope_as = current_favorite
}
send_interface_toast = {
title = remove_favorite_interaction_notification
left_icon = scope:actor
right_icon = scope:recipient
if = {
limit = {
exists = scope:current_favorite
}
remove_relation_favorite_child = scope:current_favorite
scope:current_favorite = {
add_opinion = {
target = scope:actor
modifier = no_more_favorite_opinion
}
}
}
custom_tooltip = remove_favorite_interaction_notification.tt
}
hidden_effect = {
every_close_or_extended_family_member = {
limit = {
is_child_of = scope:actor
is_grandchild_of = scope:actor
is_great_grandchild_of = scope:actor
}
add_opinion = {
target = scope:actor
modifier = no_more_favorite_opinion
}
add_opinion = {
target = scope:recipient
modifier = no_more_favorite_opinion
}
}
}
}
}
auto_accept = yes
}

View file

@ -0,0 +1,122 @@
#Accuse of violating sumptuary laws
#by James Beaumont
sumptuary_law_debate_interaction = {
category = interaction_category_hostile
interface_priority = 20
desc = sumptuary_law_debate_interaction_desc
icon = weaver_inspiration
is_shown = {
scope:actor = {
has_royal_court = yes
has_dlc_feature = royal_court
amenity_level = {
type = court_fashion
value <= 2
}
}
NOT = { scope:actor = scope:recipient }
scope:recipient = {
# Character is either not a priest/zealous class of a naked priest faith or doesn't belong to a naked priest faith
OR = {
faith = { NOT = { has_doctrine_parameter = naked_priests_active } }
NOR = {
ai_zeal >= 50
has_trait = devoted
has_trait = zealous
government_has_flag = government_is_theocracy
has_council_position = councillor_court_chaplain
}
}
# They are in your realm to some capacity
OR = {
liege = scope:actor #You may debate with direct vassals and courtiers.
host = scope:actor #You may debate guests
}
}
}
is_valid_showing_failures_only = {
scope:actor = {
is_adult = yes
}
scope:recipient = {
# Friends don't accuse friends of fashion crimes
NOT = {
has_friendly_relationship_with_character_trigger = {
CHARACTER = scope:actor
}
}
}
custom_description = {
text = sumptuary_debate_has_been_debated
object = scope:recipient
scope:recipient = {
NOT = { has_character_modifier = used_sumptuary_debate_modifier } #To prevent back and forth & back-to-back challenges
NOT = { has_character_modifier = sumptuary_debated_modifier }
}
}
custom_description = {
text = sumptuary_debate_timing
scope:actor = {
NOT = { has_character_modifier = used_sumptuary_debate_modifier }
}
}
scope:recipient = {
is_adult = yes
}
scope:recipient = {
NOT = { has_strong_hook = scope:actor }
}
scope:recipient = { is_busy_in_events_localised = yes }
scope:actor = {
NOT = {
is_at_war_with = scope:recipient
}
}
}
auto_accept = yes
on_accept = {
hidden_effect = {
scope:actor = {
add_character_modifier = {
modifier = used_sumptuary_debate_modifier
years = 2
}
}
scope:recipient = {
trigger_event = {
id = court_amenities_interactions.0001
days = 1
}
add_character_modifier = {
modifier = sumptuary_debated_modifier
years = 10
}
}
}
custom_tooltip = sumptuary_debate_interaction.tt_modifiers
scope:actor = {
stress_impact = {
arbitrary = minor_stress_impact_loss
just = minor_stress_impact_gain
}
custom_tooltip = sumptuary_debate_interaction.tt_winnings_actor
}
scope:recipient = {
custom_tooltip = sumptuary_debate_interaction.tt_winnings_recipient
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = medium_unity_loss
DESC = clan_unity_sumptuary_law.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,385 @@
# 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 = {
NOT = { scope:actor.culture = scope:recipient.culture }
scope:recipient.liege = scope:actor
}
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 = {
is_independent_ruler = yes
highest_held_title_tier >= tier_kingdom
}
is_playable_character = yes
realm_size >= 4
is_physically_able_adult = yes
is_at_war = no
exists = capital_county
capital_county.holder = root
NOT = {
has_game_rule = none_hybrid_culture_ai_frequency
}
}
is_shown = {
scope:actor = {
is_ai = yes
}
exists = scope:target
}
ai_set_target = {
scope:actor = {
if = {
limit = {
exists = capital_county
any_sub_realm_county = {
NOT = {
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 = {
NOT = {
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 = 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
NOT = {
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
NOT = {
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
OR = {
scope:actor.culture = culture:scottish
scope:actor.culture = culture:gaelic
}
OR = {
scope:target = culture:scottish
scope:target = 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

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,162 @@
#Interactions relating to factions
force_join_faction_interaction = {
category = interaction_category_vassal
special_interaction = force_join_faction
desc = force_join_faction_interaction_desc
icon = scroll_scales
force_notification = yes
greeting = positive
notification_text = FORCE_JOIN_FACTION_NOTIFICATION
is_shown = {
scope:actor = {
is_a_faction_member = yes
liege = scope:recipient.liege
NOR = {
joined_faction = scope:recipient.joined_faction
scope:recipient = scope:actor.liege
}
}
}
is_valid_showing_failures_only = {
scope:actor = {
trigger_if = {
limit = { government_allows = administrative }
custom_tooltip = {
text = force_join_faction_admin_requirement_desc
OR = {
has_strong_usable_hook = scope:recipient
AND = {
influence >= { value = scope:actor.monumental_influence_value multiply = 2 }
scope:recipient ?= {
NOT = { opinion = { target = scope:actor value <= -50 } }
NOT = { opinion = { target = scope:recipient.liege value >= 50 } }
}
}
}
}
}
trigger_else = {
has_strong_usable_hook = scope:recipient # Make sure to update the NFaction::POTENTIAL_FORCE_JOIN_HOOK_TYPE define if you change the type of hook used here
}
NOT = { is_at_war_with = scope:recipient }
}
scope:recipient = {
trigger_if = {
limit = { is_a_faction_member = yes }
joined_faction.faction_leader = { is_ai = yes }
}
is_forced_into_faction = no
can_join_faction = scope:actor.joined_faction
}
custom_description = {
text = barons_joining_independence_factions
NAND = {
scope:actor.joined_faction = { faction_is_type = independence_faction }
scope:recipient.highest_held_title_tier = tier_barony
}
}
}
on_accept = {
scope:actor = {
send_interface_message = {
type = event_faction_neutral
title = force_join_faction_interaction_notification
right_icon = scope:recipient
if = {
limit = { scope:hook = yes }
use_hook = scope:recipient
}
else_if = {
limit = { scope:influence = yes }
change_influence = {
value = monumental_influence_value
multiply = -2
}
}
scope:recipient = {
join_faction_forced = {
faction = scope:actor.joined_faction
forced_by = scope:actor
years = 10
}
}
}
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = medium_unity_loss
DESC = clan_unity_forced_faction_joinage.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
auto_accept = yes
#Use hook
send_option = {
is_valid = {
exists = scope:recipient
scope:actor ?= { has_strong_usable_hook = scope:recipient }
}
flag = hook
localization = GENERIC_SPEND_A_HOOK
}
#Spend influence
send_option = {
is_shown = {
scope:actor = { government_allows = administrative }
scope:actor.top_liege ?= { government_allows = administrative }
}
is_valid = { # Convincing someone with influence is not available if they hate you or love the liege
scope:actor ?= { influence >= { value = scope:actor.monumental_influence_value multiply = 2 } }
scope:recipient ?= {
NOT = { opinion = { target = scope:actor value <= -50 } }
NOT = { opinion = { target = scope:recipient.liege value >= 50 } }
}
}
flag = influence
localization = SPEND_INFLUENCE
}
send_options_exclusive = yes
# AI
ai_targets = {
ai_recipients = peer_vassals
}
ai_frequency = 12
ai_potential = {
is_independent_ruler = no
is_a_faction_member = yes
# Only force others to join a faction if you joined by your own free will
is_forced_into_faction = no
}
ai_will_do = {
base = 100
# Don't steal players' factions' members
modifier = {
factor = 0
scope:recipient = {
is_a_faction_member = yes
joined_faction = {
faction_leader = {
is_ai = no
}
}
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,743 @@
#Give characters money to improve their opinion of you
gift_interaction = {
icon = icon_gold
category = interaction_category_friendly
common_interaction = yes
interface_priority = 60
desc = gift_interaction_desc
greeting = positive
notification_text = SEND_GIFT_PROPOSAL
answer_accept_key = SEND_GIFT_ACCEPT
answer_reject_key = SEND_GIFT_REJECT
ai_targets = {
ai_recipients = scripted_relations
}
ai_targets = {
ai_recipients = liege
}
ai_targets = {
ai_recipients = head_of_faith
}
ai_targets = {
ai_recipients = neighboring_rulers
ai_recipients = peer_vassals
max = 10
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_target_quick_trigger = {
adult = yes
}
ai_frequency = 60
is_shown = {
NOT = {
scope:recipient = scope:actor
}
# Prioritize paying back loans first
scope:actor = {
trigger_if = {
limit = {
exists = var:loan_amount_owed
exists = var:loan_holder
}
NOT = { var:loan_holder = scope:recipient }
}
}
}
is_highlighted = {
scope:recipient = {
OR = {
house ?= {
OR = {
is_dominant_family = yes
is_powerful_family = yes
}
}
}
}
}
highlighted_reason = HIGHLIGHTED_FAMILY_RATING
is_valid_showing_failures_only = {
scope:actor.gold >= gift_value
scope:recipient = { is_busy_in_events_localised = yes }
}
on_auto_accept = {
scope:recipient = {
trigger_event = char_interaction.0100
}
}
on_accept = {
scope:recipient = {
# Verify that they could become friend
if = {
limit = {
NAND = {
has_relation_friend = scope:actor
has_relation_lover = scope:actor
has_relation_soulmate = scope:actor
has_relation_best_friend = scope:actor
}
}
gifting_leads_towards_friendship_effect = yes
}
}
scope:actor = {
# Warning for multiple gifts
if = {
limit = {
scope:recipient = {
has_opinion_modifier = {
target = scope:actor
modifier = gift_opinion
}
}
}
custom_tooltip = ALREADY_SENT_GIFT_WARNING
}
send_interface_message = {
type = event_gold_neutral
title = gift_interaction_notification
right_icon = scope:recipient
pay_short_term_gold = {
gold = gift_value
target = scope:recipient
}
stress_impact = {
greedy = medium_stress_impact_gain
}
if = {
limit = {
scope:recipient = {
NOT = {
is_heir_of = scope:actor
}
}
}
stress_impact = {
generous = medium_stress_impact_loss
}
}
#FP3 Tenet Communal Possessions Perk - piety gain for gift giving.
if = {
limit = {
scope:actor = {
faith = {
has_doctrine_parameter = piety_from_gifts_active
}
}
}
scope:actor = {
add_piety = minor_piety_gain
}
}
# Check if the target already has been sent a gift or not. If not, apply the following effects
if = {
limit = {
NOT = {
scope:recipient = {
has_opinion_modifier = {
target = scope:actor
modifier = gift_opinion
}
}
}
}
# Struggle Catalyst
if = {
limit = {
scope:actor = {
any_character_struggle = {
involvement = involved
phase_has_catalyst = catalyst_gift_independent_ruler
activate_struggle_catalyst_secondary_character_involvement_involved_trigger = {
CATALYST = catalyst_gift_independent_ruler
CHAR = scope:recipient
}
}
}
}
hidden_effect = {
scope:actor = {
every_character_struggle = {
involvement = involved
limit = { phase_has_catalyst = catalyst_gift_independent_ruler }
activate_struggle_catalyst = {
catalyst = catalyst_gift_independent_ruler
character = scope:actor
}
}
}
}
}
if = {
limit = {
fp3_struggle_involves_one_supporter_and_one_detractor = {
FIRST = scope:actor
SECOND = scope:recipient
}
scope:actor = {
any_character_struggle = {
#involvement = involved
activate_struggle_catalyst_secondary_character_involvement_either_trigger = {
CATALYST = catalyst_gift_supporter_detractor_ruler
CHAR = scope:recipient
}
}
}
}
hidden_effect = {
scope:actor = {
every_character_struggle = {
#involvement = involved
limit = {
activate_struggle_catalyst_secondary_character_involvement_either_trigger = {
CATALYST = catalyst_gift_supporter_detractor_ruler
CHAR = scope:recipient
}
}
activate_struggle_catalyst = {
catalyst = catalyst_gift_supporter_detractor_ruler
character = scope:actor
}
log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_gift_supporter_detractor_ruler }
}
}
}
}
# FP2 Urbanism Legacy Perk 2: increase cultural acceptance when gifting a republican vassal
if = {
limit = {
scope:actor = {
exists = dynasty
dynasty = { has_dynasty_perk = fp2_urbanism_legacy_4 }
}
scope:recipient = {
AND = {
is_vassal_of = scope:actor
government_has_flag = government_is_republic
}
}
NOT = {
scope:actor.culture = scope:recipient.capital_province.county.culture
}
}
scope:recipient.capital_province.county.culture = {
change_cultural_acceptance = {
target = scope:actor.culture
value = {
value = 20
multiply = scope:recipient.capital_province.county.development_level
divide = 100
}
desc = cultural_acceptance_gain_gift_dynasty_perk
}
}
}
}
# Let's apply the opinion modifier last, as to apply everything else correctly first
scope:recipient = {
add_opinion = {
target = scope:actor
modifier = gift_opinion
opinion = send_gift_opinion
}
}
}
if = { # for tutorial purposes
limit = {
is_ai = no
scope:recipient = { is_child_of = scope:actor }
}
add_character_flag = {
flag = tutorial_sent_gift
days = 200
}
}
#Influence gain between admin rulers
if = {
limit = {
is_ruler = yes
government_allows = administrative
scope:recipient = {
is_ruler = yes
government_allows = administrative
any_held_title = {
is_noble_family_title = yes
}
}
}
if = {
limit = {
scope:recipient = {
OR = {
house = {
is_dominant_family = yes
}
this = scope:actor.top_liege
}
influence_level >= 5
}
}
change_influence = {
value = miniscule_influence_gain
multiply = 8
}
}
else_if = {
limit = {
scope:recipient = {
OR = {
house = {
is_dominant_family = yes
}
this = scope:actor.top_liege
}
influence_level >= 3
}
}
change_influence = {
value = miniscule_influence_gain
multiply = 7
}
}
else_if = {
limit = {
scope:recipient = {
OR = {
house = {
is_dominant_family = yes
}
this = scope:actor.top_liege
}
}
}
change_influence = {
value = miniscule_influence_gain
multiply = 6
}
}
else_if = {
limit = {
scope:recipient = {
OR = {
house = {
is_powerful_family = yes
}
this = scope:actor.top_liege
}
influence_level >= 5
}
}
change_influence = {
value = miniscule_influence_gain
multiply = 6
}
}
else_if = {
limit = {
scope:recipient = {
OR = {
house = {
is_powerful_family = yes
}
this = scope:actor.top_liege
}
influence_level >= 3
}
}
change_influence = {
value = miniscule_influence_gain
multiply = 5
}
}
else_if = {
limit = {
scope:recipient = {
OR = {
house = {
is_powerful_family = yes
}
this = scope:actor.top_liege
}
}
}
change_influence = {
value = miniscule_influence_gain
multiply = 4
}
}
else_if = {
limit = {
scope:recipient = { influence_level >= 5 }
}
change_influence = {
value = miniscule_influence_gain
multiply = 3
}
}
else_if = {
limit = {
scope:recipient = { influence_level >= 3 }
}
change_influence = {
value = miniscule_influence_gain
multiply = 2
}
}
else = {
change_influence = miniscule_influence_gain
}
}
}
}
ai_accept = {
base = 0
modifier = {
add = 100
desc = GOLD_REASON
}
# Struggle motive
modifier = {
desc = AI_STRUGGLE_INTENT
scope:recipient = {
is_independent_ruler = yes
any_character_struggle = {
involvement = involved
}
}
add = {
value = 0
if = {
limit = {
scope:recipient = {
any_character_struggle = {
phase_has_catalyst = catalyst_gift_independent_ruler
}
has_character_flag = agenda_towards_escalation
}
}
add = -100
}
else_if = {
limit = {
scope:recipient = {
any_character_struggle = {
phase_has_catalyst = catalyst_gift_independent_ruler
}
}
}
add = 200
}
}
}
}
ai_potential = {
is_available_at_peace_ai_adult = yes
ai_greed < medium_positive_ai_value
short_term_gold >= gift_interaction_cutoff
NOT = {
has_trait = greedy
}
ai_has_conqueror_personality = no
ai_should_focus_on_building_in_their_capital = no
}
auto_accept = {
custom_description = {
text = auto_accept_interaction_ai
object = scope:recipient
scope:recipient = {
is_ai = yes
}
}
}
ai_min_reply_days = 1
ai_max_reply_days = 1
ai_will_do = {
base = 100
modifier = { # Do not send double-gifts
factor = 0
scope:recipient = {
has_opinion_modifier = {
target = scope:actor
modifier = gift_opinion
}
}
}
modifier = { # Basic Filtering
factor = 0
scope:recipient = {
NOR = {
AND = { # Bankrupt lovers, friends and a bankrupt liege should be considered
OR = {
scope:actor = {
any_liege_or_above = {
this = scope:recipient
}
}
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
}
gold < 0
}
AND = { # Generous characters will give gifts to their friends/lovers
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 = {
ai_greed <= high_negative_ai_value
AND = {
ai_greed < 0
culture = {
has_cultural_parameter = gives_more_gifts
}
}
}
}
}
AND = { # Characters with the Generous Cultural Tradition will give gifts to more people
is_ruler = yes
OR = {
is_allied_to = scope:actor
is_close_or_extended_family_of = scope:actor
}
scope:actor = {
ai_greed < 0
culture = {
has_cultural_parameter = gives_more_gifts
}
}
}
AND = { # Characters with the loyal trait more likely to give gifts to friends/lieges
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
}
scope:actor = {
ai_greed <= 0
has_trait = loyal
}
}
AND = { # Zealous characters want to support the defending side in GHW's
gold < 200
any_character_war = {
OR = {
using_cb = undirected_great_holy_war
using_cb = directed_great_holy_war
}
primary_defender = scope:recipient
}
scope:actor = {
ai_zeal >= 50
}
}
AND = { # Powerful vassals should be considered
is_powerful_vassal_of = scope:actor
opinion = {
target = scope:actor
value < 0
}
NOT ={
has_opinion_modifier = {
target = scope:actor
modifier = gift_opinion
}
}
}
AND = { # Factioneering vassals should be considered
is_vassal_of = scope:actor
is_a_faction_member = yes
NOT ={
has_opinion_modifier = {
target = scope:actor
modifier = gift_opinion
}
}
}
AND = { # Realm Priests should be considered
scope:actor = {
faith = { has_doctrine = doctrine_theocracy_temporal }
exists = cp:councillor_court_chaplain
cp:councillor_court_chaplain = scope:recipient
}
opinion = {
target = scope:actor
value <= 25
}
NOT = {
has_opinion_modifier = {
target = scope:actor
modifier = gift_opinion
}
}
}
AND = { # Rulers at war with your rivals deserve gold if they're bankrupt
gold < 0
is_at_war = yes
any_war_enemy = {
has_relation_rival = scope:actor
}
}
AND = { # Independent ruler within the struggle should be considered
any_character_struggle = {
phase_has_catalyst = catalyst_gift_independent_ruler
}
}
}
}
}
# Struggle
modifier = {
scope:recipient = {
any_character_struggle = {
involvement = involved
phase_has_catalyst = catalyst_gift_independent_ruler
}
}
scope:actor = {
any_character_struggle = {
involvement = involved
phase_has_catalyst = catalyst_gift_independent_ruler
}
NOT = {
has_relation_rival = scope:recipient
}
}
add = {
value = 0
if = {
limit = {
scope:actor = {
has_character_flag = agenda_towards_escalation
}
}
add = -100
}
else_if = {
limit = {
scope:actor = {
has_character_flag = agenda_towards_deescalation
}
scope:recipient = {
has_character_flag = agenda_towards_deescalation
}
}
add = {
value = 150
if = {
limit = { scope:recipient = { is_ai = no} }
add = 150 # higher for human player to Prioritize them
}
# Then lower the intent depending on the gold reserve
# Base value applied if the AI has 3x the gold cutoff
multiply = {
value = short_term_gold
divide = {
value = gift_interaction_cutoff
multiply = 3
}
}
}
}
else_if = {
limit = {
scope:actor = {
has_character_flag = agenda_towards_deescalation
}
}
add = {
value = 25
if = {
limit = { scope:recipient = { is_ai = no} }
add = 150 # higher for human player to Prioritize them
}
# Then lower the intent depending on the gold reserve
# Base value applied if the AI has 3x the gold cutoff
multiply = {
value = short_term_gold
divide = {
value = gift_interaction_cutoff
multiply = 3
}
}
}
}
}
}
modifier = {
factor = 0.1
scope:recipient = {
opinion = {
target = scope:actor
value < 0
}
NAND = {
is_vassal_of = scope:actor
scope:actor = {
ai_rationality > 50
}
}
}
}
modifier = {
add = 100
scope:actor = {
is_at_war = no
has_trait = fp3_struggle_supporter
any_character_struggle = { is_struggle_type = persian_struggle }
}
scope:recipient = {
title:d_sunni.holder ?= this
gold < 0
}
}
modifier = {
factor = 0.1
scope:recipient = {
has_relation_rival = scope:actor
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,190 @@

# Set one of your children as heir
#This interaction is referenced in code! If it's renamed you have to ping a coder
designate_heir_interaction = {
icon = heir
category = interaction_category_diplomacy
desc = designate_heir_interaction_desc
is_shown = {
trigger_if = {
limit = { # Admin always has access to this - Recipient just need to be their child
scope:actor = {
government_allows = administrative
any_held_title = {
is_noble_family_title = yes
}
}
}
scope:recipient = {
is_child_of = scope:actor
}
}
trigger_else = { # Everyone else also needs to gain access to this interaction
scope:recipient = {
is_child_of = scope:actor
}
scope:actor = {
can_designate_heir_trigger = yes
}
}
NOR = {
scope:recipient = scope:actor.designated_heir
scope:recipient = scope:actor
}
trigger_if = {
limit = {
scope:actor = { NOT = { primary_title = title:e_byzantium } }
}
custom_description = {
text = "dynasty_member_leads_election"
scope:actor = {
NAND = {
primary_title = {
has_title_law_flag = elective_succession_law
}
dynasty = primary_heir.dynasty
}
}
}
}
}
cost = {
prestige = {
value = {
add = {
if = {
limit = {
scope:actor = {
government_allows = administrative
any_held_title = {
is_noble_family_title = yes
}
}
}
value = designate_heir_admin_prestige_cost
}
else = {
value = designate_heir_cost
}
desc = BASE
}
if = {
limit = {
scope:actor = {
government_has_flag = government_is_landless_adventurer
}
}
multiply = {
value = 0
desc = "[adventurer|E]"
}
}
}
}
influence = {
value = {
add = 0
if = {
limit = {
scope:actor = {
government_allows = administrative
any_held_title = {
is_noble_family_title = yes
}
}
}
add = {
value = designate_heir_admin_influence_cost
desc = "[administrative_government|E]"
}
}
}
}
}
is_valid_showing_failures_only = {
trigger_if = {
limit = { exists = scope:recipient }
scope:recipient = {
is_busy_in_events_localised = yes
is_eunuch_trigger = no
NOR = {
has_trait = disinherited
has_trait = devoted
has_trait = order_member
has_trait = bastard
}
}
}
scope:actor = {
trigger_if = {
limit = {
government_allows = administrative
any_held_title = {
is_noble_family_title = yes
}
}
prestige >= designate_heir_admin_prestige_cost
influence >= designate_heir_admin_influence_cost
custom_tooltip = {
text = valid_co_emperor_candidate_liege_trigger
scope:recipient.top_liege = scope:actor.top_liege
}
}
trigger_else_if = {
limit = {
NOT = { government_has_flag = government_is_landless_adventurer }
}
prestige >= designate_heir_cost
}
trigger_else = {}
}
trigger_if = {
limit = {
scope:actor = {
government_has_flag = government_is_landless_adventurer
}
exists = scope:recipient
}
scope:recipient = {
is_adult = yes
}
}
custom_tooltip = {
text = designate_heir_interaction.tt.currently_coruling
scope:actor = {
NOT = { has_diarchy_active_parameter = diarchy_is_co_rulership }
}
}
}
on_auto_accept = {
scope:recipient = {
trigger_event = char_interaction.0120
}
}
on_accept = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_neutral
title = designate_heir_interaction_notification
left_icon = scope:actor
right_icon = scope:recipient
set_designated_heir = scope:recipient
}
}
}
auto_accept = yes
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,683 @@

invite_agent_to_scheme_interaction = {
special_interaction = invite_to_scheme_interaction
hidden = yes
# Delaying the response makes it possible to invite multiple agents to the same slot.
ai_instant_response = yes
on_accept = {
scope:recipient = {
if = {
limit = {
OR = {
always = scope:gift
always = scope:gift_significant
always = scope:offer_hook
always = scope:offer_hook_strong
always = scope:hook
always = scope:opportunities_t1
always = scope:opportunities_t2
always = scope:prestige
always = scope:influence
always = scope:council_rights
always = scope:de_jure_title
always = scope:claimed_title
always = scope:piety
}
}
force_add_to_agent_slot = {
agent_slot = scope:agent_slot
years = 5
}
}
else = { add_to_agent_slot = scope:agent_slot }
}
scope:actor = {
# No bribe.
## We hack this in to stop the window jumping around as you add or remove bribes.
if = {
limit = {
NOR = {
always = scope:gift
always = scope:gift_significant
always = scope:offer_hook
always = scope:offer_hook_strong
always = scope:hook
always = scope:opportunities_t1
always = scope:opportunities_t2
always = scope:prestige
always = scope:influence
always = scope:council_rights
always = scope:de_jure_title
always = scope:claimed_title
always = scope:piety
}
}
custom_tooltip = offer_bribes.tt.window_jump_fix
}
# Bribe
if = {
limit = { always = scope:gift }
pay_short_term_gold = {
gold = bribe_value
target = scope:recipient
}
stress_impact = { greedy = minor_stress_impact_gain }
}
# Big Bribe
if = {
limit = { always = scope:gift_significant }
pay_short_term_gold = {
gold = greater_bribe_value
target = scope:recipient
}
stress_impact = { greedy = medium_stress_impact_gain }
}
# Offer Hook
if = {
limit = { always = scope:offer_hook }
stress_impact = {
base = minor_stress_impact_gain
paranoid = major_stress_impact_gain
}
scope:recipient = {
add_hook = {
type = favor_hook
target = scope:actor
}
}
}
# Offer Strong Hook
if = {
limit = { always = scope:offer_hook_strong }
stress_impact = { base = major_stress_impact_gain }
scope:recipient = {
add_hook = {
type = strong_favor_hook
target = scope:actor
}
}
}
# Use Hook
if = {
limit = { always = scope:hook }
use_hook = scope:recipient
}
# Burn Opportunities
if = {
limit = { always = scope:opportunities_t1 }
custom_tooltip = {
text = spend_agent_charges.tt.t1
scope:scheme = {
change_opportunities = {
value = invite_agent_opportunities_t1_value
multiply = -1
}
}
}
}
# Burn More Opportunities
if = {
limit = { always = scope:opportunities_t2 }
custom_tooltip = {
text = spend_agent_charges.tt.t2
scope:scheme = {
change_opportunities = {
value = invite_agent_opportunities_t2_value
multiply = -1
}
}
}
}
# Prestige
if = {
limit = { always = scope:prestige }
add_prestige = {
value = prestige_bribe_value
multiply = -1
}
scope:recipient = { add_prestige = prestige_bribe_value }
}
# Influence
if = {
limit = { always = scope:influence }
change_influence = {
value = influence_bribe_value
multiply = -1
}
scope:recipient = { change_influence = influence_bribe_value }
}
# Council Rights
if = {
limit = { always = scope:council_rights }
scope:recipient = {
vassal_contract_set_obligation_level = {
type = council_rights
level = 1
}
set_vassal_contract_modification_blocked = yes
}
}
create_title_and_vassal_change = {
type = granted
save_scope_as = change
}
# De Jure County
if = {
limit = { always = scope:de_jure_title }
random_held_title = {
limit = {
actor_has_valid_de_jure_enticement_county_trigger = yes
any_this_title_or_de_jure_above = {
holder ?= { this = scope:recipient }
}
}
change_title_holder = {
holder = scope:recipient
change = scope:change
}
}
}
# Claimed County
if = {
limit = { always = scope:claimed_title }
random_held_title = {
limit = {
actor_has_valid_claimed_enticement_county_trigger = yes
scope:recipient = { has_claim_on = prev }
}
change_title_holder = {
holder = scope:recipient
change = scope:change
}
}
}
resolve_title_and_vassal_change = scope:change
# Piety
if = {
limit = { always = scope:piety }
scope:actor = {
add_piety = {
value = piety_bribe_value
multiply = -1
}
}
scope:recipient = { add_piety = piety_bribe_value }
}
}
# Stress.
## For scope: recipient.
scope:recipient = {
if = {
limit = {
scope:scheme = { is_scheme_category = contract }
}
# Honourable characters don't like being forced into criminal schemes.
if = {
limit = {
OR = {
has_trait = just
has_trait = compassionate
}
scope:scheme.task_contract ?= { is_criminal = yes }
}
add_opinion = {
target = scope:actor
modifier = forced_me_to_help_crimes_opinion
opinion = -20
}
stress_impact = {
just = minor_stress_impact_gain
compassionate = miniscule_stress_impact_gain
}
}
# Lazy characters don't like being made to work at all.
else_if = {
limit = { has_trait = lazy }
add_opinion = {
target = scope:actor
modifier = forced_me_to_work_opinion
opinion = -10
}
stress_impact = { lazy = miniscule_stress_impact_gain }
}
}
}
}
ai_accept = {
base = 0
scheme_modifier = {
object = scope:scheme
target = scope:recipient
}
# You should not add modifiers here! If you want to add modifiers, they should be added to either:
## - ai_agent_join_chance_hostile_general_suite_modifier
## - ai_agent_join_chance_personal_general_suite_modifier
}
auto_accept = {
trigger_if = {
limit = {
scope:recipient.var:devotee_agent_var ?= scope:actor # They are a devotee of yours
}
custom_tooltip = devotee_agent_desc
}
trigger_else_if = {
limit = {
scope:hook = yes
scope:actor = { has_strong_hook = scope:recipient }
}
custom_description = {
text = "spending_hook"
subject = scope:actor
object = scope:recipient
always = yes
}
}
trigger_else_if = {
limit = {
scope:scheme = { is_scheme_category = contract }
}
# Should be synced with the modifiers in ai_agent_join_chance_laamp_contract_modifier, else agents'll leave the scheme immediately after joining.
scope:recipient = {
is_courtier_of = scope:actor
NOR = {
has_relation_rival = scope:actor
custom_tooltip = {
text = invite_agent_to_scheme_interaction.tt.no_stooges
AND = {
scope:actor = { has_court_position = stooge_camp_officer }
is_court_position_employer = {
court_position = stooge_camp_officer
who = scope:actor
}
}
}
}
}
}
trigger_else = { always = no }
}
options_heading = invite_agent_to_scheme_interaction.t.options_header
# Everyone
## Spend opportunities.
### x1.
send_option = {
flag = opportunities_t1
is_shown = {
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
custom_tooltip = {
text = offer_opportunities.tt.need_an_opportunity.t1
scope:scheme = { scheme_agent_charges >= invite_agent_opportunities_t1_value }
}
custom_tooltip = {
text = offer_opportunities.tt.cannot_offer_multiple_sets
scope:opportunities_t2 = no
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_OPPORTUNITIES_T1
}
### x3.
send_option = {
flag = opportunities_t2
is_shown = {
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
custom_tooltip = {
text = offer_opportunities.tt.need_an_opportunity.t2
scope:scheme = { scheme_agent_charges >= invite_agent_opportunities_t2_value }
}
custom_tooltip = {
text = offer_opportunities.tt.cannot_offer_multiple_sets
scope:opportunities_t1 = no
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_OPPORTUNITIES_T2
}
## Gold
send_option = {
flag = gift
is_shown = {
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:actor.gold >= bribe_value
custom_tooltip = {
text = offer_gold.tt.cannot_offer_both_bribes
scope:gift_significant = no
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_GOLD
current_description = {
# Triggered desc so that we don't get a weird double tooltip.
triggered_desc = {
trigger = { scope:actor.gold >= bribe_value }
desc = SCHEME_AGENT_GOLD_VALID
}
}
}
## Even more gold
send_option = {
flag = gift_significant
is_shown = {
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:actor.gold >= greater_bribe_value
custom_tooltip = {
text = offer_gold.tt.cannot_offer_both_bribes
scope:gift = no
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_GOLD_SIGNIFICANT
current_description = {
# Triggered desc so that we don't get a weird double tooltip.
triggered_desc = {
trigger = { scope:actor.gold >= greater_bribe_value }
desc = SCHEME_AGENT_GOLD_SIGNIFICANT_VALID
}
}
}
## Offer a hook
send_option = {
flag = offer_hook
is_shown = {
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
custom_tooltip = {
text = offer_hook.tt.cannot_offer_both_hooks
scope:offer_hook_strong = no
}
NOT = {
scope:recipient = { has_hook = scope:actor }
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_HOOK
}
## Offer a strong hook
send_option = {
flag = offer_hook_strong
is_shown = {
scope:actor = { has_trait_with_flag = can_offer_strong_hook_to_agents }
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
custom_tooltip = {
text = offer_hook.tt.cannot_offer_both_hooks
scope:offer_hook = no
}
NOT = {
scope:recipient = { has_strong_hook = scope:actor }
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_HOOK_STRONG
}
## Use hook.
### Weak hook bonus is added through the scheme's agent join chance.
### Strong hook is in the auto_accept block.
send_option = {
flag = hook
is_valid = {
scope:actor = { has_usable_hook = scope:recipient }
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_HOOK_EXPLICIT
}
# Rulers
## Prestige
send_option = {
flag = prestige
is_shown = {
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:actor.prestige >= prestige_bribe_value
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_PRESTIGE
current_description = {
# Triggered desc so that we don't get a weird double tooltip.
triggered_desc = {
trigger = { scope:actor.prestige >= prestige_bribe_value }
desc = SCHEME_AGENT_PRESTIGE_VALID
}
}
}
## Influence
send_option = {
flag = influence
is_shown = {
scope:actor.top_liege ?= scope:recipient.top_liege
scope:actor = { government_allows = administrative }
scope:recipient = {
OR = {
government_allows = administrative
host = { government_allows = administrative }
AND = {
highest_held_title_tier = tier_barony
liege = { government_allows = administrative }
}
}
}
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:actor.influence >= influence_bribe_value
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_INFLUENCE
current_description = {
# Triggered desc so that we don't get a weird double tooltip.
triggered_desc = {
trigger = { scope:actor.influence >= influence_bribe_value }
desc = SCHEME_AGENT_INFLUENCE_VALID
}
}
}
## Council Rights
send_option = {
flag = council_rights
is_shown = {
would_actor_consider_dramatic_enticement_trigger = yes
scope:recipient.liege ?= scope:actor
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:recipient = { vassal_contract_has_modifiable_obligations = yes }
NOT = {
scope:recipient = { has_trait = lazy }
}
custom_tooltip = {
text = council_rights.tt.already_has_council_rights
scope:recipient = {
NOT = { vassal_contract_has_flag = can_demand_council_seat }
}
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_COUNCIL_RIGHTS
}
## De jure county of theirs you hold.
send_option = {
flag = de_jure_title
is_shown = {
would_actor_consider_dramatic_enticement_trigger = yes
scope:recipient = {
is_landed = yes
any_liege_or_above = { this = scope:actor }
}
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
custom_tooltip = {
text = de_jure_title.tt.no_suitable_county
scope:actor = {
any_held_title = {
actor_has_valid_de_jure_enticement_county_trigger = yes
any_this_title_or_de_jure_above = {
holder ?= { this = scope:recipient }
}
}
}
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_DE_JURE_TITLE
}
# Landless Chars
## County they hold a claim to that you hold.
send_option = {
flag = claimed_title
is_shown = {
would_actor_consider_dramatic_enticement_trigger = yes
trigger_if = {
limit = {
exists = scope:scheme.scheme_target_character
}
scope:recipient = {
is_ruler = no
# And you don't want them _because_ they're in your target's court.
NOT = { host = scope:scheme.scheme_target_character }
}
}
trigger_if = {
limit = {
exists = scope:scheme.scheme_target_title
}
scope:recipient = {
is_ruler = no
# And you don't want them _because_ they're in your target's court.
NOT = { host = scope:scheme.scheme_target_title.holder }
}
}
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:recipient = {
trigger_if = {
limit = {
any_claim = { count >= 1 }
}
custom_tooltip = {
text = claimed_title.tt.no_valid_county
any_claim = { actor_has_valid_claimed_enticement_county_trigger = yes }
}
}
trigger_else = {
custom_tooltip = {
text = claimed_title.tt.no_claims
always = no
}
}
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_CLAIMED_TITLE
}
# Cofaithists
## Piety
send_option = {
flag = piety
is_shown = {
## Target amenable to this argument.
scope:recipient = {
OR = {
has_trait = devoted
has_trait = zealous
has_council_position = councillor_court_chaplain
government_has_flag = government_is_theocracy
}
}
## In-group out-group requirements.
OR = {
## Either we share a faith.
scope:actor.faith = scope:recipient.faith
## Or our faiths *really* get along.
scope:recipient.faith = {
faith_hostility_level = {
target = scope:actor.faith
value <= faith_fully_accepted_level
}
}
}
# We don't show bribes for schemes where agents will always auto-accept or else deny.
NAND = {
scope:scheme = { is_scheme_category = contract }
scope:recipient = { is_courtier_of = scope:actor }
}
}
is_valid = {
scope:actor.piety >= piety_bribe_value
NOT = {
scope:recipient = { has_trait = cynical }
}
would_agent_accept_petty_bribes_against_target_trigger = yes
}
localization = SCHEME_AGENT_PIETY
current_description = {
# Triggered desc so that we don't get a weird double tooltip.
triggered_desc = {
trigger = { scope:actor.piety >= piety_bribe_value }
desc = SCHEME_AGENT_PIETY_VALID
}
}
}
send_options_exclusive = no
}

View file

@ -0,0 +1,83 @@
invite_to_activity_interaction = {
category = interaction_category_diplomacy
greeting = positive
notification_text = invite_to_activity_flavor
reply_item_key = invite_to_activity_reply_item_key
icon = activity_feast
common_interaction = yes
desc = invite_to_activity_interaction_desc
ai_maybe = yes
can_send_despite_rejection = yes
is_highlighted = {
always = yes
}
is_shown = {
exists = scope:actor.involved_activity
scope:actor = scope:actor.involved_activity.activity_host
scope:actor.involved_activity = {
is_current_phase_active = no
OR = {
has_activity_type = activity_tournament
has_activity_type = activity_wedding
has_activity_type = activity_feast
has_activity_type = activity_hunt
has_activity_type = activity_chariot_race
}
}
scope:recipient = { can_join_activity = scope:actor.involved_activity }
}
on_send = {
scope:recipient = {
invite_to_activity = scope:actor.involved_activity
}
}
on_accept = {
# Acceptance handled by the activity system itself
scope:actor = {
send_interface_message = {
type = event_activity_good_with_text
title = invite_to_activity_accepted
desc = invite_to_activity_accepted_desc
left_icon = scope:actor
right_icon = scope:recipient
scope:recipient = {
accept_activity_invite = scope:actor.involved_activity
}
}
}
}
on_decline = {
# Acceptance handled by the activity system itself
scope:actor = {
send_interface_message = {
type = event_activity_bad_with_text
title = invite_to_activity_refused
desc = invite_to_activity_refused_desc
left_icon = scope:actor
right_icon = scope:recipient
scope:recipient = {
decline_activity_invite = scope:actor.involved_activity
}
}
}
}
ai_accept = {
base = 0
## You should not add modifiers here! They won't show up in the UI
# If you want to add modifiers, they should be added to base_activity_modifier in 00_activity_scripted_modifiers.txt
# Any new activity should use base_activity_modifier = yes in their activity to get these default modifiers
activity_modifier = {
object = scope:actor.involved_activity
target = scope:recipient
}
}
}

View file

@ -0,0 +1,79 @@
revoke_leased_title_interaction = {
category = interaction_category_uncategorized
hidden = yes
desc = revoke_leased_title_interaction_desc
target_type = title
target_filter = recipient_lessee_titles
auto_accept = yes
is_shown = {
scope:actor = {
any_sub_realm_barony = {
barony_is_valid_for_holy_order_lease_cancellation_trigger = yes
lessee ?= scope:recipient
}
}
}
#is_valid = {
# scope:actor = {
# piety >= holy_order_revoke_lease_piety_cost
# }
#}
has_valid_target_showing_failures_only = {
NOT = { scope:actor = { is_at_war_with = scope:recipient } }
#scope:target = {
# NOT = {
# recent_history = {
# type = leased_out
# years = 1
# }
# }
#}
scope:target = {
has_revokable_lease = yes
lessee = scope:recipient
OR = {
county.holder = { is_ai = yes }
county.holder = scope:actor
}
}
scope:recipient = { NOT = { has_strong_hook = scope:actor } }
}
on_accept = {
revoke_holy_order_lease_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
BARONY = scope:target
}
}
# AI
ai_targets = {
ai_recipients = vassals
}
ai_frequency = 12
ai_potential = {
is_playable_character = yes
highest_held_title_tier > tier_barony
}
ai_will_do = {
base = 0
# revoke titles leased to holy orders of the wrong faith
modifier = {
add = 100
scope:recipient = {
government_has_flag = government_is_holy_order
NOT = { faith = scope:actor.faith }
}
}
}
}

View file

@ -0,0 +1,47 @@
#Break up with your Lover
break_up_with_lover_interaction = {
category = interaction_category_hostile
use_diplomatic_range = no
icon = lover
desc = break_up_with_lover_interaction_desc
is_shown = {
scope:actor = {
has_relation_lover = scope:recipient
}
}
is_valid_showing_failures_only = {
scope:recipient = { is_busy_in_events_localised = yes }
}
on_accept = {
scope:actor = {
send_interface_message = {
type = event_sway_neutral
title = break_up_with_lover_interaction_notification
right_icon = scope:recipient
lover_breakup_effect = {
BREAKER = scope:actor
LOVER = scope:recipient
}
stress_impact = {
lustful = minor_stress_impact_gain
compassionate = minor_stress_impact_gain
}
}
}
# 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_dramatic_breakup.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
auto_accept = yes
}

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,57 @@
###################
# Demand Subjugation
# by Petter Vilberg
###################
mongol_demand_subjugation_interaction = {
category = interaction_category_hostile
icon = icon_dismiss_temporary_regency
auto_accept = yes
use_diplomatic_range = yes
desc = mongol_demand_subjugation_interaction_desc
is_shown = {
scope:actor = {
any_owned_story = {
story_type = story_mongol_invasion
}
highest_held_title_tier = tier_empire
is_independent_ruler = yes
}
scope:recipient = {
NOT = { this = scope:actor }
is_landless_adventurer = no
is_independent_ruler = yes
any_neighboring_top_liege_realm_owner = {
this = scope:actor
}
}
}
is_valid_showing_failures_only = {
OR = {
scope:recipient = {
highest_held_title_tier <= tier_kingdom
}
scope:actor = {
is_target_in_variable_list = {
name = subjugation_offer_under_consideration
target = scope:recipient
}
}
}
}
on_accept = {
custom_tooltip = mongol_demand_subjugation_interaction_tooltip
hidden_effect = {
scope:actor = {
save_scope_as = mongol_emperor
}
scope:recipient = {
send_mongol_subjugation_demand_effect = yes
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,420 @@
# Poetry
###################
# Send a Poem
# by Ewan Cowhig Croft & Alexander Oltner
###################
send_poem_interaction = {
interface_priority = 30
common_interaction = yes
category = interaction_category_friendly
popup_on_receive = yes
pause_on_receive = yes
desc = send_poem_interaction_desc
is_shown = {
# Must be a poet.
scope:actor = {
OR = {
has_trait = poet
employs_court_position = master_bard_camp_officer
employs_court_position = laureate_camp_officer
}
}
# Cannot send self fan-poetry. Egoist.
NOT = { scope:actor = scope:recipient }
# May only write for adults.
scope:recipient = { is_adult = yes }
}
is_valid_showing_failures_only = {
# Neither of the characters can be imprisoned.
scope:actor = { is_imprisoned = no }
scope:recipient = { is_imprisoned = no }
}
can_send = {
scope:actor = {
custom_description = {
text = "character_interactions_hostile_actions_disabled_delay"
NOT = { has_character_flag = flag_hostile_actions_disabled_delay }
}
}
}
send_options_exclusive = yes
cost = { prestige = minor_prestige_value }
cooldown = { years = 3 }
cooldown_against_recipient = { years = send_poem_cooldown_years_value }
on_send = {
scope:actor = {
add_character_flag = {
flag = flag_hostile_actions_disabled_delay
days = 10
}
}
}
on_accept = {
# Set up the poem subject.
scope:actor = {
# Set up a subject gender.
select_poem_subject_gender_effect = {
SUBJECT = flag:specific
SUBJECT_TARGET = scope:recipient
}
}
# Theme Effects
## Romantic
if = {
limit = { always = scope:poem_theme_romance }
# As this is a positive poem, inform scope:actor that scope:recipient may simply accept it.
custom_tooltip = send_poem_interaction.positive_auto_accept.tt
# Show the potential duel.
show_as_tooltip = {
scope:recipient = {
send_poem_romance_duel_effect = { POV_TARGET = scope:actor }
}
}
# Set up the theme.
scope:actor = { select_poem_theme_romance_effect = yes }
# Send the response event to scope:recipient.
scope:recipient = { trigger_event = trait_specific_interactions.0001 }
}
## Mourning
else_if = {
limit = { always = scope:poem_theme_mourning }
# As this is a positive poem, inform scope:actor that scope:recipient may simply accept it.
custom_tooltip = send_poem_interaction.positive_auto_accept.tt
# Show the potential duel.
show_as_tooltip = {
scope:recipient = {
send_poem_mourning_duel_effect = { POV_TARGET = scope:actor }
}
}
# Set up the theme.
scope:actor = { select_poem_theme_mourning_effect = yes }
# Send the response event to scope:recipient.
scope:recipient = { trigger_event = trait_specific_interactions.0011 }
}
## Legacy
else_if = {
limit = { always = scope:poem_theme_legacy }
# As this is a positive poem, inform scope:actor that scope:recipient may simply accept it.
custom_tooltip = send_poem_interaction.positive_auto_accept.tt
# Show the potential duel.
show_as_tooltip = {
scope:recipient = {
send_poem_legacy_duel_effect = { POV_TARGET = scope:actor }
}
}
# Set up the theme.
scope:actor = { select_poem_theme_legacy_effect = yes }
# Send the response event to scope:recipient.
scope:recipient = { trigger_event = trait_specific_interactions.0021 }
}
## Strife
else_if = {
limit = { always = scope:poem_theme_strife }
# As this is a positive poem, inform scope:actor that scope:recipient may simply accept it.
custom_tooltip = send_poem_interaction.positive_auto_accept.tt
# Show the potential duel.
show_as_tooltip = {
scope:recipient = {
send_poem_strife_duel_effect = { POV_TARGET = scope:actor }
}
}
# Set up the theme.
scope:actor = { select_poem_theme_strife_effect = yes }
# Send the response event to scope:recipient.
scope:recipient = { trigger_event = trait_specific_interactions.0031 }
}
## Incompetence
else_if = {
limit = { always = scope:poem_theme_incompetence }
# Show the potential duel.
show_as_tooltip = {
scope:recipient = {
send_poem_incompetence_duel_effect = { POV_TARGET = scope:actor }
}
}
# Set up the theme.
scope:actor = { select_poem_theme_incompetence_effect = yes }
# Send the response event to scope:recipient.
scope:recipient = { trigger_event = trait_specific_interactions.0041 }
}
# Make sure the AI doesn't spam players
scope:recipient = {
if = {
limit = {
is_ai = no
}
add_character_flag = {
flag = ai_poem_block
years = 5
}
}
}
# Clear up hostile actions flag.
if = {
limit = {
scope:actor = { has_character_flag = flag_hostile_actions_disabled_delay }
}
scope:actor = { remove_character_flag = flag_hostile_actions_disabled_delay }
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = minor_unity_gain
DESC = clan_unity_poetry.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
# SEND OPTIONS
## Send a romantic poem.
send_option = {
is_shown = {
# Only available if they'd be attracted to you.
scope:recipient = { is_attracted_to_gender_of = scope:actor }
# And the romance would be acceptable to both parties.
accepts_incest_with_each_other_trigger = {
CHARACTER_1 = scope:actor
CHARACTER_2 = scope:recipient
}
scope:recipient = {
freely_accepts_sodomy_with_trigger = { CHARACTER = scope:actor }
}
# Plus not if either of you have a soulmate, unless you're each other's soulmates.
scope:actor = {
OR = {
any_relation = {
type = soulmate
count = 0
}
has_relation_soulmate = scope:recipient
faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active }
}
}
scope:recipient = {
OR = {
any_relation = {
type = soulmate
count = 0
}
has_relation_soulmate = scope:actor
faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active }
}
}
# As this is a positive option, we restrict it to non-rivals and players.
scope:actor = { send_poem_positive_poem_lock_trigger = yes }
}
flag = poem_theme_romance
localization = "SEND_POEM_ROMANCE"
}
## Send a poem about legacy.
send_option = {
is_shown = {
# Scope:recipient must be a ruler & at least _potentially_ concerned.
scope:recipient = {
is_ruler = yes
NOT = { has_trait = humble }
}
# As this is a positive option, we restrict it to non-rivals and players.
scope:actor = { send_poem_positive_poem_lock_trigger = yes }
}
flag = poem_theme_legacy
localization = "SEND_POEM_LEGACY"
}
## Send a mourning poem.
send_option = {
# Scope:recipient must have at least one dead close family member.
is_shown = {
scope:recipient = {
any_close_family_member = {
even_if_dead = yes
is_alive = no
NOT = { # It's quite natural
is_grandparent_of = scope:recipient
}
}
}
}
flag = poem_theme_mourning
localization = "SEND_POEM_MOURNING"
}
## Send a poem about strife.
send_option = {
is_shown = {
# Scope:recipient must be a ruler & at least _potentially_ concerned.
scope:recipient = {
is_ruler = yes
NOT = { has_trait = humble }
}
# As this is a positive option, we restrict it to non-rivals and players.
scope:actor = { send_poem_positive_poem_lock_trigger = yes }
}
flag = poem_theme_strife
localization = "SEND_POEM_STRIFE"
}
## Send a poem about incompetence.
send_option = {
is_shown = {
# As this is a negative option, we restrict it to rivals and players.
scope:actor = { send_poem_negative_poem_lock_trigger = yes }
}
flag = poem_theme_incompetence
localization = "SEND_POEM_INCOMPETENCE"
}
auto_accept = yes
# AI
ai_potential = {
has_trait = poet
is_imprisoned = no
prestige >= 150
is_at_war = no
}
ai_target_quick_trigger = { adult = yes }
ai_targets = {
ai_recipients = scripted_relations
}
ai_targets = {
ai_recipients = liege
}
ai_targets = {
ai_recipients = neighboring_rulers
ai_recipients = peer_vassals
ai_recipients = top_realm_domicile_owners
max = 10
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_frequency = 60
ai_will_do = {
base = 50
# Lustful characters prefer romance poems
modifier = {
add = 50
OR = {
has_trait = lustful
has_focus = intrigue_temptation_focus
}
scope:poem_theme_romance = yes
}
# Arrogant characters are prone to actually interact via public poetry publishing.
modifier = {
add = 20
scope:actor = { has_trait = arrogant }
}
# Certain personality types skew towards specific poem types
modifier = {
add = 10
scope:actor = {
has_trait_benevolent_trigger = yes
}
scope:poem_theme_mourning = yes
}
modifier = {
add = 10
scope:actor = {
has_trait_submissive_trigger = yes
}
scope:poem_theme_legacy = yes
}
modifier = {
add = 10
scope:actor = {
has_trait_malicious_trigger = yes
}
scope:poem_theme_strife = yes
}
## Insult people you don't like
modifier = {
add = 50
scope:poem_theme_incompetence = yes
scope:actor = {
OR = {
has_personality_malicious_trigger = yes
has_relation_potential_rival = scope:recipient
has_relation_rival = scope:recipient
}
}
}
## Players enjoy receiving poetry!
modifier = {
add = 50
scope:recipient = {
is_ai = no
}
}
# Unity modifiers
evaluate_action_increasing_house_unity = {
VALUE = 100
}
# Characters who are not lustful don't send romantic poems to just anyone
modifier = {
factor = 0
NOR = {
has_trait = lustful
has_focus = intrigue_temptation_focus
}
scope:recipient = {
NOR = {
has_relation_lover = scope:actor
is_consort_of = scope:actor
}
}
scope:poem_theme_romance = yes
}
## Don't use insulting poems willy-nilly
modifier = {
factor = 0
scope:poem_theme_incompetence = yes
scope:actor = {
NOR = {
has_trait = arbitrary
has_trait = lunatic
has_relation_potential_rival = scope:recipient
has_relation_rival = scope:recipient
opinion = {
target = scope:recipient
value <= medium_negative_opinion
}
}
}
}
## Don't spam players while at war
modifier = {
factor = 0
scope:recipient = {
is_ai = no
is_at_war = yes
}
}
## Don't spam players when the poetry block is active
modifier = {
factor = 0
scope:recipient = {
has_character_flag = ai_poem_block
}
}
}
}

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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,411 @@
spar_with_knight_interaction = {
icon = icon_combat
interface_priority = 30
common_interaction = yes
category = interaction_category_friendly
ai_min_reply_days = 0
ai_max_reply_days = 0
popup_on_receive = yes
pause_on_receive = yes
desc = spar_with_knight_interaction_desc
greeting = positive
notification_text = REQUEST_SPARRING_TEXT
is_shown = {
scope:actor = {
culture = {
has_cultural_parameter = can_use_sparring_duel
}
}
scope:recipient = {
is_knight_of = scope:actor
}
# Can't duel yourself.
NOT = { scope:actor = scope:recipient }
}
is_valid_showing_failures_only = {
scope:actor = { can_start_single_combat_trigger = yes }
scope:actor = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:actor } }
# Scope:recipient must be able to fight personally.
scope:recipient = { can_start_single_combat_trigger = yes }
# Scope:recipient must not be banned from single combat.
scope:recipient = {
custom_description = {
text = fp1_tbc_recipient_banned_from_combat
can_start_single_combat_banned_checks_trigger = no
}
}
# Neither of the characters can be imprisoned.
scope:actor = { is_imprisoned = no }
scope:recipient = { is_imprisoned = no }
scope:actor = { is_at_war = no }
scope:recipient = { is_at_war = no }
}
can_send = {
scope:actor = {
custom_description = {
text = "character_interactions_hostile_actions_disabled_delay"
NOT = { has_character_flag = flag_hostile_actions_disabled_delay }
}
}
}
cost = { prestige = medium_prestige_value }
cooldown = { years = 5 }
cooldown_against_recipient = { years = 10 }
on_send = {
scope:actor = {
add_character_flag = {
flag = flag_hostile_actions_disabled_delay
days = 10
}
}
}
on_accept = {
# Set up the bout immediately.
## First inform.
scope:actor = {
custom_tooltip = challenge_to_single_combat_interaction.enter_non_lethal_bout.tt
custom_tooltip = spar_with_knight_interaction.effect.tt
custom_tooltip = spar_with_knight_interaction.negative_effect.tt
}
scope:recipient = {
custom_tooltip = spar_with_knight_interaction.effect.tt
custom_tooltip = spar_with_knight_interaction.negative_effect.tt
}
## Finally, begin.
configure_start_single_combat_effect = {
SC_INITIATOR = scope:actor
SC_ATTACKER = scope:actor
SC_DEFENDER = scope:recipient
FATALITY = no
FIXED = no
LOCALE = army_camp
OUTPUT_EVENT = culture_tradition_events.0001
INVALIDATION_EVENT = perk_interaction.0102
}
}
ai_accept = {
base = 10 # Try to make it 0 for most interactions
modifier = {
desc = CTSC_RELATIVE_PROWESS
scope:recipient.prowess < scope:actor.prowess
add = {
value = scope:actor.prowess
subtract = scope:recipient.prowess
multiply = -2
}
}
# Personality values
ai_value_modifier = {
who = scope:recipient
ai_boldness = 0.5
ai_honor = {
if = {
limit = {
scope:recipient = {
ai_honor > 0
}
}
value = 0.25
}
}
}
modifier = {
desc = AI_REFUSAL_WOUNDED
scope:recipient = {
OR = {
has_trait = wounded
has_trait = maimed
}
}
add = -200
}
}
# AI
ai_potential = {
culture = {
has_cultural_parameter = can_use_sparring_duel
}
NOT = { has_trait = craven }
is_imprisoned = no
can_start_single_combat_trigger = yes
number_of_knights > 0
primary_title.tier > tier_barony
}
ai_target_quick_trigger = {
adult = yes
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_targets = {
ai_recipients = courtiers
max = 10
}
ai_frequency = 60
ai_will_do = {
base = -25
# Factor for personality (excluding realism).
modifier = {
add = {
value = ai_boldness
multiply = 1
}
}
modifier = {
add = {
value = ai_energy
multiply = 0.5
}
}
modifier = {
add = -50
prowess <= low_skill_rating
}
modifier = {
factor = 0
OR = {
has_trait = wounded
has_trait = maimed
}
}
}
}
#Appointing a Podesta over a Commune - Turning a one county holder into a Republican Vassal
#Local culture must have the parameter, as does the granting character.
#Recipient does not need to have local culture.
appoint_podesta_interaction = {
icon = grant_titles_interaction
interface_priority = 30
common_interaction = yes
category = interaction_category_vassal
ai_min_reply_days = 0
ai_max_reply_days = 0
popup_on_receive = yes
pause_on_receive = yes
desc = appoint_podesta_desc
greeting = positive
notification_text = REQUEST_REPUBLIC_TEXT
is_shown = {
NOT = { scope:actor = scope:recipient } # Can't make yourself a Podesta.
scope:actor = {
culture = {
has_cultural_parameter = can_make_republican_vassals
}
any_held_title = {
count > 1
}
}
scope:recipient = {
is_ai = yes
is_landed = yes
target_is_liege_or_above = scope:actor
NOT = { government_has_flag = government_is_republic }
}
}
is_valid_showing_failures_only = {
scope:recipient = { can_be_granted_titles_by = { RULER = scope:actor } }
NOT = { scope:actor = { is_at_war_with = scope:recipient } }
custom_description = {
text = too_many_republics
scope:actor = {
any_vassal = {
count < 4 #Use Script Value
highest_held_title_tier >= tier_county
government_has_flag = government_is_republic
}
}
}
scope:recipient = {
target_is_liege_or_above = scope:actor
NOT = { government_has_flag = government_is_republic }
is_claimant = no
custom_description = {
text = must_be_one_county_count
any_held_title = {
count = 1
tier = tier_county
}
}
custom_description = {
text = must_not_have_landed_relatives
NOT = {
any_close_or_extended_family_member = {
is_landed_or_landless_administrative = yes
}
}
}
custom_description = {
text = must_not_be_heir_to_any_title
scope:recipient = {
any_heir_title = {
count < 1
tier >= tier_county
}
}
}
custom_description = { #The county must be developed or have at least one city
text = county_must_have_city
any_held_title = {
count = 1
tier = tier_county
OR = {
any_county_province = {
has_holding_type = city_holding
}
development_level > 20
}
}
}
custom_description = { #County must be of a culture that has the tradition parameter
text = county_must_have_culture
any_held_title = {
count = 1
tier = tier_county
any_county_province = {
culture = {
has_cultural_parameter = can_make_republican_vassals
}
}
}
}
}
scope:recipient = { is_busy_in_events_localised = yes }
trigger_if = {
limit = {
scope:recipient = {
is_ruler = no
}
}
scope:recipient = {
is_imprisoned = no
}
}
}
cost = { prestige = minor_prestige_value }
cooldown = { years = 5 }
cooldown_against_recipient = { years = 10 }
on_accept = {
scope:actor = {
hidden_effect = {
send_interface_toast = {
type = event_toast_effect_neutral
title = appoint_podesta_interaction_notification
left_icon = scope:actor
right_icon = scope:recipient
scope:recipient = {
show_as_tooltip = {
change_government = republic_government
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
every_vassal = {
limit = {
government_has_flag = government_is_republic
}
every_held_title = {
change_title_holder = {
holder = scope:recipient
change = scope:change
take_baronies = yes
}
}
}
resolve_title_and_vassal_change = scope:change
}
}
}
}
}
scope:recipient = {
change_government = republic_government
create_title_and_vassal_change = {
type = returned
save_scope_as = change
add_claim_on_loss = no
}
every_vassal = {
limit = {
government_has_flag = government_is_republic
}
every_held_title = {
change_title_holder = {
holder = scope:recipient
change = scope:change
take_baronies = yes
}
}
}
resolve_title_and_vassal_change = scope:change
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = minor_unity_gain
DESC = clan_unity_podesta.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
auto_accept = yes
# AI
ai_potential = {
culture = {
has_cultural_parameter = can_make_republican_vassals
has_cultural_era_or_later = culture_era_high_medieval
}
primary_title.tier > tier_county
}
ai_target_quick_trigger = {
adult = yes
}
ai_targets = {
ai_recipients = vassals
}
ai_frequency = 240
ai_will_do = {
base = 100
}
}

View file

@ -0,0 +1,750 @@
#FORGIVING INTERACTION
abandon_hook_interaction = {
interface_priority = 120
common_interaction = yes
category = interaction_category_friendly
icon = forgiving
desc = abandon_hook_interaction_desc
is_shown = {
OR = {
scope:actor = {
has_trait = forgiving
}
#Struggle
scope:actor = {
any_character_struggle = {
involvement = involved
has_struggle_phase_parameter = unlocks_abandon_hook_for_all
is_secondary_character_involvement_involved_trigger = {
CHAR = scope:recipient
}
}
}
}
}
is_valid_showing_failures_only = {
scope:recipient = { is_busy_in_events_localised = yes }
scope:actor = {
has_usable_hook = scope:recipient
}
custom_description = {
scope:actor = {
NOT = {
has_hook_of_type = {
target = scope:recipient
type = house_head_hook
}
}
}
text = need_non_house_head_hook
}
custom_description = {
scope:actor = {
NOT = {
has_hook_of_type = {
target = scope:recipient
type = ritual_best_friend_hook
}
}
}
text = need_non_best_friend_hook
}
}
on_accept = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_neutral
title = msg_abandon_hook_interaction_title
left_icon = scope:actor
right_icon = scope:recipient
use_hook = scope:recipient
if = {
limit = {
has_strong_hook = scope:recipient
}
stress_impact = {
forgiving = major_stress_impact_loss
}
}
else = {
stress_impact = {
forgiving = medium_stress_impact_loss
}
}
scope:recipient = {
add_opinion = {
target = scope:actor
modifier = forgiven_opinion
}
}
}
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = minor_unity_gain
DESC = clan_unity_abandon_hook.desc
REVERSE_NON_HOUSE_TARGET = no
}
hidden_effect = {
# Struggle Catalysts
scope:actor = {
if = {
limit = {
fp3_struggle_involves_one_supporter_and_one_detractor = {
FIRST = scope:actor
SECOND = scope:recipient
}
any_character_struggle = {
involvement = involved
phase_has_catalyst = catalyst_abandon_hook_on_supporter_detractor
}
}
every_character_struggle = {
involvement = involved
activate_struggle_catalyst = {
catalyst = catalyst_abandon_hook_on_supporter_detractor
character = scope:actor
}
log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_abandon_hook_on_supporter_detractor }
}
}
}
}
}
ai_frequency = 60
ai_targets = {
ai_recipients = guests
ai_recipients = courtiers
max = 10
}
ai_targets = {
ai_recipients = liege
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_target_quick_trigger = {
adult = yes
}
ai_potential = {
stress_level >= 1
}
ai_will_do = {
base = 100
}
auto_accept = yes
}
#ARBITRARY INTERACTION
dismiss_strong_hook_interaction = {
interface_priority = 120
common_interaction = yes
category = interaction_category_hostile
icon = arbitrary
cost = {
prestige = monumental_prestige_value
}
desc = dismiss_strong_hook_interaction_desc
is_shown = {
scope:actor = {
has_trait = arbitrary
}
scope:recipient = {
is_vassal_of = scope:actor
has_strong_hook = scope:actor
}
}
is_valid_showing_failures_only = {
scope:actor = {
prestige >= monumental_prestige_value
}
}
on_accept = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_neutral
title = msg_dismiss_hook_interaction_title
left_icon = scope:actor
right_icon = scope:recipient
scope:recipient = {
remove_hook = { target = scope:actor }
add_opinion = {
target = scope:actor
modifier = lost_strong_hook_opinion
}
}
add_tyranny = 35
}
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = medium_unity_gain
DESC = clan_unity_dismiss_strong_hook.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
ai_frequency = 60
ai_potential = {
dread >= 50
}
ai_will_do = {
base = 100
}
ai_targets = {
ai_recipients = guests
ai_recipients = courtiers
max = 10
}
ai_targets = {
ai_recipients = liege
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_target_quick_trigger = {
adult = yes
}
auto_accept = yes
}
dismiss_weak_hook_interaction = {
interface_priority = 120
common_interaction = yes
category = interaction_category_hostile
icon = arbitrary
cost = {
prestige = major_prestige_value
}
desc = dismiss_weak_hook_interaction_desc
is_shown = {
scope:actor = {
has_trait = arbitrary
}
scope:recipient = {
is_vassal_of = scope:actor
has_usable_hook = scope:actor
NOT = { has_strong_hook = scope:actor }
}
}
is_valid_showing_failures_only = {
scope:actor = {
prestige >= major_prestige_value
}
}
on_accept = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_neutral
title = msg_dismiss_hook_interaction_title
left_icon = scope:actor
right_icon = scope:recipient
scope:recipient = {
remove_hook = { target = scope:actor }
add_opinion = {
target = scope:actor
modifier = lost_weak_hook_opinion
}
progress_towards_rival_effect = {
CHARACTER = scope:actor
REASON = rival_dismissed_weak_hook
OPINION = default_rival_opinion
}
}
add_tyranny = 15
}
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = minor_unity_gain
DESC = clan_unity_dismiss_weak_hook.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
ai_targets = {
ai_recipients = guests
ai_recipients = courtiers
max = 10
}
ai_targets = {
ai_recipients = liege
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_target_quick_trigger = {
adult = yes
}
ai_frequency = 60
ai_potential = {
dread >= 50
}
ai_will_do = {
base = 100
}
auto_accept = yes
}
#WRATHFUL DUELING
force_duel_criminals_interaction = {
interface_priority = 30
common_interaction = yes
category = interaction_category_hostile
ai_maybe = yes
ai_max_reply_days = 0
popup_on_receive = yes
pause_on_receive = yes
desc = force_duel_criminals_interaction_desc
icon = wrathful
greeting = negative
notification_text = REQUEST_TRIAL_BY_COMBAT_TEXT
is_shown = {
#First, verify if the actor is Wrathful
scope:actor = { has_trait = wrathful }
#Then, look to see if this character is a criminal.
scope:actor = {
OR = {
has_imprisonment_reason = scope:recipient
has_banish_reason = scope:recipient
has_execute_reason = scope:recipient
}
basic_allowed_to_imprison_character_trigger = { # And if you are allowed to imprison the target.
CHARACTER = scope:recipient
}
}
# Can't duel yourself.
NOT = { scope:actor = scope:recipient }
}
is_valid_showing_failures_only = {
# Calc some stuff that might invalidate elsewhere before the bout is sorted.
rival_single_combat_shown_and_not_invalid_trigger = yes
# Scope:recipient must be able to fight personally.
scope:recipient = { can_start_single_combat_trigger = yes }
# Scope:recipient must not be banned from single combat.
scope:recipient = {
custom_description = {
text = fp1_tbc_recipient_banned_from_combat
can_start_single_combat_banned_checks_trigger = no
}
}
# Neither of the characters can be imprisoned.
scope:actor = { is_imprisoned = no }
scope:recipient = { is_imprisoned = no }
}
can_send = {
scope:actor = {
custom_description = {
text = "character_interactions_hostile_actions_disabled_delay"
NOT = { has_character_flag = flag_hostile_actions_disabled_delay }
}
}
}
cooldown_against_recipient = { years = 10 }
on_send = {
scope:actor = {
add_character_flag = {
flag = flag_hostile_actions_disabled_delay
days = 10
}
}
}
on_accept = {
# Set up the bout immediately.
#Starting with the strongest punishment in case more than one reason is valid
if = {
limit = {
scope:actor = { has_execute_reason = scope:recipient }
}
## First inform.
scope:actor = {
custom_tooltip = force_duel_criminals_interaction.execute_punishment.tt
}
## Finally, begin.
configure_start_single_combat_effect = {
SC_INITIATOR = scope:actor
SC_ATTACKER = scope:actor
SC_DEFENDER = scope:recipient
FATALITY = no
FIXED = no
LOCALE = terrain_scope
OUTPUT_EVENT = trait_specific_interactions.0155
INVALIDATION_EVENT = fp1_tbc.0102
}
}
else_if = {
limit = {
scope:actor = { has_banish_reason = scope:recipient }
}
## First inform.
scope:actor = {
custom_tooltip = force_duel_criminals_interaction.banish_punishment.tt
}
## Finally, begin.
configure_start_single_combat_effect = {
SC_INITIATOR = scope:actor
SC_ATTACKER = scope:actor
SC_DEFENDER = scope:recipient
FATALITY = no
FIXED = no
LOCALE = terrain_scope
OUTPUT_EVENT = trait_specific_interactions.0153
INVALIDATION_EVENT = fp1_tbc.0102
}
}
else_if = {
limit = {
scope:actor = { has_imprisonment_reason = scope:recipient }
}
scope:actor = {
custom_tooltip = force_duel_criminals_interaction.imprison_punishment.tt
}
configure_start_single_combat_effect = {
SC_INITIATOR = scope:actor
SC_ATTACKER = scope:actor
SC_DEFENDER = scope:recipient
FATALITY = no
FIXED = no
LOCALE = terrain_scope
OUTPUT_EVENT = trait_specific_interactions.0151
INVALIDATION_EVENT = fp1_tbc.0102
}
}
}
auto_accept = yes
# AI
ai_potential = {
has_trait = wrathful
is_imprisoned = no
can_start_single_combat_trigger = yes
}
ai_target_quick_trigger = {
adult = yes
}
ai_targets = {
ai_recipients = courtiers
ai_recipients = guests
max = 10
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_targets = {
ai_recipients = family
max = 10
}
ai_frequency = 120
ai_will_do = {
base = -50
# Factor for personality (excluding realism).
modifier = {
add = {
value = ai_boldness
multiply = 1
}
}
modifier = { add = ai_vengefulness }
modifier = {
add = {
value = ai_energy
multiply = -0.25
}
}
# Don't challenge kinslayer-counting family, unless they're your nemesis.
modifier = {
scope:actor = {
murdering_character_is_kinslaying_in_faith_trigger = {
CHARACTER = scope:recipient
FAITH = scope:actor.faith
}
}
scope:recipient = {
NOT = { has_relation_nemesis = scope:actor }
}
add = -1000
}
# Don't challenge your spouse, unless they're your nemesis.
modifier = {
scope:recipient = {
is_spouse_of = scope:actor
NOT = { has_relation_nemesis = scope:actor }
}
add = -1000
}
# Don't challenge people hopelessly out of your league unless you're really, really not seeing things clearly.
modifier = {
scope:actor = {
prowess_diff = {
target = scope:recipient
value <= -15
}
ai_rationality >= high_negative_ai_value
}
add = -1000
}
}
}
#IRRITABLE DUELING
force_duel_anyone_interaction = {
#need to have a stress level >= 1
interface_priority = 30
common_interaction = yes
category = interaction_category_hostile
ai_maybe = yes
ai_max_reply_days = 0
popup_on_receive = yes
pause_on_receive = yes
desc = force_duel_anyone_interaction_desc
icon = irritable
greeting = negative
notification_text = REQUEST_TRIAL_BY_COMBAT_TEXT
is_shown = {
#Just, verify if the actor is Wrathful
scope:actor = { has_trait = irritable }
# Can't duel yourself.
NOT = { scope:actor = scope:recipient }
}
is_valid_showing_failures_only = {
# Need to be stressed to be able to force a Duel
scope:actor = {
custom_description = {
stress_level >= 1
text = not_enough_stress
}
}
# Calc some stuff that might invalidate elsewhere before the bout is sorted.
rival_single_combat_shown_and_not_invalid_trigger = yes
# Scope:recipient must be able to fight personally.
scope:recipient = { can_start_single_combat_trigger = yes }
# Scope:recipient must not be banned from single combat.
scope:recipient = {
custom_description = {
text = fp1_tbc_recipient_banned_from_combat
can_start_single_combat_banned_checks_trigger = no
}
}
# Neither of the characters can be imprisoned.
scope:actor = { is_imprisoned = no }
scope:recipient = { is_imprisoned = no }
}
can_send = {
scope:actor = {
custom_description = {
text = "character_interactions_hostile_actions_disabled_delay"
NOT = { has_character_flag = flag_hostile_actions_disabled_delay }
}
}
}
cost = { prestige = medium_prestige_value }
cooldown_against_recipient = { years = 10 }
on_send = {
scope:actor = {
add_character_flag = {
flag = flag_hostile_actions_disabled_delay
days = 10
}
}
}
on_accept = {
# Set up the bout immediately.
## First inform.
scope:actor = {
add_tyranny = 5
add_dread = 5
custom_tooltip = challenge_to_single_combat_interaction.victor_gets.tt
custom_tooltip = challenge_to_single_combat_interaction.loser_gets.tt
}
## Finally, begin.
configure_start_single_combat_effect = {
SC_INITIATOR = scope:actor
SC_ATTACKER = scope:actor
SC_DEFENDER = scope:recipient
FATALITY = no
FIXED = no
LOCALE = terrain_scope
OUTPUT_EVENT = perk_interaction.0101
INVALIDATION_EVENT = fp1_tbc.0102
}
# If we're a clan this interaction affects unity
add_clan_unity_interaction_effect = {
CHARACTER = scope:actor
TARGET = scope:recipient
VALUE = medium_unity_loss
DESC = clan_unity_released_anger.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
auto_accept = yes
# AI
ai_potential = {
has_trait = irritable
stress_level >= 1
is_imprisoned = no
can_start_single_combat_trigger = yes
}
ai_target_quick_trigger = {
adult = yes
}
ai_targets = {
ai_recipients = prisoners
ai_recipients = courtiers
ai_recipients = guests
max = 1
}
ai_targets = {
ai_recipients = family
max = 10
}
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_frequency = 120
ai_will_do = {
base = -50
# Factor for personality (excluding realism).
modifier = {
add = {
value = ai_boldness
multiply = 1
}
}
modifier = { add = ai_vengefulness }
modifier = {
add = {
value = ai_energy
multiply = -0.25
}
}
# Don't challenge kinslayer-counting family, unless they're your nemesis.
modifier = {
scope:actor = {
murdering_character_is_kinslaying_in_faith_trigger = {
CHARACTER = scope:recipient
FAITH = scope:actor.faith
}
}
scope:recipient = {
NOT = { has_relation_nemesis = scope:actor }
}
add = -1000
}
# Don't challenge your spouse, unless they're your nemesis.
modifier = {
scope:recipient = {
is_spouse_of = scope:actor
NOT = { has_relation_nemesis = scope:actor }
}
add = -1000
}
# Don't challenge people hopelessly out of your league unless you're really, really not seeing things clearly.
modifier = {
scope:actor = {
prowess_diff = {
target = scope:recipient
value <= -15
}
ai_rationality >= high_negative_ai_value
}
add = -1000
}
}
}

View file

@ -0,0 +1,297 @@
feudalize_tribal_holding_interaction = {
category = interaction_category_uncategorized
hidden = yes
special_interaction = feudalize_tribal_holding
desc = feudalize_tribal_holding_interaction_desc
target_type = title
target_filter = actor_domain_titles
auto_accept = yes
is_shown = {
scope:actor = {
this = scope:recipient
NOT = { government_has_flag = government_is_tribal }
}
}
can_be_picked_title = {
scope:target = {
holder = scope:actor
is_capital_barony = no # we'll use the county in that case
trigger_if = {
limit = { tier <= tier_county }
title_province = {
has_holding_type = tribal_holding
}
}
trigger_else = {
custom_description = {
text = "feudalize_tribal_holding_interaction_title_not_county_or_below"
always = no
}
}
}
}
has_valid_target_showing_failures_only = {
scope:target = {
trigger_if = {
limit = { tier <= tier_county }
title_province = {
barony_controller = scope:actor
has_ongoing_construction = no
}
}
}
}
cost = {
gold = {
scope:actor = {
add = {
value = feudalize_tribal_holding_interaction_cost
desc = BASE
}
if = {
limit = { # More expensive for admin to make barbarians civilized...
government_has_flag = government_is_administrative
}
add = {
value = feudalize_tribal_holding_interaction_cost
multiply = 0.25
desc = has_admin_government
}
if = {
limit = { # Admin get a bonus for high bureaucracy levels
OR = {
has_realm_law = imperial_bureaucracy_2
has_realm_law = imperial_bureaucracy_3
}
}
subtract = {
value = feudalize_tribal_holding_interaction_cost
multiply = {
value = 0.1
if = {
limit = {
has_realm_law = imperial_bureaucracy_3
}
add = 0.15
}
}
desc = imperial_bureaucracy
}
}
}
}
}
}
on_accept = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_good
title = feudalize_tribal_holding_interaction_notification
right_icon = scope:actor
if = {
limit = { exists = scope:target.title_province }
scope:target.title_province = {
set_holding_type = castle_holding
}
}
}
}
}
ai_will_do = {
base = 1500
}
}
support_feudalize_tribal_holding_interaction = {
category = interaction_category_vassal
icon = request_funding_interaction
desc = support_feudalize_tribal_holding_interaction_desc
target_type = title
target_filter = recipient_domain_titles
auto_accept = yes
is_shown = {
scope:actor = {
NOT = { government_has_flag = government_is_tribal }
}
scope:recipient = {
target_is_liege_or_above = scope:actor
NOT = { government_has_flag = government_is_tribal }
NOT = { this = scope:actor }
any_held_title = {
tier <= tier_county
title_province = {
has_holding_type = tribal_holding
}
}
}
}
can_be_picked_title = {
scope:target = {
is_capital_barony = no # we'll use the county in that case
trigger_if = {
limit = { tier <= tier_county }
title_province = {
barony_controller = scope:recipient
has_ongoing_construction = no
}
}
}
}
has_valid_target_showing_failures_only = {
scope:target = {
trigger_if = {
limit = { tier <= tier_county }
title_province = {
has_holding_type = tribal_holding
}
}
trigger_else = {
custom_description = {
text = "feudalize_tribal_holding_interaction_title_not_county_or_below"
always = no
}
}
}
}
cost = {
gold = {
scope:actor = {
add = {
value = feudalize_tribal_holding_interaction_cost
desc = BASE
}
if = {
limit = { # More expensive for admin to make these barbarians civilized...
government_has_flag = government_is_administrative
}
add = {
value = feudalize_tribal_holding_interaction_cost
multiply = 0.25
desc = has_admin_government
}
if = {
limit = { # Admin get a bonus for high bureaucracy levels
OR = {
has_realm_law = imperial_bureaucracy_2
has_realm_law = imperial_bureaucracy_3
}
}
subtract = {
value = feudalize_tribal_holding_interaction_cost
multiply = {
value = 0.1
if = {
limit = {
has_realm_law = imperial_bureaucracy_3
}
add = 0.15
}
}
desc = imperial_bureaucracy
}
}
}
}
}
}
is_highlighted = {
# Highlight the interaction if we have the gold to spare
scope:actor = {
gold >= {
value = feudalize_tribal_holding_interaction_cost
if = {
limit = { # More expensive for admin to convert these... Barbarians...
government_has_flag = government_is_administrative
}
multiply = {
value = 1.25
desc = has_admin_government
}
}
}
}
}
on_accept = {
scope:recipient = {
# Add some opinion to make it worthwhile
add_opinion = {
target = scope:actor
modifier = grateful_opinion
opinion = 15
}
# Notify actor and recipient
scope:actor = {
send_interface_toast = {
type = event_toast_effect_good
title = feudalize_tribal_holding_interaction_notification
left_icon = scope:actor
right_icon = scope:target
if = {
limit = { exists = scope:target.title_province }
scope:target.title_province = {
set_holding_type = castle_holding
}
}
}
}
}
scope:actor = {
# If you are admin, you get some influence for your efforts
if = {
limit = { government_has_flag = government_is_administrative }
change_influence = medium_influence_gain
}
}
}
# The AI doesn't check this very often - So if they have more important expenses, they will put their gold to better use first.
ai_frequency = 72
ai_targets = {
ai_recipients = vassals
max = 10
}
ai_potential = {
# Some basic triggers
is_at_war = no
is_adult = yes
# The AI only does this if they have plenty of gold to spare
gold >= { value = feudalize_tribal_holding_interaction_cost multiply = 4 }
# Warring AI don't do this - They want to spend their gold on war!
ai_has_warlike_personality = no
ai_has_conqueror_personality = no
}
ai_will_do = {
base = 25
modifier = {
scope:actor = { ai_has_economical_boom_personality = yes }
add = 50
}
}
}

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,311 @@

convert_to_witchcraft_interaction = {
icon = icon_scheme_convert_to_witchcraft
category = interaction_category_friendly
interface_priority = 90
scheme = convert_to_witchcraft
send_name = START_SCHEME
desc = convert_to_witchcraft_interaction_desc
is_shown = {
scope:actor = {
can_start_scheme = {
type = convert_to_witchcraft
target_character = scope:recipient
}
}
NOT = { scope:actor = scope:recipient }
}
is_valid_showing_failures_only = {
scope:actor = {
NOT = { is_at_war_with = scope:recipient }
can_start_scheme = {
type = convert_to_witchcraft
target_character = scope:recipient
}
}
custom_description = {
text = has_a_witch_secret_known_by_character
subject = scope:recipient
object = scope:actor
scope:recipient = { #If they are a secret witch I must not know about it
trigger_if = {
limit = {
any_secret = {
secret_type = secret_witch
}
}
any_secret = {
secret_type = secret_witch
NOT = { any_secret_knower = { this = scope:actor } }
}
}
}
}
}
on_accept = {
scope:actor = {
send_interface_toast = {
type = event_toast_effect_good
title = convert_to_witchcraft_interaction_notification
left_icon = scope:actor
right_icon = scope:recipient
begin_scheme_basic_effect = {
SCHEME_TYPE = convert_to_witchcraft
TARGET_TYPE = target_character
TARGET_SCOPE = scope:recipient
}
}
}
}
auto_accept = yes
#AI will do
ai_potential = {
is_witch_trigger = yes
}
ai_target_quick_trigger = {
adult = yes
}
ai_targets = {
ai_recipients = family
max = 5
}
ai_targets = {
ai_recipients = guests
ai_recipients = courtiers
ai_recipients = liege
ai_recipients = vassals
chance = 0.2
}
ai_frequency = 72
ai_will_do = {
base = -45
# Do I like recipient & are they trustworthy
opinion_modifier = {
who = scope:actor
opinion_target = scope:recipient
multiplier = 0.5
}
compatibility_modifier = {
who = scope:actor
compatibility_target = scope:recipient
multiplier = 0.2
}
opinion_modifier = {
who = scope:recipient
opinion_target = scope:actor
multiplier = 0.5
}
ai_value_modifier = {
who = scope:recipient
ai_honor = 0.2
ai_compassion = 0.1
ai_rationality = 0.2
ai_greed = 0.2
ai_sociability = 0.1
}
ai_value_modifier = {
trigger = { trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = scope:recipient.faith TRAIT = witch GENDER_CHARACTER = scope:actor } }
ai_zeal = -0.5
max = 20
}
# Are they important (to me)
modifier = {
add = {
value = scope:recipient.highest_held_title_tier
subtract = scope:actor.highest_held_title_tier
multiply = 10
}
}
modifier = {
OR = {
is_close_family_of = scope:recipient
is_consort_of = scope:recipient
has_relation_lover = scope:recipient
has_relation_friend = scope:recipient
}
add = 20
}
modifier = {
OR = {
has_relation_best_friend = scope:recipient
has_relation_soulmate = scope:recipient
}
add = 30
}
modifier = {
exists = house
exists = scope:recipient.house
house = scope:recipient.house
add = 10
}
# Do I want to spread the word
ai_value_modifier = {
ai_sociability = 0.2
ai_compassion = 0.1
ai_boldness = 0.4
min = -20
}
}
}
reveal_as_witch_interaction = {
category = interaction_category_friendly
icon = icon_scheme_convert_to_witchcraft
interface_priority = 100
desc = reveal_as_witch_interaction_desc
notification_text = witch.2900.desc
is_shown = {
scope:actor = {
is_adult = yes
any_secret = {
secret_type = secret_witch
NOT = { is_known_by = scope:recipient }
}
knows_about_character_being_witch_trigger = { CHARACTER = scope:recipient }
}
scope:actor.faith = scope:recipient.faith
scope:recipient = {
is_adult = yes
}
}
is_valid_showing_failures_only = {
scope:actor = {
NOT = { is_at_war_with = scope:recipient }
}
}
on_accept = {
scope:actor = {
#Secret reveals.
random_secret = {
limit = {
secret_type = secret_witch
NOT = { is_known_by = scope:recipient }
}
save_scope_as = witch_secret
reveal_to = scope:recipient
}
#Send a reply.
trigger_event = witch.2901
#Opinion effects.
reverse_add_opinion = {
target = scope:recipient
modifier = trust_opinion
opinion = 20
}
hidden_effect = {
if = {
limit = {
can_set_relation_potential_friend_trigger = { CHARACTER = scope:recipient }
}
set_relation_potential_friend = scope:recipient
}
}
}
# 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_witch_reveal.desc
REVERSE_NON_HOUSE_TARGET = no
}
}
auto_accept = yes
force_notification = yes
#AI will do
ai_potential = {
always = yes
}
ai_target_quick_trigger = {
adult = yes
}
ai_targets = {
ai_recipients = liege
ai_recipients = known_secrets
}
ai_targets = {
ai_recipients = vassals
ai_recipients = peer_vassals
chance = 0.2
}
ai_frequency = 144
ai_will_do = {
base = -45
# Do I like recipient & are they trustworthy
opinion_modifier = {
who = scope:actor
opinion_target = scope:recipient
multiplier = 0.5
}
compatibility_modifier = {
who = scope:actor
compatibility_target = scope:recipient
multiplier = 0.2
}
opinion_modifier = {
who = scope:recipient
opinion_target = scope:actor
multiplier = 0.5
}
ai_value_modifier = {
who = scope:recipient
ai_honor = 0.2
ai_compassion = 0.1
}
# Are they important
modifier = {
add = {
value = scope:recipient.highest_held_title_tier
subtract = scope:actor.highest_held_title_tier
multiply = 10
max = 30
}
}
#Do I want to tell anyone
ai_value_modifier = {
ai_sociability = 0.2
ai_compassion = 0.1
min = -20
}
modifier = {
has_trait = paranoid
add = -40
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,468 @@
# 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
exists = inspiration
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 }
}
# 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
}
}
auto_accept = {
custom_description = {
text = auto_accept_interaction_ai
object = scope:recipient
scope:recipient = {
is_ai = yes
}
}
}
ai_frequency = 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
government_has_flag = government_is_landless_adventurer
}
gold > ai_inspiration_desired_gold_value
NOT = { has_character_flag = recently_fund_inspiration }
ai_has_conqueror_personality = no
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 = {
NOT = { 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:recipient = { is_busy_in_events_localised = yes }
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 = 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
count >= 1
}
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

View file

@ -0,0 +1,110 @@
find_suitable_accolade_successor_interaction = {
desc = find_suitable_accolade_successor_interaction_desc
icon = icon_combat
cooldown = { days = 730 }
hidden = yes # we use this via the accolade view only
is_shown = {
has_dlc_feature = accolades
}
is_valid_showing_failures_only = {
scope:recipient = {
accolade ?= {
NOT = { exists = accolade_successor }
has_potential_accolade_successors = no
NOT = {
primary_type = {
this = accolade_type:house_knight_attribute
}
}
}
}
scope:actor = {
highest_held_title_tier >= tier_county
}
scope:actor = {
NOT = { government_has_flag = government_is_theocracy }
}
}
on_accept = {
custom_tooltip = find_suitable_accolade_successor_interaction.tt
scope:actor = {
save_scope_as = accolade_owner
}
scope:recipient = {
save_scope_as = knight_in_need
}
scope:recipient.accolade = {
save_scope_as = accolade_in_need
}
scope:actor = {
if = {
limit = {
is_ai = yes
}
trigger_event = {
id = accolade.0006
}
}
else = {
trigger_event = {
id = accolade.0006
days = { 60 180 }
}
}
}
}
auto_accept = yes
cost = {
prestige = {
value = 75
if = {
limit = {
scope:actor = {
highest_held_title_tier >= tier_empire
}
}
add = 100
}
else_if = {
limit = {
scope:actor = {
highest_held_title_tier = tier_kingdom
}
}
add = 50
}
else_if = {
limit = {
scope:actor = {
highest_held_title_tier = tier_duchy
}
}
add = 25
}
}
}
ai_targets = {
ai_recipients = courtiers
ai_recipients = vassals
}
ai_frequency = 36
ai_will_do = {
base = 100
}
ai_potential = {
highest_held_title_tier >= tier_county
has_dlc_feature = accolades
}
}

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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,114 @@

make_noble_family_interaction = {
category = interaction_debug_admin
common_interaction = no
icon = powerful_family_shield
is_shown = {
debug_only = yes
scope:recipient = {
liege = scope:actor
is_ruler = no
}
}
auto_accept = yes
on_accept = {
scope:recipient = { create_noble_family_effect = yes }
}
}
destroy_noble_family_interaction = {
category = interaction_debug_admin
common_interaction = no
icon = icon_cross
is_shown = {
debug_only = yes
scope:recipient = {
liege = scope:actor
any_held_title = {
is_noble_family_title = yes
}
}
}
auto_accept = yes
on_accept = {
scope:recipient = {
random_held_title = {
limit = {
is_noble_family_title = yes
}
save_scope_as = title_to_destroy
scope:recipient = {
destroy_title = scope:title_to_destroy
}
}
}
}
}
invest_appointment_interaction = {
category = interaction_debug_admin
common_interaction = yes
icon = byzantine_crown_positive
target_type = title
target_filter = actor_domain_titles
is_shown = {
debug_only = yes
scope:recipient = {
government_allows = administrative
liege = scope:actor
}
}
auto_accept = yes
on_accept = {
scope:target = {
change_appointment_investment = {
target = scope:recipient
value = 20
}
}
}
}
transfer_title_army_maa_interaction = {
category = interaction_debug_admin
target_type = title
target_filter = actor_domain_titles
icon = request_maa_interaction
auto_accept = yes
is_shown = {
debug_only = yes
scope:recipient = {
government_allows = administrative
}
scope:actor = {
government_allows = administrative
}
scope:actor != scope:recipient
}
on_accept = {
scope:actor = {
every_maa_regiment = {
limit = {
regiment_owning_title = scope:target
}
transfer_title_maa = scope:recipient.primary_title
}
}
}
}

View file

@ -0,0 +1,568 @@
=== Notes ===
This info is a WIP.
=== Structure ===
my_interaction = {
interface_priority = number # Used by interaction menu
common_interaction = yes/no # Used by interaction menu
category = interaction_category_hostile # Used by interaction menu
icon = key # What icon to use. If an icon is used for more
# than one interaction; please consider making
# it general (such as icon_culture for
# interactions relating to culture or
# icon_personal for personal schemes.).
# Otherwise defaults to none/the my_interaction
# key + related my_interaction.dds in
# gfx/interface/icons/character_interactions
override_background = { reference = relaxing_room } # Used to define which image is used as the
# background for the interaction window. These
# can use triggers.
#
# Root is scope:actor for the interaction. If
# there are no backgrounds defined or none are
# valid, the interaction gui will default to
# "study"
is_highlighted = trigger # Should the interaction be highlighted in
# the menu
highlighted_reason = loc_key # Tooltip if highlighted in menu
on_decline_summary = dynamic description # Flavor text that is shown under acceptance
# widget. Use it when you need to draw more
# attention to the on decline effect
special_interaction = type # This interaction uses specialized GUI
special_ai_interaction = type # This interaction runs specialized code that
# identifies the interaction by this
interface = call_ally/marriage/grant_titles/etc. # What interface does the interaction use?
custom_character_sort = { } # What custom character sort options should the
# interaction have available? Last one defined
# will show up first in the dropdown list.
#
# Current Options:
# candidate_score (requires a target title)
# governor_efficiency
scheme = elope/murder/etc. # The type of scheme the interaction starts
popup_on_receive = yes # Have the interaction pop-up for the
# recipient when received
force_notification = yes/no # Force diplomatic item if interaction is
# auto-accept
pause_on_receive = yes/no # Pause the game on receive. It usually makes
# sense to combine it with popup_on_receive
ai_accept_negotiation = yes/no # If the interaction is declined negotiations
# will start. We don't show "won't accept", etc.
# because there is still a possibility that the
# interaction will be accepted via negotiation
# event chain
hidden = yes # Is the interaction hidden?
use_diplomatic_range = yes/no/trigger # Does this interaction check diplomatic range?
# Yes by default
can_send_despite_rejection = yes # Interaction can be sent and the ai might reject
ignores_pending_interaction_block = yes # If the actor is a player and the recipient
# already has received an interaction from them
# pending a response, can this interaction be
# sent anyway.
# Defaults to no
send_name = loc_key # The name of the interaction in context of
# it being seen once sent. Defaults to database
# object key
needs_recipient_to_open = yes # Does the interaction need a recipient set to
# be able to be allowed to open and be shown.
# Defaults to no
show_effects_in_notification = no # Should the effects of the interaction be shown
# in the notification window when an interaction
# is sent.
# Defaults to yes
diarch_interaction = no # If this interaction should be taken by diarch,
# including unlanded one
alert_icon = texture_path # Default is gfx/interface/icons/
# character_interactions/my_interaction_alert.dds
icon_small = texture_path # Default is gfx/interface/icons/
# character_interactions/my_interaction_small.dds
should_use_extra_icon = { always = yes } # When to show an extra icon.
# Tooltip key is <key>_extra_icon
extra_icon = "gfx/<...>/hook_icon.dds" # Icon to show when should_use_extra_icon is true
target_type = type # Possible types:
# title
# artifact
# men_at_arms
# count (default)
target_filter = type # See FAQ for possible types
ai_intermediary_maybe = no # The ai intermediary answer is randomized
ai_maybe = yes # The ai answer is randomized
ai_min_reply_days = 4 # Minimum days before ai replies
ai_max_reply_days = 9 # Maximum days before ai replies
desc = loc_key # Short description of the interaction
greeting = negative/positive # Sets tone in request text
intermediary_notification_text = loc_key # Request text shown to the intermediary
notification_text = loc_key # Request text shown to the recipient
prompt = loc_key # What text should be shown under the
# portrait? (For example: "Pick a Guardian")
cooldown = { years = x } # How long until the interaction can be
# used again?
cooldown_against_recipient = { years = x } # How long until the interaction can be
# used again against recipient?
ignore_recipient_recieve_cooldown = trigger # Under what circumstances can an interaction
# against a recipient be used despite there
# being a cooldown for targeting that recipient?
category_cooldown = { years = x } # Will apply a cooldown to all interactions in
# the same category as this interaction
#
# If an interaction already has a cooldown,
# the longer cooldown one will be applied
category_cooldown_against_recipient = { years = x } # Will apply a cooldown to all interactions in
# the same category as this interaction against
# this recipient
#
# If an interaction already has a cooldown, the
# longer cooldown will be applied
is_shown = trigger # Is the interaction available and visible
# between scope:actor and scope:recipient
is_valid_showing_failures_only = trigger # Is the interaction valid to be selected in
# it's current setup, trigger only displays
# failures
is_valid = trigger # Is the interaction valid to be selected in
# it's current setup
has_valid_target_showing_failures_only = trigger # Is the target valid, trigger only displays
# failures
has_valid_target = trigger # Is the target valid
can_be_picked = trigger # Can this character be picked as a valid target
can_be_picked_title = trigger # Can this title be picked as a valid target
can_be_picked_artifact = trigger # Can this artifact be picked as a valid target
can_be_picked_regiment = trigger # Can this regiment be picked as a valid target
auto_accept = yes/no/trigger # Is the interaction automatically accepted,
# or can recipient decide
can_send = trigger # Can the interaction be sent?
can_be_blocked = trigger # Can the interaction be blocked by the
# recipient (i.e. by a hook on the actor)
redirect = {} # This changes the redirection of characters
# using the scopes actor, recipient,
# secondary_actor and secondary_recipient
populate_actor_list = {} # Everyone sorted into the list 'characters' has
# the potential of being shown to be selected.
#
# Uses the scopes actor, recipient,
# secondary_actor and secondary_recipient.
populate_recipient_list = {} # Same as populate_actor_list
localization_values = = {} # To be able to use values in loc
# (for example: RANSOM_COST =
# scope:secondary_recipient.ransom_cost_value
# lets you use $RANSOM_COST|0$ in loc)
options_heading = loc_key # Text shown above options block - describes all
# options in general
send_option = { # Adds an option
is_shown = trigger # Is option shown. Independent trigger - don't
# reference any other option flags to avoid
# logic bugs
is_valid = trigger # Is option selectable
current_description = desc # Tooltip
flag = flag_name # If selected then scope:flag_name will be
# set to yes
localization = loc_key # Loc_key for option label
starts_enabled = trigger # Trigger for whether this should be on when the
# window opens. If not defined, defaults to off
can_be_changed = trigger # Trigger for whether this option can be changed
# from its default
can_invalidate_interaction = bool # If yes then when the AI picks an interaction
# it will do the full can send this entire
# interaction check instead of the more
# performance saving checking of recipient
# refusal and ai will do, use with care and
# profile it
}
# Options should avoid preventing an interaction from sending (except by the recipient refusing), as we assume that to be the case in the AI for performance reasons, use can_invalidate_interaction if you need it to be re-checked
send_options_exclusive = yes/no # Are the options exclusive?
secondary_scopes_optional = yes/no # Are the secondary scope targets optional?
on_send = effect # Executes directly the interaction is sent
on_accept = effect # Executes when accepted by recipient
# (only if intermediary accepts)
on_decline = effect # Executes when declined by recipient
# (only if intermediary accepts)
on_blocked_effect = effect # Executes when blocked by recipient
# (only if intermediary accepts)
pre_auto_accept = effect # Only executes if the interaction was auto
# accepted. Done before any other side effect
# (E.G., hard coded ones like marriage)
on_auto_accept = effect # Only executes if the interaction was
# auto accepted
on_intermediary_accept = effect # Executes when intermediary allows the
# interaction to happen. It's followed by
# recipient decision
on_intermediary_decline = effect # Executes when intermediary declines the
# interaction. It prevents any effect from
# being called on the recipient
reply_item_key = loc_key # The key to the loc to show in the interaction
# item tooltip. Receives the name of the
# interaction in $INTERACTION$. Default value
# "INTERACTION_REPLY_ITEM"
### These loc keys are shown to the player when sending the interaction. The meaning is what is going to be the answer from the target.
pre_answer_yes_key = loc_key # The key to the loc when the interaction is
# going to be accepted.
# Default value "ANSWER_YES"
pre_answer_no_key = loc_key # The key to the loc when the interaction is
# NOT going to be accepted.
# Default value "ANSWER_NO"
pre_answer_maybe_key = loc_key # The key to the loc when the interaction maybe
# is accepted. Receives the acceptance value in
# $VALUE$.
# Default value "ANSWER_MAYBE"
pre_answer_yes_breakdown_key = ANSWER_WILL_ACCEPT # Summary header for acceptance breakdown for
# recipient, when they accept
pre_answer_no_breakdown_key = ANSWER_WILL_NOT_ACCEPT # Summary header for acceptance breakdown for
# recipient, when they decline
pre_answer_maybe_breakdown_key = ANSWER_SUM_MAYBE # Summary header for acceptance breakdown for
# recipient, when it's randomized
intermediary_breakdown_yes = ANSWER_WILL_ACCEPT # Summary header for acceptance breakdown for
# intermediary, when they accept
intermediary_breakdown_no = ANSWER_WILL_NOT_ACCEPT # Summary header for acceptance breakdown for
# intermediary, when they decline
intermediary_breakdown_maybe = ANSWER_SUM_MAYBE # Summary header for acceptance breakdown for
# intermediary, when it's randomized
### These loc keys are shown to the player when answering an interaction.
intermediary_answer_accept_key = ANSWER_YES # Intermediary Accept interaction button text
intermediary_answer_reject_key = ANSWER_NO # Intermediary Decline interaction button text
answer_block_key = ANSWER_BLOCK # Recipient Block interaction text
answer_accept_key = ANSWER_YES # Recipient Accept interaction button text
answer_reject_key = ANSWER_NO # Recipient Decline interaction button text
answer_acknowledge_key = ANSWER_ACKNOWLEDGE # Recipient Acknowledge interaction button text.
# Used for notifications when it's already
# happened
cost = { # Scripted cost for the interaction. The
# interaction will be disabled if the actor
# can't pay up, and the cost will be subtracted
# from the actor when the interaction is sent.
# Renown can only be spent by the dynast.
piety = {}
prestige = {}
gold = {}
renown = {}
}
ai_instant_response = yes/no # Will the AI respond instantly, and not pretend
# to think about it for N days?
ai_set_target = {} # Set scope:target to make the AI target
# something specific. Title targeting
# interactions don't need this
ai_targets = {
ai_recipients = type # Which characters does the ai consider as
# recipient for the interaction, can be scripted
# multiple times to combine lists
#
# Available lists are in the "ai_targets"
# section of this file (trying to add an invalid
# list will trigger an error message with all
# available )
max = integer # Maximum number of targets to consider, unset
# considers all of them, will consider random
# targets that it filters too
chance = 0-1 # A low chance, such as 0.25, randomly excludes
# that number of characters from being checked -
# this is useful for saving performance
}
ai_target_quick_trigger = { # Quick triggers for the ai_targets
adult = yes # The target needs to be adult
attracted_to_owner = yes # The target needs to be attracted to owner
owner_attracted = yes # Owner needs to be attracted to the target
prison = yes # Target must be in prison
}
ai_frequency = months # How often should the ai consider doing this
# interaction
ai_potential = trigger # Will the ai consider trying this interaction.
# Root scope is the actor, and other event
# target are not available
ai_intermediary_accept = mtth # Will the intermediary ai approve for this
# interaction and forward it to the recipient
ai_accept = mtth # Will the ai accept a request for this
# interaction
ai_will_do = mtth # How interested is the ai in sending this
# interaction (tested after selecting targets)
# 0-100 percent chance, will be clamped.
#
### Note that for title interactions, each individual target title will get evaluated, and the one giving the highest ai_will_do will get used. If the interaction has options, the combination of options that gives the highest ai_will_do will be used.
}
=== FAQ ===
Q: What does the special interaction type arrange_marriage_interaction do?
A: special_interaction = arrange_marriage_interaction will add extra marriage info to the interaction
this info makes the game show the special marriage interfaces when setting up an interaction or replying to it.
It's also used by the ai in knowing which interaction to use when setting up marriages.
It automatically marries/betroths the secondary participants and sets up alliances and hands out prestige.
Q: What does "secondary_actor = marriage" and "secondary_recipient = marriage" do?
A: It states that the interaction has secondary participants (the one's actually getting married) and that
we're allowed to change them in the interface. It also automatically redirects the interaction to the matchmaker
so that the player can arrange a marriage with the son/daughter of another ruler and get the child as the
secondary recipient and the ruler as the recipient (since they will be the ones accepting or not).
It also sets up the list of characters to choose from from the actor/recipient with their courts and children.
Q: What does "secondary_actor = marry_off" and "secondary_recipient = marry_off" do?
A: Very similar to marriage, but with some expections:
- The list of characters is calculated from all living characters that are allowed to marry.
- The redirection makes the character you do the interaction with the secondary actor (since you're the one marrying them off)
- There's the marriage redirection for whoever you select them to marry (ie mostly being the employer)
Q: How and when are the character interaction triggers checked?
A: These are the main triggers used by interactions:
- is_shown
- is_highlighted
- is_valid_showing_failures_only
- is_valid
- has_valid_target_showing_failures_only
- has_valid_target
- can_be_picked
- can_be_picked_title
- can_be_blocked
- can_send
Q: What are the possible types for target_filter?
A: Possible types:
- actor_domain_titles
- recipient_domain_titles
- secondary_actor_domain_titles
- secondary_recipient_domain_titles
- actor_domain_titles_including_leases
- recipient_domain_titles_including_leases
- secondary_actor_domain_titles_including_leases
- secondary_recipient_domain_titles_including_leases
- actor_de_jure_titles
- recipient_de_jure_titles
- secondary_actor_de_jure_titles
- secondary_recipient_de_jure_titles
- actor_realm_titles
- recipient_realm_titles
- secondary_actor_realm_titles
- secondary_recipient_realm_titles
- actor_top_liege_de_jure_titles
- recipient_top_liege_de_jure_titles
- secondary_actor_top_liege_de_jure_titles
- secondary_recipient_top_liege_de_jure_titles
- actor_artifacts
- recipient_artifacts
- actor_artifacts_claimable
- recipient_artifacts_claimable
- actor_maa
- recipient_maa
- actor_personal_maa
- recipient_personal_maa
- actor_title_maa
- recipient_title_maa
- count (default)
Is there any other special behaviors set in code that these interactions are affected by?
When are the following conditions evaluated, are any of them checked during special circumstances (e.g. "not all scopes exist yet"):
is_shown
can_be_picked
is_valid_showing_failures_only
has_valid_target_showing_failures_only
=== Custom Widgets ===
=== FAQ ===
Q: What does the special interaction type arrange_marriage_interaction do?
A: special_interaction = arrange_marriage_interaction will add extra marriage info to the interaction
this info makes the game show the special marriage interfaces when setting up an interaction or replying to it.
It's also used by the ai in knowing which interaction to use when setting up marriages.
It automatically marries/betroths the secondary participants and sets up alliances and hands out prestige.
Q: What does "secondary_actor = marriage" and "secondary_recipient = marriage" do?
A: It states that the interaction has secondary participants (the one's actually getting married) and that
we're allowed to change them in the interface. It also automatically redirects the interaction to the matchmaker
so that the player can arrange a marriage with the son/daughter of another ruler and get the child as the
secondary recipient and the ruler as the recipient (since they will be the ones accepting or not).
It also sets up the list of characters to choose from from the actor/recipient with their courts and children.
Q: What does "secondary_actor = marry_off" and "secondary_recipient = marry_off" do?
A: Very similar to marriage, but with some expections:
- The list of characters is calculated from all living characters that are allowed to marry.
- The redirection makes the character you do the interaction with the secondary actor (since you're the one marrying them off)
- There's the marriage redirection for whoever you select them to marry (ie mostly being the employer)
Q: How and when are the character interaction triggers checked?
A: These are the main checks used by interactions:
Can Send: If an interaction can be sent is tested like this:
- check if set up for sending (this means that all targets and secondary actors/recipients that the interaction uses, must have been selected)
- check diplomatic range (if interaction scripted to use it)
- make special is shown checks decided by special_interaction =
- Trigger: is_shown
- check if the interaction is already being considered by the recipient
- Trigger: is_valid_showing_failures_only
- Trigger: has_valid_target_showing_failures_only
- Trigger: can_send
- Trigger: is_valid
- Trigger: has_valid_target
- make special can send checks decided by special_interaction =
If it passes all the above, then we check if the interaction needs to be accepted (auto_accept = no or failing trigger and interactions that can be sent regardless like imprison)
interactions that need acceptance cannot be sent to the ai unless it will accept.
When populating a list of titles we look at this (examples: grant title, revoke title):
- select domain or dejure title based on target_filter =
- Trigger: can_be_picked_title with the full interaction scope and the title set as scope:target
Note: can_be_picked_title is not checked when we try to send, it's a separate trigger that should be a fast way of deciding what can end up in the list to select from
When populating a list of characters we look a this:
- secondary_actor/secondary_recipient = decides what to base the list off (vassals, courtiers, marriage, dynasty, house, ...)
If we're haven't picked a character already (many interactions wants us to pick two characters, such as marriage)
- Trigger: can_be_picked with the current interaction scipe and the tested character set as root
Else if we're picking character number two
- Try setting the character as secondary_actor/secondary_recipient. The interaction should be fully set up after this.
- Do a full Can Send test, but ignore the ai acceptance check.
Note: can_be_picked is only there to filter out the first character we need to select and is not part of the Can Send test.
Is Shown: is_shown is used by the interface to check if the interaction should be visible in the interaction list
Is Valid: is_valid and is_valid_showing_failures_only are tested to see if an interaction should be enabled (clickable) or not in the menu
== ai_targets ==
The following are valid AI targets:
known_secrets - Characters who has a secret you know of
scheme_targets
hooked_characters
neighboring_rulers
peer_vassals
guests
dynasty
courtiers
councillors
prisoners
sub_realm_characters
realm_characters
vassals
liege
self
head_of_faith
spouses
family
children
primary_war_enemies
war_enemies
war_allies
scripted_relations - Any character you have a scripted relation with
activity_host - Host of your involved activity
activity_guests - Guests of your involved activity
contacts - People on your contact list (connected to task contracts)
domicile_location_top_ruler - Ruler of domicile location's Top Realm (for Domicile Owners)
domicile_location_top_realm_vassals - Vassals of domicile location's Top Realm (for Domicile Owners)
domicile_location_neighboring_top_rulers - Rulers of Neighboring Top Realms (for Domicile Owners, uses the top liege of the domicile's location to fetch neighboring realms)
domicile_location_neighboring_top_realm_vassals - Vassals of Neighboring Top Realms (for Domicile Owners, uses the top liege of the domicile's location to fetch neighboring realms)
top_realm_domicile_owners - Owners of domiciles located in Top Liege Realm (for unlanded Domicile Owners, uses the top liege of the location you're in)
sub_realm_domicile_owners - Owners of domiciles located within your own realm (for Landed Rulers)
nearby_domicile_owners - Nearby owners of domiciles (Uses a range value defined as NEARBY_DOMICILE_RANGE in 00_defines.txt)