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_seize_realm_on_victory_effect

gdp_merchant_seize_realm_on_victory_effect = { ALLY_FAME_BASE = … VICTOR_PRESTIGE_XP = … }

game/common/scripted_effects/gdp_merchant_scripted_effects.txt, line 5079 (165 lines). Parameters: $ALLY_FAME_BASE$, $VICTOR_PRESTIGE_XP$.

gdp_merchant_seize_realm_on_victory_effect is a scripted effect in Crusader Kings III, in the Silk and Silver files, written at line 5079 of its file. A call passes 2 parameters: ALLY_FAME_BASE and VICTOR_PRESTIGE_XP. The game's script calls it in 3 places, among them Seize Realm County (casus belli), Seize Realm Duchy (casus belli) and Seize Realm Kingdom (casus belli). Patch 1.21.0, from game/common/scripted_effects/gdp_merchant_scripted_effects.txt.

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 (120 lines of game script)
gdp_merchant_seize_realm_on_victory_effect = {
	on_victory_aggressive_war_effect = yes
	scope:attacker = {
		add_character_flag = {
			flag = domicile_culture_and_faith_check
			days = 1
		}
		scope:defender = {
			if = {
				limit = { government_has_flag = government_is_tribal }
				save_scope_as = tribal
			}
		}
		ordered_in_list = {
			list = target_titles
			order_by = tier
			save_scope_as = target
		}
		scope:target = {
			every_in_de_jure_hierarchy = {
				continue = { tier > tier_county }
				limit = {
					tier = tier_county
					NOT = { is_in_list = target_titles }
					holder ?= {
						OR = {
							this = scope:defender
							target_is_liege_or_above = scope:defender
						}
					}
				}
				add_to_list = target_titles
			}
		}
		# Find capital
		random_in_list = {
			list = target_titles
			limit = {
				tier = tier_county
				scope:defender.capital_county ?= this
				any_county_province = {
					OR = {
						has_holding_type = city_holding
						has_holding_type = castle_holding
						has_holding_type = tribal_holding
					}
				}
			}
			alternative_limit = {
				tier = tier_county
				any_county_province = {
					OR = {
						has_holding_type = city_holding
						has_holding_type = castle_holding
						has_holding_type = tribal_holding
					}
				}
			}
			weight = {
				base = 0
				modifier = { add = prosperity_level }
			}
			save_scope_as = capital_county
			if = {
				limit = {
					title_province = {
						NOR = {
							has_holding_type = city_holding
							has_holding_type = castle_holding
							has_holding_type = tribal_holding
						}
					}
				}
				random_county_province = {
					limit = {
						OR = {
							has_holding_type = city_holding
							has_holding_type = castle_holding
						}
					}
					alternative_limit = { has_holding_type = tribal_holding }
					weight = {
						base = 0
						modifier = { add = province_size_level }
					}
					barony = { save_scope_as = new_capital }
				}
			}
		}
		# Transfer barony if necessary
		hidden_effect = {
			if = {
				limit = {
					exists = scope:new_capital
					scope:new_capital.holder != scope:capital_county.holder
				}
				create_title_and_vassal_change = {
					type = revoked
					save_scope_as = barony_change
					add_claim_on_loss = yes
				}
				scope:new_capital = {
					change_title_holder = {
						holder = scope:capital_county.holder
						change = scope:barony_change
					}
				}
				resolve_title_and_vassal_change = scope:barony_change
			}
			if = {
				limit = { exists = scope:new_capital }
				scope:new_capital = { set_capital_barony = yes }
			}
		}
		create_title_and_vassal_change = {
			type = conquest
			save_scope_as = change
			add_claim_on_loss = yes
		}
		every_in_list = {

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

The first 120 of its 165 lines; the rest is in game/common/scripted_effects/gdp_merchant_scripted_effects.txt from line 5079.

Where it is used

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

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?