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

merchant_has_charter_from_trigger

merchant_has_charter_from_trigger = { INCLUDE_FORGERIES = … ONLY_EQUIPPED = … PATRON = … }

game/common/scripted_triggers/gdp_merchant_triggers.txt, line 547 (25 lines). Parameters: $INCLUDE_FORGERIES$, $ONLY_EQUIPPED$, $PATRON$.

merchant_has_charter_from_trigger is a scripted trigger in Crusader Kings III, in the Silk and Silver files, written at line 547 of its file. A call passes 3 parameters: INCLUDE_FORGERIES, ONLY_EQUIPPED and PATRON. The game's script calls it in 6 places, among them Commission Trade Route (interaction), Make a Request (interaction) and Monopolize Trade (interaction). 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.

The comment above it in the file

is a merchant with a charter from PATRON

What it checks

  • $PATRON$ ?= { save_temporary_scope_as = patron_temp }
  • Granter of any Charter Artifact is …
  • If

    • flag:$ONLY_EQUIPPED$ = flag:yes

    Then

    • • Is currently equipped
  • If

    • flag:$INCLUDE_FORGERIES$ = flag:no

    Then

    • • Is not a forgery

• 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 (25 lines of game script)
merchant_has_charter_from_trigger = {
	$PATRON$ ?= { save_temporary_scope_as = patron_temp }
	custom_tooltip = {
		text = merchant_has_charter_from
		government_has_flag = government_is_merchant
		any_character_artifact = {
			var:charter_patron ?= scope:patron_temp
			save_temporary_scope_as = 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 }
		}
	}
}

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_charter_from_trigger.

Buttons of the game's windows (scripted GUIs) (1)

  • merchant_has_charter_from_scope_patron_gui

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?