This commit is contained in:
Magpie490 2025-02-19 22:32:34 +00:00
parent 147f9ae42a
commit 98c4af4207
39 changed files with 101450 additions and 0 deletions

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

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
}

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

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

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

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)