Scripted effect
on_claimant_faction_war_win_common
on_claimant_faction_war_win_common = { ATTACKER = … CLAIMANT = … DEFENDER = … TARGET_TITLES = … }game/common/scripted_effects/00_war_effects.txt, line 1316 (330 lines). Parameters: $ATTACKER$, $CLAIMANT$, $DEFENDER$, $TARGET_TITLES$.
on_claimant_faction_war_win_common is a scripted effect in Crusader Kings III, written at line 1316 of its file. A call passes 4 parameters: ATTACKER, CLAIMANT, DEFENDER and TARGET_TITLES. The game's script calls it in 3 places, among them Claimant Faction (casus belli), faction_demand.2001 (event) and faction_demand_claimant_counter_offer_corule_accepted_effect (local effect). Patch 1.20.1.2, from game/common/scripted_effects/00_war_effects.txt.
What it does
$DEFENDER$ = { … }scope:the_claimant:If
is_imprisoned_by = $DEFENDER$
Then
release_from_prison = yes
$ATTACKER$.joined_faction = { … }If
scope:faction_targeted_title ?= $DEFENDER$.top_liege.primary_title.var:administrative_ui_special_title
Then
$DEFENDER$ = { … }
scope:target_holder:If
- Is an Independent Ruler
- they has administrative government mechanic
Then
- Every held title:
- Where: The … is not a Noble Family Title
title_tier > barony
If
- scope:target_holder: Is an Independent Ruler
scope:the_claimant.primary_title.tier < scope:target_title.tier
Then
scope:the_claimant:change_liege = { liege = scope:target_holder.liege change = scope:change }
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:num_faction_members > 0scope:the_claimant:
Then
scope:the_claimant:add_legitimacy = { value = list_size:num_faction_members multiply = 50 }
- scope:the_claimant › If have a Royal Court:
change_current_court_grandeur = massive_court_grandeur_gain
If
scope:target_title = title:e_byzantium
Then
- scope:the_claimant: Event ep3_emperor_yearly.2030 (after 15 days)
If
a check the game hides
Then
start_tributary_interaction_effect = { TRIBUTARY = scope:the_claimant SUZERAIN = scope:handover_suzerain }
• 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_claimant_faction_war_win_common = {
$DEFENDER$ = {
if = {
limit = {
is_tributary = yes
exists = suzerain
$CLAIMANT$ = {
is_tributary = no
OR = {
is_ruler = no
is_vassal_or_below_of = $DEFENDER$
}
}
}
suzerain = { save_scope_as = handover_suzerain }
}
}
$ATTACKER$.joined_faction.special_title ?= {
save_scope_as = faction_targeted_title
}
$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)
scope:the_claimant = {
if = {
limit = {
is_imprisoned_by = $DEFENDER$
}
release_from_prison = yes
}
}
# Add mutual opinion bonuses between claimant and faction members, as well as a hook on the claimant if possible.
$ATTACKER$.joined_faction = {
every_faction_member = {
custom = FACTION_CLAIMANT_EVERY_FACTION_MEMBER
limit = {
NOT = { this = $ATTACKER$.joined_faction.special_character }
}
hidden_effect = {
add_opinion = {
modifier = claimant_faction_member_opinion
target = $ATTACKER$.joined_faction.special_character
}
reverse_add_opinion = {
modifier = claimant_faction_claimant_opinion
target = $ATTACKER$.joined_faction.special_character
}
}
if = {
limit = {
can_add_hook = {
type = favor_hook
target = $ATTACKER$.joined_faction.special_character
}
}
add_hook = {
type = favor_hook
target = $ATTACKER$.joined_faction.special_character
}
}
# Struggle boost
if = {
limit = {
culture = $ATTACKER$.joined_faction.special_character.culture
any_character_struggle = {
involvement = involved
has_struggle_phase_parameter = struggle_prestige_install_same_culture_claimant
}
}
add_prestige = major_prestige_gain
}
# Save the number of faction members for use further down
add_to_list = num_faction_members
}
}
# Give the claimant their new title.
create_title_and_vassal_change = {
type = faction_demand
save_scope_as = change
add_claim_on_loss = yes
}
# Ceremonial Liege
if = {
limit = {
exists = $DEFENDER$.top_liege.primary_title.var:administrative_ui_special_title
scope:faction_targeted_title ?= $DEFENDER$.top_liege.primary_title.var:administrative_ui_special_title
}
$DEFENDER$ = {
every_held_title = {
limit = {
is_noble_family_title = no
is_landless_type_title = no
tier >= scope:faction_targeted_title.tier
}
add_to_list = faction_titles
}
}
}
every_in_list = {
list = $TARGET_TITLES$
add_to_list = faction_titles
holder = {
save_scope_as = target_holder
}
}
scope:target_holder ?= {
if = {
limit = {
top_liege = this
government_has_mechanic = administrative
primary_title = { is_in_list = faction_titles }
}
every_held_title = {
title_tier > baronyAs written in game/common/scripted_effects/00_war_effects.txt.
The first 120 of its 330 lines; the rest is in game/common/scripted_effects/00_war_effects.txt from line 1316.
Where it is used
Every place in common/, events/ and history/ that calls on_claimant_faction_war_win_common.
Casus belli (1)
Events (1)
Scripted effects inside an event file (1)
- faction_demand_claimant_counter_offer_corule_accepted_effect
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.