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_ai_personal_tenet_pulse_effect

pam_ai_personal_tenet_pulse_effect = yes

game/common/scripted_effects/pam_effects.txt, line 1188 (177 lines). No parameters.

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

The comment above it in the file

Called from five_year_playable_pulse. Root is the character.

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_ai_personal_tenet_pulse_effect = {
	if = {
		limit = {
			is_physically_able_ai = yes
		}

		# Phase 0: cardinals may hold beliefs their rite prohibits, so a new pontiff can arrive carrying one
		# Ahead of Phase 1 so the freed slot refills this pulse; on_personal_tenet_loss clears the secret
		if = {
			limit = {
				pam_holds_college_elected_church_seat_trigger = yes
				pam_has_forbidden_personal_tenet_trigger = yes
			}
			faith.main_rite = { save_temporary_scope_as = pam_pontiff_rite }
			while = {
				count = 8
				limit = { pam_has_forbidden_personal_tenet_trigger = yes }
				random_personal_tenet = {
					limit = {
						scope:pam_pontiff_rite = {
							has_tenet_status = {
								tenet = prev
								status = prohibited
							}
						}
					}
					root = { remove_personal_tenet = prev }
				}
			}
		}

		# Phase 1: fill every empty personal tenet slot. No chance gate - empty slots are wasted SF and immersion.
		# 8 = safety upper bound on slot cap (base 1 + up to ~5 from piety levels, with headroom).
		while = {
			count = 8
			limit = {
				free_personal_tenet_slots > 0
				any_desired_tenet = {
					only_positive = yes
					threshold = 1
					selection_count = 97
					save_temporary_scope_as = pam_personal_tenet_candidate
					NOT = {
						root = {
							any_personal_tenet = {
								this = scope:pam_personal_tenet_candidate
							}
						}
					}
					OR = {
						NOT = {
							root.faith.main_rite = {
								has_tenet_status = {
									tenet = scope:pam_personal_tenet_candidate
									status = prohibited
								}
							}
						}
						root = { pam_ai_can_consider_forbidden_personal_tenet_trigger = yes }
					}
				}
			}

			random_desired_tenet = {
				only_positive = yes
				threshold = 1
				selection_count = 97
				limit = {
					save_temporary_scope_as = pam_personal_tenet_candidate
					NOT = {
						root = {
							any_personal_tenet = {
								this = scope:pam_personal_tenet_candidate
							}
						}
					}
					OR = {
						NOT = {
							root.faith.main_rite = {
								has_tenet_status = {
									tenet = scope:pam_personal_tenet_candidate
									status = prohibited
								}
							}
						}
						root = { pam_ai_can_consider_forbidden_personal_tenet_trigger = yes }
					}
				}
				root = { set_personal_tenet = prev }
			}
		}

		# Phase 2: chance-gated swap, only when there are no free slots left to fill.
		if = {
			limit = {
				free_personal_tenet_slots <= 0
				any_desired_tenet = {
					only_positive = yes
					threshold = 1
					selection_count = 97
					save_temporary_scope_as = pam_personal_tenet_candidate
					NOT = {
						root = {
							any_personal_tenet = {
								this = scope:pam_personal_tenet_candidate
							}
						}
					}
					OR = {
						NOT = {
							root.faith.main_rite = {
								has_tenet_status = {
									tenet = scope:pam_personal_tenet_candidate
									status = prohibited
								}
							}
						}
						root = { pam_ai_can_consider_forbidden_personal_tenet_trigger = yes }
					}
				}

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

The first 120 of its 177 lines; the rest is in game/common/scripted_effects/pam_effects.txt from line 1188.

Where it is used

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

On actions (the game's own hooks) (1)

  • five_year_playable_pulse

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?