> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-achievements/features/tiers-and-prerequisites.md).

# Tiers and Prerequisites

Ladders of awards that advance together.

## Tiers

Give several awards the same `stat` and one event advances all of them.

```lua
{ id = 'not_again',       goal = 1,  stat = 'prison_sentences', chain = 'prison', tier = 1 },
{ id = 'hardened',        goal = 10, stat = 'prison_sentences', chain = 'prison', tier = 2, requires = 'not_again' },
{ id = 'repeat_offender', goal = 50, stat = 'prison_sentences', chain = 'prison', tier = 3, requires = 'hardened' },
```

Your prison script then calls one thing per sentence:

```lua
exports['mango_achievements']:AddStat(source, 'prison_sentences', 1)
```

All three tiers advance. Without a shared `stat` you would have to call the export once per tier and keep the list in sync by hand — and adding a fourth tier later would mean a code change rather than a config edit.

`chain` and `tier` group them visually in the menu.

## Prerequisites

`requires` holds an award back until another is complete.

```lua
requires = 'hardened'                 -- one
requires = { 'hardened', 'jailbird' } -- or several, all required
```

{% hint style="success" %}
**Progress is banked, never lost.** A player who does things out of order keeps everything they earned, and the gated award completes the instant its prerequisite does.
{% endhint %}

Circular prerequisites are detected when the resource starts, reported against the award id, and cleared — so a mistake never leaves a chain permanently unreachable.

## Repeatable awards

```lua
repeatable = true,
maxCompletions = 10,   -- optional cap
```

Progress resets on each completion and any overflow carries into the next run. The menu shows the count.
