Scripted trigger · Silk and Silver files
merchant_has_usable_charter_trigger
merchant_has_usable_charter_trigger = { INCLUDE_FORGERIES = … ONLY_EQUIPPED = … }game/common/scripted_triggers/gdp_merchant_triggers.txt, line 494 (27 lines). Parameters: $INCLUDE_FORGERIES$, $ONLY_EQUIPPED$.
merchant_has_usable_charter_trigger is a scripted trigger in Crusader Kings III, in the Silk and Silver files, written at line 494 of its file. A call passes 2 parameters: INCLUDE_FORGERIES and ONLY_EQUIPPED. The game's script calls it in 6 places, among them Abuse Charter Authority (decision), Direct Local Investment (decision) and Entice Merchants (decision). Its body carries 3 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_triggers/gdp_merchant_triggers.txt.
What it checks
- Any held Charter Artifact:
If
flag:$ONLY_EQUIPPED$ = flag:yes
Then
- • Is currently equipped
If
flag:$INCLUDE_FORGERIES$ = flag:no
Then
- • Is not a forgery
merchant_has_patron_or_below_trigger = { PATRON = scope:patron_temp }patron_is_duke_or_above_trigger = { PATRON = scope:patron_temp }
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (27 lines of game script)
merchant_has_usable_charter_trigger = {
save_temporary_scope_as = merchant_temp
custom_tooltip = {
text = merchant_charter_of_patron_or_liege
any_character_artifact = {
save_temporary_scope_as = charter_temp
var:charter_patron ?= { save_temporary_scope_as = patron_temp } # is charter
scope:merchant_temp = { can_benefit_from_artifact = scope:charter_temp }
}
}
trigger_if = {
limit = { flag:$ONLY_EQUIPPED$ = flag:yes }
custom_tooltip = {
text = merchant_charter_of_patron_or_liege_equipped
scope:charter_temp ?= { is_equipped = yes }
}
}
trigger_if = {
limit = { flag:$INCLUDE_FORGERIES$ = flag:no }
custom_tooltip = {
text = merchant_charter_of_patron_or_liege_forgery
NOT = { exists = scope:charter_temp.var:forger }
}
}
merchant_has_patron_or_below_trigger = { PATRON = scope:patron_temp }
patron_is_duke_or_above_trigger = { PATRON = scope:patron_temp }
}As written in game/common/scripted_triggers/gdp_merchant_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls merchant_has_usable_charter_trigger.
Character interactions (1)
Events (2)
- …: Push for Advantages
gdp_merchant_scheme_advantage.1020 - Danger: Target on our Backs
gdp_travel_events.1070
Source: game/common/scripted_triggers/gdp_merchant_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.21.0.