CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted trigger · Khans of the Steppe files

mpo_nomad_invasion_war_ai_trigger

mpo_nomad_invasion_war_ai_trigger = { NOMAD = … }

game/common/scripted_triggers/mpo_scripted_triggers.txt, line 1860 (140 lines). Parameters: $NOMAD$.

mpo_nomad_invasion_war_ai_trigger is a scripted trigger in Crusader Kings III, in the Khans of the Steppe files, written at line 1860 of its file. A call passes 1 parameter: NOMAD. The game's script calls it in 2 places, among them Overrun Kingdom (casus belli) and mpo_the_great_steppe_yearly_pulse_random (on action). Patch 1.20.1.2, from game/common/scripted_triggers/mpo_scripted_triggers.txt.

What it checks

  • One of these

  • Is an Independent Ruler
  • Is at not War
  • Gold more than 0
  • Does NOT have the Uncrowned Law
  • One of these

    • All of these

      • Dynastic Cycle:
        • situation_current_phase = situation_dynastic_cycle_phase_chaos
      • NOT = { exists = title:h_china.holder }
      • Their capital province: Is in the Eastern Steppe region
    • or

      title:e_byzantium.holder:
      • in_diplomatic_range = $NOMAD$
      • NOT = { has_any_good_relationship_with_character_trigger = { CHARACTER = $NOMAD$ } }
      • NOT = { is_allied_to = $NOMAD$ }
      • NOT = { is_tributary_of = $NOMAD$ }
      • NOT = { $NOMAD$ = { is_tributary_of_suzerain_or_above = prev } }
      • NOT = { $NOMAD$ = { has_truce = prev } }
      • current_military_strength < $NOMAD$.seventy_percent_of_current_military_strength
      • One of these

        • gold <= $NOMAD$.fifty_percent_of_current_gold
        • or

          current_military_strength <= $NOMAD$.forty_percent_of_current_military_strength
    • or

      title:h_china.holder:
      • in_diplomatic_range = $NOMAD$
      • NOT = { has_any_good_relationship_with_character_trigger = { CHARACTER = $NOMAD$ } }
      • NOT = { is_allied_to = $NOMAD$ }
      • NOT = { is_tributary_of = $NOMAD$ }
      • NOT = { $NOMAD$ = { is_tributary_of_suzerain_or_above = prev } }
      • NOT = { $NOMAD$ = { has_truce = prev } }
      • current_military_strength < $NOMAD$.seventy_percent_of_current_military_strength
      • One of these

        • gold <= $NOMAD$.fifty_percent_of_current_gold
        • or

          current_military_strength <= $NOMAD$.forty_percent_of_current_military_strength
    • or

      Their capital county › Any county situation sub region:
      • situation_sub_region_has_county = prev
      • sub_region_current_phase = situation_steppe_havsarsan_zud_season
    • or

      All of these

      • Is not landed
      • domicile.herd >= 8000
    • or

      All of these

      • Ai energy more than -20
      • is_gurkhan = no
      • Realm size (counties) at most 30
      • Their domicile:
        • herd <= two_thirds_max_herd_value
      • exists = $NOMAD$.house
      • Their primary title:
        • previous_holder ?= { house ?= $NOMAD$.house }
        • Past holder (at least 2):
          • NOT = { this = $NOMAD$ }
          • house ?= $NOMAD$.house
          • If

            a check the game hides

            Then

            • time_since_death = { years <= 120 }
    • or

      All of these

      • Ai vengefulness less than 20
      • is_gurkhan = no
      • Any neighboring realm with tributaries owner:
        • NOT = { is_tributary_of_suzerain_or_above = $NOMAD$ }
        • One of these

          • All of these

            • Government is Nomadic
            • Seventy percent of current military strength at least $NOMAD$.current military strength
            • NOT = { is_allied_to = $NOMAD$ }
            • NOT = { has_truce = $NOMAD$ }
          • or

            All of these

• 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)
mpo_nomad_invasion_war_ai_trigger = {
	OR = {
		has_realm_law = nomadic_authority_3
		has_realm_law = nomadic_authority_4
		has_realm_law = nomadic_authority_5
	}
	is_independent_ruler = yes
	is_at_war = no
	gold > 0
	NOT = {
		has_realm_law = uncrowned
	}
	OR = {
		#China is in division
		AND = {
			situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_chaos }
			NOT = {
				exists = title:h_china.holder
			}
			capital_province = {
				geographical_region = world_steppe_east
			}
		}
		#Byzantium or China are actually somehow a viable target
		title:e_byzantium.holder ?= {
			in_diplomatic_range = $NOMAD$
			NOR = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = $NOMAD$ }
				is_allied_to = $NOMAD$
				is_tributary_of = $NOMAD$
				$NOMAD$ = {
					is_tributary_of_suzerain_or_above = prev
				}
				$NOMAD$ = {
					has_truce = prev
				}
			}
			#Fulfills strength comparison
			current_military_strength < $NOMAD$.seventy_percent_of_current_military_strength
			OR = {
				gold <= $NOMAD$.fifty_percent_of_current_gold
				current_military_strength <= $NOMAD$.forty_percent_of_current_military_strength
			}
		}
		title:h_china.holder ?= {
			in_diplomatic_range = $NOMAD$
			NOR = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = $NOMAD$ }
				is_allied_to = $NOMAD$
				is_tributary_of = $NOMAD$
				$NOMAD$ = {
					is_tributary_of_suzerain_or_above = prev
				}
				$NOMAD$ = {
					has_truce = prev
				}
			}
			#Fulfills strength comparison
			current_military_strength < $NOMAD$.seventy_percent_of_current_military_strength
			OR = {
				gold <= $NOMAD$.fifty_percent_of_current_gold
				current_military_strength <= $NOMAD$.forty_percent_of_current_military_strength
			}
		}
		# Havsaran zud? Leave the steppe!
		capital_county ?= {
			any_county_situation_sub_region = {
				situation_sub_region_has_county = prev
				sub_region_current_phase = situation_steppe_havsarsan_zud_season
			}
		}
		#Landless and heavily herded
		AND = {
			is_landed = no
			domicile.herd >= 8000
		}
		#Family has held title without ascendance for a while
		AND = {
			ai_energy > low_negative_ai_value
			is_gurkhan = no
			sub_realm_size <= 30
			domicile ?= { herd <= two_thirds_max_herd_value }
			
			exists = $NOMAD$.house
			primary_title = {
				previous_holder ?= {
					house ?= $NOMAD$.house
				}
				any_past_holder = {
					count >= 2
					NOT = {
						this = $NOMAD$
					}
					house ?= $NOMAD$.house
					trigger_if = {
						limit = {
							is_alive = no
						}
						time_since_death = {
							years <= 120
						}
					}
				}
			}
		}
		#Is "pushed out" by stronger neighbor
		AND = {
			ai_vengefulness < low_positive_ai_value
			is_gurkhan = no
			any_neighboring_realm_with_tributaries_owner = {
				NOT = { is_tributary_of_suzerain_or_above = $NOMAD$ }
				OR = {
					#Is personally scary
					AND = {
						government_has_flag = government_is_nomadic
						seventy_percent_of_current_military_strength >= $NOMAD$.current_military_strength
						NOR = {
							is_allied_to = $NOMAD$
							has_truce = $NOMAD$
						}

As written in game/common/scripted_triggers/mpo_scripted_triggers.txt.

The first 120 of its 140 lines; the rest is in game/common/scripted_triggers/mpo_scripted_triggers.txt from line 1860.

Where it is used

Every place in common/, events/ and history/ that calls mpo_nomad_invasion_war_ai_trigger.

Casus belli (1)

On actions (the game's own hooks) (1)

  • mpo_the_great_steppe_yearly_pulse_random

Source: game/common/scripted_triggers/mpo_scripted_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?