Scripted effect
on_ceremonial_claimant_faction_war_win_common
on_ceremonial_claimant_faction_war_win_common = { ATTACKER = … CLAIMANT = … DEFENDER = … TITLE = … }game/common/scripted_effects/00_war_effects.txt, line 3033 (227 lines). Parameters: $ATTACKER$, $CLAIMANT$, $DEFENDER$, $TITLE$.
on_ceremonial_claimant_faction_war_win_common is a scripted effect in Crusader Kings III, written at line 3033 of its file. A call passes 4 parameters: ATTACKER, CLAIMANT, DEFENDER and TITLE. The game's script calls it in 2 places, among them Ceremonial Claimant Faction (casus belli) and faction_demand.2011 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.
What it does
$TITLE$ = { … }$CLAIMANT$ = { … }If
a check the game hides
Then
$ATTACKER$.joined_faction = { … }
- Every Faction Member:
If
can_add_hook = { type = favor_hook target = scope:the_claimant }
Then
add_hook = { type = favor_hook target = scope:the_claimant }
If
- Their culture is the same as that of the claimant
- Any character struggle:
involvement = involvedhas_struggle_phase_parameter = struggle_prestige_install_same_culture_claimant
Then
- Gain +350 Prestige
- scope:the_claimant › If landed:
force_step_down_landed_titles = yes
- scope:the_claimant › If has the Trait: Former Emperor: Loses the Trait Former Emperor
- scope:target_title: Gains the … Title (the claimant)
If
scope:the_claimant:top_liege != $ATTACKER$.top_liegeprimary_title.tier < $ATTACKER$.primary_title.tier
Then
scope:the_claimant:change_liege = { liege = $ATTACKER$.top_liege change = scope:change_two }
- scope:previous_emperor: Gains the Trait Former Emperor
If
scope:the_claimant:
Then
If
scope:target_title.tier >= tier_empire
Then
scope:the_claimant:add_legitimacy = { value = 1000 multiply = nomadic_legitimacy_claimant_multiplier }
Else if
scope:target_title.tier = tier_kingdom
Then
scope:the_claimant:add_legitimacy = { value = 750 multiply = nomadic_legitimacy_claimant_multiplier }
Else if
scope:target_title.tier = tier_duchy
Then
scope:the_claimant:add_legitimacy = { value = 500 multiply = nomadic_legitimacy_claimant_multiplier }
Otherwise
scope:the_claimant:add_legitimacy = { value = 300 multiply = nomadic_legitimacy_claimant_multiplier }
If
list_size:supporters > 0scope:the_claimant:
Then
scope:the_claimant:add_legitimacy = { value = list_size:supporters multiply = 50 }
- scope:the_claimant › If have a Royal Court:
change_current_court_grandeur = massive_court_grandeur_gain
• 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)
on_ceremonial_claimant_faction_war_win_common = {
$TITLE$ = {
save_scope_as = target_title
holder = { save_scope_as = previous_emperor }
}
$CLAIMANT$ = {
save_scope_as = the_claimant
# If the claimant is the prisoner of the defender, free the claimant (it doesn't make much sense to leave the new king in the old king's dungeon)
if = {
limit = { is_imprisoned_by = $DEFENDER$ }
release_from_prison = yes
}
}
if = { # Demand
limit = { exists = $ATTACKER$.joined_faction }
$ATTACKER$.joined_faction = {
every_faction_member = {
limit = {
NOT = { this = scope:the_claimant }
}
add_to_list = supporters
}
}
}
# Add mutual opinion bonuses between claimant and faction members, as well as a hook on the claimant if possible.
every_in_list = {
custom = FACTION_CLAIMANT_EVERY_FACTION_MEMBER
list = supporters
limit = {
NOT = { this = scope:the_claimant }
}
hidden_effect = {
add_opinion = {
modifier = ceremonial_claimant_faction_member_opinion
target = scope:the_claimant
}
reverse_add_opinion = {
modifier = ceremonial_claimant_faction_claimant_opinion
target = scope:the_claimant
}
}
if = {
limit = {
can_add_hook = {
type = favor_hook
target = scope:the_claimant
}
}
add_hook = {
type = favor_hook
target = scope:the_claimant
}
}
# Struggle boost
if = {
limit = {
culture = scope:the_claimant.culture
any_character_struggle = {
involvement = involved
has_struggle_phase_parameter = struggle_prestige_install_same_culture_claimant
}
}
add_prestige = major_prestige_gain
}
}
scope:the_claimant = {
if = {
limit = { is_landed = yes }
force_step_down_landed_titles = yes
}
}
# Give the claimant their new title.
create_title_and_vassal_change = {
type = faction_demand
save_scope_as = change
add_claim_on_loss = yes
}
# Preserve Grandeur
if = {
limit = {
scope:target_title.holder = {
has_royal_court = yes
has_dlc_feature = royal_court
}
scope:the_claimant = {
has_royal_court = no
}
}
scope:the_claimant = {
set_variable = {
name = previous_holder_grandeur_value
value = scope:target_title.holder.court_grandeur_current
}
}
}
scope:the_claimant = {
if = {
limit = { has_trait = former_emperor }
remove_trait = former_emperor
}
}
scope:target_title = {
change_title_holder = {
holder = scope:the_claimant
change = scope:change
}
}
resolve_title_and_vassal_change = scope:change
if = {
limit = {
scope:the_claimant = {As written in game/common/scripted_effects/00_war_effects.txt.
The first 120 of its 227 lines; the rest is in game/common/scripted_effects/00_war_effects.txt from line 3033.
Where it is used
Every place in common/, events/ and history/ that calls on_ceremonial_claimant_faction_war_win_common.
Casus belli (1)
Events (1)
Source: game/common/scripted_effects/00_war_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.