Rarity System

Zombies & Dungeon works with an excellent rarity system. You can determine the probability of getting an item according to the rates you add here.

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.

An example table is shown below.

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},
            },
        },
    },
}

Last updated