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

# Overview

> Unified modular minigame framework with 26+ game modes.

The **Minigame Extension** is a complete minigame ecosystem built on a state-machine phase engine. Every game runs through a single **GameContext** — one store for ready players, teams and per-game state — with shared lobby, team, scoreboard, inventory and records services. All of it is configured through Typewriter entries.

## Features

<CardGroup cols={2}>
  <Card title="26+ Game Modes" icon="gamepad">
    PvP (Sumo, Gladiator, Duels, KOTH, Paintball, OneInTheChamber), Parkour (Parkour, BlockParty, TNTRun, FloorIsLava), PvE (FallingBlocks, WaveSurvival, ZombieApocalypse, DefendTheCore, DodgeTheArrows), Strategy (CaptureTheFlag, Infection, Spleef, SheepHunt), Party (TPP, FreezeTag, HotPotato, DeACoudre, MusicalChairs), Reflex (Archery, Quake).
  </Card>

  <Card title="Phase Engine" icon="diagram-project">
    Idle → Lobby → Countdown → Playing → Ending → Cleanup, as a state machine. Games plug custom phases (jump, rounds, waves) into the same engine.
  </Card>

  <Card title="Unified Game Context" icon="database">
    One store per game instance: ready players, team assignments (with solo/duo/squad team modes), scores and live state. No parallel managers.
  </Card>

  <Card title="OmniGUI Menus" icon="table-cells">
    Game browser, arena selection, lobby, team selection, stats and post-game menus rendered through OmniGUI, opened by dedicated action entries.
  </Card>

  <Card title="Records & Quests" icon="trophy">
    Persistent wins, scores, best-time and top-times artifacts, plus quest objectives (`minigame_completion_objective`) and facts to gate content on minigame progress.
  </Card>

  <Card title="Arena Regions" icon="map">
    Arena definitions bind to Protection extension regions for boundaries and reset zones.
  </Card>
</CardGroup>

## Entries

| Group          | Entries                                                                                                                                       |
| :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| Arenas         | `minigame_arena`, `parkour_arena` (+ `parkour_start_point`, `parkour_checkpoint`, `parkour_end_point`), `deacoudre_arena`, `archery_arena`    |
| Player actions | `minigame_join`, `minigame_leave`, `minigame_forcestart`, `minigame_reset_records`                                                            |
| Menu actions   | `minigame_open_browser`, `minigame_open_arenas`, `minigame_open_lobby`, `minigame_open_stats`, `minigame_open_results`, `minigame_lobby_menu` |
| Persistence    | `minigame_wins`, `minigame_scores`, `minigame_state`, `minigame_best_time_artifact`, `minigame_top_times_artifact`                            |
| Quest support  | `minigame_completion_objective`, `minigame_completion_fact`                                                                                   |

## Quick Start

<CardGroup cols={1}>
  <Card title="1. Define an arena" icon="map">
    Create a `minigame_arena` (or a game-specific arena like `parkour_arena`) and pick its game type, spawn points and Protection region.
  </Card>

  <Card title="2. Wire persistence" icon="database">
    Add `minigame_wins` / `minigame_scores` / `minigame_state` artifacts so records survive restarts.
  </Card>

  <Card title="3. Open the flow to players" icon="play">
    Trigger `minigame_open_browser` (all games) or `minigame_join` (direct) from an NPC, command or menu. The phase engine handles the rest.
  </Card>
</CardGroup>

## Dependencies

| Extension                   | Required | Usage                  |
| :-------------------------- | :------- | :--------------------- |
| **OmniGUI (GuiAndDialogs)** | Required | All menus.             |
| **Protection**              | Required | Arena regions.         |
| **Quest** (official)        | Required | Completion objectives. |
