Scripted effect · Khans of the Steppe files
nomadic_realm_split_effect
nomadic_realm_split_effect = { NEW_RULER = … ORIGINAL_REALM_HOLDER = … SPLIT_VALUE = … }game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt, line 6301 (315 lines). Parameters: $NEW_RULER$, $ORIGINAL_REALM_HOLDER$, $SPLIT_VALUE$.
nomadic_realm_split_effect is a scripted effect in Crusader Kings III, in the Khans of the Steppe files, written at line 6301 of its file. A call passes 3 parameters: NEW_RULER, ORIGINAL_REALM_HOLDER and SPLIT_VALUE. The game's script calls it in 2 places, among them Chaotic Succession: Divided Realm (event mpo_chaotic_kurultai_succession.0012) and Chaotic Succession: Splinter Realm (event mpo_chaotic_kurultai_succession.0013). Patch 1.20.1.2, from game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.
What it does
scope:new_ruler_scope:while = { … }- scope:capital_duchy: Gains the … Title (new ruler scope)
- Every in list: Gains the … Title (new ruler scope)
create_dynamic_title = { tier = kingdom name = NEW_CREATED_TITLE_NAME }scope:new_title:- Gains the … Title (new ruler scope)
generate_coa = yesset_de_jure_liege_title = scope:root_scope.primary_title.empire
- Every in list:
If
- Their holder:
One of these
this = scope:root_scopeor
primary_title.tier >= tier_kingdom
Then
- Gains the … Title (new ruler scope)
- Their holder:
If
- Their holder:
liege = scope:root_scopeprimary_title.tier < tier_kingdom
Then
- Their holder:
change_liege = { liege = scope:new_ruler_scope change = scope:change }
- Their holder:
- Every in list:
set_de_jure_liege_title = scope:new_kingdom_title
• 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)
nomadic_realm_split_effect = {
$ORIGINAL_REALM_HOLDER$ = {
save_scope_as = root_scope
}
$NEW_RULER$ = {
save_scope_as = new_ruler_scope
}
primary_title = {
every_in_de_jure_hierarchy = {
limit = {
tier = tier_county
holder.top_liege = scope:root_scope
}
add_to_list = de_jure_realm_counties_of_primary
add_to_list = combined_counties_of_primary
}
every_in_de_jure_hierarchy = {
limit = {
tier = tier_county
holder.top_liege != scope:root_scope
}
add_to_list = de_jure_realm_counties_of_primary_outside_realm
}
every_in_de_jure_hierarchy = {
limit = {
tier = tier_county
}
add_to_list = de_jure_realm_counties_of_primary_combined
}
every_in_de_facto_hierarchy = {
limit = {
tier = tier_county
holder.top_liege ?= scope:root_scope
NOT = { is_in_list = de_jure_realm_counties_of_primary }
}
add_to_list = de_facto_realm_counties_of_primary
add_to_list = combined_counties_of_primary
}
}
# Pick a suitable capital County, as far away from your capital as possible
ordered_in_list = {
list = de_jure_realm_counties_of_primary
limit = {
NOT = {
this = scope:root_scope.capital_county
}
}
order_by = {
value = "title_province.squared_distance(scope:root_scope.capital_province)"
}
save_scope_as = new_capital
}
# Mark the capital duchy
scope:new_ruler_scope = {
scope:new_capital = {
add_to_list = counties_given_to_sibling
}
scope:new_capital.duchy = {
save_scope_as = capital_duchy
add_to_list = duchies_given_to_sibling
add_to_list = duchies_to_de_jure_shift
if = {
limit = {
holder.top_liege = scope:root_scope
holder.primary_title.tier < tier_kingdom
}
holder = {
add_to_list = rulers_transferred
}
}
every_in_de_jure_hierarchy = {
limit = {
is_in_list = combined_counties_of_primary
}
add_to_list = capital_duchy_counties
if = {
limit = {
NOT = {
is_in_list = counties_given_to_sibling
}
}
add_to_list = counties_given_to_sibling
}
if = {
limit = {
holder.top_liege = scope:root_scope
holder.primary_title.tier < tier_kingdom
}
holder = {
add_to_list = rulers_transferred
}
}
}
}
# Expand in a 'ring' first
scope:new_capital.duchy = {
every_title_to_title_neighboring_duchy = {
limit = {
any_in_de_jure_hierarchy = {
OR = {
is_in_list = de_jure_realm_counties_of_primary
is_in_list = de_jure_realm_counties_of_primary_outside_realm
}
}
}
add_to_list = duchies_to_de_jure_shift
if = {
limit = {
any_in_de_jure_hierarchy = {
is_in_list = de_jure_realm_counties_of_primary
}
}
add_to_list = duchies_given_to_sibling
if = {
limit = {
holder ?= {
top_liege = scope:root_scope
primary_title.tier < tier_kingdom
NOT = { is_in_list = rulers_transferred }As written in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.
The first 120 of its 315 lines; the rest is in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt from line 6301.
Where it is used
Every place in common/, events/ and history/ that calls nomadic_realm_split_effect.
Events (2)
- Chaotic Succession: Divided Realm
mpo_chaotic_kurultai_succession.0012 - Chaotic Succession: Splinter Realm
mpo_chaotic_kurultai_succession.0013
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.