Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
CookingPerks
Food runs on calories: activity burns them faster, rest and shelter slow them. Cooking tiers every 25 levels add calories and stronger food. Recook old food to upgrade it. Server-synced config.
By Superman
| Last updated | 19 hours ago |
| Total downloads | 13 |
| Total rating | 0 |
| Categories | Mistlands Update Mods Deep North Update Hildir's Request Update Server-side |
| Dependency string | Superman-CookingPerks-1.2.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2351README
CookingPerks (Valheim / BepInEx)
Cooking becomes a real progression skill, and food runs on calories: every food holds a calorie supply that your body burns at a steady resting rate, plus extra for every bit of activity you do.
Features
Cooking amounts and ingredients stay vanilla. There are no free or bonus crafts.
Tiers
Perks only increase at cooking levels 25, 50, 75 and 100 (tiers 1–4). Nothing changes between those levels.
| Tier | Cooking level | Food calories | Health / stamina / eitr |
|---|---|---|---|
| 0 | 0–24 | vanilla | vanilla |
| 1 | 25 | +5% | +3% |
| 2 | 50 | +10% | +6% |
| 3 | 75 | +15% | +9% |
| 4 | 100 | +20% | +12% |
(Defaults. You can change them with CalorieBonusPerTier, QualityBonusPerTier and LevelsPerTier.)
Eitr foods get an extra +10% calories at every tier, added on top (a tier 4 eitr food has +30%). See Eitr food balance below for why.
Features
| Feature | How it works |
|---|---|
| Food remembers its cook | Food you make at a cauldron or prep table, or take off a spit, grill or oven, gets your current tier. The tier shows in the item tooltip. Food of different tiers stays in separate stacks. |
| Recooking | Hold older cooked food on your hotbar, look at the station that makes it, and press the hotbar key. The whole stack is upgraded to your current tier, with its new calories and quality. Cooked meat goes back on the spit or grill, bread in the oven, stews in the cauldron. The station must be usable (fire lit). It's free and instant, and it never lowers a tier. |
| Calories | Each food holds calories equal to its vanilla duration in seconds (a 30-minute food = 1800 calories), plus its tier bonus. Every food burns 1 calorie per second just from you being alive (BaseMetabolism), so an idle player matches vanilla. Activity burns extra calories: regenerating health (from food), stamina or eitr costs calories from the foods that provide that stat. Stamina only refills what you spent, so sprinting, fighting and swimming cost the most. Instant restores from meads are free. As a food's calories drop below its base amount, its health/stamina/eitr fade exactly like vanilla food fading over time. |
| Comfort lowers calorie usage | The Rested buff cuts calorie usage by 5%, Resting by 10% and Sheltered by 5%. With all three at once, you get an extra 10% on top: 30% less in total. This applies to both the resting burn and activity costs. A proper rest spot (fire, shelter, seat, comfort) is where food stretches the furthest. |
| Calorie counter on the HUD | Under each food icon you see calories left (for example 1.8k, then 950), instead of a time. Nothing is estimated: the number only goes down as you burn it, slowly at rest and faster when you work. The food's tooltip shows its calories instead of a duration. |
| Tier popups | Reaching a new tier shows your new perk values. |
Perks use the vanilla Cooking skill, which you level the vanilla way.
Balance
Goal: a beginner cook's food runs a little short when adventuring, and a master cook (level 100) is back to about vanilla. Cooking is worth leveling, but it never becomes "food lasts forever."
Simulated with the default settings: how long a food's calories last compared with vanilla's fixed duration. Activity rates are estimates of typical play:
| Activity | Calorie burn (× resting) | Tier 0 | Tier 4 (level 100) |
|---|---|---|---|
| Resting, sailing or riding (bars full) | 1.00× | 100% | 120% |
| Base chores and building | 1.04× | 96% | 115% |
| Exploring (jog and sprint) | 1.21× | 83% | 99% |
| Swimming | 1.22× | 82% | 99% |
| Mage combat | 1.57× | 64% | 76% |
| Heavy melee combat | 1.60× | 62% | 75% |
| Typical session (45% explore, 15% fight, 25% base, 10% rest, 5% swim) | 1.20× | 83% | 100% |
These numbers are without comfort buffs. With them (Rested for most of an outing, and all three while resting at base), a typical session improves to about 88% at tier 0 and 105% at tier 4.
Tiers 1–3 fall in between: about 88%, 92% and 96% for a typical session.
Why it's fair: stamina regen only refills stamina you've spent, so the stamina cost is really a cost for exertion. Sprinting, swinging and dodging use stamina, the refill costs calories, and standing around costs only your resting burn. The game already tracks this exactly, so there is no guessing about what you are doing.
Safeguards that keep the game from breaking:
- Burn cap. A food can never burn more than 2 calories per second (
MaxCaloriesPerSecond), resting burn included. Activity cost above the cap is deferred and paid once your bars are full again, never counted twice. Deferred cost is capped at 60 calories per food, so a long boss fight can't erase your food. - Resting matches vanilla. With nothing regenerating, food burns 1 calorie per second, exactly vanilla's speed. Only the tier calorie bonus makes food last longer.
- The vanilla food curve is kept. The quality bonus multiplies the values the game itself computes, so food fades exactly like vanilla, just from a slightly higher peak.
- Quality stays modest. +12% at level 100 is about 25–30 extra health on a late-game loadout. That's noticeable, but it's less than a single extra food.
- Recooking can't be farmed. It gives no Cooking XP, only upgrades to your own tier, and never downgrades.
- The death penalty matters. Vanilla skill loss on death can drop you below a tier, and food you cook from then on uses the lower tier until you level back up. Food you already cooked keeps its tier.
- Setting limits. The config's allowed ranges are capped (calories ≤ +25%/tier, quality ≤ +15%/tier, resting burn 0.5–1.5 per second), so a server owner can't accidentally set extreme values.
Eitr food balance
Stamina and health costs are shared across most of your foods, but eitr cost falls entirely on your eitr food(s). Without help, a caster's eitr food runs out noticeably before the rest of the meal. The flat +10% calories (EitrFoodCalorieBonus) closes that gap:
| Caster play | Eitr food life vs. the caster's other food | With +10% |
|---|---|---|
| Not casting (exploring, base, resting) | 100% | 110% |
| Sustained elemental magic combat | 77% | 85% |
| Sustained blood magic combat (also spends health) | 79% | 87% |
| Session with 15% casting | 96% | 105% |
| Session with 30% casting | 91–92% | 101% |
Over a normal play session the eitr food now keeps pace with the others. In long casting fights it still burns somewhat faster, which keeps magic from being free. Non-casters who eat eitr food just get a small calorie bonus on that one food.
About "server-side"
In Valheim, each player's own game runs their food, stamina, crafting and HUD. A server does not run these, so a DLL installed only on the server can't change them. This mod works like most gameplay mods:
- Install it on the server and on every client.
- The server's config is the authority. When a client connects, the server sends its settings, and the client uses them for the whole session. If you edit the config on the server while it is running, the server sends the change to everyone right away. Players can't give themselves better perks by editing their own config.
ShowCaloriesOnHudandShowPerkMessagesare client-only display options.- A client without the mod plays vanilla. To force everyone to install it, add a version-check mod such as ServerSync or Jotunn's
NetworkCompatibility.
Building
Requirements: the .NET SDK (8+), Valheim, and BepInExPack_Valheim (taken from Gale's download cache).
dotnet build -c Release
The project expects Valheim at D:\SteamLibrary\steamapps\common\Valheim, and BepInEx at Gale's cached denikson-BepInExPack_Valheim\5.4.2351. If either moves, override it:
dotnet build -c Release -p:ValheimDir="X:\path\to\Valheim" -p:BepInExCoreDir="X:\path\to\BepInEx\core"
A Release build writes dist/CookingPerks-<version>.zip, a Thunderstore-format package (DLL, manifest, icon, README, changelog).
The project builds against publicized game assemblies. If a Valheim update renames something this mod uses, the build fails with a clear error pointing at the member. It doesn't break silently in game.
Testing with Gale
- In Gale, create a new Valheim profile (for example "CookingPerks Test"), so other food or skill mods don't muddy the test. Gale adds BepInExPack automatically.
- Import
dist/CookingPerks-1.0.0.zipas a local mod (Gale's import menu → local mod). - Optional: also install Azumatt-Official_BepInEx_ConfigurationManager. Press F1 in game to tweak settings live.
- Launch from Gale. In the console (F5), run
devcommands, thenraiseskill cooking 25(repeat to step through tiers). - Work through the test checklist below. The log is in the profile's
BepInEx/LogOutput.log; search it forCookingPerks. - To test multiplayer config sync, put the same DLL in the dedicated server's
BepInEx/pluginsfolder.
When you change the code, bump <Version> in the .csproj and version_number in package/manifest.json, rebuild, and re-import.
Config
The first launch creates BepInEx/config/com.cookingperks.valheim.cfg. Every value is documented in the file. Main settings:
LevelsPerTier,CalorieBonusPerTier(0.05),QualityBonusPerTier(0.03),EitrFoodCalorieBonus(0.10),AllowRecookBaseMetabolism(1.0): calories each food burns per second at restCaloriesPerHealthRegen(0.5),CaloriesPerStaminaRegen(0.13),CaloriesPerEitrRegen(0.06): calories burned per point regeneratedMaxCaloriesPerSecond(2.0): hard cap on how fast one food can burnRestedReduction(0.05),RestingReduction(0.10),ShelteredReduction(0.05),AllThreeBonusReduction(0.10): comfort buff reductions, total capped at 50%
Code map
src/CookingPerksPlugin.cs: entry point, Harmony setup, live config reloadsrc/ModConfig.cs,src/ConfigSync.cs: settings and server→client syncsrc/CookingMath.cs: all perk formulassrc/PerkMilestones.cs: tier-up popupssrc/FoodBurn.cs: the calorie system: resting burn, activity cost (with the cap) and qualitysrc/Patches/FoodPatches.cs: eating (fills calories), plus the burn and regen hookssrc/Patches/HudPatches.cs: calorie counter under the food iconssrc/Patches/CookedFoodPatches.cs: tier stamping on cooked food, recooking, tooltip
Design notes
- Where the tier is stored. A food's tier is saved in the item's built-in quality field (quality 1 = tier 0 = vanilla, quality 2 = tier 1, and so on). Valheim already keeps different qualities in separate stacks and saves quality with the item, so tiers survive stacking, chests, dropping and relogging. Food normally has a max quality of 1, so the game shows no star or number for it; the tooltip line shows the tier instead. If you remove the mod, upgraded food stays as normal food in its own stacks.
- Who sets the tier. The tier comes from whoever cooks the food. That's what makes recooking meaningful: when you level up, your older food is worth upgrading. Food cooked by a tier-0 player, foraged food (berries, honey) and food made before installing the mod are all tier 0.
- How calories are stored. Calories live in the game's own food timer (1 calorie = 1 second), so vanilla still fades the food's stats as calories drop and removes the food at zero, with its normal "wore off" message. Bonus calories sit above the base amount, so food stays at full strength while you burn through the bonus, then fades as usual.
- No time estimates. The HUD shows calories, not time, so nothing has to guess how active you'll be. It subtracts activity you've already done but haven't paid for yet, so the number never jumps back up.
First in-game test checklist
Some of this can only be confirmed in a running game:
- Craft a stew at the cauldron with Cooking ≥ 25 (use
raiseskill cooking 30with devcommands). Check that the tooltip says tier 1 and the stew doesn't merge with tier-0 stew. - Take cooked meat off a spit and check its tier. Then relog and check that the tier survived.
- Recook a tier-0 stack at the spit and at the cauldron.
- Eat the food and check the HUD shows calories (a 30-minute food shows
1.8k). Stand still: it should drop about 1 per second. Sprint until your stamina is low: it should drop faster while stamina refills. - Take some damage and confirm calories drop faster while health regenerates.
- Sit by a fire under a roof until you have Rested, Resting and Sheltered together. Idle burn should slow to about 0.7 per second, about 7 calories every 10 seconds instead of 10.
- Hover an eitr food: the tooltip should show its calories with the +10% eitr bonus included, in place of vanilla's duration line.