# Game list (Broccolini Bot schema) Canonical list of games and their **display name**, **key** (snake_case), and **aliases**. Used by `config.js` (`GAME_LIST`, `GAME_ALIASES`, `GAME_NAME_TO_KEY`) and `game-options.json`. ## GAME_LIST (display names, comma-separated) Use this value for the `GAME_LIST` env var: ``` 7 Days to Die, Abiotic Factor, ARK: Survival Evolved, Conan Exiles, Core Keeper, Counter-Strike 2, DayZ, ECO, Enshrouded, Factorio, FiveM, The Front, Garry's Mod, Hytale, ICARUS, Minecraft, Necesse, Palworld, Project Zomboid, Rust, Satisfactory, Sons of the Forest, Soulmask, Star Rupture, Terraria, Valheim, VEIN, Vintage Story, Voyagers of Nera, V Rising ``` ## Table (display name, key, aliases) | Display name | Key | Aliases | |--------------|-----|--------| | 7 Days to Die | `7_days_to_die` | `7D2D`, `7 days` | | Abiotic Factor | `abiotic_factor` | — | | ARK: Survival Evolved | `ark_survival_evolved` | `Ark` | | Conan Exiles | `conan_exiles` | — | | Core Keeper | `core_keeper` | — | | Counter-Strike 2 | `counter_strike_2` | `CS2` | | DayZ | `dayz` | — | | ECO | `eco` | — | | Enshrouded | `enshrouded` | — | | Factorio | `factorio` | — | | FiveM | `fivem` | — | | The Front | `the_front` | — | | Garry's Mod | `garrys_mod` | — | | Hytale | `hytale` | — | | ICARUS | `icarus` | — | | Minecraft | `minecraft` | `MC` | | Necesse | `necesse` | — | | Palworld | `palworld` | — | | Project Zomboid | `project_zomboid` | `PZ`, `zomboid` | | Rust | `rust` | — | | Satisfactory | `satisfactory` | — | | Sons of the Forest | `sons_of_the_forest` | `SOTF` | | Soulmask | `soulmask` | — | | Star Rupture | `star_rupture` | — | | Terraria | `terraria` | — | | Valheim | `valheim` | — | | VEIN | `vein` | — | | Vintage Story | `vintage_story` | — | | Voyagers of Nera | `voyagers_of_nera` | — | | V Rising | `v_rising` | — | --- ## Matching rules (e.g. 7D2D → 7 Days to Die) Game detection lives in **`utils.js`** (`detectGame(subject, body)`). It only looks at the **combined subject + body** (lowercased). Matching is **case-insensitive** and uses **word boundaries**. ### 1. Full names first - **Source:** `GAME_NAMES` (from env `GAME_LIST`, comma-separated, trimmed). - **How:** For each game name, the code builds a regex: `\b` + escaped name + `\b`, with flag `i`. - So the **exact display name** must appear as **whole words**. Examples: “7 days to die” matches → `7 Days to Die`; “zomboid” alone does *not* match “Project Zomboid” (would need “project zomboid” as words). ### 2. Aliases second - **Source:** `GAME_ALIASES` in `config.js` (alias → full display name). - **How:** For each alias, the **alias** is lowercased, then the same pattern: `\b` + escaped alias + `\b`, case-insensitive. - If it matches, the function returns the **full game name** (the value in `GAME_ALIASES`). - So “7d2d”, “7D2D”, “7 days” match and resolve to **7 Days to Die**; “PZ” / “zomboid” resolve to **Project Zomboid**; “MC” → **Minecraft**; “Ark” → **ARK: Survival Evolved**; “SOTF” → **Sons of the Forest**; “CS2” → **Counter-Strike 2**. ### 3. Word boundaries - `\b` means “word boundary” (between word and non-word character, or start/end of string). - So “7d2d” matches “my 7d2d server” or “7D2D” but not “7d2dmod” (no boundary after 7d2d) unless that substring appears as a separate word. ### 4. Order and “first match wins” - Full names are checked **before** aliases. So if the text contains both a full name and an alias, the full name wins when it matches as whole words. - First matching game in `GAME_NAMES` or first matching alias in `GAME_ALIASES` wins; no tie-breaking between games. ### 5. No match - If neither a full name nor an alias matches (with word boundaries), `detectGame` returns **`'Not Mentioned'`**. ### Summary | Input (in subject/body) | Resolved game | |-------------------------|----------------| | 7d2d, 7D2D, 7 days | 7 Days to Die | | PZ, zomboid | Project Zomboid | | MC | Minecraft | | Ark | ARK: Survival Evolved | | SOTF | Sons of the Forest | | CS2 | Counter-Strike 2 | When adding a new game: 1. Add its **display name** to `GAME_LIST` (env) and to `GAME_NAME_TO_KEY` in `config.js`. 2. Add **key → display name** to `game-options.json`. 3. If users might type a shorthand (e.g. 7D2D), add an entry to **`GAME_ALIASES`** in `config.js` mapping that alias to the full display name.