Mods are a feature of the full game, not the demo. They open when the full game launches, and details may change before then.

Loot

Add extra drops to an enemy: what drops, how often, how many, and from what level.

The loot table adds drops on top of what an enemy already drops. The original drops stay, and you simply give that enemy an extra list. The enemy can be a base game one or a creature you added.

In the editor#

Open the Loot tab, which sits in the Rules group in the left column, and press Add. Each entry is named after the enemy.

FieldWhat it does
Which enemyBeating this enemy also drops the items below. Mod creatures work too.
Extra dropsUp to 16 rows, and each row rolls its own chance. A row has: Item (a base item or one from this mod), Drop chance (per kill; 1 means it always drops, and the form shows it as "about 1 in N"), At least, At most, and Enemy level at least (leave empty for no limit).

The right column shows bars for each drop: how often it drops and how many you get.

To test, press the top-bar Test, then beat that enemy in the test arena a few times.

Advanced: writing the JSON by hand#

Below is the same content as it looks in the file. The editor saves exactly this format. You can also press Open folder at the top of the editor and edit the file in an outside text editor; when you save, the editor picks up the change. Fields the form does not show are kept as they are. Where the file goes and how it is listed: Mod folder and mod.json.

The table is one JSON file; put its path under content.loot in mod.json.

Smallest working example#

Give the Frost Wolf a 50% chance of dropping 1 to 2 wolf pelts, plus a 10% chance of raw meat, but only from enemies of level 5 or higher:

data/loot.json
[
  {
    "enemy": "FROST_WOLF",
    "drops": [
      { "item": "wolf_pelt", "chance": 0.5, "min": 1, "max": 2 },
      { "item": "raw_meat", "chance": 0.1, "min": 1, "max": 1, "minLevel": 5 }
    ]
  }
]

Fields#

FieldRequired?What it meansAllowed values
enemyYesWhich enemy gets the extra dropsA base game creature id in capitals (for example ZOMBIE, WOLF, FROST_WOLF), the local id of a creature you added, or @modid/name
dropsYesThe list of extra drops1 to 16 entries
drops[].itemYesWhat dropsAn item id: base game, your own, or @modid/name
drops[].chanceYesDrop chance; 1 means always0.001 to 1
drops[].minNoFewest droppedWhole number, 1 to 99. Default 1
drops[].maxNoMost droppedWhole number, 1 to 99, not below min. Same as min if missing
drops[].minLevelNoThe enemy must be at least this level for this dropWhole number, 1 to 200

How it points at other things#

  • For a base game creature, write its id in capitals. For one of your own creatures, write the local id from your species table.
  • item can be anything of yours: an item, a fish, a dish, or a crop seed (<crop id>_seed). Loot loads late inside a mod, so all of these can be found.
  • Something from another mod is written @modid/name, and that mod must be in dependsOn.

Common mistakes#

  • Leaving out chance. Every drop needs one.
  • Writing chance as 50 thinking it means 50%. Chances are 0 to 1, so half is 0.5. Below 0.001 is not allowed either.
  • max smaller than min.
  • An empty drops list, or more than 16 entries.
  • A creature id in lowercase (zombie). Base game creatures are in capitals, ZOMBIE. The game says there is no creature called "zombie".
  • A misspelled item id. The game says there is no item called "something".
  • Items: the things you want to drop.
  • Species: your own enemies, which can list their own drops directly.
  • Dishes: a dropped dish has to exist first.
  • The mod editor: build this kind of content with forms and test it in the game.