> For the complete documentation index, see [llms.txt](https://changelog.matrixemulator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changelog.matrixemulator.com/welcome/server/muserver/data/eventitembag/advanced-eventbag.md).

# Advanced EventBag

<mark style="color:green;">Advanced reward bag format: supports multiple independent drop groups, separate item tables, and class restrictions. The number at the beginning of the filename (</mark><mark style="color:green;">`000 -`</mark> <mark style="color:green;"></mark><mark style="color:green;">,</mark> <mark style="color:green;"></mark><mark style="color:green;">`007 -`</mark> <mark style="color:green;"></mark><mark style="color:green;">, etc.) must match the</mark> <mark style="color:green;"></mark><mark style="color:green;">`Index`</mark> <mark style="color:green;"></mark><mark style="color:green;">of a row in</mark> [<mark style="color:green;">EventItemBagManager.txt</mark>](https://chatgpt.com/EventItemBagManager.txt.md)<mark style="color:green;">. This link determines which event or monster uses which bag.</mark>

### <mark style="color:yellow;">Section 3 — Bag drop group(s)</mark>

| Column        | Accepted values               | Description                                                                                                                                             |
| ------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Index         | Number                        | Identifies this drop group. A file may contain multiple Block 3 sections, each with its own `Index`. Each group performs its own independent drop roll. |
| Rate          | Number, scale from 0 to 10000 | Chance for this group to drop something.                                                                                                                |
| DropInventory | `0` or `1`                    | `1` = attempts to place items directly into the inventory. `0` = always drops them on the ground.                                                       |

### <mark style="color:yellow;">Section 4 — What each group can drop</mark>

<table data-search="false"><thead><tr><th>Column</th><th>Accepted values</th><th>Description</th></tr></thead><tbody><tr><td>Index</td><td>A Block 3 <code>Index</code> value</td><td>Specifies which drop group this row belongs to.</td></tr><tr><td>Section</td><td>Number of an item table block (5 or higher, see below)</td><td>Item table used when this row is selected.</td></tr><tr><td>Rate</td><td>Number (weight)</td><td>Selection weight for this row, compared only against other rows with the same <code>Index</code>.</td></tr><tr><td>Zen</td><td>Number</td><td>Zen dropped if the referenced item table (<code>Section</code>) does not exist or is empty. Acts as a fallback.</td></tr><tr><td>DropCount</td><td>Number</td><td>Number of times this row performs its drop roll.</td></tr><tr><td>Coin1 / Coin2 / Coin3</td><td>Number</td><td>WCoinC / WCoinP / Goblin Point granted when this row is selected.</td></tr><tr><td>Options</td><td>Number (sum of flags)</td><td><code>1</code> = trigger fireworks · <code>2</code> = evaluate the class of any party member, not only the player receiving the drop · <code>4</code> = drop <strong>every</strong> item from the selected table (<code>Section</code>) instead of choosing only one · <code>8</code> = also generate a random Ancient/Set item. Combine flags by adding their values (e.g. <code>1 + 8 = 9</code>).</td></tr><tr><td>DW / DK / FE / MG / DL / SU / RF</td><td><code>0</code>, <code>1</code>, <code>2</code>, or <code>3</code></td><td>Class restriction: <code>0</code> = this class cannot receive the drop. <code>1</code>, <code>2</code>, or <code>3</code> = available starting from the 1st, 2nd, or 3rd class advancement for that class.</td></tr></tbody></table>

### <mark style="color:yellow;">Section 5 (or any number ≥ 5) — Item table</mark>

<mark style="color:orange;">The block number is not fixed to</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`5`</mark><mark style="color:orange;">—it may be</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`5`</mark><mark style="color:orange;">,</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`6`</mark><mark style="color:orange;">,</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`7`</mark><mark style="color:orange;">, etc. Each block represents a different item table, selected through the</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`Section`</mark> <mark style="color:orange;"></mark><mark style="color:orange;">column in Block 4.</mark>

| Column            | Accepted values                                                                                            | Description                                                                                                                                                                                       |
| ----------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Index             | Either a single number (direct item code) **or** two comma-separated numbers (`group,index`, e.g. `14,14`) | The item. The comma-separated form builds the item code from the item group and item index, just like the `Index`/`Item` pair in the Standard format.                                             |
| Level             | Number                                                                                                     | Item level.                                                                                                                                                                                       |
| Grade             | Number                                                                                                     | For stackable items (such as jewels), this is the **stack size**. For equipment, it is used as an alternative Excellent option only if `Option4` does not generate one.                           |
| Option0 – Option6 | Number, or `*`                                                                                             | Each option controls one item attribute (level, skill/luck/additional option, excellent, ancient/set, socket, etc.) through a probability table defined in another file. `*` = no option applied. |
| Duration          | Number, in seconds, or `0`                                                                                 | If greater than `0`, the item expires and disappears after that amount of time. `0` = permanent item.                                                                                             |
| Comment           | Text after `//`                                                                                            | Free comment, ignored by the game.                                                                                                                                                                |

### <mark style="color:yellow;">Notes</mark>

* If this format (Blocks 3/4/5+) contains any content, the server **completely ignores** the Standard format (Blocks 0/1), even if both are populated in the same file. See [EventItemBag - Standard](https://chatgpt.com/c/EventItemBag%20-%20Standard.md). Never use both formats in the same file.
* `Options` (Block 4) is a bitmask represented as the sum of flags, allowing multiple behaviors to be combined in a single value.
* `Grade` (Block 5+) changes its meaning depending on the item type: for jewels and other stackable items it represents the stack size, while for equipment it serves as a fallback Excellent option.
