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_procures_estate_effect

gdp_merchant_procures_estate_effect = { GIVER = … }

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 2747 (104 lines). Parameters: $GIVER$.

gdp_merchant_procures_estate_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 2747 of its file. A call passes 1 parameter: GIVER. The game's script calls it in 1 place, among them Procure an Estate (interaction). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

The comment above it in the file

Settles a landless merchant as an unlanded noble family of $GIVER$'s administrative realm
Company and estate are different domicile types, so we destroy the company title

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 (104 lines of game script)
gdp_merchant_procures_estate_effect = {
	save_scope_as = settling_merchant
	$GIVER$ = { save_scope_as = estate_giver }

	# 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 }
	}

	hidden_effect = {
		every_character_artifact = {
			limit = { has_variable = charter_patron }
			save_temporary_scope_as = surrendered_charter
			scope:settling_merchant = { destroy_artifact = scope:surrendered_charter }
		}
		gdp_merchant_forgive_debtors_effect = yes
		# The government arrives via give_noble_family_title, so on_government_change cannot be relied on.
		gdp_invalidate_merchant_task_contracts_on_government_change_effect = yes
		every_courtier = { add_to_list = courtiers_list }
	}

	destroy_merchant_effect = { MERCHANT = scope:settling_merchant }

	# Checked only after the company is gone, since the company itself is a noble family title.
	if = {
		limit = {
			house ?= {
				any_house_member = {
					this != scope:settling_merchant
					top_liege = scope:estate_giver.top_liege
					any_held_title = { is_noble_family_title = yes }
				}
			}
		}
		found_cadet_house_decision_effect = {
			CHARACTER = scope:settling_merchant
			PRESTIGE = major_prestige_gain
		}
	}

	hidden_effect = {
		scope:estate_giver.top_liege = {
			add_courtier = scope:settling_merchant
			scope:settling_merchant = { return_to_court = yes }
		}
	}

	create_noble_family_effect = { GOVERNMENT_GIVER = scope:estate_giver }

	hidden_effect = {
		every_in_list = {
			list = courtiers_list
			limit = {
				NOT = { liege_or_court_owner = scope:settling_merchant }
			}
			scope:settling_merchant = { add_courtier = prev }
		}
		# And boot any new autogenned arrivals.
		every_courtier = {
			limit = {
				is_lowborn = yes
				NOR = {
					is_in_list = courtiers_list
					is_close_or_extended_family_of = scope:settling_merchant
					is_consort_of = scope:settling_merchant
					has_important_relationship_trigger = { CHARACTER = scope:settling_merchant }
				}
			}
			silent_disappearance_effect = yes
		}
	}

	# create_noble_family_effect already swears fealty when it resolves a liege of its own.
	if = {
		limit = { top_liege = this }
		create_title_and_vassal_change = {
			type = swear_fealty
			add_claim_on_loss = no
			save_scope_as = estate_vassal_change
		}
		change_liege = {
			liege = scope:estate_giver.top_liege
			change = scope:estate_vassal_change
		}
		resolve_title_and_vassal_change = scope:estate_vassal_change
	}

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

	add_character_modifier = {
		modifier = ep3_administrative_outsider_modifier
		years = 15
	}
}

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

Character interactions (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?