> 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/devilenchants/scrolls-and-rarities.md). Agents can also search and read this documentation through its [MCP server](https://docs.mantic.dev/~gitbook/mcp).

# Scrolls & Rarity Shop

## Rarity shop

Fresh configs enable `use-rarity-menu: true`.

Run `/de`, then **left-click** a rarity to preview its books or **right-click** to buy a random book from that group using XP points.

The default groups are Common, Uncommon, Rare, Epic and Legendary. Tier assignments determine which books belong to each group; weights determine how often eligible results are selected.

Open **/de editor → Rarity Manager** to edit groups, prices, tier assignments and roll weights. Existing custom rules are preserved. Standard five-group setups receive assignments for previously unassigned new PvP enchants.

The **Utilities** chest opens the scroll shop, merger and disenchanter. Back returns to the screen that opened Utilities, including the rarity hub.

In the **Scroll Shop**, Back returns to Utilities when opened there. Utilities keeps its original return destination, so opening the scroll shop does not lose your route back to the rarity hub or classic shop.

If you open the scroll shop directly with `/de scrolls`, Back returns to the main shop selected by `use-rarity-menu`.

## Black Scrolls

A Black Scroll extracts one random eligible DevilEnchant and returns its book at the same tier. Other enchants and item metadata remain.

1. Buy a scroll with `/de scrolls`.
2. Close the shop.
3. Pick up the scroll and left-click one piece of equipment in your own inventory.

Targets without eligible enchants keep the scroll. Administrators can exclude enchants from extraction.

## White Scrolls

A White Scroll marks equipment as protected. It prevents destruction during a failed book application. Successful applications retain protection.

Protection is consumed on the next failed attempt by default. Set `scrolls.consume-white-protection-on-failure: false` for reusable protection. Applying another White Scroll to an already protected item keeps the extra scroll.

Equipment destruction is disabled by default, so White Scrolls become useful when your server enables a destruction chance.

## Failure rules

* Fresh enchant settings use 85% book success.
* `consume-failed-books: true` consumes failed books even when equipment survives.
* `scrolls.destroy-chance: 0.0` keeps equipment safe.
* A positive destruction chance rolls only after application fails.
* Destroyed equipment always consumes the attempted book.
* White Scroll protection saves the equipment, independently of the configured book-consumption policy.

For example, a 25% destruction chance is `0.25`. It is a chance after failure, not on every book application.

## Scroll items and shop

Scroll appearance, prices and the shop layout live under `scrolls` in `config.yml`:

```yaml
scrolls:
  black-scroll-enabled: true
  white-scroll-enabled: true
  shop-enabled: true
  black-scroll-cost: 1000
  white-scroll-cost: 500
  shop-layout:
    - 'xxxxxxxxx'
    - 'xxbxxxwxx'
    - 'xxxxaxxxx'
  black-scroll-item:
    material: PAPER
    data: 0
    glow: false
    skull-data: ''
  white-scroll-item:
    material: PAPER
    data: 0
    glow: false
    skull-data: ''
  use-sound: LEVEL_UP
  purchase-sound: LEVEL_UP
  black-scroll-world-blacklist: []
  white-scroll-world-blacklist: []
  extraction-blacklist: []
```

* Costs are XP points. `shop-enabled: false` closes the shop without disabling scrolls players already own.
* `shop-layout` takes 1–6 rows of exactly nine characters: `b` is the Black Scroll, `w` the White Scroll, `a` the back button and `x` filler. Fillers and the back button use `shop-filler-item` and `shop-back-item`; set `material: ''` to hide a decoration.
* `black-scroll-item` and `white-scroll-item` set the material, `data` (custom model data on 1.14+), glow and an optional Base64 `skull-data`. Use **Use Item in Hand** in the editor to copy a full custom item, metadata included.
* World blacklists stop purchases and applications in those worlds. Admin giving still works, and existing protection stays active.
* `extraction-blacklist` lists enchants that Black Scrolls must leave on the item, for example `[Venom, Rage]`. If every enchant is excluded, the item and scroll are kept.
* `white-scroll-lore` accepts `{protection_usage}`, which inserts `single-use-protection-lore` or `reusable-protection-lore` to match the configured behaviour.

## Admin commands

Give scrolls with:

```
/de givescroll PlayerName black 1
/de givescroll PlayerName white 8
```

Amounts are 1–64. Giving requires `devilenchants.give`.

Invalid targets keep the scroll. When inventory space is unavailable, normal item delivery drops rewards nearby; leave room before buying or extracting.
