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

Patches

Tweak the numbers of items, recipes, buffs and enemies the game already has.

Patches let you change things the game already has instead of adding new ones: give the Iron Sword a better crit chance, make a recipe craftable a level earlier, or lower the Zombie’s health. Each entry names a target and the fields to change.

So that no single mod can break the game, only a short list of fields can be changed, and only by a limited amount: a number that already exists can be moved to between 0.25 and 4 times its original value.

In the editor#

Open the Base game tweaks tab, which sits in the Rules group in the left column, and press Add. Each entry is named after the thing it changes.

FieldWhat it does
What to changeFirst pick a kind: Item, Recipe, Buff or Creature. Then pick one from the base game. Things from your own mod are edited on their own tabs.
New valuesOnly the fields you touch change, and the form shows "Base X → Y" so you see the original. For an item: Stats it already has, Add stats it does not have, and colours (Main color, Model color, Second color). For a recipe: Level needed, Amount made, and Materials (Change materials or Keep base materials). For a buff: the Effects it already has, and Add effects it does not have. For a creature: Health, Damage, Walk speed, Chase speed, Attack interval and Size.

Numbers that already exist can move between 0.25 times and 4 times the original. This tab has no preview. To test, press the top-bar Test.

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.patches in mod.json.

Smallest working example#

One entry for each kind of target: add crit and a new colour to the Iron Sword, lower the Iron Sword recipe to level 3, make the base game "Might" meal buff +6% attack, and set the Zombie’s health to 60:

data/patches.json
[
  { "target": "item:iron_sword", "set": { "stats": { "crit": 6 }, "color": "#ffd27a" } },
  { "target": "recipe:recipe_iron_sword", "set": { "requiredLevel": 3 } },
  { "target": "buff:meal_might", "set": { "effects": { "powerPct": 6 } } },
  { "target": "species:ZOMBIE", "set": { "maxHp": 60 } }
]

Fields#

FieldRequired?What it meansAllowed values
targetYesWhat to change, written as "kind:id"item:id recipe:id buff:id species:id. The id is a base game one, your own, or @modid/name
setYesThe fields to change and their new values, at least oneSee the table below; it depends on the kind

What each kind can change#

KindFields you can change
itemAny field inside stats (same ranges as Items; you can also write them straight in set, where damage and attack count as power and defense counts as armor), plus color, modelColor, secondaryColor
reciperequiredLevel (1 to 200), outputCount (1 to 99), ingredients (1 to 8 entries, same format as Recipes)
buffAny field inside effects (same ranges as Buffs)
speciesmaxHp, damage, walkSpeed, chaseSpeed, attackCooldownSec, scale

The rules for changing a number:

  • A number that already exists and is not 0 can only become 0.25 to 4 times the original. For example, if an enemy has 100 health, you can only set it between 25 and 400.
  • A number that is 0 has to stay 0.
  • A field the thing did not have before (for example crit on a sword that had none) uses that field’s own absolute range, such as 0 to 60 for crit.
  • Any field outside the list is refused with "cannot be changed by mods".

How it points at other things#

  • The id in target: a base game id (item:iron_sword, species:ZOMBIE, with creatures in capitals), your own local id, or @modid/name.
  • When you change a recipe’s ingredients, each item can be a base game id, your own, or @modid/name.
  • Base game recipe ids usually start with recipe_, for example recipe_iron_sword.
  • Patches are applied after items and buffs load but before recipes load, so inside one mod a recipe target can only point at a base game recipe (or one from a mod that loads earlier).

Common mistakes#

  • A target without a colon, or with a wrong kind (such as weapon:iron_sword). The game says it does not understand the target and tells you to write item:name, recipe:name, buff:name or species:name.
  • Changing too much: setting 100 health to 1000 gives "can only be changed to 0.25 to 4 times the original (original 100, wanted 1000)".
  • Changing a field outside the list, such as putting name in set. The game says that field cannot be changed by mods. Use a translation file to rename things.
  • An empty set ({}). The game says this entry does not change anything.
  • A misspelled target id. The game says there is no item, buff or creature called "something".
  • Items, Recipes, Buffs: the ranges for each field.
  • Species: when you want a new enemy rather than changing the original one.
  • Rule packs: scale all enemy health and damage at once.
  • The mod editor: build this kind of content with forms and test it in the game.