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_create_meritocratic_ruling_regent_title_effect

In the game: Due to being Ruler of a Meritocratic Empire:

tgp_create_meritocratic_ruling_regent_title_effect = yes

game/common/scripted_effects/10_dlc_tgp_korea_scripted_effects.txt, line 75 (87 lines). No parameters.

tgp_create_meritocratic_ruling_regent_title_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 75 of its file. It takes no parameters: tgp_create_meritocratic_ruling_regent_title_effect = yes. The game's script calls it in 2 places, among them Liberty Faction (casus belli) and faction_demand.0101 (event). Its body carries 3 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_korea_scripted_effects.txt.

The comment above it in the file

Create a Ceremonial Monarch title and apply the Meritocratic Regency succession law to the Realm

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 (87 lines of game script)
tgp_create_meritocratic_ruling_regent_title_effect = {
	if = {
		limit = {
			has_tgp_dlc_trigger = yes
			# Strictly Independent Empires
			is_independent_ruler = yes
			highest_held_title_tier = tier_empire
			# Validity
			has_realm_law = single_heir_succession_law
			tgp_realm_has_ceremonial_liege_trigger = no
			# Strictly Meritocratic
			government_has_flag = government_is_meritocratic
		}
		custom_description_no_bullet = { text = tgp_create_meritocratic_ruling_regent_title_effect }
		custom_tooltip = {
			text = tgp_create_meritocratic_ruling_regent_title_effect_title_tt
			save_scope_as = founder
			# CREATE CEREMONIAL TITLE (TITULAR)
			if = {
				limit = {
					scope:founder.primary_title = title:e_goryeo
					NOT = { exists = title:k_yongson_throne.holder }
				}
				title:k_yongson_throne = { save_scope_as = monarch_title }
			}
			else = {
				create_dynamic_title = {
					tier = kingdom
					name = MERITOCRATIC_CEREMONIAL_LIEGE_TITLE
				}
				scope:new_title = {
					set_coa = scope:founder.house
					save_scope_as = monarch_title
					set_definitive_form = yes
				}
			}
			# GRANT CEREMONIAL TITLE
			create_title_and_vassal_change = {
				type = created
				save_scope_as = change
				add_claim_on_loss = yes
			}
			scope:monarch_title = {
				set_variable = {
					name = ceremonial_title
					value = scope:founder.primary_title
				}
				# LINK TITLES
				change_title_holder = {
					holder = scope:founder
					change = scope:change
				}
			}
			resolve_title_and_vassal_change = scope:change
			# SETUP MONARCH SUCCESSION
			scope:monarch_title = { add_title_law = single_heir_succession_law } # Monarchy inherited separately
			# LINK TITLES
			primary_title = {
				save_scope_as = regent_title
				set_variable = {
					name = administrative_ui_special_title
					value = scope:monarch_title
				}
			}
		}
		custom_tooltip = tgp_create_meritocratic_ruling_regent_title_effect_faction_tt
		# SETUP REGENCY SUCCESION
		add_realm_law_skip_effects = meritocratic_regency_succession_law # Regency inherited separately
		hidden_effect = {
			every_player = {
				limit = { top_liege = scope:founder.top_liege }
				send_interface_message = {
					title = tgp_create_meritocratic_ruling_regent_title_message_title
					left_icon = scope:founder
					right_icon = scope:monarch_title
					show_as_tooltip = {
						scope:founder = {
							add_realm_law_skip_effects = meritocratic_regency_succession_law
							get_title = scope:monarch_title
							scope:monarch_title = { add_title_law = single_heir_succession_law }
						}
					}
				}
			}
		}
	}
}

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

Where it is used

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

Casus belli (1)

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