Scripted effect · Tours and Tournaments files
tournament_pivotal_contestant_scope_effect
tournament_pivotal_contestant_scope_effect = yesgame/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 8042 (112 lines). No parameters.
tournament_pivotal_contestant_scope_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 8042 of its file. It takes no parameters: tournament_pivotal_contestant_scope_effect = yes. The game's script calls it in 13 places, among them tournament_contest_versus_battle_effect (scripted effect), tournament_race_pulse_effect (scripted effect) and tournament_turn_pulse_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
The comment above it in the file
Save pivotal contestant perspective scope, root or someone important to you
What it does
- Otherwise › scope:activity › Every guest subset current phase:
- Only some of them (the filter is in the script below)
name = qualified
• 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 (112 lines of game script)
tournament_pivotal_contestant_scope_effect = {
if = {
limit = {
has_none_of_variables = {
name = resigned_contest_flag
name = disqualified_contest_flag
}
trigger_if = {
limit = {
scope:activity = {
activity_tournament_versus_contest_trigger = yes
var:contest_versus_progress ?= 2
}
}
is_in_guest_subset = { name = finalist }
}
trigger_else_if = {
limit = {
scope:activity = {
activity_tournament_versus_contest_trigger = yes
var:contest_versus_progress ?= 1
}
}
is_in_guest_subset = { name = semi_finalist }
}
trigger_else = {
is_in_guest_subset = { name = qualified }
}
}
save_scope_as = pivotal_contestant
}
# Otherwise, find someone you care about to frame the event
else = {
# Filter out anyone who is no longer a valid contestant
scope:activity = {
every_guest_subset_current_phase = {
name = qualified
limit = {
has_none_of_variables = {
name = resigned_contest_flag
name = disqualified_contest_flag
}
trigger_if = {
limit = { scope:activity.var:contest_versus_progress ?= 2 }
is_in_guest_subset = { name = finalist }
}
trigger_else_if = {
limit = { scope:activity.var:contest_versus_progress ?= 1 }
is_in_guest_subset = { name = semi_finalist }
}
trigger_else = { always = yes }
this != root
}
add_to_list = potential_pivotal_contestants
}
}
# Randomly select the most relevant character possible
random_in_list = {
list = potential_pivotal_contestants
# Intent Targets
limit = { root.intent_target ?= this }
# Wager Targets
alternative_limit = { root.var:tournament_wager_target ?= this }
# Relations
alternative_limit = { has_relation_to = root }
# Champions
alternative_limit = { root.court_position:champion_court_position ?= this }
# Children
alternative_limit = { is_child_of = root }
# Spouses
alternative_limit = { is_consort_of = root }
# Close Family
alternative_limit = { is_close_family_of = root }
# Liege
alternative_limit = { root.liege ?= this }
# Powerful Vassals
alternative_limit = { is_powerful_vassal_of = root }
# Vassals
alternative_limit = { is_vassal_of = root }
# Knights
alternative_limit = { is_knight_of = root }
# Extended Family
alternative_limit = { is_extended_family_of = root }
# Courtiers
alternative_limit = { is_courtier_of = root }
# Other
alternative_limit = { always = yes }
weight = {
base = 1
opinion_modifier = {
who = root
opinion_target = this
}
modifier = { add = var:progress_to_victory }
}
save_scope_as = pivotal_contestant
}
}
if = {
limit = {
exists = scope:contest_winner
exists = scope:contest_loser
}
if = {
limit = { scope:pivotal_contestant = scope:contest_winner }
scope:contest_loser = { save_scope_as = other_contestant }
}
else = {
scope:contest_winner = { save_scope_as = other_contestant }
}
}
}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_contestant_scope_effect.
Events (10)
- …: Check
contest_events.0863 - …: Final Lap
contest_events.0510 - …: Full Tilt
contest_events.0860 - …: Highly Strung
contest_events.0720 - …: Into the Fray
contest_events.0610 - …: Pinned
contest_events.0861
4 more
- …: Riposte
contest_events.0862 - …: Striking True
contest_events.0710 - …: The Final Blows
contest_events.0620 - …: 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.