Scripted effect
configure_start_board_game_effect
configure_start_board_game_effect = { BG_ATTACKER = … BG_DEFENDER = … BG_INITIATOR = … INVALIDATION_EVENT = … LOCALE = … OUTPUT_EVENT = … SYSTEM = … }game/common/scripted_effects/00_board_game_effects.txt, line 9 (255 lines). Parameters: $BG_ATTACKER$, $BG_DEFENDER$, $BG_INITIATOR$, $INVALIDATION_EVENT$, $LOCALE$, $OUTPUT_EVENT$, $SYSTEM$.
configure_start_board_game_effect is a scripted effect in Crusader Kings III, written at line 9 of its file. A call passes 7 parameters: BG_ATTACKER, BG_DEFENDER, BG_INITIATOR, INVALIDATION_EVENT, LOCALE, OUTPUT_EVENT and SYSTEM. The game's script calls it in 4 places, among them Challenge to Board Game (interaction), Bored Games (event host_dinner_events.1040) and The Challenge (event host_dinner_events.1041). Patch 1.20.1.2, from game/common/scripted_effects/00_board_game_effects.txt.
What it does
- Else, if all of these hold:
- Conditions:
scope:bg_locale = flag:random_nice_day
- Then › 1 of 3 things will happen:
- 33%: Nothing else happens
- 33%: Nothing else happens
- 33%: Nothing else happens
- Conditions:
- scope:bg_defender: Event board_games.0001
• 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)
configure_start_board_game_effect = {
# DOCUMENTATION
## scope:bg_initiator
### Who started the board game? This is who the output/invalidation events will fire for.
## scope:bg_attacker
### The hostile party - in the event of a tie, the match is decided against them.
## scope:bg_defender
### The defending party - in the event of a tie, the match is decided in their favour.
## scope:bg_system = flag:XYZ
### These control both the relevant skills, counters, & some flavour adjacent to the game.
### chess
### pachisi
### hnefatafl
### tabula
### go
### fidchell
## scope:locale = flag:XYZ
### These just trigger the event background of the same name. New ones can be added as needed, but should be added across all three events (round, victory, loss/board_games.0001, board_games.0031, board_games.0041), as we can't add a scripted list.
### terrain_scope
### wilderness_scope
### battlefield
### temple
### council_chamber
### courtyard
### dungeon
### docks
### feast
### gallows
### garden
### market
### sitting_room
### bedchamber
### study
### physicians_study
### tavern
### throne_room
### army_camp
### random_nice_day
#### Selects either garden or sitting_room, depending on season.
## output event ID
### Which event fires after the game's completion?
# Sort parties.
$BG_INITIATOR$ = { save_scope_as = bg_initiator }
$BG_DEFENDER$ = { save_scope_as = bg_defender }
$BG_ATTACKER$ = { save_scope_as = bg_attacker }
# Make sure they're clean for setup.
hidden_effect = { remove_board_game_variables_effect = yes}
# Set them both to busy for the single combat.
scope:bg_defender = {
set_variable = {
name = engaged_in_board_game
value = yes
}
}
scope:bg_attacker = {
set_variable = {
name = engaged_in_board_game
value = yes
}
}
## Sadly, we have no good justification for ripping your shirt off whilst playing board games.
# Set rules & system.
save_scope_value_as = {
name = bg_system
value = flag:$SYSTEM$
}
## Chess
### In chess, our counter order is Martial -> Learning -> Intrigue.
if = {
limit = { scope:bg_system = flag:chess }
save_scope_value_as = {
name = bg_skill_a
value = flag:martial
}
save_scope_value_as = {
name = bg_skill_b
value = flag:learning
}
save_scope_value_as = {
name = bg_skill_c
value = flag:intrigue
}
}
## Pachisi
### For pachisi, our counter order is Diplomacy -> Intrigue -> Stewardship.
else_if = {
limit = { scope:bg_system = flag:pachisi }
save_scope_value_as = {
name = bg_skill_a
value = flag:diplomacy
}
save_scope_value_as = {
name = bg_skill_b
value = flag:intrigue
}
save_scope_value_as = {
name = bg_skill_c
value = flag:stewardship
}
}
## Hnefatafl
### For hnefatafl, our counter order is Intrigue -> Martial -> Prowess.
else_if = {
limit = { scope:bg_system = flag:hnefatafl }
save_scope_value_as = {
name = bg_skill_a
value = flag:intrigue
}
save_scope_value_as = {
name = bg_skill_b
value = flag:martial
}
save_scope_value_as = {
name = bg_skill_c
value = flag:prowess
}
}
## Tabula
### For tabula, our counter order is Intrigue -> Learning -> Stewardship.As written in game/common/scripted_effects/00_board_game_effects.txt.
The first 120 of its 255 lines; the rest is in game/common/scripted_effects/00_board_game_effects.txt from line 9.
Where it is used
Every place in common/, events/ and history/ that calls configure_start_board_game_effect.
Character interactions (1)
Events (3)
- Bored Games
host_dinner_events.1040 - The Challenge
host_dinner_events.1041 - The Game of Games
board_games.0102
Source: game/common/scripted_effects/00_board_game_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.