Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
20 hours ago
Downloads
148
Size
200KB
ADDatHost Valheim hosting
30% off

Description

Food Knowledge adds new foods and recipes through YAML and edits vanilla foods or removes their crafting recipes, using Valheim's native inventory and crafting menus. Customize food stats, healing, temporary skill bonuses and other modifiers, icons and crafting requirements; choose models for new foods. Requires ModifiersFramework for modifier gameplay, food modifier lifetimes, saved modifier snapshots and buff display. Food Knowledge creates the foods and supplies their definitions/icons. During online play, food definitions are synced from the server. Icons sync once when joining unless the server enables Live Reload. Modifier information is always included in food tooltips.

Food Knowledge supports CRUD operations for food definitions and recipes:

  • Create: Add new foods and recipes.
  • Read: Load food definitions from YAML.
  • Update: Edit existing vanilla foods, preserving omitted values.
  • Delete: Remove a food's crafting recipes while keeping the item usable.

CRUD means Create, Read, Update and Delete. Deletion keeps native food items registered, including saved inventory copies and already-eaten meals.

Overview

Feature Description
Food definitions CRUD operations for food definitions and recipes through YAML, selected automatically by the food name and supplied fields.
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.
Food modifiers Add vanilla skills, stamina-cost changes, regeneration, damage, resistance, speed, carry capacity, adrenaline, stagger, sailing tailwind and Wet immunity for the full food duration.
Buff display Modifier foods show an icon and timer, with automatic or custom text in Active effects.
Models and icons Choose a model for new foods and add matching PNG icons; new foods fall back to boar meat, while native edits retain their original appearance.
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 Icons only: server-controlled live synchronization of PNG additions, replacements and deletions. All YAML edits, including vanilla foods and recipes, synchronize during play with either setting.

Food item YAML

All .yaml and .yml files directly inside BepInEx/config/FoodKnowledge/ are loaded together. No recipes are enabled by default. Add food-name mappings to foods.yaml, or copy the entries from Examples/foods.example.yaml into it, replacing the empty {} (or the older []). Examples are inactive while they remain outside the config folder. The default foods.yaml uses a short setup header and points to ModifiersFramework documentation for modifiers and buffs. Startup replaces its leading comments while preserving food definitions; other YAML files are left unchanged.

dbfk_PerchMeal:
  basics:
    - displayName: "Perch meal"
    - description: "A filling meal: perch and blueberries. Grants temporary swimming knowledge."
    - useModel: FishCooked
    - craftingStation: piece_cauldron
    - stationLevel: 1
    - stackSize: 20
    - weightPerUnit: 0.1
    - amountProduced: 2
  stats:
    - hpGain: 45
    - hpPerTick: 2
    - staminaGain: 15
    - eitrGain: 0
    - modifierGain: jump[100]
    - activeEffectText: ""
    - durationMinutes: 20
  ingredients:
    - 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
Food name (top-level key) Console prefab name followed by :. A vanilla food with an empty value deletes its crafting recipes; additional fields edit it. A new name creates a food. Required; no separate itemName field.
displayName Title in inventory and crafting menus. Use the food name.
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 modifiers and values in brackets, for example swim[10],jumpCost[-60%],bluntResist[2]. See ModifiersFramework/modifiers.md for effects, units and limits. No modifiers.
activeEffectText Custom text for Active effects; double quotes support \n for line breaks. Nonzero effects, 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.
ingredients One - Prefab[amount] list row per ingredient. Supplied ingredients replace the complete list. Required for new foods; inherited for native recipe edits.

The defaults in this table apply to new foods. For a vanilla food edit, omitted or unquoted blank/null fields inherit the captured native value. Explicit zero overrides numeric values; quoted empty text clears descriptions or modifier lists. Supplying craftingStation with an empty value deliberately selects inventory crafting. A newly supplied station without a level uses level 1; recipe-only edits otherwise retain the native station, level, output and ingredients.

No mode field is needed. Write the native food name followed by a colon, leaving its value empty, to remove its crafting-menu recipes:

SerpentStew:

Add any supported field to edit the food instead. This changes health and modifiers while preserving the native stamina, healing, duration and recipes:

FishCooked:
  stats:
    - hpGain: 70
    - modifierGain: swim[15]

Deletion affects crafting-menu recipes. It keeps native prefabs, saved inventory items and already-eaten food intact; cooking-rack/oven conversions and naturally obtained foods remain available. Removing the YAML entry restores the original recipes. A field left blank still makes the entry an edit, with the native value inherited.

Stats and text edits preserve native recipes. Supplying ingredients, craftingStation, stationLevel or amountProduced edits the recipe. An item with multiple native recipes supports stats/text edits and name-only deletion; recipe changes reject ambiguous targets. Existing foods keep their native model, item type and discovery/name token. useModel selects appearance for new foods only. Matching PNGs can override an edited native food's icon; without one, its native icon is retained.

Removing an edit restores the captured native values, text, icons and recipes. Reloads resolve omitted fields from that baseline, rather than from the previous edit. Saved consumed snapshots also restore after the edit is removed. Non-food targets and collisions with items registered by other mods are rejected. New foods retain their model-independent defaults and required ingredients. The inactive Examples/foods.vanilla.example.yaml illustrates edits and deletions.

Start each food with its console prefab name followed by a colon, for example dbfk_PerchMeal:. Do not put a dash before the food name or add a separate itemName field. Each file is a mapping of food names; different names begin at the same unindented level. Put item and crafting fields under basics, food values under stats, and each ingredient in the list under ingredients. Indent section headings by two spaces and their contents by four spaces. Each field under basics or stats can use its own dashed - key: value row, as illustrated. The earlier mapping style without dashes remains accepted; keep one style within each section. Keep the sections adjacent, and write one ingredient per list row, for example - Fish1[5]. 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 #. Modifiers and crafting stations accept comma-separated values without quotation marks:

craftingStation: piece_cauldron,piece_workbench
modifierGain: swim[15],run[10]

The illustrated layout is standard YAML: each food name is a top-level mapping key, basics and stats are lists of single-field mappings, and ingredients is a list of bracketed ingredient strings. Earlier shorthand with indented item fields or ingredient rows without dashes remains readable by the mod for compatibility; use the standard layout for new files.

Earlier root lists starting with - itemName: PrefabName remain accepted, with either grouped or fully flat fields. Different files can use different root formats; do not mix a mapping root and a list root in the same file. Existing flat YAML entries, including ingredientList: Fish1[5],Blueberries[3], remain accepted. Use either fully flat fields or the grouped layout within each food; different foods can use different layouts in the same file. Earlier itemCharacteristics sections are accepted as an alias for basics; use only one section name per food. Prefab: amount ingredient mappings also remain accepted. Existing recipe files are not automatically rearranged. Earlier separate modifierGain and modifierValues lists remain accepted; remove modifierValues when switching to bracketed values. Use brackets for every modifier in a list. Earlier field names remain accepted: item, miscModifier, effectInfo/buffText and duration map to itemName, modifierGain, activeEffectText 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.

Fork colors use the food's full configured gains. Eitr above both HP and stamina gives the native purple fork. Otherwise, higher HP gives red, higher stamina gives yellow, and equal HP and stamina give silver. Modifier-only foods with zero gains also use silver. Healing (hpPerTick) does not affect fork color.

Skill bonuses and buffs

ModifiersFramework handles modifier gameplay, duration, saved modifier values and buff display. Food Knowledge supplies the foods, recipes and icons. See ModifiersFramework/modifiers.md for available effects and value limits.

Use short, case-insensitive skill names in modifierGain, with each value in brackets: swim[10],run[15]. Values accept 0–100 temporary levels, including decimals such as swim[2.5].

  • 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. For other modifiers, see ModifiersFramework/modifiers.md. For example, modifierGain: swim[10],adrenaline[50%],jumpCost[-60%],bluntResist[2] grants all four effects. Percentage effects accept an optional % inside the brackets; skills, resistance tiers and fixed units use plain numbers. runStamina[-60%] is an alias for runCost[-60%]. Aliases keep their canonical identity; use runCost in the full-name catalog to label that food effect.

Use wetImmune[true] to prevent the native Wet condition for the food duration. It removes existing Wet when immunity starts. Boolean values are case-insensitive; numbers and percentages are not accepted. wetImmune[false] adds no immunity and does not cancel another active source.

The framework also supplies parryBonus, staminaRegen, armor, swimSpeed, attackCost, healthInstant, staminaInstant and eitrInstant. Instant modifiers restore current resources once when the food is successfully eaten; the existing food-stat fields set maximum resource gains. Added elemental damage accepts fixed values such as addFireDmg[50] or ranges such as addFireDmg[5-10].

Unknown modifiers and missing named buffs are skipped with a warning when YAML loads. Food stats and recipes still load, and valid direct modifiers remain active. Any named call excludes direct modifiers even when its definition is missing. Adding or removing that definition through the framework reload updates future meals; already-eaten effects stay unchanged. Invalid values for known modifiers, malformed brackets and duplicate known effects still reject the edit.

Use buff[CallingName] to expand a named set from the host/server's BepInEx/config/ModifiersFramework/buffs.yaml. The custom buff's top-level key supplies its calling name: MightofNorn: is called with buff[MightofNorn]; no separate callingName field is needed. Earlier explicit calling names remain supported. A named call applies only that set; all other entries in the same modifierGain are discarded. Use one named call per food. Its food tooltip leaves one blank row after the existing tooltip text, then shows the framework's buffName in orange and its buffText in white. Food Knowledge sends the server's expanded effects to clients. The named buff's icon, title and text take precedence for buff display, suppressing the food's activeEffectText and its buff icon/title overrides. Install the matching named definitions and PNGs in ModifiersFramework on clients; their local numerical definitions cannot override the transmitted food effects. If a client lacks a named definition, it retains the server effects and uses the calling name with fallback presentation. The framework automatically reloads valid custom YAML edits and notifies Food Knowledge. The host/server refreshes named food definitions through the existing debounced YAML path and synchronizes changed gameplay values; eaten meals retain their captured values. Client-local edits cannot override server food values. No Food Knowledge YAML resave or restart is required.

With hpGain, staminaGain and eitrGain all set to zero, a modifier food still occupies a normal food slot and uses its configured duration. For a new skill-only food, set hpPerTick to zero or leave it omitted. A vanilla edit inherits native healing when omitted; set it explicitly to zero to disable healing. Foods with nonzero modifiers and no stat gains show the native silver/white fork.

For direct modifiers, each food shows its title, icon and remaining duration beside native buffs such as Rested. All modifiers share that food's buff icon. activeEffectText: "Custom text" replaces its Active effects description; an omitted, empty or whitespace-only value lists nonzero effects. A blank row separates existing food-tooltip text from its modifiers. Food tooltips and automatic Active effects descriptions show one modifier per row, with the name and colon in white and the value in orange, for example Axes: +10. Signs, percentages, resistance tiers and damage ranges retain their meaning. Labels come from BepInEx/config/ModifiersFramework/modifiers.yaml. Edit each canonical modifier key's Full name to change its label. Changes appear at the next display, including for active foods. Missing rows use framework defaults. Boolean/on-off modifiers show only their white full name, without a colon or value; false/off entries add no row. These labels are local presentation metadata and do not change synchronized effects or consumed values. Named buffs supply their own presentation. The item description and eating notice retain their usual behavior.

For direct modifiers, the yellow eating notice lists stat gains and modifiers, for example +15 Eitr and +10 Running. Named-buff foods show only nonzero HP/stamina/eitr gains and the framework's buffName, for example +28 Health and +15 Stamina and Might of The Norns. A named food with zero stat gains shows the buffName alone. Zero gains are omitted. Expiry, vomiting, clearing or replacing the food removes its bonuses and buff display.

Numeric modifiers add across eaten foods. Resistance tiers add and clamp to -3 through 3 before native resistance selection; neutral totals preserve other effects. Tailwind uses the native sailing flag while any active food enables it. Percentage reductions cannot make costs or damage negative; blockReturn explicitly grants stamina after blocking-cost changes. Movement speed follows native behavior, with half its percentage applied while swimming, alongside the full swimSpeed percentage. See ModifiersFramework/modifiers.md for regeneration-factor behavior and all value limits.

Food icons

Place PNG files in BepInEx/config/FoodKnowledge/icons. Match the filename exactly to the top-level food name, for example dbfk_PerchMeal.png. Missing icons use the vanilla boar-meat icon for new foods regardless of useModel; edited native foods retain their original icon. 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. After the initial full download, updates send only changed PNGs and deleted filenames when that is smaller than sending the complete folder. Unchanged icons keep their existing textures. 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 without restarting or logging out. This includes new foods, vanilla food edits, recipe changes, recipe deletion and restoration. Live Reload controls icons only. Invalid YAML or unavailable ingredients/stations keep the last valid catalog and report the reason in the BepInEx log. Startup updates the default foods.yaml header without changing recipe values or additional YAML files.

Already-eaten foods retain their stats, healing, modifiers, duration and activeEffectText, including through character save/reload. Updated definitions apply to the next food eaten. Uneaten foods in inventories and containers refresh to the current definition, including copies from picked-up items. Inventory weight is recalculated. 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.

Existing config files drop the obsolete [UI] Show skill bonuses option on startup while preserving other settings. Direct modifiers and named-buff information are always shown in food tooltips. Client YAML and PNG files 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

  1. Install BepInEx/plugins/dannanboi_FoodKnowledge.dll and the required compatible ModifiersFramework release at BepInEx/plugins/dannanboi_ModifiersFramework.dll on clients and servers. Remove older or duplicate DLL copies before upgrading.
  2. Start the game or server once to generate BepInEx/config/dannanboi.foodknowledge.cfg, FoodKnowledge/foods.yaml and the FoodKnowledge/icons folder under BepInEx/config.
  3. Add recipes to the YAML. For multiplayer, edit the server/host's files. No foods are added until definitions are supplied.

Compatibility

Requires BepInEx for Valheim and a compatible ModifiersFramework release (plugin GUID dannanboi.modifiersframework). Use the framework release required by the selected Food Knowledge package. 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. Official Food Knowledge releases reference official ModifiersFramework releases; internal builds may reference internal framework releases. Server and clients must run matching enabled versions of both Food Knowledge and ModifiersFramework. A missing or failed framework prevents Food Knowledge from starting. Native food and recipe baselines must also match the server; differing game or recipe/stat mods reject joining rather than silently changing inherited values. Keep each custom food's name and definition while it exists in saved characters or worlds; changing displayName preserves its identity. Removing a new-food 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. Removing native-food edits or deletions restores their baseline; native prefabs are retained and never destroyed by this mod.

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!

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.