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

Scripted effect

assign_core_mongol_titles_to_heir_effect

assign_core_mongol_titles_to_heir_effect = yes

game/common/scripted_effects/00_mongol_invasion_effects.txt, line 2188 (187 lines). No parameters.

assign_core_mongol_titles_to_heir_effect is a scripted effect in Crusader Kings III, written at line 2188 of its file. It takes no parameters: assign_core_mongol_titles_to_heir_effect = yes. The game's script calls it in 1 place, among them break_up_mongol_empire_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_mongol_invasion_effects.txt.

The comment above it in the file

Title creation effects

What it does

  • If

    a check the game hides

    Then

    • If

      • None of these

        • Any held title:
          • Title tier exactly County
          • is_landless_type_title = no
          • Their province:
            • Is not in the special mongol empire ilkhanate region region
            • Is not in the special mongol empire golden horde region region
            • Is not in the special mongol empire chagatai region region
            • Is not in the special mongol empire red horde region region
            • Is not in the special mongol empire white horde region region
            • Is not in the special mongol empire aarlud khanate region region
            • Is not in the special mongol empire togskol khanate region region
            • Is not in the special mongol empire baruun khanate region region
            • Is not in the special mongol empire great yuan region region
            • Is not in the special mongol empire blue horde region region
            • Is not in the special mongol empire omnod dalai khanate region region

      Then

      • scope:county_to_transfer: Gains the … Title (candidate)
    • Mongolia: Gains the … Title (candidate)
    • Mongol Empire › Every in de jure hierarchy:
      • Where: Title tier exactly Kingdom
      • Becomes de jure part of Mongolia
  • Every character war:
    • end_war = white_peace
  • If holds e mongolia.title capital county: e mongolia.title capital county becomes the realm capital
  • If

    • NOT = { is_primary_heir_of = scope:old_mongol_emperor }

    Then

  • If government is Nomadic › Their domicile: Herd +5,000
  • They gets +1,000
  • Dread +100
  • Starts the story “Conqueror”
  • If government is Nomadic:
    • If has the Unruly Nomads Law:
      • remove_realm_law = nomadic_authority_1
    • If has the Limited Dominance Law:
      • remove_realm_law = nomadic_authority_2
    • If has the High Dominance Law:
      • remove_realm_law = nomadic_authority_3
    • If has the Unrestricted Dominance Law:
      • remove_realm_law = nomadic_authority_5
    • Adopts the Absolute Dominance Law
    • If

      • Their domicile:
        • Free external domicile building slots at least 1
        • NOT = { has_domicile_building_or_higher = mass_warfare_yurt_01 }

      Then

      • Their domicile:
        • add_domicile_building = mass_warfare_yurt_01
        • add_domicile_building = mass_warfare_yurt_02
        • add_domicile_building = mass_warfare_yurt_03
    • If

      • None of these

        • Any held title:
          • is_nomad_title = yes

      Then

      • create_nomad_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)
assign_core_mongol_titles_to_heir_effect = {
	save_temporary_scope_as = candidate

	if = { # Check whether everything is grantable
		limit = {
			NOT = { exists = global_var:handed_out_mongolia_in_mongol_succession }
			NOT = { exists = title:e_mongolia.holder }
		}
		
		# 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 = {
							NOR = {
								geographical_region = special_mongol_empire_ilkhanate_region
								geographical_region = special_mongol_empire_golden_horde_region
								geographical_region = special_mongol_empire_chagatai_region
								geographical_region = special_mongol_empire_red_horde_region
								geographical_region = special_mongol_empire_white_horde_region
								geographical_region = special_mongol_empire_aarlud_khanate_region
								geographical_region = special_mongol_empire_togskol_khanate_region
								geographical_region = special_mongol_empire_baruun_khanate_region
								geographical_region = special_mongol_empire_great_yuan_region
								geographical_region = special_mongol_empire_blue_horde_region
								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 = {
							NOR = {
								geographical_region = special_mongol_empire_ilkhanate_region
								geographical_region = special_mongol_empire_golden_horde_region
								geographical_region = special_mongol_empire_chagatai_region
								geographical_region = special_mongol_empire_red_horde_region
								geographical_region = special_mongol_empire_white_horde_region
								geographical_region = special_mongol_empire_aarlud_khanate_region
								geographical_region = special_mongol_empire_togskol_khanate_region
								geographical_region = special_mongol_empire_baruun_khanate_region
								geographical_region = special_mongol_empire_great_yuan_region
								geographical_region = special_mongol_empire_blue_horde_region
								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 and grant title
		create_title_and_vassal_change = {
			type = granted
			save_scope_as = title_change
			add_claim_on_loss = no
		}
		title:e_mongolia = {
			change_title_holder = {
				holder = scope:candidate
				change = scope:title_change
			}
		}
		resolve_title_and_vassal_change = scope:title_change
		# Move de jure back from Mongol Empire to Mongolia
		title:e_mongol_empire = {
			every_in_de_jure_hierarchy = {
				limit = {
					tier = tier_kingdom
				}
				set_de_jure_liege_title = title:e_mongolia
			}
		}
		# Used to check whether e_mongol_empire can be safely destroyed
		set_global_variable = {
			name = handed_out_mongolia_in_mongol_succession
			value = yes
		}
	}
	save_scope_as = mongolia_ruler
	add_to_list = candidate_granted_title
	
	every_character_war = {
		end_war = white_peace
	}
	if = {
		limit = {
			has_title = title:e_mongolia.title_capital_county
		}
		set_realm_capital = title:e_mongolia.title_capital_county
	}
	#The primary heir of the Mongol emperor will likely be inheriting big special armies if MPO is active
	if = {
		limit = {
			has_mpo_dlc_trigger = no
			NOT = {
				is_primary_heir_of = scope:old_mongol_emperor
			}
		}
		spawn_mongol_successor_state_troops_effect = yes

As written in game/common/scripted_effects/00_mongol_invasion_effects.txt.

The first 120 of its 187 lines; the rest is in game/common/scripted_effects/00_mongol_invasion_effects.txt from line 2188.

Where it is used

Every place in common/, events/ and history/ that calls assign_core_mongol_titles_to_heir_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.

Spotted a mistake on this page?