> 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/config-files/menus/disenchant.yml.md).

# disenchant.yml

The disenchant menu lets a player remove one purchased enchant level and receive a refund. Open it with `/hoedisenchant`, or from a button using the `OPEN_DISENCHANT` action in `menus/main.yml`.

`title` sets the heading and `layout` sets the slot grid. `main-menu-item` is the back button. `disenchant-items` holds one entry per enchant, and each entry's `key` must match a character in `layout`.

| Field                                         | Purpose                                                                      |
| --------------------------------------------- | ---------------------------------------------------------------------------- |
| `display-name`, `lore`, `description`         | Text for the button.                                                         |
| `material`, `skull`, `data`, `glow`           | Appearance when no provider item is set.                                     |
| `nexo-item`, `oraxen-item`, `itemsadder-item` | Use a custom item instead. Set only one.                                     |
| `key`                                         | Slot character from `layout`.                                                |
| `enchant`                                     | Enchant ID this button removes a level from.                                 |
| `refund-min-percent`, `refund-max-percent`    | Refund range for this enchant, as a percentage of that level's upgrade cost. |

The refund is randomised inside the configured range and rounded to a whole number; the default range is 40–65%. Levels cannot drop below the enchant's base level, and a failed refund leaves the enchant untouched. Refunds go back to the currency provider used for upgrades.

Lore placeholders: `{level_ENCHANT}`, `{max_level_ENCHANT}`, `{progress_ENCHANT}`, `{refund_ENCHANT}`, `{min_refund_percent_ENCHANT}`, `{max_refund_percent_ENCHANT}`, `{tokens}`, `{prestige}`. Replace `ENCHANT` with the enchant ID.

```yaml
title: Disenchant
layout:
  - '         '
  - '  abcde  '
  - '  fghij  '
  - '    k    '
  - '<       x'
disenchant-items:
  - display-name: '&6&l✦ Token Finder'
    key: a
    enchant: token_finder
    refund-min-percent: 40.0
    refund-max-percent: 65.0
```
