Scripted effect · Roads to Power files
chariot_race_payout_effect
chariot_race_payout_effect = yesgame/common/scripted_effects/07_dlc_ep3_scripted_effects.txt, line 6003 (525 lines). No parameters.
chariot_race_payout_effect is a scripted effect in Crusader Kings III, in the Roads to Power files, written at line 6003 of its file. It takes no parameters: chariot_race_payout_effect = yes. The game's script calls it in 1 place, among them Chariot Race (activity). Patch 1.20.1.2, from game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
What it does
- scope:activity › Every guest subset:
name = spectatorsIf
- Wager type is win
- Wager target is scope:activity.var:first place
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:first_place.var:win_payout max = scope:current_gambler.monumental_gold_value }
Else if
- Wager type is place
One of these
- Wager target is scope:activity.var:first place
or
Wager target is scope:activity.var:second place
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:second_place.var:place_payout max = scope:current_gambler.monumental_gold_value }
Else if
- Wager type is show
One of these
- Wager target is scope:activity.var:first place
or
Wager target is scope:activity.var:second placeor
Wager target is scope:activity.var:third place
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:third_place.var:show_payout max = scope:current_gambler.monumental_gold_value }
Else if
- Wager type is win
- Wager target is this
Then
- Depending on wager team:
- When wager team is blues:
If
- scope:activity.var:first_place: Has the Trait: Charioteer of the Venetoi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:blue_win_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is greens:
If
- scope:activity.var:first_place: Has the Trait: Charioteer of the Prasinoi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:green_win_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is whites:
If
- scope:activity.var:first_place: Has the Trait: Charioteer of the Leukoi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:white_win_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is reds:
If
- scope:activity.var:first_place: Has the Trait: Charioteer of the Rhousioi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:red_win_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is blues:
Else if
- Wager type is place
- Wager target is this
Then
- Depending on wager team:
- When wager team is blues:
If
One of these
- scope:activity.var:first_place: Has the Trait: Charioteer of the Venetoi
or
scope:activity.var:second_place: Has the Trait: Charioteer of the Venetoi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:blue_place_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is greens:
If
One of these
- scope:activity.var:first_place: Has the Trait: Charioteer of the Prasinoi
or
scope:activity.var:second_place: Has the Trait: Charioteer of the Prasinoi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:green_place_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is whites:
If
One of these
- scope:activity.var:first_place: Has the Trait: Charioteer of the Leukoi
or
scope:activity.var:second_place: Has the Trait: Charioteer of the Leukoi
Then
set_or_increment_lucky_better_variable = yes- scope:activity › Activity log entry › scope:current_gambler:
add_gold = { value = scope:current_gambler.var:wager_value multiply = scope:activity.var:white_place_payout max = scope:current_gambler.monumental_gold_value }
- When wager team is reds:
If
One of these
- … (more in the script below)
- When wager team is blues:
- … (more in the script below)
• 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 (120 lines of game script)
chariot_race_payout_effect = {
scope:activity = {
every_guest_subset = {
name = spectators
save_scope_as = current_gambler
if = {
limit = {
var:wager_type ?= flag:win
var:wager_target ?= scope:activity.var:first_place
}
set_or_increment_lucky_better_variable = yes
add_character_flag = successful_bet
scope:activity = {
add_activity_log_entry = {
key = chariot_race_betting_char_outcome_key
score = 100
show_in_conclusion = yes
character = scope:current_gambler
scope:current_gambler = {
add_gold = {
value = scope:current_gambler.var:wager_value
multiply = scope:activity.var:first_place.var:win_payout
max = scope:current_gambler.monumental_gold_value
}
}
change_variable = {
name = chariot_race_pot
subtract = {
value = scope:current_gambler.var:wager_value
multiply = scope:activity.var:first_place.var:win_payout
}
}
}
}
}
else_if = {
limit = {
var:wager_type ?= flag:place
OR = {
var:wager_target ?= scope:activity.var:first_place
var:wager_target ?= scope:activity.var:second_place
}
}
set_or_increment_lucky_better_variable = yes
add_character_flag = successful_bet
scope:activity = {
add_activity_log_entry = {
key = chariot_race_betting_char_outcome_key
score = 100
show_in_conclusion = yes
character = scope:current_gambler
scope:current_gambler = {
add_gold = {
value = scope:current_gambler.var:wager_value
multiply = scope:activity.var:second_place.var:place_payout
max = scope:current_gambler.monumental_gold_value
}
}
change_variable = {
name = chariot_race_pot
subtract = {
value = scope:current_gambler.var:wager_value
multiply = scope:activity.var:second_place.var:place_payout
}
}
}
}
}
else_if = {
limit = {
var:wager_type ?= flag:show
OR = {
var:wager_target ?= scope:activity.var:first_place
var:wager_target ?= scope:activity.var:second_place
var:wager_target ?= scope:activity.var:third_place
}
}
set_or_increment_lucky_better_variable = yes
add_character_flag = successful_bet
scope:activity = {
add_activity_log_entry = {
key = chariot_race_betting_char_outcome_key
score = 100
show_in_conclusion = yes
character = scope:current_gambler
scope:current_gambler = {
add_gold = {
value = scope:current_gambler.var:wager_value
multiply = scope:activity.var:third_place.var:show_payout
max = scope:current_gambler.monumental_gold_value
}
}
change_variable = {
name = chariot_race_pot
subtract = {
value = scope:current_gambler.var:wager_value
multiply = scope:activity.var:third_place.var:show_payout
}
}
}
}
}
# Handle team based bets
else_if = {
limit = {
var:wager_type ?= flag:win
var:wager_target ?= this
}
switch = {
trigger = var:wager_team
flag:blues = {
if = {
limit = { scope:activity.var:first_place = { has_trait = charioteer_blue } }
set_or_increment_lucky_better_variable = yes
add_character_flag = successful_bet
scope:activity = {
add_activity_log_entry = {
key = chariot_race_betting_team_outcome_key
score = 100
show_in_conclusion = yesAs written in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt.
The first 120 of its 525 lines; the rest is in game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt from line 6003.
Where it is used
Every place in common/, events/ and history/ that calls chariot_race_payout_effect.
Activities (1)
Source: game/common/scripted_effects/07_dlc_ep3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.