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

Scripted effect · All Under Heaven files

tgp_restore_japanese_monarchy_yamato_scion_effect

tgp_restore_japanese_monarchy_yamato_scion_effect = yes

game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt, line 2595 (106 lines). No parameters.

tgp_restore_japanese_monarchy_yamato_scion_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2595 of its file. It takes no parameters: tgp_restore_japanese_monarchy_yamato_scion_effect = yes. The game's script calls it in 1 place, among them tgp_restore_japanese_monarchy_decision_effect (scripted effect). Its body carries 6 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_japan_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 (106 lines of game script)
tgp_restore_japanese_monarchy_yamato_scion_effect = {
	title:k_chrysanthemum_throne.previous_holder ?= { save_scope_as = last_tenno }
	dynasty:japanese_yamato.dynasty_founder.house ?= {
		save_scope_as = house_yamato
		if = {
			limit = { this = scope:kampaku.house }
			if = { # Avoid display of short tooltips after creation
				limit = { NOT = { exists = scope:scion } }
				custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_kampaku_tt
			}
			scope:kampaku = { save_scope_as = scion }
		}
		else_if = {
			limit = {
				scope:last_tenno ?= { tgp_japan_valid_restore_monarchy_scion_trigger = yes }
			}
			if = { # Avoid display of short tooltips after creation
				limit = { NOT = { exists = scope:scion } }
				custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_last_tt
			}
			scope:last_tenno = { save_scope_as = scion }
		}
		else_if = {
			limit = {
				scope:last_tenno ?= {
					any_child = { tgp_japan_valid_restore_monarchy_scion_trigger = yes }
				}
			}
			if = { # Avoid display of short tooltips after creation
				limit = { NOT = { exists = scope:scion } }
				custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_last_child_tt
			}
			scope:last_tenno = {
				ordered_child = {
					limit = { tgp_japan_valid_restore_monarchy_scion_trigger = yes }
					order_by = age
					save_scope_as = scion
				}
			}
		}
		else_if = {
			limit = {
				scope:last_tenno ?= {
					any_close_family_member = { tgp_japan_valid_restore_monarchy_scion_trigger = yes }
				}
			}
			if = { # Avoid display of short tooltips after creation
				limit = { NOT = { exists = scope:scion } }
				custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_last_close_family_tt
			}
			scope:last_tenno = {
				ordered_close_family_member = {
					limit = { tgp_japan_valid_restore_monarchy_scion_trigger = yes }
					order_by = age
					save_scope_as = scion
				}
			}
		}
		else_if = {
			limit = {
				any_house_member = {
					is_ruler = no
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root.top_liege }
					is_healthy = yes
				}
			}
			if = { # Avoid display of short tooltips after creation
				limit = { NOT = { exists = scope:scion } }
				custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_found_tt
			}
			ordered_house_member = {
				limit = {
					top_liege = root.top_liege
					is_ruler = no
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root.top_liege }
					is_healthy = yes
				}
				order_by = age
				save_scope_as = scion
			}
		}
		else = {
			tgp_restore_japanese_monarchy_yamato_creation_effect = yes
			if = { # Avoid display of short tooltips after creation
				limit = { NOT = { exists = scope:scion } }
				custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_created_tt
			}
		}
		# Save children for portraits
		scope:scion = {
			save_scope_as = background_throne_room_scope
			ordered_child = {
				limit = { house = scope:scion.house }
				max = 3
				check_range_bounds = no
				order_by = age
				switch = {
					trigger = exists
					scope:scion_child_2 = { save_scope_as = scion_child_3 }
					scope:scion_child_1 = { save_scope_as = scion_child_2 }
					fallback = { save_scope_as = scion_child_1 }
				}
			}
		}
	}
}

As written in game/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt.

Where it is used

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

Source: game/common/scripted_effects/10_dlc_tgp_japan_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?