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

Scripted effect · Silk and Silver files

merchant_charter_destroy_held_charters_effect

merchant_charter_destroy_held_charters_effect = { MERCHANT = … PATRON = … }

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 4611 (31 lines). Parameters: $MERCHANT$, $PATRON$.

merchant_charter_destroy_held_charters_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 4611 of its file. A call passes 2 parameters: MERCHANT and PATRON. The game's script calls it in 5 places, among them Request Merchant Charter (interaction), Revoke Merchant Charter (interaction) and …: Push for Advantages (event gdp_merchant_scheme_advantage.1020). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

What it does

  • scope:merchant_temp › Every character artifact:
    • Where: Charter patron is scope:patron temp
    • scope:merchant_temp › scope:patron_temp › scope:patron_temp:
      • destroy_artifact = scope:destroyed_charter_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 (31 lines of game script)
merchant_charter_destroy_held_charters_effect = {
	$MERCHANT$ = { save_temporary_scope_as = merchant_temp }
	$PATRON$ = { save_temporary_scope_as = patron_temp }
	scope:merchant_temp = {
		every_character_artifact = {
			limit = { var:charter_patron ?= scope:patron_temp }
			save_temporary_scope_as = destroyed_charter_temp
			scope:merchant_temp = {
				send_interface_toast = {
					type = event_toast_effect_bad
					title = charter_destroyed_title
					left_icon = scope:patron_temp
					scope:patron_temp = {
						send_interface_toast = {
							type = event_toast_effect_good
							title = charter_destroyed_title
							left_icon = scope:merchant_temp
							scope:patron_temp = {
								destroy_artifact = scope:destroyed_charter_temp
							}
						}
					}
				}
			}
		}
		if = {
			limit = { var:charter_abused_patron ?= scope:patron_temp }
			remove_variable = charter_abused_patron
		}
	}
}

As written in game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls merchant_charter_destroy_held_charters_effect.

Events (1)

On actions (the game's own hooks) (1)

  • on_imprison

Source: game/common/scripted_effects/gdp_merchant_scripted_effects.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?