
FoodKnowledge
Easily extend Valheims cooking with YAML. Supports food buffs and custom icons. Server-synced and locked in multiplayer.Description
Food Knowledge adds new foods and recipes through YAML, using Valheim's native inventory and crafting menus. Customize food stats, healing, temporary skill bonuses, models, icons and crafting requirements. During online play, food definitions are synced from the server. Icons sync once when joining unless the server enables Live Reload; tooltip visibility stays local.
Overview
| Feature | Description |
|---|---|
| New food recipes | Define new items without changing existing vanilla foods or recipes. |
| Native crafting | Use inventory crafting or one or more specified crafting stations, with ingredient discovery and station-level requirements. |
| Food customization | Set health, stamina, eitr, healing, duration, weight, stack size and crafting output. |
| Temporary skill bonuses | Add vanilla skill levels for the full food duration, including foods with no health, stamina or eitr. |
| Buff display | Modifier foods show an icon and timer, with automatic or custom text in Active effects. |
| Models and icons | Choose an existing item's 3D model and add a matching PNG icon; missing assets use boar meat. |
| Multiplayer | The server controls food definitions and icon synchronization; matching versions are required. |
Configuration and values
Edit BepInEx/config/dannanboi.foodknowledge.cfg. Food definitions are stored separately in BepInEx/config/FoodKnowledge/. Offline play uses local files; multiplayer uses the server's definitions and icons without overwriting the client's files.
| Section / option | Default | Meaning |
|---|---|---|
[General] Enabled |
true |
Local startup switch. Changing it requires restarting the game or server. |
[Settings] Live Reload |
false |
Server-controlled live synchronization of PNG additions, replacements and deletions. YAML updates always synchronize independently. |
[UI] Show skill bonuses |
true |
Show temporary skill bonuses in item tooltips. Local and editable during multiplayer. |
Food item YAML
All .yaml and .yml files directly inside BepInEx/config/FoodKnowledge/ are loaded together. No recipes are enabled by default. Add a flat list to foods.yaml, or copy the entries from Examples/foods.example.yaml into it, replacing the empty []. Examples are inactive while they remain outside the config folder.
- itemName: dbfk_PerchMeal
displayName: "Perch meal"
description: "A filling meal: perch and blueberries. Grants temporary swimming knowledge."
useModel: FishCooked
craftingStation: piece_cauldron
stationLevel: 1
hpGain: 45
hpPerTick: 2
staminaGain: 15
eitrGain: 0
modifierGain: jump
modifierValues: 100
buffText: ""
stackSize: 20
weightPerUnit: 0.1
durationMinutes: 20
amountProduced: 2
ingredientList: Fish1[1],Blueberries[1]
Use console spawn names for items, ingredients, models and stations. Prefab names and field names are case-sensitive. Fish1 is perch, Blueberries is blueberries and FishCooked is cooked fish.
| Field | Meaning | Missing/empty value |
|---|---|---|
itemName |
New item's console prefab name; must not match an existing prefab. | Required. |
displayName |
Title in inventory and crafting menus. | Use itemName. |
description |
Item tooltip description. | Empty description. |
useModel |
Existing item supplying the 3D appearance and physical model setup; food stats and recipes are independent. | Boar meat (RawMeat). Invalid or unavailable models also use this fallback. |
craftingStation |
Comma-separated crafting-station prefab names. | Inventory crafting only. |
stationLevel |
Positive whole-number minimum level for every listed station. | 1; unused without a station. |
hpGain |
Maximum-health contribution when eaten. | 0. |
hpPerTick |
HP restored per normal 10-second healing tick, before vanilla regeneration modifiers. | 2 with positive hpGain, otherwise 0. |
staminaGain |
Maximum-stamina contribution when eaten. | 0. |
eitrGain |
Maximum-eitr contribution when eaten. | 0. |
modifierGain |
Comma-separated vanilla skill names. | No skill bonuses. |
modifierValues |
Temporary skill levels, paired with modifierGain in the same order. |
Empty when no modifiers are listed. |
buffText |
Custom text for Active effects; double quotes support \n for line breaks. |
Positive skill increases, one per line. |
stackSize |
Maximum items per stack; positive whole number. | 20. |
weightPerUnit |
Weight of one item; nonnegative, including 0. |
0.1. |
durationMinutes |
Food duration in minutes; positive decimal values are allowed. | 20. |
amountProduced |
Items produced per craft; positive whole number. | 1. |
ingredientList |
Comma-separated Prefab[quantity] requirements. |
Required. |
Keep the flat list and two-space indentation. Use a decimal point for numbers. Optional fields may be omitted or left empty; null and ~ also use defaults. Explicit zero values are preserved. Quote text containing : or #. The four comma-list fields accept values without quotation marks:
craftingStation: piece_cauldron,piece_workbench
modifierGain: swim,run
modifierValues: 15,10
ingredientList: Fish1[5],Blueberries[3]
Earlier field names remain accepted: item, miscModifier, effectInfo and duration map to itemName, modifierGain, buffText and durationMinutes. Use one spelling per field in an entry. Replace the obsolete cloneFrom field with useModel.
Crafting requirements
Recipes appear after discovering their ingredients and, for station recipes, a qualifying listed station. Every station uses the same stationLevel; leaving it empty defaults to level 1. A recipe can be available at several stations.
Omit or leave craftingStation empty to craft exclusively from the normal inventory crafting menu, alongside the hammer and club. These recipes do not appear at the workbench or other stations. Include piece_workbench explicitly to allow workbench crafting.
Use crafting-menu stations such as piece_cauldron and piece_workbench. Cooking racks and ovens are conversion machines and are not supported by these recipes. Ingredients from other mods can be used once their items are registered; foods defined in the same YAML catalog can also be ingredients.
Food stats and healing
Health, stamina and eitr contributions decay normally. hpPerTick controls healing independently of maximum health: hpGain: 45 with hpPerTick: 3.5 contributes up to 45 maximum HP and restores 3.5 HP per normal 10-second tick, before vanilla regeneration modifiers. Healing from active foods adds together and does not decay. Explicit hpPerTick: 0 disables that food's healing; a positive value can heal even with hpGain: 0.
Stamina and eitr use Valheim's continuous regeneration rules. There are no staminaPerTick or eitrPerTick fields.
Skill bonuses and buffs
Use short, case-insensitive skill names in modifierGain. Match each entry with a value in modifierValues; values accept 0–100 temporary levels.
- Weapon skills:
swords,knives,clubs,polearms,spears,blocking,axes,bows,elementalmagic,bloodmagic,unarmed,pickaxes,crossbows - Other skills:
woodcutting,jump,sneak,run,swim,fishing,cooking,farming,crafting,dodge,ride
Bonuses add across active foods and stay at full strength until the food expires or is removed. They change effective skill levels without granting XP or changing learned levels. Effective levels are capped at 100. There are no direct movement-speed, carry-weight or resistance modifiers.
With hpGain, staminaGain and eitrGain all set to zero, a modifier food still occupies a normal food slot and uses its configured duration. Set hpPerTick to zero or leave it omitted for a skill-only food. Foods with positive skill bonuses and no stat gains show the native silver/white fork.
Each modifier food shows its title, icon and remaining duration beside native buffs such as Rested. Multiple skills share that food's buff icon. buffText: "Custom text" replaces its Active effects description; an omitted, empty or whitespace-only value lists positive skill increases, one per line. This does not change the item description or eating notice.
The yellow eating notice lists positive gains, for example +15 Eitr and +10 Running. Zero gains are omitted. Buffs remain visible when the local Show skill bonuses tooltip option is off. Expiry, vomiting, clearing or replacing the food removes its bonuses and buff display.
Food icons
Place PNG files in BepInEx/config/FoodKnowledge/icons. Match the filename exactly to itemName, for example dbfk_PerchMeal.png. Missing icons use the vanilla boar-meat icon regardless of useModel. Transparency is supported; PNGs are limited to 8 MiB and 2048 pixels per side.
Offline icon changes reload automatically. In multiplayer, the server sends its PNG folder once when a client joins. By default, additions, replacements and deletions do not affect that client until its next session. Local icon edits are ignored while connected.
Enable the server's [Settings] Live Reload to synchronize folder changes with connected clients. Enabling it also updates clients already online. Disabling it freezes their icons after any started transfer finishes. The client setting cannot override the server. YAML updates synchronize with either setting.
Live updates
Valid YAML saves reload automatically and synchronize from the server. Invalid YAML or unavailable ingredients/stations keep the last valid catalog and report the reason in the BepInEx log. Startup refreshes the marked skill-reference comments without rewriting recipe values or other comments.
Already-eaten foods retain their stats, healing, skill bonuses, duration and buffText, including through character save/reload. Updated definitions apply to the next food eaten. Weight and stack-size edits apply to uneaten items; reducing a stack limit does not delete or automatically split existing larger stacks. Changing an already registered item's effective useModel requires restarting the game/server.
Client files and preferences are preserved. Leaving multiplayer restores local definitions and icons for offline play. Synchronization runs on joining and accepted file changes, with no periodic food-sync traffic.
Manual Installation
- Install
BepInEx/plugins/FoodKnowledge/dannanboi_FoodKnowledge.dllon clients and servers. Remove older or duplicate DLL copies before upgrading. - Start the game or server once to generate
BepInEx/config/dannanboi.foodknowledge.cfg,FoodKnowledge/foods.yamland theFoodKnowledge/iconsfolder underBepInEx/config. - Add recipes to the YAML. For multiplayer, edit the server/host's files. No foods are added until definitions are supplied.
Compatibility
Requires BepInEx 5 for Valheim. Uses the native inventory and crafting UI; no additional YAML-parser dependency is required. Mods replacing recipe, crafting, food, skill or tooltip behavior may conflict.
Server and clients must run the same enabled version. Keep each food's itemName and definition while it exists in saved characters or worlds; changing displayName preserves its identity. Removing a definition hides its recipe for the current session, but its prefab is no longer registered after restarting. Remove saved custom foods before uninstalling the mod or deleting their definitions.
dannanboi Mod Philosophy
My mods aim to be small and modular, stay close to Valheim's vanilla experience, and work well together or independently. Enable all features to make bigger changes, or choose the ones that suit your playstyle. Your run should be yours to customize. Features described as "an added bonus" or "nice to have" should always be optional. In multiplayer, the server controls gameplay settings, while visual settings stay local to each player.
Credits
You, the player. Thanks for using my mod!