> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edpets/items/candy-backpacks.md).

# Candy Backpacks

Candy backpacks are **physical, tradeable items** that auto-store found candies. All state — contents *and* per-backpack upgrade levels — lives **inside the item itself**, so trading or storing the item carries everything with it.

Definitions live in `candy-backpacks.yml`; the two menus live with every other layout in `guis/backpack.yml` and `guis/backpack-upgrades.yml`.

```yaml
backpacks:
  common:
    base-capacity: 100
    item:
      material: 'texture-<base64>'
      name: '&7&l✦ Common Candy Bag'
      lore:            # live placeholders: {current} {max} {level} {total_enchants} {upgrades}
        - '&7▸ Capacity: &f{current}&7/&f{max}'
        - '{upgrades}'
```

## Behavior

* **Auto-storage**: any candy the player receives (bin, candy finder, admin gives) goes into a carried backpack first; only overflow lands in the inventory.
* **Right-click** opens the backpack: candies display in configurable slots — left-click takes 1, right-click 10, shift-click all.
* **Death**: backpacks drop like normal items unless the **Soulbound** upgrade is unlocked.

## Upgrades (per backpack item)

| Upgrade     | Effect                                                             |
| ----------- | ------------------------------------------------------------------ |
| `capacity`  | +`increase-per-level` stored candies per level                     |
| `fortune`   | +% bonus candies whenever candy is stored                          |
| `feeder`    | chance per stored candy to feed it straight to a random active pet |
| `blackhole` | unlocks the wipe-contents button in the backpack menu              |
| `soulbound` | keep the backpack on death                                         |

Each upgrade has `max-level`, `price`, `price-increase` and its own [`economy` section](/p/edpets/core/currencies.md). Lore rendering of owned upgrades is controlled by `lore-settings` (order + per-upgrade format).

Give backpacks with `/pets givebackpack <player> <type>`.
