> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/zombies-and-dungeon/rarity-system.md).

# Rarity System

{% hint style="warning" %}
The total amount of the rates you add here must be equal to 100, otherwise it will give an error. For example, all numbers in the common table are equal to 100.
{% endhint %}

An example table is shown below.

```lua
zombie_loot = { -- example data
    ["money"] = {
        rarity = 60,
    },
    ["item"] = {
        rarity = 40,
        ["common"] = {
            rarity = 40,
            ["weapons"] = {
                rarity = 50,
                ["WEAPON_PISTOL"] = {rarity = 30},
                ["WEAPON_COMBATPISTOL"] = {rarity = 25},
                ["WEAPON_SNSPISTOL"] = {rarity = 15},
                ["WEAPON_MOLOTOV"] = {rarity = 15},
                ["WEAPON_SNSPISTOL_MK2"] = {rarity = 10},
                ["WEAPON_MACHETE"] = {rarity = 5},
            },
            ["vehicles"] = {
                rarity = 25, 
                ["vetir"] = {rarity = 40},
                ["winky"] = {rarity = 30},
                ["verus"] = {rarity = 15},
                ["emperor2"] = {rarity = 10},
                ["manchez2"] = {rarity = 5},
            },
            ["others"] = {
                rarity = 25,
                ["ammo_45acp"] = {rarity = 40},
                ["bandage"] = {rarity = 30},
                ["adrenalin"] = {rarity = 15},
                ["stamina"] = {rarity = 10},
                ["ammo_9mm"] = {rarity = 5},
            },
        },
    },
}
```
