Scripted effect
save_unique_holy_site_and_update_count_variable_for_tally_effect
save_unique_holy_site_and_update_count_variable_for_tally_effect = { HOLY_SITE = … }game/common/scripted_effects/00_pilgrimage_effects.txt, line 947 (43 lines). Parameters: $HOLY_SITE$.
save_unique_holy_site_and_update_count_variable_for_tally_effect is a scripted effect in Crusader Kings III, written at line 947 of its file. A call passes 1 parameter: HOLY_SITE. The game's script calls it in 1 place, among them Pilgrimage (activity). Patch 1.20.1.2, from game/common/scripted_effects/00_pilgrimage_effects.txt.
The comment above it in the file
Track unique holy sites visited for conclusion, rewards and other statistics - saves a variable_list and variable on your character
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (43 lines of game script)
save_unique_holy_site_and_update_count_variable_for_tally_effect = {
#If this is our first holy site, set up the variable
if = {
limit = {
#These two really shouldn't exist without each other, but safe-checking
NOT = { exists = var:visited_unique_holy_sites_list }
NOT = { exists = var:visited_unique_holy_sites_count }
}
#Create variables
add_to_variable_list = {
name = visited_unique_holy_sites_list
target = $HOLY_SITE$
}
set_variable = {
name = visited_unique_holy_sites_count
value = 1
}
add_character_flag = added_new_holy_site
}
#Otherwise add the holy site if we don't already have it
else_if = {
limit = {
#These two really shouldn't exist without each other, but safe-checking
exists = var:visited_unique_holy_sites_count
#Does this holy site exist in the list?
any_in_list = {
variable = visited_unique_holy_sites_list
NOT = { this = $HOLY_SITE$ }
}
}
#Add the holy site to the list
add_to_variable_list = {
name = visited_unique_holy_sites_list
target = $HOLY_SITE$
}
#Count up the variable
change_variable = {
name = visited_unique_holy_sites_count
add = 1
}
add_character_flag = added_new_holy_site
}
}As written in game/common/scripted_effects/00_pilgrimage_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls save_unique_holy_site_and_update_count_variable_for_tally_effect.
Activities (1)
Source: game/common/scripted_effects/00_pilgrimage_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.