Scripted effect · Khans of the Steppe files
migration_title_and_vassal_change_effect
migration_title_and_vassal_change_effect = yesgame/common/scripted_effects/09_dlc_mpo_scripted_effects.txt, line 460 (356 lines). No parameters.
migration_title_and_vassal_change_effect is a scripted effect in Crusader Kings III, in the Khans of the Steppe files, written at line 460 of its file. It takes no parameters: migration_title_and_vassal_change_effect = yes. The game's script calls it in 2 places, among them on_migration_travel_end (on action) and on_migration_war_end (on action). Patch 1.20.1.2, from game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.
What it does
- Every in list:
- scope:target_title: Gains the … Title (actor)
If
scope:target_title.tier >= tier_kingdom
Then
- scope:target_title › Every in de jure hierarchy:
- Only some of them (the filter is in the script below)
continue = { tier >= tier_duchy }- Gains the … Title (actor)
- Every in list:
change_liege = { liege = scope:actor change = scope:change1 }
- scope:actor › Every vassal:
- Where:
None of these
- Any held county:
target_is_de_jure_liege_or_above = scope:target_title
- Any held county:
becomes_independent = { change = scope:change }
- Where:
- Every in list:
- scope:actor › If in list (at least 1):
migration_fitting_vassal_lands_effect = { UPPER_TIER = empire LOWER_TIER = kingdom }migration_fitting_vassal_lands_effect = { UPPER_TIER = kingdom LOWER_TIER = duchy }If
scope:target_title.tier >= tier_duchy- Domain limit available less than 0
- In list (at least 1):
Then
while = { … }
- Every vassal:
change_liege = { liege = primary_title.de_jure_liege.holder change = scope:change4 }
- scope:actor › Every in list:
- Where: Is not landed
- Every courtier or guest:
set_employer = scope:actor
destroy_title = primary_titleset_employer = scope:actor
- Every in list:
- Their domicile:
move_domicile = prev.capital_province
- Every vassal › Their domicile:
move_domicile = prev.capital_province
- Their domicile:
scope:actor:- Their domicile:
move_domicile = prev.capital_province
- Every vassal › Their domicile:
move_domicile = prev.capital_province
- Their domicile:
- scope:actor › Every vassal:
- Where: No held county:
becomes_independent = { change = scope:change }
• 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)
migration_title_and_vassal_change_effect = {
scope:domain ?= {
if = {
limit = {
tier = tier_county
}
holder = {
add_to_list = old_holder
}
}
else = {
every_de_jure_county_holder = {
limit = {
is_independent_ruler = yes
}
add_to_list = old_holder
}
}
}
scope:target_title.holder ?= {
add_to_list = old_holder
}
# Change 1: The old holder will attempt to create a new title for their lands, if they are losing their primary title
every_in_list = {
list = old_holder
# Inform relevant people
migration_message_effect = yes
# Run effects
migration_find_fitting_title_effect = yes
}
# Change 2: Hand out titles to actor
create_title_and_vassal_change = {
type = migration
save_scope_as = change1
add_claim_on_loss = yes
}
scope:target_title ?= {
change_title_holder = {
holder = scope:actor
change = scope:change1
}
}
if = {
limit = {
NOT = { scope:domain = scope:target_title }
}
scope:domain = {
change_title_holder = {
holder = scope:actor
change = scope:change1
}
}
}
if = {
limit = {
scope:domain.tier = tier_duchy
}
scope:domain = {
every_de_jure_county = {
change_title_holder = {
holder = scope:actor
change = scope:change1
}
}
}
}
if = {
limit = {
scope:target_title.tier >= tier_kingdom
}
scope:target_title ?= {
every_in_de_jure_hierarchy = {
continue = {
tier >= tier_duchy
}
limit = {
holder ?= {
OR = {
any_in_list = {
list = old_holder
this = prev
}
this = scope:recipient
AND = {
scope:recipient = this.liege
any_held_county = {
is_landless_type_title = no
NOT = { target_is_de_jure_liege_or_above = scope:target_title }
}
}
}
}
}
change_title_holder = {
holder = scope:actor
change = scope:change1
}
}
}
scope:target_title = {
every_de_jure_county_holder = {
limit = {
OR = {
any_in_list = {
list = old_holder
this != prev
this = prev.liege
}
AND = {
this != scope:recipient
scope:recipient = this.liege
}
}
this != scope:actor
}
add_to_list = new_vassals
}
}As written in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.
The first 120 of its 356 lines; the rest is in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt from line 460.
Where it is used
Every place in common/, events/ and history/ that calls migration_title_and_vassal_change_effect.
On actions (the game's own hooks) (2)
- on_migration_travel_end
- on_migration_war_end
Source: game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.