CK3 DatabaseCrusader Kings III · 1.21.0 “Florin” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →Merch→

Scripted trigger · Silk and Silver files

commission_trade_route_good_trigger

commission_trade_route_good_trigger = { COMMISSIONER = … GOOD = … MARKET = … MERCHANT = … }

game/common/scripted_triggers/gdp_merchant_triggers.txt, line 891 (32 lines). Parameters: $COMMISSIONER$, $GOOD$, $MARKET$, $MERCHANT$.

commission_trade_route_good_trigger is a scripted trigger in Crusader Kings III, in the Silk and Silver files, written at line 891 of its file. A call passes 4 parameters: COMMISSIONER, GOOD, MARKET and MERCHANT. The game's script calls it in 4 places, among them Commission Trade Route (interaction), Commission a Merchant (important action) and gdp_merchant.9020 (event). Its body carries 2 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_triggers/gdp_merchant_triggers.txt.

The comment above it in the file

AI merchant commission goods check
Separate from commission_trade_route_interaction, because code handles much of its goods sorting

What it checks

  • $MERCHANT$ = { save_temporary_scope_as = merchant_temp }
  • $COMMISSIONER$ = { save_temporary_scope_as = commissioner_temp }
  • $MARKET$ = { save_temporary_scope_as = market_temp }
  • $GOOD$ = { save_temporary_scope_as = good_temp }
  • scope:merchant_temp:
    • … is already trading this Good in this Market
    • … would not trade this Good into this Market: its need there is already covered, or no Market within reach can supply it

• 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 (32 lines of game script)
commission_trade_route_good_trigger = {
	# Valid...
	exists = $MERCHANT$
	exists = $COMMISSIONER$
	exists = $MARKET$
	exists = $GOOD$
	$MERCHANT$ = { save_temporary_scope_as = merchant_temp }
	$COMMISSIONER$ = { save_temporary_scope_as = commissioner_temp }
	$MARKET$ = { save_temporary_scope_as = market_temp }
	$GOOD$ = { save_temporary_scope_as = good_temp }

	scope:merchant_temp = {	
		# ...not trading said good in said place already...
		custom_tooltip = {
			text = commission_trade_route_good_trigger_conflict_tt
			NOT = {
				any_trade_route = {
					any_trade_market_on_route = { this = scope:market_temp }
					any_traded_good = { this = scope:good_temp }
				}
			}
		}
		# ...and the route would actually trade, checked last as it runs a full trade projection
		custom_tooltip = {
			text = commission_trade_route_would_not_trade_tt
			can_create_commission_trade_route = {
				primary_good = scope:good_temp
				destination = scope:market_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 commission_trade_route_good_trigger.

Character interactions (1)

Important actions (1)

  • Commission a Merchant

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.

Spotted a mistake on this page, or have an idea for the site?