Scripted effect · By God Alone files
pam_pentarchy_pilgrim_circuit_effect
pam_pentarchy_pilgrim_circuit_effect = yesgame/common/scripted_effects/pam_effects.txt, line 593 (105 lines). No parameters.
pam_pentarchy_pilgrim_circuit_effect is a scripted effect in Crusader Kings III, in the By God Alone files, written at line 593 of its file. It takes no parameters: pam_pentarchy_pilgrim_circuit_effect = yes. The game's script calls it in 1 place, among them pilgrimage_additional_reward_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/pam_effects.txt.
The comment above it in the file
Pentarchy tenet is already checked when pilgrimage_additional_reward_effect fires this
What it does
If
- Their faith: Any holy site barony:
Then
If
One of these
NOT = { has_variable_list = pam_pentarchy_sees_visited }or
NOT = { is_target_in_variable_list = { name = pam_pentarchy_sees_visited target = scope:pam_pentarchy_see } }
Then
If
- Has “pentarchy sees total” (a variable the game's script sets)
- Pentarchy sees total more than 0
- Pentarchy sees count at least var:pam pentarchy sees total
Then
- Gains the modifier “Pilgrim of Every Seat”
- Piety +0.5/month
- Clergy Opinion +20
- Same Faith Opinion +10
- Head of Faith Opinion +25
- Gain +500 Piety
- Spiritual fulfillment +10
- If the Personal Tenets unlock tenet pentarchy pilgrim circuit companions:
Otherwise
- Gain +100 Piety
- Spiritual fulfillment +3
- If the Personal Tenets unlock tenet pentarchy pilgrim circuit companions:
• 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 (105 lines of game script)
pam_pentarchy_pilgrim_circuit_effect = {
save_temporary_scope_as = pam_pentarchy_pilgrim
if = {
limit = {
NOT = { has_character_flag = pam_pentarchy_circuit_completed }
exists = scope:pam_pentarchy_pilgrim.location.barony
faith = {
any_holy_site_barony = { this = scope:pam_pentarchy_pilgrim.location.barony }
}
}
scope:pam_pentarchy_pilgrim.location.barony = {
save_temporary_scope_as = pam_pentarchy_see
}
if = {
limit = {
OR = {
NOT = { has_variable_list = pam_pentarchy_sees_visited }
NOT = {
is_target_in_variable_list = {
name = pam_pentarchy_sees_visited
target = scope:pam_pentarchy_see
}
}
}
}
add_to_variable_list = {
name = pam_pentarchy_sees_visited
target = scope:pam_pentarchy_see
}
# Recount vs current holy sites so a conversion since visiting self-corrects
set_variable = {
name = pam_pentarchy_sees_total
value = 0
}
set_variable = {
name = pam_pentarchy_sees_count
value = 0
}
faith = {
every_holy_site = {
limit = { exists = holy_site_barony }
holy_site_barony = { save_temporary_scope_as = pam_pentarchy_counted_see }
scope:pam_pentarchy_pilgrim = {
change_variable = {
name = pam_pentarchy_sees_total
add = 1
}
if = {
limit = {
is_target_in_variable_list = {
name = pam_pentarchy_sees_visited
target = scope:pam_pentarchy_counted_see
}
}
change_variable = {
name = pam_pentarchy_sees_count
add = 1
}
}
}
}
}
if = {
limit = {
# The log entry's description is drawn before the counters above are set
has_variable = pam_pentarchy_sees_total
var:pam_pentarchy_sees_total > 0
var:pam_pentarchy_sees_count >= var:pam_pentarchy_sees_total
}
add_character_flag = pam_pentarchy_circuit_completed
send_interface_toast = {
type = event_toast_text_and_effect_good
title = pam_pentarchy_circuit_completed_toast
desc = pam_pentarchy_circuit_completed_toast_desc
left_icon = scope:pam_pentarchy_pilgrim
add_character_modifier = {
modifier = pam_pilgrim_of_every_holy_site_modifier
}
add_piety = massive_piety_gain
change_spiritual_fulfillment = major_spiritual_fulfillment_value
if = {
limit = { has_personal_tenet_flag = tenet_pentarchy_pilgrim_circuit_companions }
pam_pentarchy_circuit_entourage_effect = yes
}
}
}
else = {
send_interface_message = {
type = event_generic_good_with_text
title = pam_pentarchy_see_visited_message
desc = pam_pentarchy_see_visited_message_desc
left_icon = scope:pam_pentarchy_pilgrim
add_piety = medium_piety_gain
change_spiritual_fulfillment = minor_spiritual_fulfillment_value
if = {
limit = { has_personal_tenet_flag = tenet_pentarchy_pilgrim_circuit_companions }
pam_pentarchy_circuit_entourage_effect = yes
}
}
}
}
}
}As written in game/common/scripted_effects/pam_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls pam_pentarchy_pilgrim_circuit_effect.
Scripted effects (1)
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.