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

gdp_merchant_becomes_patrician_effect

gdp_merchant_becomes_patrician_effect = { LIEGE = … }

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 2672 (72 lines). Parameters: $LIEGE$.

gdp_merchant_becomes_patrician_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 2672 of its file. A call passes 1 parameter: LIEGE. The game's script calls it in 2 places, among them Join Republic (interaction) and new_republic_population_effect (scripted effect). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

The comment above it in the file

Turns a landless merchant into a patrician family of $LIEGE$'s republic, keeping the company.

What it does

• 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 (72 lines of game script)
gdp_merchant_becomes_patrician_effect = {
	save_scope_as = new_patrician_merchant
	save_scope_as = the_merchant
	$LIEGE$ = { save_scope_as = new_patrician_liege }

	# Court positions fall away with the government change, so stamp the Associate trait first.
	hidden_effect = {
		every_courtier = {
			gdp_merchant_courtier_becomes_associate_effect = yes
		}
	}

	# tributary_merchant cannot be broken from the merchant's side, so end it before swearing fealty.
	if = {
		limit = { is_tributary = yes }
		hidden_effect = { end_tributary = yes }
	}

	every_character_artifact = {
		limit = { has_variable = charter_patron }
		save_temporary_scope_as = surrendered_charter
		scope:new_patrician_merchant = { destroy_artifact = scope:surrendered_charter }
	}

	gdp_merchant_forgive_debtors_effect = yes

	if = {
		limit = {
			NOT = { liege ?= scope:new_patrician_liege }
		}
		create_title_and_vassal_change = {
			type = swear_fealty
			save_scope_as = new_patrician_vassal_change
		}
		change_liege = {
			liege = scope:new_patrician_liege
			change = scope:new_patrician_vassal_change
		}
		resolve_title_and_vassal_change = scope:new_patrician_vassal_change
	}

	change_government = republic_government
	# GDP music cue, only plays for the local player
	play_music_cue = mx_cue_the_rise_of_a_nation

	hidden_effect = {
		domicile ?= {
			if = {
				limit = {
					NOT = { domicile_location = scope:new_patrician_liege.capital_province }
				}
				move_domicile = scope:new_patrician_liege.capital_province
			}
		}
	}

	gdp_republic_restore_family_succession_law_effect = yes

	every_held_title = {
		limit = { gdp_merchant_company_title_trigger = yes }
		set_title_name_dynamic = NEW_PATRICIAN_TITLE_NAME_FROM_COMPANY
		# The title survives, so it never hits the on_title_destroyed prune that maintains merchants_tally.
		save_temporary_scope_as = departing_company_title
		if = {
			limit = { has_global_variable_list = merchants_tally }
			remove_list_global_variable = {
				name = merchants_tally
				target = scope:departing_company_title
			}
		}
	}
}

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

Character interactions (1)

Scripted effects (1)

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?