Scripted trigger
adventurer_potential_destination_distance_check
adventurer_potential_destination_distance_check = { REGION = … }game/common/scripted_triggers/00_activity_triggers.txt, line 558 (33 lines). Parameters: $REGION$.
adventurer_potential_destination_distance_check is a scripted trigger in Crusader Kings III, written at line 558 of its file. A call passes 1 parameter: REGION. The game's script calls it in 3 places, among them Inspiration: A Change in Direction (event fund_inspiration.5021), fund_inspiration_0051_pick_options_to_show_effect (local effect) and set_adventure_location_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_triggers/00_activity_triggers.txt.
What it checks
- Any county in region:
region = $REGION$If
prev.adventure_inspiration_average_skill_value >= high_inspiration_skill
Then
None of these
- prev.location: Is in the $REGION$ region
Else if
prev.adventure_inspiration_average_skill_value >= medium_inspiration_skill
Then
squared_distance = { target = prev.location value <= medium_adventure_max_length }
Otherwise
squared_distance = { target = prev.location value < short_adventure_max_length }
• 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 (33 lines of game script)
adventurer_potential_destination_distance_check = {
#This is made to be used inside set_adventure_location_effect - it relies on the scope it is being run in being the adventurer
#Also expects $REGION$
any_county_in_region = {
region = $REGION$
trigger_if = {
limit = {
prev.adventure_inspiration_average_skill_value >= high_inspiration_skill
}
NOT = {
prev.location = {
geographical_region = $REGION$
}
} #Highly skilled adventurers can travel anywhere - and will not pick the region they are already in
}
trigger_else_if = {
limit = {
prev.adventure_inspiration_average_skill_value >= medium_inspiration_skill
}
squared_distance = {
target = prev.location
value <= medium_adventure_max_length
}
}
trigger_else = {
#low_inspiration_skill
squared_distance = {
target = prev.location
value < short_adventure_max_length
}
}
}
}As written in game/common/scripted_triggers/00_activity_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls adventurer_potential_destination_distance_check.
Events (1)
- Inspiration: A Change in Direction
fund_inspiration.5021
Scripted effects inside an event file (1)
- fund_inspiration_0051_pick_options_to_show_effect
Scripted effects (1)
Source: game/common/scripted_triggers/00_activity_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.