Expand description
The per-mod tournament selection state, NO extra file.
The selection lives in the mod’s own active configuration (the
mods.json entries the launcher already writes and the hook resolver
already merges):
tournament_room_id, non-empty = a selection exists; the enable_if-gated managed rules interpolate it into their URLs;tournament_env/tournament_difficulty/tournament_player, the launcher-set values the rules’remote/push_urlinterpolate;tournament_room_name/tournament_starts_at/tournament_ends_at, display + play-gating values (rooms have a name and a planning window; a room that has not started yet or has expired must not start the game).
Everything here reads that map. Writing it is the tournament page’s
job (same mechanism as any parameter edit,
mods_tasks::persist_mod_configurations).
Structs§
- Tournament
Selection - One mod’s current tournament selection, read from its active
configuration.
Nonewhen no room is selected (tournament_room_idempty or absent).
Constants§
- TOURNAMENT_
ENDS_ AT_ CFG - when the selected room closes (epoch seconds, UTC).
- TOURNAMENT_
ONLINE_ CFG - the mod’s own play-online toggle (declared, user-facing): when off, the whole tournament flow goes dormant and the mod’s offline rules take over (vanilla main menu with the room list).
- TOURNAMENT_
ROOMS_ CFG - the launcher-computed room list the offline main-menu patch
interpolates:
"Name (records), ...", soonest-expiring room first. - TOURNAMENT_
ROOM_ ID_ CFG - The configuration key carrying the selected room id (the mod’s own parameter id, declared, but hidden from the UI since ).
- TOURNAMENT_
ROOM_ NAME_ CFG - display name of the selected room (launcher-written; no rule interpolates it, it exists so the UI never has to show the room id).
- TOURNAMENT_
STARTS_ AT_ CFG - when the selected room opens for play (epoch seconds, UTC).
Functions§
- format_
tournament_ when - Formats an epoch value as local time for UI display (
2026-10-23 18:00). - is_
online - Whether the mod’s active configuration plays online (the
tournament_onlinetoggle).truewhen the key is absent: the mod defaults to online and older configurations predate the toggle. - validate_
player_ name - The player-name field’s contract: 1 to 9 ASCII letters. The name
travels inside every replay
.datand lands in the game’s high-times table, so it stays as narrow as the game’s own name handling needs. Returns the trimmed name, or the reason an input was refused.