CK3 DatabaseCrusader Kings III · 1.21.0 “Florin” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →Merch→

Scripted effect · By God Alone files

ecumenical_council_host_rite_adopt_core_tenet_effect

ecumenical_council_host_rite_adopt_core_tenet_effect = { TENET = … }

game/common/scripted_effects/pam_ecumenical_council_effects.txt, line 527 (77 lines). Parameters: $TENET$.

ecumenical_council_host_rite_adopt_core_tenet_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 527 of its file. A call passes 1 parameter: TENET. The game's script calls it in 1 place, among them ecumenical_council_apply_debate_outcome_effect (scripted effect). Its body carries 3 texts of the game's own for the player. Patch 1.21.0, from game/common/scripted_effects/pam_ecumenical_council_effects.txt.

The comment above it in the file

A host who leads a branched rite carries a passed make-core ruling over to that rite
At the core tenet limit the rite gives up the tenet the main rite demoted, else its least popular tenet that is not core in the main rite
can_pick still sees the tenet about to be dropped
The four exclusive ascetic tenets may swap for one another when it is the only one of them the rite holds
Does nothing if the rite still cannot take the tenet, or has nothing to give up
Uses rite_has_tenet, because has_tenet_status on a branched rite falls back to the main rite, which already holds $TENET$
Reads scope:ec_demoted_tenet, saved when the main rite demoted a tenet

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 (77 lines of game script)
ecumenical_council_host_rite_adopt_core_tenet_effect = {
	ecumenical_council_save_host_branched_rite_effect = yes
	$TENET$ = {
		save_temporary_scope_as = ec_host_rite_new_tenet
	}
	if = {
		limit = {
			exists = scope:ec_host_rite
			scope:ec_host_rite = {
				NOT = { rite_has_tenet = scope:ec_host_rite_new_tenet }
			}
		}
		scope:ec_host_rite = {
			if = {
				limit = { pam_rite_is_at_core_tenet_cap_trigger = yes }
				if = {
					limit = {
						exists = scope:ec_demoted_tenet
						rite_has_tenet = scope:ec_demoted_tenet
					}
					scope:ec_demoted_tenet = {
						save_temporary_scope_as = ec_host_rite_dropped_tenet
					}
				}
				else = {
					ordered_rite_tenet = {
						limit = {
							save_temporary_scope_as = ec_host_rite_drop_candidate
							scope:host.faith = {
								NOT = { pam_faith_tenet_is_core_trigger = { TENET = scope:ec_host_rite_drop_candidate } }
							}
						}
						order_by = {
							save_temporary_scope_as = pam_popularity_tenet
							scope:host.faith = { subtract = pam_faith_tenet_popularity_value }
						}
						position = 0
						save_temporary_scope_as = ec_host_rite_dropped_tenet
					}
				}
				if = {
					limit = {
						exists = scope:ec_host_rite_dropped_tenet
						OR = {
							rite_can_choose_tenet = scope:ec_host_rite_new_tenet
							pam_rite_can_swap_exclusive_ascetic_tenet_trigger = {
								NEW = scope:ec_host_rite_new_tenet
								DROPPED = scope:ec_host_rite_dropped_tenet
							}
						}
					}
					custom_tooltip = {
						text = ecumenical_council_host_rite_drops_tenet_tt
						hidden_effect = {
							remove_rite_tenet = scope:ec_host_rite_dropped_tenet
						}
					}
					custom_tooltip = {
						text = ecumenical_council_host_rite_adopts_tenet_tt
						hidden_effect = {
							add_rite_tenet = scope:ec_host_rite_new_tenet
						}
					}
				}
			}
			else_if = {
				limit = { rite_can_choose_tenet = scope:ec_host_rite_new_tenet }
				custom_tooltip = {
					text = ecumenical_council_host_rite_adopts_tenet_tt
					hidden_effect = {
						add_rite_tenet = scope:ec_host_rite_new_tenet
					}
				}
			}
		}
	}
}

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

Where it is used

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

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.21.0.

Spotted a mistake on this page, or have an idea for the site?