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
on_victory_aggressive_war_effect = yesscope:attacker:- scope:target › Every in de jure hierarchy:
- Where:
- Title tier exactly County
- Their holder:
One of these
this = scope:defenderor
target_is_liege_or_above = scope:defender
continue = { tier > tier_county }
- Where:
- Every in list: Gains the … Title (attacker)
Otherwise
ep3_become_landed_cleanup_effect = yes- Gain … Fame Prestige
- scope:target › Every in de jure hierarchy:
modify_allies_of_participants_fame_values = { … }- scope:attacker › Every ally:
- Where:
NOT = { in_diplomatic_range = scope:attacker }
break_alliance = scope:attacker
- Where:
• 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.
Casus belli (3)
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.