> 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/item/itemoptionrate.md).

# ItemOptionRate

<mark style="color:green;">Central probability table used by the server's entire item generation system (</mark><mark style="color:green;">`ItemBag`</mark><mark style="color:green;">,</mark> <mark style="color:green;"></mark><mark style="color:green;">`EventItemBag`</mark><mark style="color:green;">,</mark> <mark style="color:green;"></mark><mark style="color:green;">`ItemDrop.txt`</mark><mark style="color:green;">,</mark> <mark style="color:green;"></mark><mark style="color:green;">`MossMerchant.txt`</mark><mark style="color:green;">, etc.) whenever those files request an item</mark> <mark style="color:green;"></mark><mark style="color:green;">**option**</mark> <mark style="color:green;"></mark><mark style="color:green;">(</mark><mark style="color:green;">`Option0`</mark> <mark style="color:green;"></mark><mark style="color:green;">through</mark> <mark style="color:green;"></mark><mark style="color:green;">`Option6`</mark><mark style="color:green;">). Each block (</mark><mark style="color:green;">`0`</mark> <mark style="color:green;"></mark><mark style="color:green;">to</mark> <mark style="color:green;"></mark><mark style="color:green;">`6`</mark><mark style="color:green;">) corresponds to one type of item option, and each row within a block defines a probability preset. The value specified by other files in their</mark> <mark style="color:green;"></mark><mark style="color:green;">`Option0`</mark><mark style="color:green;">–</mark><mark style="color:green;">`Option6`</mark> <mark style="color:green;"></mark><mark style="color:green;">columns is simply the</mark> <mark style="color:green;"></mark><mark style="color:green;">`Index`</mark> <mark style="color:green;"></mark><mark style="color:green;">of one of these presets.</mark>

### <mark style="color:yellow;">How each row works</mark>

<mark style="color:orange;">After the</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`Index`</mark><mark style="color:orange;">, the remaining columns represent the possible values for that option (for example,</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`+0`</mark><mark style="color:orange;">,</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`+1`</mark><mark style="color:orange;">,</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`+2`</mark><mark style="color:orange;">, etc.). Each cell contains the</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**selection weight**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">for that value. The weights in a row typically add up to</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`10000`</mark><mark style="color:orange;">, and the higher a value's weight, the more likely it is to be selected. A weight of</mark> <mark style="color:orange;"></mark><mark style="color:orange;">`0`</mark> <mark style="color:orange;"></mark><mark style="color:orange;">means that value can never be selected by that preset.</mark>

### <mark style="color:yellow;">The 7 blocks (one for each option type)</mark>

<table data-header-hidden data-search="false"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td>Block</td><td>Option (corresponds to <code>Option0</code>–<code>Option6</code> in other files)</td><td>Possible column values</td></tr><tr><td>0</td><td>Item level (+0 to +15)</td><td><code>+0</code> through <code>+15</code></td></tr><tr><td>1</td><td>Skill option</td><td><code>0</code> or <code>1</code></td></tr><tr><td>2</td><td>Luck option</td><td><code>0</code> or <code>1</code></td></tr><tr><td>3</td><td>Jewel of Life (JoL) option</td><td><code>+0</code>, <code>+4</code>, <code>+8</code>, <code>+12</code>, <code>+16</code>, <code>+20</code>, <code>+24</code>, <code>+28</code></td></tr><tr><td>4</td><td>Excellent option (bitmask)</td><td><code>0</code>, <code>2</code>, <code>4</code>, <code>8</code>, <code>16</code>, <code>32</code>, <code>63</code></td></tr><tr><td>5</td><td>Ancient/Set option</td><td><code>0</code>, <code>1</code>, <code>2</code></td></tr><tr><td>6</td><td>Socket option (number of sockets)</td><td><code>0</code> through <code>5</code></td></tr></tbody></table>

### <mark style="color:yellow;">Common preset indices</mark>

<table data-search="false"><thead><tr><th>Index</th><th>Typical usage</th></tr></thead><tbody><tr><td><code>0</code></td><td>Normal item (regular monster drop)</td></tr><tr><td><code>1</code></td><td>Excellent item</td></tr><tr><td><code>2</code></td><td>Ancient item</td></tr><tr><td><code>3</code></td><td>Chaos Machine combinations</td></tr><tr><td><code>4</code>, <code>5</code>, <code>6</code></td><td>Level 2 / Level 1 / Level 3 Wing combinations</td></tr><tr><td><code>7</code></td><td>Monster Wing combination</td></tr><tr><td><code>8</code></td><td>Socket weapon combination</td></tr><tr><td><code>9</code></td><td>Moss Merchant</td></tr><tr><td><code>10</code></td><td>Lucky Item</td></tr><tr><td><code>11</code> and above</td><td>Presets used by <code>EventItemBag</code>—each one locks a specific value or allows only a narrow range of values (see the comments for each row in the file).</td></tr></tbody></table>

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

* When another file uses `*` in an `Option0`–`Option6` column, the server **does not look up this file**. That option is simply left at its default value, regardless of what is defined here.
* Presets `11` and above (used by `EventItemBag`) typically force a single value with a 100% chance or distribute the probability almost evenly across a small range of two or three values. This is how a reward bag can guarantee, for example, that it always generates an item at exactly `+3`.
* Editing the weights in this file changes the probability for **every item on the server** that references the corresponding `Index`. These presets are shared globally and are not specific to any individual item.
