Scripted effect · Tours and Tournaments files
tournament_pivotal_ptv_value_effect
tournament_pivotal_ptv_value_effect = yesgame/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 8156 (53 lines). No parameters.
tournament_pivotal_ptv_value_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 8156 of its file. It takes no parameters: tournament_pivotal_ptv_value_effect = yes. The game's script calls it in 8 places, among them …: Final Lap (event contest_events.0510), …: Highly Strung (event contest_events.0720) and …: Horses for Courses (event contest_events.0530). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
The comment above it in the file
Save values for determining overall progress in a contest
What it does
If
a check the game hides
Then
scope:activity:- One guest subset current phase, picked in order:
name = qualified
- One guest subset current phase, picked in order:
name = qualified
- One guest subset current phase, picked in order:
• 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 (53 lines of game script)
tournament_pivotal_ptv_value_effect = {
if = {
limit = { exists = scope:pivotal_contestant.var:progress_to_victory }
scope:activity = {
ordered_guest_subset_current_phase = {
name = qualified
limit = { exists = var:progress_to_victory }
order_by = var:progress_to_victory
save_scope_as = best_contestant
}
ordered_guest_subset_current_phase = {
name = qualified
limit = { exists = var:progress_to_victory }
order_by = {
value = 0
subtract = var:progress_to_victory
}
save_scope_as = worst_contestant
}
}
save_scope_value_as = {
name = best_worst_diff
value = {
value = scope:best_contestant.var:progress_to_victory
subtract = scope:worst_contestant.var:progress_to_victory
}
}
save_scope_value_as = {
name = ptv_half_way
value = {
value = scope:worst_contestant.var:progress_to_victory
add = {
value = scope:best_worst_diff
divide = 2
}
}
}
save_scope_value_as = {
name = pivotal_best_diff
value = {
value = scope:pivotal_contestant.var:progress_to_victory
subtract = scope:best_contestant.var:progress_to_victory
}
}
save_scope_value_as = {
name = pivotal_worst_diff
value = {
value = scope:pivotal_contestant.var:progress_to_victory
subtract = scope:worst_contestant.var:progress_to_victory
}
}
}
}As written in game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls tournament_pivotal_ptv_value_effect.
Events (8)
- …: Final Lap
contest_events.0510 - …: Highly Strung
contest_events.0720 - …: Horses for Courses
contest_events.0530 - …: Into the Fray
contest_events.0610 - …: Striking True
contest_events.0710 - …: The Final Blows
contest_events.0620
2 more
- …: Well Versed
contest_events.0721 - …: Word to the Wise
contest_events.0711
Source: game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.