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_merge_new_ecclesiastical_title_interaction_effect

pam_merge_new_ecclesiastical_title_interaction_effect = { ABSORBED_TITLE = … ABSORBING_TITLE = … SENDER = … }

game/common/scripted_effects/pam_effects.txt, line 8078 (83 lines). Parameters: $ABSORBED_TITLE$, $ABSORBING_TITLE$, $SENDER$.

pam_merge_new_ecclesiastical_title_interaction_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 8078 of its file. A call passes 3 parameters: ABSORBED_TITLE, ABSORBING_TITLE and SENDER. The game's script calls it in 2 places, among them Merge Clerical Title (interaction) and Request Clerical Title Merger (interaction). 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

Merge an Ecclesiastical Title as HoF - on_accept

What it does

  • $ABSORBING_TITLE$ ?= { … }
  • $ABSORBED_TITLE$ = { … }
  • $SENDER$ = { … }
  • scope:absorbing_holder:
    • … absorbs … Clerical Region and its Counties
    • If

      a check the game hides

      Then

      • If played by the AI: Opinion: Grateful (+50)
      • $SENDER$ = { … }

• 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 (83 lines of game script)
pam_merge_new_ecclesiastical_title_interaction_effect = {
	$ABSORBING_TITLE$ ?= {
		save_scope_as = absorbing_title
		holder ?= { save_scope_as = absorbing_holder }
	}
	$ABSORBED_TITLE$ = {
		save_scope_as = absorbed_title
		holder = {
			save_scope_as = absorbed_holder
			scope:absorbed_holder = {
				send_interface_toast = {
					type = event_toast_effect_bad
					title = request_ecclesiastical_title_merger_absorbed_tt
					left_icon = scope:absorbing_holder
					right_icon = scope:absorbed_title
					if = {
						limit = { is_ai = yes }
						# Absorbed region holder is angry at the initiator
						add_opinion = {
							target = $SENDER$
							modifier = angry_opinion
							opinion = -75
						}
						progress_towards_rival_effect = {
							CHARACTER = $SENDER$
							OPINION = 0
							REASON = rival_ecclesiastical_title_merged
						}
					}
				}
			}
		}
	}
	# Toast to the initiator
	$SENDER$ = {
		hidden_effect = {
			send_interface_toast = {
				type = event_toast_effect_good
				title = merge_new_ecclesiastical_title_toast
				left_icon = scope:absorbing_holder
				right_icon = scope:absorbed_title
				# Perform the region merge
				custom_tooltip = {
					text = merge_new_ecclesiastical_title_effect_tt
					scope:absorbing_title = {
						grow_clerical_region_from = scope:absorbed_title
						set_variable = {
							name = merge_clerical_region_cooldown
							years = merge_clerical_region_cooldown_years_value
						}
					}
				}
			}
		}
	}
	scope:absorbing_holder = {
		send_interface_toast = {
			type = event_toast_effect_good
			title = merge_new_ecclesiastical_title_toast
			left_icon = $SENDER$
			right_icon = scope:absorbed_title
			custom_tooltip = merge_new_ecclesiastical_title_effect_tt
			# The puppet variant sends on its own behalf, so there is no favour owed.
			if = {
				limit = { NOT = { this = $SENDER$ } }
				if = {
					limit = { is_ai = yes }
					add_opinion = {
						target = $SENDER$
						modifier = grateful_opinion
						opinion = 50
					}
				}
				$SENDER$ = {
					add_hook = {
						type = favor_hook
						target = scope:absorbing_holder
					}
				}
			}
		}
	}
}

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

Where it is used

Every place in common/, events/ and history/ that calls pam_merge_new_ecclesiastical_title_interaction_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?