Scripted effect
set_adventure_distance_variable_effect
set_adventure_distance_variable_effect = { ADVENTURER = … DESTINATION = … }game/common/scripted_effects/00_adventure_effects.txt, line 34 (57 lines). Parameters: $ADVENTURER$, $DESTINATION$.
set_adventure_distance_variable_effect is a scripted effect in Crusader Kings III, written at line 34 of its file. A call passes 2 parameters: ADVENTURER and DESTINATION. The game's script calls it in 1 place, among them start_adventure_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_adventure_effects.txt.
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (57 lines of game script)
set_adventure_distance_variable_effect = {
# Requires ADVENTURER = character
# Requires DESTINATION = barony_title
$ADVENTURER$.location = {
save_temporary_scope_as = start_barony
}
# Calculate distance to the destination
# The value set indicates how long time it will take for the adventurer to come back
if = {
limit = {
scope:start_barony = {
squared_distance = {
target = $DESTINATION$
value > long_adventure_max_length
}
}
}
set_variable = {
name = adventure_distance
value = very_long_adventure_var
}
}
else_if = {
limit = {
scope:start_barony = {
squared_distance = {
target = $DESTINATION$
value > medium_adventure_max_length
}
}
}
set_variable = {
name = adventure_distance
value = long_adventure_var
}
}
else_if = {
limit = {
scope:start_barony = {
squared_distance = {
target = $DESTINATION$
value > short_adventure_max_length
}
}
}
set_variable = {
name = adventure_distance
value = medium_adventure_var
}
}
else = {
set_variable = {
name = adventure_distance
value = short_adventure_var
}
}
}As written in game/common/scripted_effects/00_adventure_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls set_adventure_distance_variable_effect.
Scripted effects (1)
Source: game/common/scripted_effects/00_adventure_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.