Scripted effect · Tours and Tournaments files
tournament_contest_winner_captain_effect
tournament_contest_winner_captain_effect = { CONTEST = … LOSER = … WINNER = … }game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 693 (61 lines). Parameters: $CONTEST$, $LOSER$, $WINNER$.
tournament_contest_winner_captain_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 693 of its file. A call passes 3 parameters: CONTEST, LOSER and WINNER. The game's script calls it in 1 place, among them tournament_contest_team_winner_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
What it does
If
- Any guest subset:
name = team_$WINNER$_captainphase = tournament_phase_$CONTEST$
Then
- One random guest subset:
name = team_$WINNER$_captainphase = tournament_phase_$CONTEST$
Otherwise
- One random guest subset:
name = winnerphase = tournament_phase_$CONTEST$
- Any guest subset:
If
- Any guest subset:
name = team_$LOSER$_captainphase = tournament_phase_$CONTEST$
Then
- One random guest subset:
name = team_$LOSER$_captainphase = tournament_phase_$CONTEST$
Otherwise
- One random guest subset:
name = second_placephase = tournament_phase_$CONTEST$
- Any guest subset:
• 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 (61 lines of game script)
tournament_contest_winner_captain_effect = {
if = { # Original captain
limit = {
any_guest_subset = {
name = team_$WINNER$_captain
phase = tournament_phase_$CONTEST$
is_alive = yes
}
}
random_guest_subset = {
name = team_$WINNER$_captain
phase = tournament_phase_$CONTEST$
save_scope_as = contest_winner
}
}
else = { # New captain
random_guest_subset = {
name = winner
phase = tournament_phase_$CONTEST$
limit = { is_alive = yes }
weight = {
base = 1
tournament_team_captain_modifier = yes
}
save_scope_as = contest_winner
}
}
scope:activity = {
set_variable = {
name = melee_winner
value = scope:contest_winner
}
}
# Save losing captain
if = {
limit = {
any_guest_subset = {
name = team_$LOSER$_captain
phase = tournament_phase_$CONTEST$
is_alive = yes
}
}
random_guest_subset = {
name = team_$LOSER$_captain
phase = tournament_phase_$CONTEST$
save_scope_as = second_place
}
}
else = {
random_guest_subset = {
name = second_place
phase = tournament_phase_$CONTEST$
limit = { is_alive = yes }
weight = {
base = 1
tournament_team_captain_modifier = yes
}
save_scope_as = second_place
}
}
}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_contest_winner_captain_effect.
Scripted effects (1)
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.