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_investiture_council_tally_effect

pam_investiture_council_tally_effect = yes

game/common/scripted_effects/pam_investiture_council_effects.txt, line 152 (127 lines). No parameters.

pam_investiture_council_tally_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 152 of its file. It takes no parameters: pam_investiture_council_tally_effect = yes. The game's script calls it in 1 place, among them The Investiture Council (activity). Patch 1.20.1.2, from game/common/scripted_effects/pam_investiture_council_effects.txt.

The comment above it in the file

Run on the host from the debate phase on_end

What it does

  • scope:activity:
    • Every guest subset:
      • name = innovator
    • Every guest subset:
      • name = conservative
  • If

    • list_size:ec_innovators >= list_size:ec_conservatives

    Then

    • scope:activity › Activity log entry › scope:host.faith:
    • The Christian Church › If in the Investiture Controversy phase: Counts toward the situation's next phase: “The Investiture Council upheld the Church's sole right to appoint the Clergy, and for life”

    Otherwise

  • scope:host.faith.religious_head:
  • Every player:

• 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_investiture_council_tally_effect = {
	# The outcome letters (0060/0061) render after the activity is torn down; save the host now for their desc.
	scope:host = { save_scope_as = investiture_conclusion_host }
	scope:activity = {
		every_guest_subset = {
			name = innovator
			add_to_list = ec_innovators
		}
		every_guest_subset = {
			name = conservative
			add_to_list = ec_conservatives
		}
		# Activity vars so the conclusion window can read them after guests disperse
		# AI-only so the viewing player isn't staged twice
		if = {
			limit = { any_attending_character = { is_ai = yes this != scope:host is_in_guest_subset = { name = innovator } } }
			random_attending_character = {
				limit = { is_ai = yes this != scope:host is_in_guest_subset = { name = innovator } }
				save_scope_as = investiture_rep_church
			}
			set_variable = { name = investiture_conclusion_innovator value = scope:investiture_rep_church }
		}
		if = {
			limit = { any_attending_character = { is_ai = yes this != scope:host is_in_guest_subset = { name = conservative } } }
			random_attending_character = {
				limit = { is_ai = yes this != scope:host is_in_guest_subset = { name = conservative } }
				save_scope_as = investiture_rep_crown
			}
			set_variable = { name = investiture_conclusion_conservative value = scope:investiture_rep_crown }
		}
	}
	# Activity keeps the outcome for the conclusion page
	# Host keeps a two-month copy for letters 0060 and 0061, situation for 0051 and 0054
	if = {
		limit = { list_size:ec_innovators >= list_size:ec_conservatives }
		scope:activity = {
			set_variable = {
				name = third_debate_resolution
				value = flag:passed
			}
		}
		scope:host = {
			set_variable = { name = investiture_conclusion_outcome value = flag:passed days = 60 }
		}
		# Log entry so the ruling shows as the conclusion "Effects from ..." (hunt idiom)
		scope:activity = {
			add_activity_log_entry = {
				key = pam_investiture_council_concluded_spiritual_log
				score = 100
				tags = { complete good }
				character = scope:host
				show_in_conclusion = yes
				# EFFECT
				scope:host.faith = {
					pam_resolve_investiture_crisis_effect = { WINNER = spiritual DOCTRINE = doctrine_clerical_succession_spiritual_fixed_appointment }
				}
			}
		}
		# Crisis-phase guard so a later council for another faith can't re-transition
		situation:the_christian_church ?= {
			if = {
				limit = { has_situation_top_phase_parameter = the_christian_church_investiture_controversy }
				trigger_situation_catalyst = catalyst_investiture_council_settled_spiritual
				set_variable = { name = pam_investiture_last_outcome value = flag:spiritual days = 60 }
			}
		}
	}
	else = {
		scope:activity = {
			set_variable = {
				name = third_debate_resolution
				value = flag:failed
			}
		}
		scope:host = {
			set_variable = { name = investiture_conclusion_outcome value = flag:failed days = 60 }
		}
		# The ruling as a conclusion log entry - see the passed branch.
		scope:activity = {
			add_activity_log_entry = {
				key = pam_investiture_council_concluded_temporal_log
				score = 100
				tags = { complete bad }
				character = scope:host
				show_in_conclusion = yes
				# EFFECT
				scope:host.faith = {
					pam_resolve_investiture_crisis_effect = { WINNER = temporal DOCTRINE = doctrine_clerical_succession_spiritual_appointment }
				}
			}
		}
		# Temporal victory -> Fragile Unity, same council-only rule as above.
		situation:the_christian_church ?= {
			if = {
				limit = { has_situation_top_phase_parameter = the_christian_church_investiture_controversy }
				trigger_situation_catalyst = catalyst_investiture_council_settled_temporal
				# Short-lived marker so the Fragile Unity entry event (0051) can explain it followed a Temporal ruling.
				set_variable = { name = pam_investiture_last_outcome value = flag:temporal days = 60 }
			}
		}
	}
	# Letter to a player Head of Faith who didn't attend, the moment it is decided.
	scope:host.faith.religious_head ?= {
		if = {
			limit = {
				is_ai = no
				this != scope:host
				NOT = { involved_activity ?= scope:activity }
			}
			trigger_event = pam_investiture_council_events.0060
		}
	}
	# Non-attending faith player hears the outcome from their court chaplain
	every_player = {
		limit = {
			is_ai = no
			faith = scope:host.faith
			NOT = { faith.religious_head = this }
			NOT = { involved_activity ?= scope:activity }
			exists = cp:councillor_court_chaplain

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

The first 120 of its 127 lines; the rest is in game/common/scripted_effects/pam_investiture_council_effects.txt from line 152.

Where it is used

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

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