> For the complete documentation index, see [llms.txt](https://docs.mantic.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mantic.dev/mantichoes/enchant-rewards.md).

# Enchant rewards

Every enchant in `enchants.yml` can pay its reward in three ways, set per enchant with `command-dispatch-type`. The mode applies only to `commands`; built-in token, money, XP and item rewards still run normally.

| Mode     | Behaviour                                 |
| -------- | ----------------------------------------- |
| `ALL`    | Runs every configured command.            |
| `RANDOM` | Picks one command with equal odds.        |
| `CHANCE` | Picks one command using relative weights. |

The choice is made only after the enchant's own activation chance succeeds, so a 5% enchant with weighted commands still fires rarely — the weights only decide which reward it pays when it does.

## Weighted rewards

Append `CHANCE:<weight>` to each command. Weights are relative, so they do not need to add up to 100:

```yaml
command-dispatch-type: CHANCE
commands:
  - 'eco give {player} 100 CHANCE:90'
  - 'eco give {player} 1000 CHANCE:10'
```

Here the first reward is nine times as likely as the second. A command without a weight counts as `100`, which makes it a useful baseline when you only want to weight one option.

## Permission-based overrides

To pay different rewards by rank, keep the normal commands as the fallback and add `permission-command-overrides` at the same indentation:

```yaml
command-dispatch-type: ALL
commands:
  - 'token give {player} 1'
permission-command-overrides:
  - permission: rewards.vip
    commands:
      - 'token give {player} 3'
  - permission: group.rookie
    commands:
      - 'token give {player} 2'
```

Rules that matter in practice:

* Only the **first** permission the player has is used, so put the highest reward first — ranks commonly inherit permissions.
* Matching commands **replace** the normal list rather than running in addition to it.
* With no match, the normal commands run.
* A matching `commands: []` runs nothing at all.

Avoid paying the same currency through both the built-in enchant amounts and commands unless that is what you want.

See enchants.yml for the per-enchant fields.
