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_guests_into_ecumenical_council_groups_effect

pam_sort_guests_into_ecumenical_council_groups_effect = { NEXT_EVENT = … }

game/common/scripted_effects/pam_ecumenical_council_effects.txt, line 977 (285 lines). Parameters: $NEXT_EVENT$.

pam_sort_guests_into_ecumenical_council_groups_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 977 of its file. A call passes 1 parameter: NEXT_EVENT. The game's script calls it in 26 places, among them Debate … (event ecumenical_council_events.0020), Our Stance on … (event ecumenical_council_events.0010) and The … Question (event ecumenical_council_events.0050). Patch 1.20.1.2, from game/common/scripted_effects/pam_ecumenical_council_effects.txt.

The comment above it in the file

Build innovator/conservative subsets based on each attendee's stance toward the planner-selected debate tenet

What it does

  • scope:activity:
    • 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 }
    • scope:host › scope:activity:
      • add_to_guest_subset = { name = innovator target = prev }
    • Every attending character:
      • Only some of them (the filter is in the script below)
      • scope:activity:
        • add_to_guest_subset = { name = innovator target = prev }
    • Every attending character:
    • Otherwise:
      • If

        • list_size:conservative > list_size:innovator

        Then

        • One in list, picked in order:
          • Where: Is played by the AI
          • remove_from_list = conservative
          • scope:activity:
            • remove_from_guest_subset = { name = conservative target = prev }
            • add_to_guest_subset = { name = innovator target = prev }
    • Activity log entry:
    • Every attending character:

• 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_guests_into_ecumenical_council_groups_effect = {
	scope:activity = {
		# Clear all lists
		clear_variable_list = major_innovator
		clear_variable_list = major_conservative
		clear_variable_list = locked_into_innovators
		clear_variable_list = locked_into_conservatives
		# Explain the backlash again for each debate that passes
		remove_variable = ec_backlash_tt_shown
		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 supports their own proposal, regardless of player or AI control
		scope:host = {
			add_to_list = innovator
			scope:activity = {
				add_to_guest_subset = {
					name = innovator
					target = prev
				}
			}
		}
		# Build a list of AI guest innovators
		every_attending_character = {
			limit = {
				# Players will decide in the follow up event
				is_ai = yes
				this != scope:host
				# Only eligible voters
				pam_valid_ecumenical_council_voter_trigger = yes
				NOT = {	has_relation_rival = scope:host }
				trigger_if = {
					limit = {
						scope:activity = { has_current_phase = ecumenical_council_phase_first_debate }
					}
					scope:activity.activity_tenet:1 = {
						save_temporary_scope_as = tenet
					}
					OR = {
						scope:host = { has_strong_hook = prev }
						ecumenical_council_attendee_support_value > 0
					}
				}
				trigger_else_if = {
					limit = {
						scope:activity = { has_current_phase = ecumenical_council_phase_second_debate }
					}
					scope:activity.activity_tenet:2 = {
						save_temporary_scope_as = tenet
					}
					OR = {
						scope:host = { has_strong_hook = prev }
						ecumenical_council_attendee_support_value > 0
					}
				}
				trigger_else = {
					scope:activity.var:third_debate_proposal ?= {
						save_temporary_scope_as = doctrine
					}
					OR = {
						scope:host = { has_strong_hook = prev }
						ecumenical_council_doctrine_attendee_support_value > 0
					}
				}
			}
			add_to_list = innovator
			scope:activity = {
				add_to_guest_subset = {
					name = innovator
					target = prev
				}
			}
		}
		# Lump everyone else into the conservative group
		every_attending_character = {
			limit = {
				# Players will decide in the follow up event
				is_ai = yes
				# Only eligible voters
				this != scope:host
				pam_valid_ecumenical_council_voter_trigger = yes
				NOT = { is_in_list = innovator }
			}
			add_to_list = conservative
			scope:activity = {
				add_to_guest_subset = {
					name = conservative
					target = prev
				}
			}
		}
		if = {
			limit = {
				any_in_list = {
					list = innovator
					count >= 3
				}
			}
			ordered_in_list = {
				list = innovator
				max = 3
				order_by = ecumenical_council_innovator_sort_value
				scope:activity = {
					add_to_variable_list = {
						name = major_innovator

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

The first 120 of its 285 lines; the rest is in game/common/scripted_effects/pam_ecumenical_council_effects.txt from line 977.

Where it is used

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

Events (26)

20 more

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