Scripted effect · Tours and Tournaments files
tournament_contest_versus_disqualification_effect
tournament_contest_versus_disqualification_effect = { CONTEST = … DISQUALIFIED = … MATCH = … SKILL = … }game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 2642 (99 lines). Parameters: $CONTEST$, $DISQUALIFIED$, $MATCH$, $SKILL$.
tournament_contest_versus_disqualification_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 2642 of its file. A call passes 4 parameters: CONTEST, DISQUALIFIED, MATCH and SKILL. The game's script calls it in 3 places, among them …: Sabotage (event tournament_events.6052), Unseemly Conduct (event ep2_tournament_events.2504) and …: Tabletop Tantrum (event contest_events.5510). Its body carries 2 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
The comment above it in the file
Set round participants after disqualifications
What it does
scope:activity:- Depending on contest versus progress:
- When contest versus progress is 0:
add_to_guest_subset = { name = semi_finalist target = scope:disqualify_match phase = tournament_phase_$CONTEST$ }
- When contest versus progress is 1:
add_to_guest_subset = { name = finalist target = scope:disqualify_match phase = tournament_phase_$CONTEST$ }
- When contest versus progress is 2:
add_to_guest_subset = { name = winner target = scope:disqualify_match phase = tournament_phase_$CONTEST$ }
- When contest versus progress is 0:
- Activity log entry › scope:contest_loser:
- Every attending character:
- Where: Is played by a person
- Event contest_events.0826
- Depending on contest versus progress:
• 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 (99 lines of game script)
tournament_contest_versus_disqualification_effect = {
$DISQUALIFIED$ = { save_scope_as = disqualify_target }
$MATCH$ = { save_scope_as = disqualify_match }
scope:disqualify_target = {
save_scope_as = contest_loser
remove_variable = contest_aptitude
remove_variable = progress_to_victory
add_character_flag = {
flag = disqualified_contest_flag
months = 2
}
}
scope:disqualify_match = {
save_scope_as = contest_winner
remove_variable = contest_aptitude
set_variable = {
name = contest_aptitude
value = contest_$SKILL$_aptitude_value
}
set_variable = {
name = progress_to_victory
value = progress_to_victory_active_contestant_value
}
}
scope:activity = {
switch = {
trigger = var:contest_versus_progress
0 = {
add_to_guest_subset = {
name = semi_finalist
target = scope:disqualify_match
phase = tournament_phase_$CONTEST$
}
}
1 = {
add_to_guest_subset = {
name = finalist
target = scope:disqualify_match
phase = tournament_phase_$CONTEST$
}
}
2 = {
add_to_guest_subset = {
name = winner
target = scope:disqualify_match
phase = tournament_phase_$CONTEST$
}
}
}
add_activity_log_entry = {
key = tournament_disqualified_log
score = 50
tags = { contestant removal }
character = scope:contest_loser
target = scope:host
# Effect
scope:contest_loser = {
if ={
limit = { scope:activity.var:contest_versus_progress = 2 }
custom_description = {
text = tournament_contest_disqualify_win_tt
subject = scope:disqualify_match # WINNER
object = scope:disqualify_target # DISQUALIFIED
}
}
else = {
custom_description = {
text = tournament_contest_disqualify_round_tt
subject = scope:disqualify_match # WINNER
object = scope:disqualify_target # DISQUALIFIED
}
}
if = {
limit = { is_ai = yes }
add_opinion = {
target = scope:host
modifier = tournament_disqualified_opinion
opinion = -15
}
}
}
}
every_attending_character = {
limit = {
is_ai = no
trigger_if = {
limit = { exists = scope:contest_winner }
this != scope:contest_winner
}
trigger_if = {
limit = { exists = scope:contest_loser }
this != scope:contest_loser
}
}
trigger_event = contest_events.0826
}
}
}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_versus_disqualification_effect.
Events (3)
- …: Sabotage
tournament_events.6052 - Unseemly Conduct
ep2_tournament_events.2504 - …: Tabletop Tantrum
contest_events.5510
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.