Scripted effect · Tours and Tournaments files
tournament_contest_wager_effect
tournament_contest_wager_effect = yesgame/common/scripted_effects/04_dlc_ep2_tournament_effects.txt, line 3526 (34 lines). No parameters.
tournament_contest_wager_effect is a scripted effect in Crusader Kings III, in the Tours and Tournaments files, written at line 3526 of its file. It takes no parameters: tournament_contest_wager_effect = yes. The game's script calls it in 3 places, among them Archery: Contest Winner (event contest_events.0705), Board Game: Contest Winner (event contest_events.0805) and Horse Race: Contest Winner (event contest_events.0505). Its body carries 4 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
Info and payout for won/lost wager
What it does
If
a check the game hides
Then
If
scope:wager_target = scope:contest_winner
Then
If
scope:contest_complete ?= flag:horse_race
Then
- You won your … wager on … horse, …
Otherwise
- You won your … wager on …
- They gets …
Otherwise
If
scope:contest_complete ?= flag:horse_race
Then
- You lost your … wager on … horse, …
Otherwise
- You lost your … wager on …
• 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 (34 lines of game script)
tournament_contest_wager_effect = {
if = {
limit = {
exists = var:tournament_wager_target
exists = var:tournament_wager_payout
}
var:tournament_wager_target = { save_scope_as = wager_target }
if = {
limit = { scope:wager_target = scope:contest_winner }
if = {
limit = {
scope:contest_complete ?= flag:horse_race
exists = scope:wager_target.var:contest_horse_race_name
}
custom_tooltip = wager_won_horse_tooltip
}
else = { custom_tooltip = wager_won_tooltip }
add_gold = var:tournament_wager_payout
}
else = {
if = {
limit = {
scope:contest_complete ?= flag:horse_race
exists = scope:wager_target.var:contest_horse_race_name
}
custom_tooltip = wager_lost_horse_tooltip
}
else = { custom_tooltip = wager_lost_tooltip }
}
remove_variable = tournament_wager_stake
remove_variable = tournament_wager_target
remove_variable = tournament_wager_payout
}
}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_wager_effect.
Events (3)
- Archery: Contest Winner
contest_events.0705 - Board Game: Contest Winner
contest_events.0805 - Horse Race: Contest Winner
contest_events.0505
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.