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_split_ecclesiastical_title_outcome_effect

pam_split_ecclesiastical_title_outcome_effect = yes

game/common/scripted_effects/pam_effects.txt, line 7960 (116 lines). No parameters.

pam_split_ecclesiastical_title_outcome_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 7960 of its file. It takes no parameters: pam_split_ecclesiastical_title_outcome_effect = yes. The game's script calls it in 1 place, among them pam_split_ecclesiastical_title_interaction_effect (scripted effect). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.

The comment above it in the file

Runs twice, once for the interaction window tooltip and once for real after a successful split

What it does

  • scope:secular_ruler:
    • If

      • scope:new_ecclesiastical_holder:
        • NOT = { is_courtier_of = scope:secular_ruler }
        • Is not a ruler

      Then

      • add_courtier = scope:new_ecclesiastical_holder
    • If

      • scope:new_ecclesiastical_holder:
        • NOT = { is_councillor_of = scope:secular_ruler }

      Then

      • assign_councillor_type = { type = councillor_court_chaplain remove_existing_councillor = yes target = scope:new_ecclesiastical_holder }
  • scope:actor:
    • If

      • Any character situation:
        • situation_type = the_christian_church
        • The current phase counts “A Clerical Region is split in two”

      Then

    • reverse_add_opinion = { target = scope:new_ecclesiastical_holder modifier = grateful_opinion opinion = 50 }
    • reverse_add_opinion = { target = scope:secondary_actor modifier = pleased_opinion opinion = 25 }
    • If

      • scope:recipient != scope:actor

      Then

      • reverse_add_opinion = { target = scope:recipient modifier = angry_opinion opinion = -50 }
    • add_hook = { type = favor_hook target = scope:new_ecclesiastical_holder }
  • If

    • scope:recipient != scope:actor

    Then

    • scope:recipient: A new Clerical Title covering … Realm within … is split off and granted to …
  • scope:new_ecclesiastical_holder › If their government is not Ecclesiastical: Adopts Ecclesiastical Government

• 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 (116 lines of game script)
pam_split_ecclesiastical_title_outcome_effect = {
	scope:secular_ruler = {
		if = {
			limit = {
				scope:new_ecclesiastical_holder = {
					NOT = {
						is_courtier_of = scope:secular_ruler
					}
					is_ruler = no
				}
			}
			add_courtier = scope:new_ecclesiastical_holder
		}
		if = {
			limit = {
				scope:new_ecclesiastical_holder = {
					NOT = { is_councillor_of = scope:secular_ruler }
				}
			}
			assign_councillor_type = {
				type = councillor_court_chaplain
				remove_existing_councillor = yes
				target = scope:new_ecclesiastical_holder
			}
		}
	}
	hidden_effect = {
		create_title_and_vassal_change = {
			type = created
			save_scope_as = change
			add_claim_on_loss = no
		}
		scope:new_title ?= {
			set_coa = scope:secular_ruler.primary_title
			set_color_from_title = scope:secular_ruler.primary_title
			set_capital_county = scope:secular_ruler.capital_county
			set_landless_title = yes
			set_no_automatic_claims = yes
			set_always_follows_primary_heir = yes

			change_title_holder = {
				holder = scope:new_ecclesiastical_holder
				change = scope:change
			}
			resolve_title_and_vassal_change = scope:change
		}
	}
	scope:actor = {
		if = {
			limit = {
				any_character_situation = {
					situation_type = the_christian_church
					situation_top_has_catalyst = catalyst_the_christian_church_clerical_region_split
				}
			}
			situation:the_christian_church = {
				trigger_situation_catalyst = catalyst_the_christian_church_clerical_region_split
			}
		}
		hidden_effect = {
			send_interface_toast = {
				type = event_toast_effect_good
				title = split_ecclesiastical_title_toast
				left_icon = scope:actor
				right_icon = scope:new_ecclesiastical_holder
				custom_tooltip = {
					text = split_ecclesiastical_title_effect_tt
				}
			}
		}
		reverse_add_opinion = {
			target = scope:new_ecclesiastical_holder
			modifier = grateful_opinion
			opinion = 50
		}
		reverse_add_opinion = {
			target = scope:secondary_actor
			modifier = pleased_opinion
			opinion = 25
		}
		if = {
			# On a self-split the HoF reorganises their own region, so there is no aggrieved superior to anger
			limit = { scope:recipient != scope:actor }
			reverse_add_opinion = {
				target = scope:recipient
				modifier = angry_opinion
				opinion = -50
			}
		}
		add_hook = {
			type = favor_hook
			target = scope:new_ecclesiastical_holder
		}
	}
	if = {
		# Skip the "your region was split" notification when the HoF split their own region
		limit = { scope:recipient != scope:actor }
		scope:recipient = {
			send_interface_toast = {
				type = event_toast_effect_bad
				title = split_ecclesiastical_title_toast
				left_icon = scope:actor
				right_icon = scope:new_ecclesiastical_holder
				custom_tooltip = split_ecclesiastical_title_effect_tt
			}
		}
	}
	scope:new_ecclesiastical_holder = {
		if = {
			limit = {
				NOT = { government_has_flag = government_is_ecclesiastical }
			}
			change_government = ecclesiastical_government
		}
	}
}

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

Where it is used

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

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?