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

Buffs

Define an effect you get from eating, drinking or resting, such as more health or cold resistance.

A buff is a temporary boost on your character: the effect from a cooked meal or from a tonic is a buff. The buffs table lets you write new ones, which you then attach to a consumable item or a dish. The ranges are kept in the same league as the base game’s potions and meals, so one mod cannot make you unbeatable.

In the editor#

Open the Buffs tab under Food & gathering in the left column. Press Add to start a new buff, or Copy from game to start from a base game buff.

FieldWhat it does
TypeMeal, Potion or Rest. Only one meal or potion effect works at a time, and a new one replaces the old. Rest effects can stack with others.
NameThe name shown on screen (Other languages underneath).
EffectsSet at least one; clear a field to leave that effect out. Each one has a hint with its unit. You can set: Attack, Crit chance, Max health, Move speed, Stamina recovery, Dodge stamina cost, Natural healing, Healing delay, Damage taken, Gathering speed, Swim speed, Skill XP, Fire resistance, Frost resistance, Poison resistance, Storm resistance, Chill buildup, Heat buildup, Night vision and Water breathing.

This tab has no preview. To test, press the top-bar Test, then eat or drink the item that carries the buff.

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

Smallest working example#

Two buffs: a tonic, "Frost ward", that adds 15% cold resistance, and a meal, "Warm belly", that adds 6% max health and speeds up healing a little:

data/buffs.json
[
  {
    "id": "frost_ward",
    "slot": "tonic",
    "name": "Frost ward",
    "names": { "zh-TW": "霜護" },
    "effects": { "frostResistPct": 15, "coldFillMult": 0.6 }
  },
  {
    "id": "hearty_frost",
    "slot": "meal",
    "name": "Warm belly",
    "names": { "zh-TW": "暖胃" },
    "effects": { "maxHpPct": 6, "hpRegenMult": 1.2 }
  }
]

Fields#

FieldRequired?What it meansAllowed values
idYesThe buff’s name inside your modStarts with a lowercase letter or digit; only lowercase letters, digits and underscores; up to 48 characters
name, namesAt least oneName shown in the effects list on your characterUp to 32 characters each
slotYesWhich slot it takes. Only one buff per slot is active, and a new one replaces the old one (except rest)meal, tonic, rest
effectsYesThe effects, at least oneOnly the fields in the table below, each with its own range

Effects#

Names with Pct are percentages (10 means +10%). Names with Mult are multipliers (1 is no change, 1.2 is 20% more). A value out of range is never quietly clamped; the entry is skipped and you are told why.

EffectMeaningRange
powerPctAttack power bonus, %0 to 20
critAddCritical hit bonus0 to 15
maxHpPctMax health bonus, %0 to 30
moveSpeedPctMove speed bonus, %0 to 20
staminaRegenMultStamina recovery multiplier0.5 to 2
dodgeStaminaMultStamina cost of dodging, multiplier (lower is cheaper)0.5 to 1.5
hpRegenMultHealth regeneration multiplier0.5 to 3
hpRegenDelayMsDelay before healing starts after being hurt, in milliseconds1000 to 20000, whole number
damageTakenMultDamage taken multiplier (lower is tougher)0.7 to 1.3
gatherSpeedPctGathering speed bonus, %0 to 20
swimSpeedPctSwim speed bonus, %0 to 30
skillXpPctSkill experience bonus, %0 to 30
fireResistPctFire resistance, %0 to 30
frostResistPctCold resistance, %0 to 30
poisonResistPctPoison resistance, %0 to 30
stormResistPctStorm resistance, %0 to 30
coldFillMultHow fast the cold meter fills, multiplier (lower is warmer)0.25 to 2
heatFillMultHow fast the heat meter fills, multiplier (lower is cooler)0.25 to 2
nightVisionNight vision0 to 1
waterBreathingBreathing underwater0 to 1

How it points at other things#

A buff does not point at anything itself. Other tables point at it, using its local id:

  • A consumable item: "buff": "frost_ward" inside use.
  • A dish: "buff": "hearty_frost".
  • Another mod can use your buff by writing @yourmodid/frost_ward, and must list your mod in its dependsOn.
  • To change the numbers of a base game buff, use Patches.

Common mistakes#

  • Leaving out slot or effects, or leaving effects empty. The game says: this buff has no effect.
  • A slot such as satiety or anything else. Only meal, tonic and rest.
  • An effect name that is not in the table, such as attackPct. The game says "effects.attackPct" cannot be changed by mods. Use powerPct.
  • A value out of range, such as powerPct: 50. That field must be between 0 and 20.
  • A decimal in hpRegenDelayMs. It has to be a whole number.
  • Items: make a tonic that gives this buff.
  • Dishes: make a meal that gives this buff.
  • Patches: change the numbers of a base game buff.
  • The mod editor: build this kind of content with forms and test it in the game.