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_custom_empire_effect

create_custom_empire_effect = yes

game/common/scripted_effects/00_major_decisions_scripted_effects_3.txt, line 557 (295 lines). No parameters.

create_custom_empire_effect is a scripted effect in Crusader Kings III, written at line 557 of its file. It takes no parameters: create_custom_empire_effect = yes. The game's script calls it in 1 place, among them Found a New Empire (decision). Its body carries 3 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_major_decisions_scripted_effects_3.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)
create_custom_empire_effect = {
	save_scope_as = founder
	custom_tooltip = create_new_empire
	show_as_tooltip = {
		every_held_title = {
			custom = create_title_every_held_kingdom
			title_tier = kingdom
			custom_tooltip = create_custom_empire_de_jure_changes
		}
	}
	#Also interested in kingdoms that belong to same empire and will be cut off
    every_sub_realm_county = {
        empire = {
            every_direct_de_jure_vassal_title = {
                limit = {
                    pam_custom_empire_can_claim_kingdom_exclave_trigger = { NEW_EMPEROR = scope:founder }
                    NOT = {
                    	is_in_list = exclave_adds
                    }
                }
                add_to_list = exclave_adds
            }
        }
    }

	hidden_effect = {
		#Landless title holders make this messier...
		if = {
			limit = {
				primary_title = {
					is_landless_type_title = yes
				}
			}
			ordered_held_title = {
				order_by = {
					value = 0
					every_de_jure_county = {
						add = 1
					}
				}
				limit = {
					tier = tier_kingdom
					any_de_jure_county = {
						this = scope:founder.capital_county
					}
					is_landless_type_title = no
				}
				alternative_limit = {
					tier = tier_kingdom
					is_landless_type_title = no
				}
				save_scope_as = old_title
			}
			primary_title = {
				save_scope_as = name_title
			}
		}
		else = {
			primary_title = {
				save_scope_as = old_title
			}
		}
		#To stop errors from scope not existing in decision
		if = {
			limit = {
				NOT = {
					exists = scope:old_title
				}
			}
			primary_title = {
				save_scope_as = old_title
			}
		}

		if = {
			limit = {
				exists = scope:name_title
			}
			create_dynamic_title = {
				tier = empire
				name = NEW_CREATED_TITLE_NAME_LANDLESS
			}
		}
		else = {
			create_dynamic_title = {
				tier = empire
				name = NEW_CREATED_TITLE_NAME
			}
		}
		
		create_title_and_vassal_change = {
			type = created
			save_scope_as = change
			add_claim_on_loss = no
		}

		scope:new_title = {
			change_title_holder = {
				holder = root
				change = scope:change
			}
		}

		resolve_title_and_vassal_change = scope:change

		#Check if all territory is from a single Hegemony, and if so, make Empire de jure of that Hegemony
		every_sub_realm_county = {
			if = {
				limit = {
					exists = hegemony
				}
				hegemony = {
					if = {
						limit = {
							NOT = {
								is_in_list = potential_hegemony
							}
						}
						add_to_list = potential_hegemony
					}

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

The first 120 of its 295 lines; the rest is in game/common/scripted_effects/00_major_decisions_scripted_effects_3.txt from line 557.

Where it is used

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

Decisions (1)

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