Guide

Loot pools

Shared loot lists for all the event mods. Fill a pool once, then each mod just says which pools to use and how many items.

The idea

Instead of a big loot list in every mod, the items live in pools: one file per kind of loot (Medical, Pistols, Food...). A mod's settings just say "take 2 to 4 items from Medical, 1 from Pistols". Change a pool once and every event that uses it gets the change.

The files

FileWhat's in it
ServerProfile\Hunter_Mods\LootPools\LootPools.jsonThe list of pools that are turned on.
ServerProfile\Hunter_Mods\LootPools\Pools\<Name>.jsonOne file per pool: the items in it.
LootPools.json8 lines
{
    "LootPools": [
        "Pistols",
        "Medical",
        "Food",
        "MyRareStuff"
    ]
}
  • Only the pools in this list get loaded. A file in the Pools folder that isn't listed is ignored (you'll see a line about it in the HM log).
  • Capital letters don't matter: medical finds Medical.json.
  • The files are only read when the server starts. Change something, restart.

What a pool file looks like

A pool is a list of items. Each item has these fields:

FieldWhat it does
nameThe item's classname.
quantityHow many of this item you get when it's picked. 0 means 1. See Quantity and amount.
amountHow full each one is: bullets, stack size or %. 0 means full. See Quantity and amount.
chanceHow often this item gets picked compared with the others in the pool. 0 means never.
minHealthMinimum condition, from 0 (ruined) to 1 (pristine).
maxHealthMaximum condition, from 0 (ruined) to 1 (pristine). It picks a random value between the two.
attachmentsItems that come attached to it or inside it (classnames).
Pools\HuntingRifles.json29 lines
[
    {
        "name": "Izh18",
        "quantity": 1,
        "amount": 0,
        "chance": 1.0,
        "minHealth": 0.5,
        "maxHealth": 1.0,
        "attachments": []
    },
    {
        "name": "Ruger1022",
        "quantity": 1,
        "amount": 0,
        "chance": 0.7,
        "minHealth": 0.5,
        "maxHealth": 1.0,
        "attachments": [ "Mag_Ruger1022_15Rnd" ]
    },
    {
        "name": "B95",
        "quantity": 1,
        "amount": 0,
        "chance": 0.36,
        "minHealth": 0.5,
        "maxHealth": 1.0,
        "attachments": []
    }
]

Here the Izh18 shows up the most, the Ruger about 70 % as often, and the B95 about a third as often. The Ruger always comes with a magazine. Every gun is between half and full health.

Using pools in a mod

In a mod's settings, lootPools is a list of pools with a minimum and a maximum number of items:

HM_Settings_Ambulance.json5 lines
"lootPools": [
    { "pool": "Medical", "min": 2, "max": 4 },
    { "pool": "Drinks", "min": 1, "max": 1 },
    { "pool": "Food", "min": 0, "max": 2 }
]
  • pool: the pool's name, as written in LootPools.json.
  • min: these items always spawn.
  • max: the maximum. Anything above the minimum is down to luck (see below).
  • The list is filled from top to bottom. If the container gets full, the pools at the top win, so put the important stuff first.
  • The same item can show up twice in one container.

In this example the ambulance always has 2 medical items (sometimes 3 or 4), always 1 drink, and 0 to 2 food items.

How min, max and chance work together

  1. 1The min items always spawn.
  2. 2Each extra slot between min and max gets one roll. The chance of filling it is the pool's average chance (common items count more in that average).
  3. 3Every item is picked by its chance: an item with 1.0 shows up 10 times as often as one with 0.1.

What that means in practice:

  • A pool of common items (chances close to 1) usually fills all its extra slots.
  • A pool where everything has 0.2 fills each extra slot only 1 time in 5.
  • So a pool of rare items stays rare, even with a big max.
  • Want something guaranteed? Put it in min.

Making your own pool

  1. 1Make a new file in the Pools folder, for example Pools\MyRareStuff.json, with your items (copy an existing pool file to start).
  2. 2Add "MyRareStuff" to the list in LootPools.json.
  3. 3Use it in any mod: { "pool": "MyRareStuff", "min": 0, "max": 1 }.
  4. 4Restart the server.
Pools\MyRareStuff.json4 lines
[
    { "name": "NVGoggles", "quantity": 1, "amount": 0, "chance": 0.3, "minHealth": 0.7, "maxHealth": 1.0, "attachments": [ "Battery9V" ] },
    { "name": "GoldBar", "quantity": 1, "amount": 0, "chance": 0.1, "minHealth": 1.0, "maxHealth": 1.0, "attachments": [] }
]

Items from other mods work too, as long as that mod is loaded on the server.

When something's wrong

  • A pool name with a typo, or a pool that isn't in LootPools.json: you get a warning in the HM log when the server starts, and that line is skipped. The rest of the loot still spawns.
  • A pool file with a JSON mistake (a missing comma...): it's skipped with an error in the HM log.
  • A mod with an empty lootPools list: a warning in the HM log, and its containers stay empty.
  • A classname that doesn't exist: that item just doesn't spawn.

The default pools

The first time the server starts (when LootPools.json doesn't exist yet), Hunter Mods Core writes LootPools.json and these 51 pools, filled with vanilla items and vanilla-like chances:

PistolsSMGsAssaultRiflesMarksmanRiflesBoltRiflesHuntingRiflesShotgunsSpecialWeaponsMeleeWeaponsKnivesAmmoMagazinesOpticsMuzzlesButtstocksHandguardsWeaponAccessoriesTopsMilitaryTopsCivilianPantsMilitaryPantsCivilianHatsMilitaryHatsCivilianHelmetsMilitaryHelmetsCivilianShoesMilitaryShoesCivilianGlovesMilitaryGlovesCivilianMasksMilitaryMasksCivilianVestsMilitaryVestsCivilianBackpacksMilitaryBackpacksCivilianEyewearBeltsGearAttachmentsMedicalFoodDrinksCookingSurvivalFarmingLightsElectronicsToolsGrenadesExplosivesBaseBuildingFlags
  • Your own changes are safe: a pool file that already exists is never overwritten.
  • Want the defaults back? Delete LootPools.json and the pool files you want reset, then restart.