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.
| Field | What it does |
|---|---|
| Type | Meal, 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. |
| Name | The name shown on screen (Other languages underneath). |
| Effects | Set 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:
[
{
"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#
| Field | Required? | What it means | Allowed values |
|---|---|---|---|
id | Yes | The buff’s name inside your mod | Starts with a lowercase letter or digit; only lowercase letters, digits and underscores; up to 48 characters |
name, names | At least one | Name shown in the effects list on your character | Up to 32 characters each |
slot | Yes | Which slot it takes. Only one buff per slot is active, and a new one replaces the old one (except rest) | meal, tonic, rest |
effects | Yes | The effects, at least one | Only 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.
| Effect | Meaning | Range |
|---|---|---|
powerPct | Attack power bonus, % | 0 to 20 |
critAdd | Critical hit bonus | 0 to 15 |
maxHpPct | Max health bonus, % | 0 to 30 |
moveSpeedPct | Move speed bonus, % | 0 to 20 |
staminaRegenMult | Stamina recovery multiplier | 0.5 to 2 |
dodgeStaminaMult | Stamina cost of dodging, multiplier (lower is cheaper) | 0.5 to 1.5 |
hpRegenMult | Health regeneration multiplier | 0.5 to 3 |
hpRegenDelayMs | Delay before healing starts after being hurt, in milliseconds | 1000 to 20000, whole number |
damageTakenMult | Damage taken multiplier (lower is tougher) | 0.7 to 1.3 |
gatherSpeedPct | Gathering speed bonus, % | 0 to 20 |
swimSpeedPct | Swim speed bonus, % | 0 to 30 |
skillXpPct | Skill experience bonus, % | 0 to 30 |
fireResistPct | Fire resistance, % | 0 to 30 |
frostResistPct | Cold resistance, % | 0 to 30 |
poisonResistPct | Poison resistance, % | 0 to 30 |
stormResistPct | Storm resistance, % | 0 to 30 |
coldFillMult | How fast the cold meter fills, multiplier (lower is warmer) | 0.25 to 2 |
heatFillMult | How fast the heat meter fills, multiplier (lower is cooler) | 0.25 to 2 |
nightVision | Night vision | 0 to 1 |
waterBreathing | Breathing underwater | 0 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"insideuse. - A dish:
"buff": "hearty_frost". - Another mod can use your buff by writing
@yourmodid/frost_ward, and must list your mod in itsdependsOn. - To change the numbers of a base game buff, use Patches.
Common mistakes#
- Leaving out
slotoreffects, or leavingeffectsempty. The game says: this buff has no effect. - A
slotsuch assatietyor anything else. Onlymeal,tonicandrest. - An effect name that is not in the table, such as
attackPct. The game says "effects.attackPct" cannot be changed by mods. UsepowerPct. - 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.
Related pages#
- 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.