Scripted effect · Tours and Tournaments files
tournament_give_trait_effect
tournament_give_trait_effect = { CONTEST = … }game/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 6889 (63 lines). Parameters: $CONTEST$.
tournament_give_trait_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 6889 of its file. A call passes 1 parameter: CONTEST. The game's script calls it in 3 places, among them tournament_contest_rewards_effect (scripted effect), tournament_contest_team_rewards_effect (scripted effect) and tournament_contest_team_winner_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
Hand out Tourney Participant trait
What it does
If
- scope:activity › Any guest subset:
name = qualifiedphase = tournament_phase_$CONTEST$
- Does not have the Trait: Hastiluder
Then
- If has the Trait: Hastiluder: Gains the Trait Hastiluder
- scope:activity › 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 (63 lines of game script)
tournament_give_trait_effect = {
if = {
limit = {
save_temporary_scope_as = new_list_member
scope:activity ?= {
any_guest_subset = {
name = qualified
phase = tournament_phase_$CONTEST$
this = scope:new_list_member
}
}
NOT = { has_trait = tourney_participant }
}
hidden_effect = {
random = {
chance = 50
modifier = {
is_ai = no
add = 50
}
modifier = {
scope:contest_winner ?= this
add = 100
}
modifier = {
scope:activity ?= {
any_guest_subset = {
name = winner
phase = tournament_phase_$CONTEST$
this = root
}
}
add = 50
}
modifier = {
scope:activity ?= {
any_guest_subset = {
name = second_place
phase = tournament_phase_$CONTEST$
this = root
}
}
add = 30
}
modifier = {
scope:activity ?= {
any_guest_subset = {
name = third_place
phase = tournament_phase_$CONTEST$
this = root
}
}
add = 15
}
add_trait = tourney_participant
}
}
if = {
limit = { has_trait = tourney_participant }
show_as_tooltip = { add_trait = tourney_participant }
}
}
}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_give_trait_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.