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

Scripted effect

form_austria_scripted_effect

form_austria_scripted_effect = yes

game/common/scripted_effects/00_major_decisions_scripted_effects.txt, line 1233 (148 lines). No parameters.

form_austria_scripted_effect is a scripted effect in Crusader Kings III, written at line 1233 of its file. It takes no parameters: form_austria_scripted_effect = yes. The game's script calls it in 2 places, among them Form Archduchy of Austria (decision) and The Archduchy of Austria (event middle_europe_decisions.0003). Its body carries 4 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_major_decisions_scripted_effects.txt.

What it does

• 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)
form_austria_scripted_effect = {
	#Grab scopes for loc and such.
	save_scope_as = scoped_ruler
	title:e_hre.holder = { save_scope_as = scoped_emperor }
	title:d_carinthia = { save_scope_as = carinthia }
	title:d_krain = {save_scope_as = krain }
	title:d_istria = { save_scope_as = istria }
	title:k_austria = { save_scope_as = austria}
	title:d_croatia.de_jure_liege = { save_scope_as = new_controller}
	#Hand over k_austria.
	create_title_and_vassal_change = {
		type = created
		save_scope_as = change
		add_claim_on_loss = no
	}
	title:k_austria = {
		change_title_holder = {
			holder = root
			change = scope:change
		}
		copy_title_history = title:d_osterreich
	}
	resolve_title_and_vassal_change = scope:change
	#Try to make it the primary title, unless it's the Emperor doing this.
	hidden_effect = {
		if = {
			limit = { primary_title.tier <= tier_kingdom }
			set_primary_title_to = title:k_austria
		}
	}
	#Save d_austria's current de jure liege for future reference.
	title:d_osterreich.de_jure_liege = { save_scope_as = previous_kingdom }
	#Transfer custom_core_austria (d_austria & d_steyermark) to the new Archduchy.
	hidden_effect = {
		title:k_austria = {
			set_de_jure_liege_title = scope:previous_kingdom.de_jure_liege
		}

		every_county_in_region = {
			region = custom_core_austria
			duchy = { add_to_list = austrian_heartlands_list }
		}
		every_in_list = {
			list = austrian_heartlands_list
			limit = {
				NOT = { de_jure_liege = title:k_austria }
			}
			set_de_jure_liege_title = title:k_austria
		}

	}
	#Sort Carinthia.
	if = {
		limit = { completely_controls = title:d_carinthia }
		title:d_carinthia = { set_de_jure_liege_title = title:k_austria }
	}
	else = { custom_tooltip = form_austria_kingdom_decision_effect_stretch_goals_tt }
	#Sort d_krain, giving it to k_austria, the de jure liege of d_croatia, or leaving it as-is, depending on if it borders any part of scope:previous_kingdom other than d_istria.
	if = {
		limit = {
			completely_controls = title:d_krain
			#d_krain must be part of d_osterreich's former kingdom.
			title:d_krain.de_jure_liege = scope:previous_kingdom
		}
		title:d_krain = { set_de_jure_liege_title = title:k_austria }
	}
	else_if = {
		limit = {
			#Krain must be part of d_osterreich's former kingdom.
			title:d_krain.de_jure_liege = scope:previous_kingdom
			#Cannot border any other part of the former kingdom other than Istria.
			NOR = {
				title:d_slavonia.de_jure_liege = scope:previous_kingdom
				title:d_croatia.de_jure_liege = scope:previous_kingdom
				title:d_friuli.de_jure_liege = scope:previous_kingdom
			}
			#Check d_carinthia separately, since before the effect is run (i.e., in the decision tooltip) its liege will still be scope:previous_kingdom.
			completely_controls = title:d_carinthia
		}
		hidden_effect = {
			title:d_krain = { set_de_jure_liege_title = title:d_croatia.de_jure_liege }
			save_scope_value_as = {
				name = krain_isolated
				value = yes
			}
		}
	}
	#Sort d_istria, giving it to k_austria, the de jure liege of d_croatia, or leaving it as-is, depending on if it borders any part of scope:previous_kingdom other than d_krain.
	if = {
		limit = {
			completely_controls = title:d_istria
			#d_istria must be part of d_osterreich's former kingdom.
			title:d_istria.de_jure_liege = scope:previous_kingdom
		}
		title:d_istria = { set_de_jure_liege_title = title:k_austria }
	}
	else_if = {
		limit = {
			#d_istria must be part of d_osterreich's former kingdom.
			title:d_istria.de_jure_liege = scope:previous_kingdom
			#Cannot border any other part of the former kingdom.
			NOR = {
				title:d_croatia.de_jure_liege = scope:previous_kingdom
				title:d_friuli.de_jure_liege = scope:previous_kingdom
			}
			#Check d_krain separately, since before the effect is run (i.e., in the decision tooltip) its liege will still be scope:previous_kingdom.
			completely_controls = title:d_carinthia
		}
		hidden_effect = {
			title:d_istria = { set_de_jure_liege_title = title:d_croatia.de_jure_liege }
			save_scope_value_as = {
				name = istria_isolated
				value = yes
			}
		}
	}
	#Sort notice of what's happening to Istria/Krain.
	if = {
		limit = {
			exists = scope:krain_isolated

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

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

Where it is used

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

Events (1)

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?