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

Scripted effect · By God Alone files

pam_kingdom_of_heaven_declaration_effect

pam_kingdom_of_heaven_declaration_effect = yes

game/common/scripted_effects/pam_effects.txt, line 4412 (143 lines). No parameters.

pam_kingdom_of_heaven_declaration_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 4412 of its file. It takes no parameters: pam_kingdom_of_heaven_declaration_effect = yes. The game's script calls it in 1 place, among them The Kingdom of Heaven (event pam_kingdom_of_heaven.0001). Its body carries 3 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/pam_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)
pam_kingdom_of_heaven_declaration_effect = {
	save_scope_as = kingdom_of_heaven_founder
	get_title = title:h_kingdom_of_heaven
	set_primary_title_to = title:h_kingdom_of_heaven
	set_realm_capital = title:c_jerusalem
	hidden_effect = {
		domicile ?= { move_domicile = root.capital_province }
	}
	dynasty ?= {
		add_dynasty_prestige = 10000
		add_dynasty_modifier = pam_founded_kingdom_of_heaven_modifier
	}
	if = {
		limit = { NOT = { exists = dynasty } }
		add_character_modifier = pam_founded_kingdom_of_heaven_modifier
	}
	custom_tooltip = {
		text = pam_kingdom_of_heaven_decision_subjugation_effect_tt
		set_variable = koh_subjugation_cb_allowed
	}
	set_global_variable = {
		name = created_kingdom_of_heaven
		value = yes
	}
	root.faith = {
		every_faith_ruler = {
			limit = {
				this != root
				is_independent_ruler = yes
				is_available_quick = {
					landed = yes
					ai = yes
					advanced_ruler = yes
				}
				is_playable_character = yes
				highest_held_title_tier >= tier_county
				highest_held_title_tier < tier_hegemony
				NOR = {
					has_relation_rival = root
					is_at_war_with = root
					government_has_flag = cannot_be_vassal_or_liege
				}
			}
			random = {
				chance = {
					value = 20
					if = {
						limit = { piety_level >= 1 }
						add = 5
					}
					if = {
						limit = { piety_level >= 2 }
						add = 8
					}
					if = {
						limit = { piety_level >= 3 }
						add = 10
					}
					if = {
						limit = { piety_level >= 4 }
						add = 15
					}
					if = {
						limit = {
							opinion = {
								target = root
								value >= 30
							}
						}
						add = 10
					}
					if = {
						limit = {
							opinion = {
								target = root
								value >= 60
							}
						}
						add = 15
					}
					if = {
						limit = {
							exists = rite
							scope:kingdom_of_heaven_founder = { exists = rite }
							rite = scope:kingdom_of_heaven_founder.rite
						}
						add = 40
					}
				}
				add_to_list = new_vassals
				hidden_effect = {
					create_title_and_vassal_change = {
						type = swear_fealty
						save_scope_as = koh_fealty_change
						add_claim_on_loss = no
					}
					change_liege = {
						liege = root
						change = scope:koh_fealty_change
					}
					resolve_title_and_vassal_change = scope:koh_fealty_change
				}
				if = {
					limit = { highest_held_title_tier >= tier_kingdom }
					show_as_tooltip = {
						change_liege = {
							liege = root
							change = scope:koh_fealty_change
						}
					}
				}
			}
		}
	}
	custom_tooltip = kingdom_of_heaven_lower_vassals_gained_tt
	custom_tooltip = {
		text = kingdom_of_heaven_lower_de_jure_gained_tt
		every_empire = {
			limit = {
				is_landless_type_title = no

As written in game/common/scripted_effects/pam_effects.txt.

The first 120 of its 143 lines; the rest is in game/common/scripted_effects/pam_effects.txt from line 4412.

Where it is used

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

Events (1)

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