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

# Minigames

> How the four atlasFishing NUI minigames work, how they're selected, and how to tune each one.

`atlasFishing` ships four NUI minigames. After the bite, one opens; landing it hooks the catch. The resource can pick randomly from a pool or force a single game for testing. Everything here is configured in `Config.minigame`.

```lua theme={null}
Config.minigame = {
    mode = 'random',
    static = 'tension',
    minMs = 2500,
    pool = { 'tension', 'whirlpool', 'castmeter', 'rhythm' },
    sounds = true,
    -- per-game difficulty blocks below
}
```

## Selection

| Key               | Behavior                                 |
| ----------------- | ---------------------------------------- |
| `mode = 'random'` | Picks a minigame from `pool` each catch. |
| `mode = 'static'` | Always uses the game named in `static`.  |

Force one game while tuning:

```lua theme={null}
Config.minigame.mode = 'static'
Config.minigame.static = 'whirlpool'
```

Drop a game from rotation by removing it from `pool` — e.g. `pool = { 'tension', 'castmeter' }`.

## Anti-cheat floor

```lua theme={null}
minMs = 2500
```

`minMs` is the minimum time a `success` may take before the **server** accepts it. A result reported faster than this is rejected, so a client cannot instantly claim a catch. Keep it near the default unless you also shorten the per-game durations.

## Sounds

```lua theme={null}
sounds = true
```

Procedural UI sounds play inside the minigames. Set `false` to mute them globally — useful if they clash with other UI audio.

## Tension

A rod-fight. The player keeps the catch window over a darting fish marker while avoiding too much line tension — hold too long and the line snaps.

```lua theme={null}
tension = {
    durationMs = 26000,
    catchBarHeight = 24,
    catchBarRiseSpeed = 56,
    catchBarFallSpeed = 44,
    fishSpeed = 1.25,
    fishJitter = 14,
    tensionGain = 0.75,
    tensionLoss = 0.38,
    progressGain = 0.26,
    progressLoss = 0.2,
}
```

**Harder when:** smaller `catchBarHeight`; higher `fishSpeed` / `fishJitter` (harder to track); higher `tensionGain` (punishes holding). Higher `progressGain` finishes a clean track faster.

## Whirlpool

Strike each surfacing fish (click or number key) before it dives.

```lua theme={null}
whirlpool = {
    durationMs = 24000,
    catches = 8,
    surfaceMs = 1250,
    spots = 6,
}
```

**Harder when:** more `catches` (longer round); lower `surfaceMs` (faster reactions); more `spots` (more places to watch).

## Cast Meter

Stop a sweeping meter to land the bobber in the ripple. More rounds = longer.

```lua theme={null}
castmeter = {
    rounds = 4,
    sweepMs = 1150,
    zone = 0.15,
}
```

**Harder when:** more `rounds`; lower `sweepMs` (faster sweep); lower `zone` (smaller target band).

## Reel Rhythm

Hit each WASD prompt before it expires.

```lua theme={null}
rhythm = {
    steps = 8,
    stepMs = 950,
    breakOnMiss = 3,
}
```

**Harder when:** more `steps` (longer sequence); lower `stepMs` (faster prompts); lower `breakOnMiss` (fewer allowed misses before failure).

## Tuning workflow

<Steps>
  <Step title="Force one game">
    Set `mode = 'static'` and pick a single game so you isolate it.
  </Step>

  <Step title="Test as a normal player">
    Admins who know the mechanics make difficulty feel easier than it is.
  </Step>

  <Step title="Change one value at a time">
    Adjust speed, duration, or window size separately so you can feel what changed.
  </Step>

  <Step title="Return to random">
    Once each game feels fair, set `mode = 'random'`.
  </Step>
</Steps>
