Scripted effect · Tours and Tournaments files
add_tournament_contest_contestant_effect
add_tournament_contest_contestant_effect = { CONTEST = … PTV = … SKILL = … }game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 6748 (57 lines). Parameters: $CONTEST$, $PTV$, $SKILL$.
add_tournament_contest_contestant_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 6748 of its file. A call passes 3 parameters: CONTEST, PTV and SKILL. The game's script calls it in 4 places, among them tournament_contest_race_composition_effect (scripted effect), tournament_contest_team_composition_effect (scripted effect) and tournament_contest_turn_composition_effect (scripted effect). 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
Add contestant as qualified and notify
What it does
scope:activity:add_to_guest_subset = { name = qualified target = scope:new_list_member phase = tournament_phase_$CONTEST$ }
If
scope:activity:has_current_phase = tournament_phase_horse_race
Then
- Your horse entered into … … contest
Otherwise
- You qualified for … … contest
- Gain +75 Prestige
• 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 (57 lines of game script)
add_tournament_contest_contestant_effect = {
save_scope_as = new_list_member
# Add to subset
scope:activity = {
add_to_guest_subset = {
name = qualified
target = scope:new_list_member
phase = tournament_phase_$CONTEST$
}
}
# Update stats
set_variable = {
name = contest_aptitude
value = contest_$SKILL$_aptitude_value
}
set_variable = {
name = progress_to_victory
value = $PTV$
}
# Toast
if = {
limit = {
scope:activity = { has_current_phase = tournament_phase_horse_race }
}
send_interface_toast = {
title = tournament_qualify_title
left_icon = scope:new_list_member
custom_tooltip = tournament_qualify_race_desc
play_sound_effect = "event:/SFX/Events/Themes/sfx_event_theme_type_martial"
}
}
else = {
send_interface_toast = {
title = tournament_qualify_title
left_icon = scope:new_list_member
custom_tooltip = tournament_qualify_desc
add_prestige = minor_prestige_gain
play_sound_effect = "event:/SFX/Events/Themes/sfx_event_theme_type_martial"
}
if = {
limit = {
OR = {
this = scope:activity.special_guest:special_guest_champion
has_court_position = champion_court_position
is_knight = yes
}
}
liege = {
add_to_list = qualification_liege_list
add_to_variable_list = {
name = qualified_knights
target = scope:new_list_member
}
}
}
}
}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 add_tournament_contest_contestant_effect.
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.