> ## Documentation Index
> Fetch the complete documentation index at: https://docs.awokenlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Where every Awoken Minigames setting lives, and how server defaults and per-call options fit together.

Awoken Minigames keeps its settings in a few places, each with a clear job. **None of it needs a build step** - edit a file and `restart awoken_minigames` and the change is live.

| Where                             | What                                                                                                                                                                     |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`config.lua`**                  | Global settings for every game: brand, language, volume, mute, theme, dev menu, and the [server verification](/resources/awoken-minigames/server-verification) settings. |
| **`config/games/<category>.lua`** | Per-game defaults - one file per category, one section per game.                                                                                                         |
| **`web/themes/*.lua`**            | UI colour themes. One file per theme. See [Theming](/resources/awoken-minigames/configuration/theming).                                                                  |
| **`locales/*.lua`**               | Every player-facing string, one file per language. See [Language](/resources/awoken-minigames/configuration/language).                                                   |

<Tip>
  The rule to remember: **config is the default, the call is the override.** Set a sensible server-wide baseline in the config files, then pass options only where a specific job needs something different.
</Tip>

## `config.lua` at a glance

```lua config.lua theme={"dark"}
AwokenMinigamesConfig = {
    primaryColor = GetConvar('awoken:primaryColor', '#00E5FF'),

    -- Applied to every game. Individual calls can override these.
    brand    = 'Awoken',  -- shown in the small kicker above the title
    language = 'en',      -- locale for all game copy
    volume   = 0.4,       -- master sound volume, 0..1
    muted    = false,     -- hard-mute toggle, server-wide kill switch
    theme    = 'dark',    -- UI look; built-ins: 'dark', 'midnight', 'nord'

    enableDevMenu = true, -- /awoken_minigames browser. OFF on live servers.
}
```

| Setting         | Default                                      | What it does                                                                                                                     |
| --------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `primaryColor`  | `awoken:primaryColor` convar, else `#00E5FF` | The accent colour for every game. Shared across all Awoken resources - set the convar once in `server.cfg` and they all match.   |
| `brand`         | `'Awoken'`                                   | The small kicker above each game's title (e.g. **AWOKEN // SKILL CHECK**). Set it to your server name to white-label the panels. |
| `language`      | `'en'`                                       | Locale for all player-facing copy - titles, subtitles, in-game hints.                                                            |
| `volume`        | `0.4`                                        | Master SFX volume, `0`-`1`.                                                                                                      |
| `muted`         | `false`                                      | Server-wide audio kill switch.                                                                                                   |
| `theme`         | `'dark'`                                     | UI look. Built-ins: `dark`, `midnight`, `nord`. See [Theming](/resources/awoken-minigames/configuration/theming).                |
| `enableDevMenu` | `true`                                       | Registers the `/awoken_minigames` command. **Turn off on live servers.**                                                         |

## Per-game defaults

Each category has one file, and each game is a labelled section inside it:

```lua config/games/reaction.lua theme={"dark"}
-- Skill Check ------------------------------------------------------
AwokenMinigamesConfig.skillCheck = {
    rounds          = 3,        -- checks to clear (1..20)
    keys            = { 'E', 'F', 'R' }, -- key pool, random pick each round
    speed           = 65,       -- marker speed, % of the bar per second
    zoneSize        = 18,       -- success zone width % (8..40)
    perfectZoneSize = 5,        -- inner perfect band % (0 = disabled)
    timeLimit       = 0,        -- total ms budget across rounds (0 = no limit)
    randomizeZone   = true,     -- randomise zone position each round
    mistakesAllowed = 0,        -- misses/wrong keys tolerated before fail
    canCancel       = true,
    autoStart       = false,
}
```

Change a value here and **every** call to that game uses it, unless a caller passes that option explicitly.

<CardGroup cols={2}>
  <Card title="Reaction & Precision" icon="bolt" href="/resources/awoken-minigames/configuration/reaction">
    11 games - Skill Check, Circle Click, Hold Zone, Aim Test, Balance, Rhythm, Firewall Pulse, Safe Crack, Lockpick, Osu, Slider
  </Card>

  <Card title="Input & Sequence" icon="keyboard" href="/resources/awoken-minigames/configuration/input">
    4 games - Keymash, Keys, Number Up, Backdoor
  </Card>

  <Card title="Memory" icon="brain" href="/resources/awoken-minigames/configuration/memory">
    12 games - Simon Says, Memory, Memory Colors, Verbal Memory, Numbered Sequence, Var Hack, Pairs, Recall, Observe, Tally, Chroma Lock, Pitch Lock
  </Card>

  <Card title="Logic & Hacking" icon="puzzle-piece" href="/resources/awoken-minigames/configuration/logic">
    19 games - Lights Out, Hex Breach, Code Crack, Fingerprint, Word Crack, Symbol Search, Pipe Pressure, Untangle, Minefield, Jigsaw, Wires, Tower of Hanoi, Math Rush, 2048, Splice, Current, Data Stream, Collapse, Arrow Maze
  </Card>

  <Card title="Arcade" icon="gamepad" href="/resources/awoken-minigames/configuration/arcade">
    11 games - Snake, Flappy, Stack, Pong, Invaders, Crossy, Ascent, Slipstream, Breakout, Stick It, Match It
  </Card>

  <Card title="Precision" icon="crosshairs" href="/resources/awoken-minigames/configuration/precision">
    7 games - Track, Trace, Cut, Calibrate, Waveform, Thread, Reach
  </Card>

  <Card title="Dexterity" icon="hand" href="/resources/awoken-minigames/configuration/dexterity">
    4 games - Shake, Cascade, Fishing, Cooldown
  </Card>

  <Card title="Language" icon="language" href="/resources/awoken-minigames/configuration/language">
    Translate or reword every string - 11 languages built in
  </Card>

  <Card title="Theming" icon="palette" href="/resources/awoken-minigames/configuration/theming">
    Recolour the whole UI by editing a file - no build step
  </Card>
</CardGroup>

## Shared options

On top of its own options, **every** game accepts these. Set them globally in `config.lua`, per game in its config block, or per call:

| Option      | Default    | What it does                                                                                                                         |
| ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `canCancel` | `true`     | Whether <kbd>ESC</kbd> cancels the game. A cancel returns `false`. Set `false` for a job the player must not be able to back out of. |
| `autoStart` | per game   | `false` shows a "press to start" gate before the game begins; `true` starts immediately. See [Starting a game](#starting-a-game).    |
| `title`     | per game   | The card title.                                                                                                                      |
| `subtitle`  | per game   | The line under the title.                                                                                                            |
| `brand`     | `'Awoken'` | The kicker above the title.                                                                                                          |
| `theme`     | `'dark'`   | UI look for this call.                                                                                                               |
| `volume`    | `0.4`      | SFX volume, `0`-`1`.                                                                                                                 |
| `muted`     | `false`    | Mute this call.                                                                                                                      |
| `minimal`   | `false`    | Strip the card down to a HUD prompt. See [Minimal mode](#minimal-mode).                                                              |

```lua theme={"dark"}
-- A high-stakes vault crack: custom copy, no backing out.
exports['awoken_minigames']:HexBreach({
    daemons   = { 3 },
    title     = 'Vault Mainframe',
    subtitle  = 'Breach the sequence',
    brand     = 'Pacific Standard',
    canCancel = false,
})
```

## Multi-stage games

Five games can run **several rounds back-to-back in one call**: **Simon Says**, **Memory**, **Lights Out**, **Hex Breach** and **Code Crack**. The player clears one round, gets a quick "Stage X cleared" beat, then goes straight into the next. You still get one result at the end - a win only if **every** round was cleared.

Pass `stages` in one of two forms.

<Tabs>
  <Tab title="An integer">
    Repeat the same config N times:

    ```lua theme={"dark"}
    exports['awoken_minigames']:SimonSays({
        gridSize = 5,
        rounds   = 6,
        stages   = 3,       -- three identical 5x5 / 6-round runs
    })
    ```
  </Tab>

  <Tab title="An array (per-stage)">
    One entry per stage, each a partial override on the parent config. The array's length sets the stage count:

    ```lua theme={"dark"}
    exports['awoken_minigames']:SimonSays({
        gridSize = 5,                          -- parent defaults
        rounds   = 6,
        title    = 'Vehicle Bypass',
        stages = {
            {},                                -- stage 1: parent (5x5, 6 rounds)
            { rounds = 8 },                    -- stage 2: 5x5, 8 rounds
            { gridSize = 6, rounds = 10 },     -- stage 3: 6x6, 10 rounds
        },
    })
    ```
  </Tab>
</Tabs>

A per-stage override accepts that game's own difficulty options (`gridSize` / `rounds` for Simon Says, `daemons` / `bufferSize` for Hex Breach, and so on); anything else falls back to the parent config. Stages are capped at **10**. Omitting `stages` - or passing `1` - is a single play.

<Tip>
  This is the cleanest way to build an **escalating** hack out of one call: ramp the difficulty stage by stage and still get a single `true`/`false` back, with no card flicker between rounds.
</Tip>

<Info>
  `stages` repeats the **same** game. To chain **different** games into one call - lockpick, then breach, then wires - use [Sequences](/resources/awoken-minigames/sequences) instead.
</Info>

## Starting a game

Every game has a **"press to start" gate** and an `autoStart` toggle to skip it:

* `autoStart = false` - the game shows a start gate and stays completely frozen until the player clicks it or presses a key. No clock ticks, no pattern flashes, nothing moves.
* `autoStart = true` - the game begins the moment it appears.

The default differs per game and is declared in its config block, so you can see and change it per game:

```lua config/games/arcade.lua theme={"dark"}
AwokenMinigamesConfig.snake = {
    -- ...
    autoStart = false,      -- true skips the "press to start" gate
}
```

<Info>
  The clock only starts when the player does - time spent on the start screen never counts against them. A gate is worth keeping on for anything fast or mouse-driven, so they're ready before it begins.
</Info>

## Mistakes and difficulty

Most games take a `mistakesAllowed` option - how many wrong inputs are allowed **before** the game fails:

* `mistakesAllowed = 0` - one mistake and it's over.
* `mistakesAllowed = 2` - the third mistake fails it.

<Tip>
  To make a game easier or harder, keep the same call and change a couple of numbers - a bigger or smaller zone, a slower or faster speed, more or fewer mistakes, a time limit. Each game's page shows the values you can use.
</Tip>

## Minimal mode

Every game takes `minimal`. It tidies the card down to just the game, so it sits on the screen like a HUD prompt rather than a big pop-up the player is pulled into.

```lua theme={"dark"}
exports['awoken_minigames']:SkillCheck({ minimal = true })
```

The card keeps its **size and position**. What goes is the framing: the backdrop dim over the world, the kicker, the divider line and the footer. What stays is the panel, the title, the chips (time, mistakes) and the win/lose stamp - the live state and the payoff beat.

* Set it server-wide with `minimal` in `config.lua`, or per call like any [shared option](#shared-options).
* **<kbd>ESC</kbd> still cancels.** It just isn't advertised, because the footer that advertised it is part of the chrome you removed.

## The dev menu

With `enableDevMenu = true`, the `/awoken_minigames` command opens an in-game browser of every game grouped by category. Pick a game, pick a difficulty variation, and it runs right there - then drops you back to the menu with the result.

Close it with <kbd>ESC</kbd>, or by running `/awoken_minigames` again.

<Warning>
  **Turn this off on a live server.** When `enableDevMenu = false`, no command and no chat suggestion is registered at all, so players cannot open the menu or spawn minigames.

  ```lua config.lua theme={"dark"}
  enableDevMenu = false,
  ```
</Warning>

<Info>
  Games launched from the dev menu run in the UI only and report their result to **nothing** - opening the menu can never fire your heist logic or pay anyone out. It's purely a viewer.
</Info>
