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

Scripted effect

create_kingdom_of_saxony_effect

create_kingdom_of_saxony_effect = { CHARACTER = … }

game/common/scripted_effects/00_major_decisions_scripted_effects.txt, line 4154 (125 lines). Parameters: $CHARACTER$.

create_kingdom_of_saxony_effect is a scripted effect in Crusader Kings III, written at line 4154 of its file. A call passes 1 parameter: CHARACTER. The game's script calls it in 3 places, among them Establish the Electorate of Saxony (decision), The Electorate of Saxony (event middle_europe_decisions.0017) and The Electorate of Saxony (event middle_europe_decisions.0018). Patch 1.20.1.2, from game/common/scripted_effects/00_major_decisions_scripted_effects.txt.

What it does

  • If

    • NOT = { root = $CHARACTER$ }

    Then

    • You › Every held title:
      • Where:
        • One of these

          • Saxony:
            • is_de_jure_liege_or_above_target = prev
          • or

            Sorbia:
            • is_de_jure_liege_or_above_target = prev
        • None of these

          • Their holder:
            • capital_county = prev
      • Gains the … Title ($CHARACTER$)
  • If

    a check the game hides

    Then

  • Sorbia:
    • Every in de jure hierarchy:
      • Where: Title tier exactly Duchy
      • Becomes de jure part of Saxony
  • Saxony: The coat of arms changes
  • Saxony: Becomes de jure part of Holy Roman Empire
  • Otherwise › Saxony: Gains the … Title ($CHARACTER$)
  • Every vassal:
    • Where:
      • Their primary title:
        • One of these

          • Saxony:
            • is_de_jure_liege_or_above_target = prev
          • or

            Sorbia:
            • is_de_jure_liege_or_above_target = prev
      • No liege or above:
    • change_liege = { liege = $CHARACTER$ change = scope:title_change }

• 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)
create_kingdom_of_saxony_effect = {
	if = {
		limit = {
			NOR = {
				root = $CHARACTER$
				exists = scope:new_saxon_king
			}
		}
		# Grant every held title in Saxony to the new holder
		root = {
			every_held_title = {
				limit = {
					OR = {
						title:k_saxony = { is_de_jure_liege_or_above_target = prev }
						title:k_sorbia = { is_de_jure_liege_or_above_target = prev }
					}
					NOT = {
						holder = { capital_county = prev }
					}
				}
				create_title_and_vassal_change = {
					type = granted
					save_scope_as = title_change
					add_claim_on_loss = no
				}
				change_title_holder = {
					holder = $CHARACTER$
					change = scope:title_change
				}
				resolve_title_and_vassal_change = scope:title_change
			}
		}
	}
	if = {
		limit = { exists = title:k_sorbia.holder }
		destroy_title = title:k_sorbia
	}
	title:k_sorbia = {
		every_in_de_jure_hierarchy = {
			limit = { tier = tier_duchy }
			set_de_jure_liege_title = title:k_saxony
		}
	}
	title:k_saxony = { set_coa = k_saxon_electorate }
	title:k_saxony = { set_de_jure_liege_title = title:e_hre }
	create_title_and_vassal_change = {
		type = created
		save_scope_as = title_change
		add_claim_on_loss = no
	}
	if = {
		limit = {
			has_title = title:e_hre
		}
		hidden_effect = {
			title:k_saxony = {
				change_title_holder = {
					holder = $CHARACTER$
					change = scope:title_change
				}
			}
		}
	}
	else = {
		title:k_saxony = {
			change_title_holder = {
				holder = $CHARACTER$
				change = scope:title_change
			}
		}
	}
	every_vassal = {
		limit = {
			primary_title = {
				OR = {
					title:k_saxony = { is_de_jure_liege_or_above_target = prev }
					title:k_sorbia = { is_de_jure_liege_or_above_target = prev }
				}
			}
			NOT = { this = $CHARACTER$ }
			NOT = { any_liege_or_above = { this = $CHARACTER$ } }
		}
		change_liege = {
			liege = $CHARACTER$
			change = scope:title_change
		}
	}
	hidden_effect = {
		if = {
			limit = {
				NOR = {
					$CHARACTER$ = root
					$CHARACTER$ = { is_vassal_or_below_of = root }
				}
			}
			$CHARACTER$ = {
				change_liege = {
					liege = root
					change = scope:title_change
				}
			}
		}
	}
	resolve_title_and_vassal_change = scope:title_change
	hidden_effect = {
		$CHARACTER$ = { save_scope_as = new_saxon_king }
		every_player = {
			limit = {
				this != prev
				or = {
					is_vassal_or_below_of = title:e_hre.holder
					AND = {
						exists = title:e_west_slavia
						is_vassal_or_below_of = title:e_west_slavia.holder
					}
					title:e_hre = { is_neighbor_to_realm = prev }
					primary_title = {
						title:e_west_slavia = { is_de_jure_liege_or_above_target = prev }
					}
				}

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

The first 120 of its 125 lines; the rest is in game/common/scripted_effects/00_major_decisions_scripted_effects.txt from line 4154.

Where it is used

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

Events (2)

Source: game/common/scripted_effects/00_major_decisions_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?