Scripted effect
grant_omnod_dalai_khanate_effect
grant_omnod_dalai_khanate_effect = yesgame/common/scripted_effects/00_mongol_invasion_effects.txt, line 4280 (154 lines). No parameters.
grant_omnod_dalai_khanate_effect is a scripted effect in Crusader Kings III, written at line 4280 of its file. It takes no parameters: grant_omnod_dalai_khanate_effect = yes. The game's script calls it in 1 place, among them grant_suitable_title_to_candidate_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_mongol_invasion_effects.txt.
What it does
- Ömnöd Dalai Khaganate: Gains the … Title (candidate)
If
- scope:old_mongol_emperor › Any sub realm county:
duchy = title:e_omnod_dalai_khanate.title_capital_county.duchyNone of these
holder = scope:candidate- Their holder: Is played by a person
- Their holder › Any liege or above: Is played by a person
Then
- Every in list: Gains the … Title (candidate)
- scope:old_mongol_emperor › Any sub realm county:
- Every character war:
end_war = white_peace
- If holds e omnod dalai khanate.title capital county: e omnod dalai khanate.title capital county becomes the realm capital
- Else, if all of these hold:
- Conditions:
None of these
- Their capital county’s province: Is in the special mongol empire omnod dalai khanate region region
- Any held title:
- Title tier exactly County
is_landless_type_title = no- Their province: Is in the special mongol empire omnod dalai khanate region region
- Then › One random held title:
- Where:
is_landless_type_title = no- Their province: Is in the special mongol empire omnod dalai khanate region region
title_tier = county- scope:candidate: The realm capital moves
- Where:
- Conditions:
spawn_mongol_successor_state_troops_effect = yes- They gets +1,000
- Dread +100
- Starts the story “Conqueror”
grant_mongol_successor_nomadic_bonuses_effect = yes
• 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)
grant_omnod_dalai_khanate_effect = {
# If the character doesn't hold any titles in the relevant
if = {
limit = {
NOT = {
any_held_title = {
title_tier = county
is_landless_type_title = no
title_province = {
geographical_region = special_mongol_empire_omnod_dalai_khanate_region
}
}
}
}
scope:old_mongol_emperor = {
random_sub_realm_county = {
limit = {
is_landless_type_title = no
title_province = {
geographical_region = special_mongol_empire_omnod_dalai_khanate_region
}
}
save_scope_as = county_to_transfer
}
}
create_title_and_vassal_change = {
type = granted
save_scope_as = title_change
add_claim_on_loss = no
}
scope:county_to_transfer = {
change_title_holder = {
holder = scope:candidate
change = scope:title_change
}
}
resolve_title_and_vassal_change = scope:title_change
}
create_title_and_vassal_change = {
type = created
save_scope_as = title_change
add_claim_on_loss = no
}
title:e_omnod_dalai_khanate = {
change_title_holder = {
holder = scope:candidate
change = scope:title_change
}
}
resolve_title_and_vassal_change = scope:title_change
scope:candidate = {
save_scope_as = omnod_dalai_khanate_ruler
}
set_global_variable = {
name = omnod_dalai_khanate_handed_out
value = yes
}
# Give the character the appropriate capital area, if possible
if = {
limit = {
scope:old_mongol_emperor = {
any_sub_realm_county = {
duchy = title:e_omnod_dalai_khanate.title_capital_county.duchy
NOR = {
holder = scope:candidate
holder = { # Don't steal the player's lands
is_ai = no
}
holder = {
any_liege_or_above = { is_ai = no }
}
}
}
}
}
scope:old_mongol_emperor = {
every_sub_realm_county = {
limit = {
duchy = title:e_omnod_dalai_khanate.title_capital_county.duchy
NOR = {
holder = scope:candidate
holder = { # Don't steal the player's lands
is_ai = no
}
holder = {
any_liege_or_above = { is_ai = no }
}
}
}
add_to_list = titles_taken
}
}
create_title_and_vassal_change = {
type = granted
save_scope_as = title_change
add_claim_on_loss = no
}
every_in_list = {
list = titles_taken
change_title_holder = {
holder = scope:candidate
change = scope:title_change
take_baronies = yes
}
}
resolve_title_and_vassal_change = scope:title_change
}
every_character_war = {
end_war = white_peace
}
if = {
limit = {
has_title = title:e_omnod_dalai_khanate.title_capital_county
}
set_realm_capital = title:e_omnod_dalai_khanate.title_capital_county
}As written in game/common/scripted_effects/00_mongol_invasion_effects.txt.
The first 120 of its 154 lines; the rest is in game/common/scripted_effects/00_mongol_invasion_effects.txt from line 4280.
Where it is used
Every place in common/, events/ and history/ that calls grant_omnod_dalai_khanate_effect.
Scripted effects (1)
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.