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_sort_investiture_council_groups_effect

pam_sort_investiture_council_groups_effect = { NEXT_EVENT = … }

game/common/scripted_effects/pam_investiture_council_effects.txt, line 7 (143 lines). Parameters: $NEXT_EVENT$.

pam_sort_investiture_council_groups_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 7 of its file. A call passes 1 parameter: NEXT_EVENT. The game's script calls it in 1 place, among them The Church's Right (event pam_investiture_council_events.0010). Patch 1.20.1.2, from game/common/scripted_effects/pam_investiture_council_effects.txt.

The comment above it in the file

Puppets inherit their controller's stance

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 (120 lines of game script)
pam_sort_investiture_council_groups_effect = {
	scope:activity = {
		clear_variable_list = major_innovator
		clear_variable_list = major_conservative
		every_guest_subset = {
			name = innovator
			scope:activity = {
				remove_from_guest_subset = {
					name = innovator
					target = prev
				}
			}
		}
		every_guest_subset = {
			name = conservative
			scope:activity = {
				remove_from_guest_subset = {
					name = conservative
					target = prev
				}
			}
		}

		# The host always champions Spiritual.
		every_attending_character = {
			limit = { this = scope:host }
			add_to_list = innovator
		}

		# AI voters: assigned by stance.
		every_attending_character = {
			limit = {
				is_ai = yes
				this != scope:host
				pam_valid_ecumenical_council_voter_trigger = yes
				pam_investiture_council_voter_supports_spiritual_trigger = yes
			}
			add_to_list = innovator
		}
		# Players with a committed Spiritual stance: auto-assign.
		every_attending_character = {
			limit = {
				is_ai = no
				this != scope:host
				pam_valid_ecumenical_council_voter_trigger = yes
				pam_investiture_council_voter_has_locked_stance_trigger = yes
				pam_investiture_council_voter_supports_spiritual_trigger = yes
			}
			add_to_list = innovator
		}
		# Everyone else decided (AI, or a committed-Temporal player) -> conservative.
		every_attending_character = {
			limit = {
				this != scope:host
				pam_valid_ecumenical_council_voter_trigger = yes
				NOT = { is_in_list = innovator }
				OR = {
					is_ai = yes
					AND = {
						is_ai = no
						pam_investiture_council_voter_has_locked_stance_trigger = yes
					}
				}
			}
			add_to_list = conservative
		}

		every_in_list = {
			list = conservative
			scope:activity = {
				add_to_guest_subset = {
					name = conservative
					target = prev
				}
			}
		}
		every_in_list = {
			list = innovator
			limit = {
				NOT = { is_in_list = conservative }
			}
			scope:activity = {
				add_to_guest_subset = {
					name = innovator
					target = prev
				}
			}
		}

		if = {
			limit = {
				any_in_list = { list = innovator }
			}
			ordered_in_list = {
				list = innovator
				max = 3
				order_by = ecumenical_council_innovator_sort_value
				scope:activity = {
					add_to_variable_list = {
						name = major_innovator
						target = prev
					}
				}
			}
		}
		if = {
			limit = {
				any_in_list = { list = conservative }
			}
			ordered_in_list = {
				list = conservative
				max = 3
				order_by = ecumenical_council_conservative_sort_value
				scope:activity = {
					add_to_variable_list = {
						name = major_conservative
						target = prev
					}
				}
			}

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

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

Where it is used

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

Events (1)

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?