Scripted effect · Khans of the Steppe files
gok_war_target_evaluation_and_declaration_effect
gok_war_target_evaluation_and_declaration_effect = yesgame/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt, line 8158 (206 lines). No parameters.
gok_war_target_evaluation_and_declaration_effect is a scripted effect in Crusader Kings III, in the Khans of the Steppe files, written at line 8158 of its file. It takes no parameters: gok_war_target_evaluation_and_declaration_effect = yes. The game's script calls it in 2 places, among them story_mongol_invasion (story cycle) and The Greatest of Khans (story cycle). Patch 1.20.1.2, from game/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt.
The comment above it in the file
GoK will automatically declare DEVASTATING wars
What it does
If
Then
If
a check the game hides
Then
If
scope:next_invasion_target:
Then
scope:next_invasion_title_target:- Their empire › Every in de jure hierarchy:
- Only some of them (the filter is in the script below)
continue = { … }
- Every in list › scope:mongol_emperor: Starts the interaction “Offer Submission or Ruin”
- Their empire › Every in de jure hierarchy:
Otherwise
- scope:mongol_emperor: Starts the interaction “Offer Submission or Ruin”
• 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)
gok_war_target_evaluation_and_declaration_effect = {
save_scope_as = actor
if = {
limit = {
mpo_offer_submission_or_ruin_shown_actor_trigger = yes
mpo_offer_submission_or_ruin_valid_actor_trigger = yes
}
# Set the Mongol Emperor as reference point
save_scope_as = mongol_emperor
add_character_flag = {
flag = free_mongol_cb
days = 14
}
# Select a new target
random_neighboring_top_liege_realm_owner = {
limit = {
NOT = { is_at_war_with = scope:mongol_emperor }
NOT = { is_allied_to = scope:mongol_emperor }
NOT = { this = scope:mongol_emperor }
NOT = { top_liege = scope:mongol_emperor }
save_temporary_scope_as = truce_check
NOT = {
scope:mongol_emperor = {
any_truce_target = {
this = scope:truce_check
}
}
}
trigger_if = { # We don't want the Byzantine empire to get annihilated immediately
limit = {
OR = {
has_primary_title = title:e_byzantium
has_primary_title = title:e_latin_empire
}
}
OR = {
# This is not the 'historical' Mongol Empire, all bets are off
NOT = {
scope:mongol_emperor = {
any_held_title = {
this = title:e_mongol_empire
}
}
}
current_year < 1178
current_year >= 1279 # Roughly when the mongols should fracture historically
scope:mongol_emperor = {
completely_controls_region = special_mongol_empire_golden_horde_region # Controls all of Russia and the Steppe
}
any_realm_county = { # Byzantium is expansionist
count >= 50
title_province = {
OR = {
geographical_region = special_mongol_empire_conquest_region_prio_5
geographical_region = special_mongol_empire_conquest_region_prio_4
geographical_region = special_mongol_empire_conquest_region_prio_3
geographical_region = special_mongol_empire_conquest_region_prio_2
geographical_region = special_mongol_empire_conquest_region_prio_1
geographical_region = special_mongol_empire_conquest_region_prio_1_alpha
}
}
}
}
}
save_temporary_scope_as = recipient
mpo_offer_submission_or_ruin_shown_recipient_trigger = yes
mpo_offer_submission_or_ruin_valid_recipient_trigger = yes
}
weight = {
base = 0
modifier = {
add = mongol_invasion_target_character_weight
always = yes
}
#Should only attack China when very strong
modifier = {
factor = 0.1
primary_title = title:h_china
current_military_strength >= scope:mongol_emperor.half_current_military_strength
}
}
save_temporary_scope_as = next_invasion_target
primary_title = {
save_temporary_scope_as = next_invasion_title_target
}
}
if = {
limit = {
exists = scope:next_invasion_target
}
if = {
limit = { # Declare war on every same-tier count or duke in same empire
scope:next_invasion_target = {
OR = {
highest_held_title_tier = tier_county
highest_held_title_tier = tier_duchy
}
}
}
scope:next_invasion_title_target = {
add_to_temporary_list = all_titles_to_declare_on
empire = {
every_in_de_jure_hierarchy = { # Find all other same-tier titles in same de jure empire
continue = {
tier > tier_county
# Stop searching if you hit the Mongol Emperor's territory at any point
trigger_if = {
limit = { exists = holder }
NOT = { holder = scope:mongol_emperor }
NOT = { holder.top_liege = scope:mongol_emperor }
}
}
limit = {
exists = this
OR = {
tier = tier_county
tier = tier_duchy
}
exists = holder
holder = {As written in game/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt.
The first 120 of its 206 lines; the rest is in game/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt from line 8158.
Where it is used
Every place in common/, events/ and history/ that calls gok_war_target_evaluation_and_declaration_effect.
Story cycles (2)
- story_mongol_invasion
- The Greatest of Khans
Source: game/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.