Scripted effect
set_pilgrimage_distance_variable_effect
set_pilgrimage_distance_variable_effect = { HOLY_SITE = … PILGRIM = … }game/common/scripted_effects/00_pilgrimage_effects.txt, line 880 (65 lines). Parameters: $HOLY_SITE$, $PILGRIM$.
set_pilgrimage_distance_variable_effect is a scripted effect in Crusader Kings III, written at line 880 of its file. A call passes 2 parameters: HOLY_SITE and PILGRIM. 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
Set variables tracking the length of the Pilgrimage (See pilgrimage_values.txt)
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (65 lines of game script)
set_pilgrimage_distance_variable_effect = {
# Requires PILGRIM = character
# Requires HOLY_SITE = barony_title
$PILGRIM$.capital_barony = { # Only landed characters can go on regular pilgrimages
save_temporary_scope_as = start_barony
}
# Calculate distance to the target holy site
# The value set indicates how many Journey Events a character will get
if = {
limit = {
scope:start_barony = {
squared_distance = {
target = $HOLY_SITE$
value > long_pilgrimage_max_length
}
}
}
scope:activity = {
set_variable = {
name = pilgrimage_distance
value = flag:very_long_pilgrimage_var
}
}
}
else_if = {
limit = {
scope:start_barony = {
squared_distance = {
target = $HOLY_SITE$
value > medium_pilgrimage_max_length
}
}
}
scope:activity = {
set_variable = {
name = pilgrimage_distance
value = flag:long_pilgrimage_var
}
}
}
else_if = {
limit = {
scope:start_barony = {
squared_distance = {
target = $HOLY_SITE$
value > short_pilgrimage_max_length
}
}
}
scope:activity = {
set_variable = {
name = pilgrimage_distance
value = flag:medium_pilgrimage_var
}
}
}
else = {
scope:activity = {
set_variable = {
name = pilgrimage_distance
value = flag:short_pilgrimage_var
}
}
}
}As written in game/common/scripted_effects/00_pilgrimage_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls set_pilgrimage_distance_variable_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.