> ## 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.

# Installation

> Standalone, no dependencies. Drop it in, ensure it, call a game from any script.

## Asset download

<Info>
  To find the asset, you must have made the purchase using your own keymaster account. Otherwise, you can use the transfer system to move the asset to a different keymaster account.
</Info>

Once the purchase is made on our official website, you will receive your asset directly in your [Cfx.re portal](https://portal.cfx.re/). Download it from your panel.

## Base install

<Steps>
  <Step title="Drop the Awoken Minigames folder in place">
    Extract the build into `resources/` (or any subfolder of your resources path). Keep the folder name `awoken_minigames` - the export namespace depends on it.
  </Step>

  <Step title="Add it to your server.cfg">
    There's no load order to worry about. It has no dependencies, so it can go anywhere in the list.

    ```cfg server.cfg theme={"dark"}
    ensure awoken_minigames
    ```
  </Step>

  <Step title="(Optional) Set the global accent colour">
    ```cfg server.cfg theme={"dark"}
    setr awoken:primaryColor "#00E5FF"
    ```

    Read by every Awoken-branded resource, so one line themes them all together. You can still override the colour per call.
  </Step>

  <Step title="Try the games">
    With `enableDevMenu = true` in `config.lua`, run `/awoken_minigames` in-game. It opens a browser of all 68 games and their difficulty variations so you can play each one before you wire it into anything.

    <Warning>
      Turn `enableDevMenu` **off** on a live server, or players can open the menu and spawn minigames themselves. See [Configuration → Overview](/resources/awoken-minigames/configuration/overview#the-dev-menu).
    </Warning>
  </Step>

  <Step title="Call your first game">
    From any client-side script. The call **blocks** until the player finishes, fails, or cancels, so run it in a thread:

    ```lua theme={"dark"}
    CreateThread(function()
        local passed = exports['awoken_minigames']:SkillCheck({
            keys = { 'E', 'F', 'R' },
        })

        if passed then
            print('player passed')
        else
            print('player failed or cancelled')
        end
    end)
    ```

    That's the whole pattern - every game works this way. See [Exports](/resources/awoken-minigames/exports).
  </Step>
</Steps>

## What's inside

| Path                 | What it is                                                                                    | Edit it? |
| -------------------- | --------------------------------------------------------------------------------------------- | -------- |
| `config.lua`         | Global settings: brand, theme, language, volume, mute, dev menu, server verification.         | **Yes**  |
| `config/games/*.lua` | Per-game defaults, grouped by category (one file per category).                               | **Yes**  |
| `web/themes/*.lua`   | UI colour themes. Edit + restart to recolour - no build step.                                 | **Yes**  |
| `locales/*.lua`      | Every player-facing string, one file per language. Edit to translate or reword.               | **Yes**  |
| `client/`            | The runner and the 68 game modules.                                                           | No       |
| `server/`            | The optional [win-verification](/resources/awoken-minigames/server-verification) bookkeeping. | No       |
| `web/dist/`          | The built NUI.                                                                                | No       |

<Tip>
  `config.lua`, `config/games/*.lua`, `web/themes/*.lua` and `locales/*.lua` are the files left open by asset escrow - they're the ones you're meant to touch. Everything else is protected. See [FiveM asset escrow](/fivem-asset-escrow).
</Tip>

## Updating

Re-download the asset from your Cfx.re portal, replace the folder, and restart with `ensure awoken_minigames`.

<Warning>
  Replacing the folder overwrites `config.lua`, `config/games/*.lua`, `web/themes/*.lua` and `locales/*.lua`. Back those up first if you've tuned them, then re-apply your changes - or keep a diff of what you changed so it's a two-minute job each update.
</Warning>

## Performance

Every game runs entirely client-side in the NUI, only while it's on screen. There is no idle cost: no server tick, no database, no polling loop. When no game is running, the resource does nothing at all.

<Info>
  The games are drawn to be light on weak hardware - no per-frame blur passes, no runaway particle counts. They hold frame rate on low-end laptops and integrated graphics.
</Info>
