Scripted effect
break_up_mongol_empire_effect
break_up_mongol_empire_effect = yesgame/common/scripted_effects/00_mongol_invasion_effects.txt, line 10801 (1022 lines). No parameters.
break_up_mongol_empire_effect is a scripted effect in Crusader Kings III, written at line 10801 of its file. It takes no parameters: break_up_mongol_empire_effect = yes. The game's script calls it in 2 places, among them story_mongol_invasion (story cycle) and on_death (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_mongol_invasion_effects.txt.
What it does
- Every held title:
- Every character war:
- Where:
primary_attacker = scope:old_mongol_emperoris_white_peace_possible = yes
end_war = white_peace
- Where:
If
- Is played by a person
player_heir.dynasty ?= dynasty
Then
- Their heir:
assign_core_mongol_titles_to_heir_effect = yesremove_from_list = selected_mongol_heirs
Otherwise
- One in list, picked in order:
assign_core_mongol_titles_to_heir_effect = yesremove_from_list = selected_mongol_heirs
If
Then
- Their heir:
- One in list, picked in order:
pick_up_remaining_counties_effect = yesset_correct_mongol_breakup_vassalage_effect = yesshift_counties_on_mongol_succession_effect = yes- Every player: Event mongol_invasion.1004 (after 2 days)
- scope:successor_1: Event mongol_invasion.9999 (after 1 days)
If a check the game hides passes: the same again (4 lines)
scope:chagatai_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If
a check the game hides
Then
scope:great_yuan_ruler:If
scope:great_yuan_ruler.primary_title = title:e_great_yuan
Then
- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
Otherwise
If a check the game hides passes: the same again (4 lines)
scope:golden_horde_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:ilkhanate_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:red_horde_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:white_horde_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:blue_horde_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:omnod_dalai_khanate_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:aarlud_khanate_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
If a check the game hides passes: the same again (4 lines)
scope:togskol_khanate_ruler:- Adopts the High Partition Law
- Every sub realm county:
- Only some of them (the filter is in the script below)
If
a check the game hides
Then
- Their kingdom:
set_de_jure_liege_title = scope:title_assignment.primary_title
- Their kingdom:
change_mongol_successor_illegal_government = yes
- … (more in the script below)
• 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)
break_up_mongol_empire_effect = { # Intended to run in the Mongol Emperor's scope
save_scope_as = old_mongol_emperor
every_tributary = {
add_to_list = mongol_tributaries
}
every_held_title = { # Clean up excess kingdoms
limit = {
is_landless_type_title = no
OR = {
tier = tier_kingdom
tier = tier_duchy
}
}
scope:old_mongol_emperor = {
destroy_title = prev
}
}
every_character_war = {
limit = {
primary_attacker = scope:old_mongol_emperor
is_white_peace_possible = yes
}
end_war = white_peace
}
set_global_variable = {
name = number_of_mongol_heir_candidates
value = 0
}
# Find suitable heir candidates
dynasty = {
every_dynasty_member = { # Every potential khandidate
limit = {
character_gender_can_inherit_from_trigger = {
CHARACTER = scope:old_mongol_emperor
}
is_alive = yes
tgp_is_any_minister = no
}
change_global_variable = {
name = number_of_mongol_heir_candidates
add = 1
}
add_to_list = mongol_heir_candidates
}
}
# Gather Ilkhanate counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_ilkhanate_region
}
}
add_to_temporary_list = ilkhanate_counties
}
# Gather Golden Horde counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_golden_horde_region
}
}
add_to_temporary_list = golden_horde_counties
}
# Gather Chagatai counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_chagatai_region
}
}
add_to_temporary_list = chagatai_counties
}
# Gather Great Yuan counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_great_yuan_region
}
}
add_to_temporary_list = great_yuan_counties
}
# Gather Red Horde counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_red_horde_region
}
}
add_to_temporary_list = red_horde_counties
}
# Gather White Horde counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_white_horde_region
}
}
add_to_temporary_list = white_horde_counties
}
# Gather Blue Horde counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_blue_horde_region
}
}
add_to_temporary_list = blue_horde_counties
}
# Gather Omnod Dalai Khanate counties
every_sub_realm_county = {
limit = {
title_province = {
geographical_region = special_mongol_empire_omnod_dalai_khanate_region
}
}As written in game/common/scripted_effects/00_mongol_invasion_effects.txt.
The first 120 of its 1022 lines; the rest is in game/common/scripted_effects/00_mongol_invasion_effects.txt from line 10801.
Where it is used
Every place in common/, events/ and history/ that calls break_up_mongol_empire_effect.
Story cycles (1)
- story_mongol_invasion
On actions (the game's own hooks) (1)
- on_death
Source: game/common/scripted_effects/00_mongol_invasion_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.