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_antipope_become_hof_effect

pam_antipope_become_hof_effect = { WINNER = … }

game/common/scripted_effects/pam_antipope_effects.txt, line 328 (76 lines). Parameters: $WINNER$.

pam_antipope_become_hof_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 328 of its file. A call passes 1 parameter: WINNER. The game's script calls it in 1 place, among them pam_antipope_challenge_hof_victory_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/pam_antipope_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 (76 lines of game script)
pam_antipope_become_hof_effect = {
	$WINNER$ = { save_scope_as = new_hof }
	scope:new_hof.faith = { save_scope_as = antipope_faith }
	scope:antipope_faith = {
		if = {
			limit = { exists = religious_head_title }
			religious_head_title = { save_scope_as = hof_title }
		}
	}
	scope:antipope_faith.religious_head ?= { save_scope_as = old_hof }
	if = {
		limit = { exists = scope:old_hof }
		if = {
			limit = {
				scope:antipope_faith = { has_doctrine_parameter = spiritual_head_of_faith }
				scope:old_hof = { exists = capital_county }
			}
			scope:old_hof = {
				capital_county = { save_scope_as = old_hof_capital }
			}
		}
		create_title_and_vassal_change = {
			type = usurped
			save_scope_as = hof_titles_change
			add_claim_on_loss = no
		}
		scope:old_hof = {
			every_held_title = {
				limit = {
					tier >= tier_county
				}
				change_title_holder = {
					holder = scope:new_hof
					change = scope:hof_titles_change
				}
			}
		}
		resolve_title_and_vassal_change = scope:hof_titles_change
	}
	if = {
		limit = {
			scope:new_hof = {
				has_title = title:k_papal_state
				faith = { has_doctrine_parameter = has_clerical_electors }
				NOT = { has_realm_law = theocratic_elective_succession_law }
			}
		}
		scope:new_hof = {
			add_realm_law_skip_effects = theocratic_elective_succession_law
		}
	}
	if = {
		limit = { exists = scope:hof_title }
		scope:antipope_faith = {
			set_religious_head_title = scope:hof_title
		}
	}
	if = {
		limit = {
			scope:antipope_faith = { has_doctrine_parameter = spiritual_head_of_faith }
			exists = scope:old_hof_capital
			scope:new_hof = {
				is_landed = yes
				NOT = { capital_county = scope:old_hof_capital }
			}
		}
		scope:new_hof = {
			set_realm_capital = scope:old_hof_capital
			set_location_to_default = yes
		}
	}
	scope:new_hof = {
		pam_set_pope_rite_mainline_effect = yes
	}
	pam_remove_antipope_effect = yes
}

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

Where it is used

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

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