Scripted effect · Tours and Tournaments files
tournament_contest_turn_composition_effect
tournament_contest_turn_composition_effect = { CONTEST = … SKILL = … }game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 905 (116 lines). Parameters: $CONTEST$, $SKILL$.
tournament_contest_turn_composition_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 905 of its file. A call passes 2 parameters: CONTEST and SKILL. The game's script calls it in 1 place, among them Grand Tournament (activity). Patch 1.20.1.2, from game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt.
The comment above it in the file
Create competitor list and log entry
What it does
scope:activity:- Every guest subset:
- Where:
One of these
- Is played by a person
or
All of these
has_court_position = champion_court_position- Their liege: Is played by a person
tournament_contest_can_compete_trigger = yes- Progress to victory at least scope:activity.var:progress to victory threshold
name = contestantphase = tournament_phase_$CONTEST$add_tournament_contest_contestant_effect = { CONTEST = $CONTEST$ SKILL = $SKILL$ PTV = progress_to_victory_active_contestant_value }
- Where:
while = { … }tournament_liege_qualification_toast_effect = yes- Every guest subset:
- Where:
None of these
- scope:activity › Any guest subset current phase:
name = qualifiedthis = scope:new_list_member
- scope:activity › Any guest subset current phase:
name = contestantphase = tournament_phase_$CONTEST$tournament_contest_qualification_failure_effect = yes
- Where:
- Every attending character: Event contest_events.0700
- Every 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 (116 lines of game script)
tournament_contest_turn_composition_effect = {
scope:activity = {
set_variable = { name = tournament_commenced }
# Players
every_guest_subset = {
name = contestant
phase = tournament_phase_$CONTEST$
limit = {
OR = {
is_ai = no
AND = {
has_court_position = champion_court_position
liege = { is_ai = no }
}
}
tournament_contest_can_compete_trigger = yes
var:progress_to_victory >= scope:activity.var:progress_to_victory_threshold
}
add_tournament_contest_contestant_effect = {
CONTEST = $CONTEST$
SKILL = $SKILL$
PTV = progress_to_victory_active_contestant_value
}
}
# Filter relevant into entrants list
while = {
limit = {
any_guest_subset = {
name = qualified
phase = tournament_phase_$CONTEST$
count < 7
}
any_guest_subset_current_phase = {
name = contestant
tournament_contest_can_compete_trigger = yes
}
}
ordered_guest_subset = {
name = contestant
phase = tournament_phase_$CONTEST$
limit = { tournament_contest_can_compete_trigger = yes }
order_by = var:progress_to_victory
add_tournament_contest_contestant_effect = {
CONTEST = $CONTEST$
SKILL = $SKILL$
PTV = progress_to_victory_active_contestant_value
}
}
}
hidden_effect = {
random_list = {
3 = {
ordered_guest_subset = {
name = contestant
phase = tournament_phase_$CONTEST$
limit = { tournament_contest_can_compete_trigger = yes }
order_by = var:progress_to_victory
add_tournament_contest_contestant_effect = {
CONTEST = $CONTEST$
SKILL = $SKILL$
PTV = progress_to_victory_active_contestant_value
}
}
}
1 = {
trigger = {
NOT = { exists = var:mysterious_stranger_appeared }
any_attending_character = {
culture = {
any_culture_county = {
exists = faith
any_direct_de_jure_vassal_title = { exists = this }
}
}
}
any_attending_character = { count <= 240 }
}
tournament_mysterious_stranger_effect = {
CONTEST = $CONTEST$
SKILL = $SKILL$
}
}
}
}
# Add Activity Log entry
add_activity_log_entry = {
key = tournament_contest_start_log
tags = { contest }
score = 20
character = scope:host
}
# Inform liege of prestige from qualified knights
tournament_liege_qualification_toast_effect = yes
# Qualification ping
every_guest_subset = {
name = contestant
phase = tournament_phase_$CONTEST$
limit = {
save_temporary_scope_as = new_list_member
NOT = {
scope:activity = {
any_guest_subset_current_phase = {
name = qualified
this = scope:new_list_member
}
}
}
}
tournament_contest_qualification_failure_effect = yes
}
# Fire starting event
every_attending_character = {
trigger_event = contest_events.0700
}
}
}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_turn_composition_effect.
Activities (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.