Scripted effect · All Under Heaven files
tgp_destroy_ceremonial_liege_title_effect
tgp_destroy_ceremonial_liege_title_effect = yesgame/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt, line 2913 (71 lines). No parameters.
tgp_destroy_ceremonial_liege_title_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 2913 of its file. It takes no parameters: tgp_destroy_ceremonial_liege_title_effect = yes. The game's script calls it in 1 place, among them tgp_destroy_ceremonial_throne_effect (scripted effect). Its body carries 1 text 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
If
One of these
NOT = { exists = scope:ceremonial_title.var:ceremonial_title.holder }or
scope:ceremonial_title.holder.top_liege:
Then
- Every player:
- Where:
top_liege = scope:ceremonial_liege.top_liege
scope:liege:destroy_title = scope:ceremonial_title
- scope:ceremonial_liege › If is not an Independent Ruler: Gains the Trait Former Emperor
- Where:
scope:ceremonial_liege:- If has Treasury: Your Treasury will be converted to Gold
- If is not an Independent Ruler: Gains the Trait Former Emperor
scope:liege:destroy_title = scope:ceremonial_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 (71 lines of game script)
tgp_destroy_ceremonial_liege_title_effect = {
save_scope_as = ceremonial_liege
random_held_title = {
limit = { exists = var:ceremonial_title }
save_scope_as = ceremonial_title
var:ceremonial_title = { save_scope_as = regent_title }
}
random_held_title = {
limit = { is_noble_family_title = yes }
save_scope_as = nf_title
}
# Destroy the Ceremonial Title if linked title has no holder, or is in another realm, or is a sub vassal
if = {
limit = {
exists = scope:ceremonial_title
exists = scope:regent_title
OR = {
# Linked regent title has no holder
NOT = { exists = scope:ceremonial_title.var:ceremonial_title.holder }
scope:ceremonial_title.holder.top_liege = {
OR = {
# Regent and Ceremonial titles in different realms
this != scope:ceremonial_title.var:ceremonial_title.holder.top_liege
# Regent title is not top liege's primary title
primary_title != scope:ceremonial_title.var:ceremonial_title
# Regent is not liege of Monarch
this != scope:ceremonial_title.holder.liege
# Hegemony
highest_held_title_tier = tier_hegemony
}
}
}
}
# MESSAGE
every_player = {
limit = { top_liege = scope:ceremonial_liege.top_liege }
send_interface_message = {
type = event_generic_bad
title = tgp_destroy_ceremonial_liege_throne_title
left_icon = scope:ceremonial_liege
right_icon = scope:liege
show_as_tooltip = {
scope:liege = { destroy_title = scope:ceremonial_title }
scope:ceremonial_liege = {
if = {
limit = { is_independent_ruler = no }
add_trait = former_emperor
}
}
}
}
}
# Actually destroy
scope:ceremonial_liege = {
if = {
limit = { has_treasury = yes }
custom_tooltip = {
text = treasury_emptying_effect_desc
empty_treasury_when_abandoning_landed_life_effect = yes # otherwise the treasury sticks around
}
}
if = {
limit = { is_independent_ruler = no }
add_trait = former_emperor
}
}
scope:ceremonial_title = { remove_variable = ceremonial_title }
scope:regent_title = { remove_variable = administrative_ui_special_title }
scope:liege = { destroy_title = scope:ceremonial_title }
}
}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_destroy_ceremonial_liege_title_effect.
Scripted effects (1)
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.