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