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_find_translation_clerical_region_effect

pam_find_translation_clerical_region_effect = { EXCLUDED_RULER = … EXCLUDE_RULER_REALM = … }

game/common/scripted_effects/11_dlc_pam_scripted_effects.txt, line 1573 (90 lines). Parameters: $EXCLUDED_RULER$, $EXCLUDE_RULER_REALM$.

pam_find_translation_clerical_region_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 1573 of its file. A call passes 2 parameters: EXCLUDED_RULER and EXCLUDE_RULER_REALM. The game's script calls it in 2 places, among them A Seismic Shift in Faith (event pam_clergy_events.0051) and The Antichrist Shatters My Throne (event roman_restoration.0132). Patch 1.20.1.2, from game/common/scripted_effects/11_dlc_pam_scripted_effects.txt.

The comment above it in the file

Looks for a Clerical Region the holder could be translated to when their own one is lost.
root = Clerical Region holder. Needs the doomed title in scope:title and its capital in scope:county.
$EXCLUDE_RULER_REALM$ = yes rules out any Clerical Region whose capital is held by or vassal to $EXCLUDED_RULER$.
Saves scope:translation_see when one exists.
Merged-empty regions linger; candidates must still hold a county

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (90 lines of game script)
pam_find_translation_clerical_region_effect = {
	clear_saved_scope = translation_see
	faith = {
		if = {
			limit = {
				any_clerical_region_title = {
					this != scope:title
					clerical_region_size > 0
					title_preferred_capital_county.rite ?= root.rite
					trigger_if = {
						limit = { always = $EXCLUDE_RULER_REALM$ }
						title_preferred_capital_county = {
							NOT = {
								county_held_or_vassal_to_target_trigger = { TARGET = $EXCLUDED_RULER$ }
							}
						}
					}
					OR = {
						NOT = { exists = holder }
						holder ?= {
							is_ai = yes
							this != root
						}
					}
				}
			}
			ordered_clerical_region_title = {
				limit = {
					this != scope:title
					clerical_region_size > 0
					title_preferred_capital_county.rite ?= root.rite
					trigger_if = {
						limit = { always = $EXCLUDE_RULER_REALM$ }
						title_preferred_capital_county = {
							NOT = {
								county_held_or_vassal_to_target_trigger = { TARGET = $EXCLUDED_RULER$ }
							}
						}
					}
					OR = {
						NOT = { exists = holder }
						holder ?= {
							is_ai = yes
							this != root
						}
					}
				}
				order_by = {
					value = 0
					subtract = "title_preferred_capital_county.title_province.squared_distance(scope:county.title_province)"
					subtract = clerical_region_size
				}
				max = 1
				check_range_bounds = no
				save_scope_as = translation_see
			}
		}
		else = {
			ordered_clerical_region_title = {
				limit = {
					this != scope:title
					clerical_region_size > 0
					trigger_if = {
						limit = { always = $EXCLUDE_RULER_REALM$ }
						title_preferred_capital_county = {
							NOT = {
								county_held_or_vassal_to_target_trigger = { TARGET = $EXCLUDED_RULER$ }
							}
						}
					}
					OR = {
						NOT = { exists = holder }
						holder ?= {
							is_ai = yes
							this != root
						}
					}
				}
				order_by = {
					value = 0
					subtract = "title_preferred_capital_county.title_province.squared_distance(scope:county.title_province)"
					subtract = clerical_region_size
				}
				max = 1
				check_range_bounds = no
				save_scope_as = translation_see
			}
		}
	}
}

As written in game/common/scripted_effects/11_dlc_pam_scripted_effects.txt.

Where it is used

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

Events (2)

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