# FAQ & Troubleshooting

## General

### Does Lootbags need KyuubiSoft Core?

**Yes.** Core is a required dependency: without it the server does not load Lootbags at all. Opening a bag, `/lbadmin give`, `/lbadmin panel` and pressing F on a placed bag use Core. Core also brings the "Lootbag Admin" entry in its admin menu and the `showcase_lootbag` NPC.

### Does it need DynamicTooltipsLib?

No. With it, bag items get extra tooltip lines (tier, contents, "Right-click to open"). Without it they show Hytale's normal tooltip.

### How many bags are there?

150 shipped bags: 30 styles with 5 tiers each. You can add as many of your own as you like, see [Custom Lootbags](./custom-lootbags).

### Which languages are included?

English, German, French, Spanish, Brazilian Portuguese, Russian, Polish, Turkish and Italian. Players pick theirs with `/kslang <code>`; otherwise their client language is used. See [Configuration](./configuration#languages).

---

## Opening bags

### How do I open a bag?

Hold it in your hand and **right-click**. One bag is used up, its items go into your inventory, and the opening window shows what you got. **Crouch + right-click** places the bag as a block instead.

### Nothing happens when I right-click a bag

- **Cooldown:** between two openings you have to wait `openCooldownMs` (default 1 second).
- **The mod is switched off:** `enabled: false` in `config.json` (admin panel: Settings, "Lootbags active").
- **No permission:** without `ks.lootbag.user.use` the bag is not used up and the player gets "You do not have permission for this.".
- **The item is no bag:** a bag of a custom definition that was deleted can no longer be opened.
- **The bag gives nothing:** if none of its items exists on the server, the bag is kept and the server log says `Lootbag '<id>' has nothing to grant - the bag was not consumed`.

### Can I open several bags at once?

Not in one click. After opening, **Open another (n)** in the opening window opens the next bag of the same kind right there, as long as you carry one.

### My inventory was full. Are the items lost?

No. Everything that did not fit is dropped at your feet. The opening window marks those items "On the ground", and a notification tells you how many there are. Pick them up soon.

### Can I turn the opening window off?

- For yourself: `/kslootbags settings animation off` (on again with `on`). Openings are then listed in the chat.
- For everyone: `revealPageEnabled: false` in `config.json` or "Show result window" in the admin panel's Settings.

---

## Catalog and chances

### What does the percentage in the catalog mean?

It is the **chance per bag**: how likely it is that this item is among the items drawn in one opening. Guaranteed items always show 100 %. For pool items all draws are counted. Example: the shipped Copper bag draws 2 different items from 4 items of equal weight, so each of them is in 50 % of the bags.

### Why is the chance higher than weight divided by the total weight?

Weight divided by the total weight is the chance of **one** draw. Most bags draw several items, and without duplicates every draw takes a drawn item out of the pool, so each remaining item gets more likely. The catalog and the admin panel show the result for the whole bag.

### "Where to find" is missing

The server has turned it off (`showDropSources: false`). If it is shown but says "This bag does not drop anywhere - events or admins hand it out.", no drop rule points to that bag.

### The catalog says "Not owned" although I have the bag

The catalog only counts bags in your inventory. Bags in chests, in a bank or placed as blocks are not counted.

---

## Drops

### How do creature drops work?

When an NPC dies, its role name (for example `Trork_Warrior`) is compared with every pattern in `mobDrops`. Every matching entry rolls its own chance (times `dropMultiplier`). Successful drops land on the ground where the creature died. Every NPC death counts, also when another creature or a pet killed it; player deaths never drop bags.

### How do mining drops work?

When a player breaks a block, its block type ID (for example `Ore_Gold_Basalt`) is compared with every pattern in `blockDrops`, in the same way. The bags appear where the block was. Blocks broken by anything other than a player drop nothing.

### Ore I placed myself never drops bags

That is the placed-block protection (`ignorePlacedBlocks`, on by default). Blocks a player placed drop no bags for 6 hours; the list is cleared by a restart. Switch it off in the admin panel (Drop rules, "Ignore self-placed blocks") if you do not want it.

### Can one kill drop several bags?

Yes. A creature that matches several patterns rolls every matching entry. With the shipped rules a Trork rolls the `*` entry and both `Trork_*` entries.

### How do I run a double-drop event?

Set the drop factor to `2` (admin panel: Drop rules, "Drop factor", then **Save**), or `dropMultiplier: 2.0` in `config.json` and `/lbadmin reload`. The catalog's *Where to find* shows the raised chances at once.

---

## Administration

### How do I give bags to another player?

Use **Give** in the admin panel (`/lbadmin panel`): player name, bag ID and amount. `/lbadmin give` only gives bags to yourself. Both drop what does not fit at the player's feet.

### Where are my edits saved?

All edits of bags (admin panel and `/lbadmin edit`) go to `custom/custom_lootbags.json`. Drop rules go to `configs/drop_tables.json`, settings to `config.json`. The shipped `configs/lootbags.json` is never changed.

### My changes to a JSON file are gone

A save from the admin panel writes what the server has in memory. Run `/lbadmin reload` right after editing a file (or edit while the server is stopped), and only then save in the panel.

### I updated the plugin, but the shipped bags did not change

`configs/lootbags.json` and `configs/drop_tables.json` are only written when they are missing. Delete them (and keep your own changes in `custom/custom_lootbags.json`) to get the shipped versions of a new release.

### Can the Season Pass, quests or shops hand out these bags?

Yes, as **items**: use an item reward with the bag ID, for example `Golden_Lootbag_Legendary`. The Season Pass reward type "lootbag" is something else: it uses KyuubiSoft Core's lootbag templates and gives their contents directly, not a bag of this mod.

---

## Troubleshooting

### "Lootbag not found" or "Invalid item"

IDs are case-sensitive and follow the style's base tier: `Crystal_Lootbag` is the epic Crystal bag, there is no `Crystal_Lootbag_Epic`. `/lbadmin give`, the admin panel's Give and `/kslootbags crate` map such an ID to the bag of the same style and tier; Hytale's `/give` and item rewards of other mods need the real ID. `/lbadmin list` prints every ID. See the table on [the overview page](https://wiki.kyuubisoft.com/hytale/lootbags/#styles-and-tiers).

### The admin panel does not open

- You need `ks.lootbag.admin` (see [Permissions](./permissions)).
- KyuubiSoft Core must be installed. "Player entity not cached." means Core does not know your player yet; try again after a moment.

### A drop rule never drops

- Its bag does not exist: the admin panel shows the rule in red and the server log names it at start ("points to unknown lootbag ... - it never drops").
- The pattern does not match: only `*` alone or a `*` at the end works, and creature patterns use the NPC role name.
- `dropEnabled` is off, the drop factor is `0`, or the block was placed by a player.

### My custom bag is in the catalog but cannot be given or dropped

It has no item. Give it a `visualItemId` (see [Custom Lootbags](./custom-lootbags#the-item-of-a-new-bag)) and run `/lbadmin reload`. Bags created in the admin panel get one automatically.

### The statistics in the admin panel are old

They are counted once after a restart and then kept. Click **Refresh** in the Statistics section.

### Language files were replaced after an update

When the jar brings a newer localization version, the plugin keeps your old file as `<lang>.json.backup-v<n>`. Copy your changes into the new file. Language files are only read at server start.

### Players have old `Easter_*_Lootbag_Common` items

Those items come from older versions. They stay in the game and open the common Easter bag of their style, also as a placed block (F) and in the tooltip. `/lbadmin give` with such an ID gives the current common Easter bag.

### "Lootbags are turned off on this server."

"Lootbags active" (`enabled`) is off. It also closes the catalog: `/kslootbags`, `/kslootbags crate`, the `showcase_lootbag` NPC and "View in catalog" answer with this message. `/kslootbags stats` and `/kslootbags settings` keep working.