Scripted trigger · Silk and Silver files
commission_trade_route_merchant_trigger
commission_trade_route_merchant_trigger = { COMMISSIONER = … MERCHANT = … }game/common/scripted_triggers/gdp_merchant_triggers.txt, line 846 (42 lines). Parameters: $COMMISSIONER$, $MERCHANT$.
commission_trade_route_merchant_trigger is a scripted trigger in Crusader Kings III, in the Silk and Silver files, written at line 846 of its file. A call passes 2 parameters: COMMISSIONER and MERCHANT. The game's script calls it in 2 places, among them Commission Trade Route (interaction) and gdp_merchant.9020 (event). Its body carries 4 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
$COMMISSIONER$ = { save_temporary_scope_as = commissioner_temp }$MERCHANT$ = { save_temporary_scope_as = merchant_temp }scope:merchant_temp:- Is available (a ruler, not incapable, not imprisoned)
is_landless_merchant = yes- … must be … Patron
NOT = { is_known_dealbreaker_trigger = { KNOWER = scope:commissioner_temp } }NOT = { is_at_war_with = scope:commissioner_temp }- … already operates a Commission Route for you
- … has too many Commission Routes already (…/…)
• 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 (42 lines of game script)
commission_trade_route_merchant_trigger = {
# Valid...
exists = $COMMISSIONER$
exists = $MERCHANT$
$COMMISSIONER$ = { save_temporary_scope_as = commissioner_temp }
$MERCHANT$ = { save_temporary_scope_as = merchant_temp }
scope:merchant_temp = {
# ...not on cooldown after declining, so an AI patron does not ask again immediately...
trigger_if = {
limit = {
scope:commissioner_temp = { is_ai = yes }
}
custom_tooltip = {
text = commission_trade_route_merchant_recent_request_tt
NOT = { has_variable = commission_trade_route_cooldown }
}
}
is_available_quick = {
ruler = yes
incapable = no
imprisoned = no
}
# ...is a Merchant Tributary of the commissioner...
is_landless_merchant = yes
custom_tooltip = {
text = must_be_your_merchant_tributary_tt
is_tributary_of = scope:commissioner_temp
}
NOR = {
is_known_dealbreaker_trigger = { KNOWER = scope:commissioner_temp }
is_at_war_with = scope:commissioner_temp
}
custom_tooltip = {
text = commission_trade_route_merchant_already_commissioned_tt
NOT = { has_commission_route_with = scope:commissioner_temp }
}
custom_tooltip = {
text = commission_trade_route_merchant_max_commissions_tt
has_fewer_commission_routes_than = max_commission_routes
}
}
}As written in game/common/scripted_triggers/gdp_merchant_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls commission_trade_route_merchant_trigger.
Character interactions (1)
Events (1)
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.