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

Scripted effect · Khans of the Steppe files

nomadic_heir_cleanup_realm_effect

nomadic_heir_cleanup_realm_effect = { CLEANUP_SCOPE_CHAR = … }

game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt, line 6235 (65 lines). Parameters: $CLEANUP_SCOPE_CHAR$.

nomadic_heir_cleanup_realm_effect is a scripted effect in Crusader Kings III, in the Khans of the Steppe files, written at line 6235 of its file. A call passes 1 parameter: CLEANUP_SCOPE_CHAR. The game's script calls it in 2 places, among them Chaotic Succession: Divided Realm (event mpo_chaotic_kurultai_succession.0012) and Chaotic Succession: Splinter Realm (event mpo_chaotic_kurultai_succession.0013). Patch 1.20.1.2, from game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.

What it does

  • If landed:
    • create_character = { location = $CLEANUP_SCOPE_CHAR$.location template = nomadic_chieftain_character save_scope_as = inheritor_char }
    • Every held title:
      • Where:
        • is_landless_type_title = no
      • title_tier > barony
      • Gains the … Title (inheritor char)
    • If

      a check the game hides

      Then

      • scope:inheritor_char:
        • change_liege = { liege = scope:old_liege change = scope:change }
  • If

    • top_liege != $CLEANUP_SCOPE_CHAR$

    Then

    • becomes_independent = { change = scope:going_independent }

• 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 (65 lines of game script)
nomadic_heir_cleanup_realm_effect = {
	if = {
		limit = {
			is_landed = yes
		}
		create_title_and_vassal_change = {
			type = granted
			save_scope_as = change
		}
		if = {
			limit = {
				exists = liege
			}
			liege = {
				save_scope_as = old_liege
			}
		}
		create_character = {
			location = $CLEANUP_SCOPE_CHAR$.location
			template = nomadic_chieftain_character
			save_scope_as = inheritor_char
		}
		every_held_title = {
			title_tier > barony
			limit = {
				is_landless_type_title = no
			}
			change_title_holder = {
				holder = scope:inheritor_char
				change = scope:change
			}
		}
		resolve_title_and_vassal_change = scope:change
		if = {
			limit = {
				exists = scope:old_liege
			}
			scope:inheritor_char = {
				create_title_and_vassal_change = {
					type = swear_fealty
					save_scope_as = change
				}
				change_liege = {
					liege = scope:old_liege
					change = scope:change
				}
				resolve_title_and_vassal_change = scope:change
			}
		}
	}
	if = {
		limit = {
			top_liege != $CLEANUP_SCOPE_CHAR$
		}
		create_title_and_vassal_change = {
			type = independency
			save_scope_as = going_independent
			add_claim_on_loss = no
		}
		becomes_independent = {
			change = scope:going_independent
		}
		resolve_title_and_vassal_change = scope:going_independent
	}
}

As written in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.

Where it is used

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

Events (2)

Source: game/common/scripted_effects/09_dlc_mpo_scripted_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?