jg224-FoodGuard_ icon

FoodGuard

Client-side Valheim food reminders with vanilla raid-style base detection, center-screen popups, and combat alerts. No hotkey or saved base location required.

Last updated 7 hours ago
Total downloads 28
Total rating 0 
Categories Mods AI Generated
Dependency string jg224-FoodGuard_-0.1.13
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
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.2333

README

FoodGuard

A client-side Valheim mod that reminds you to eat and stay Rested when leaving base, exploring, or entering combat. It uses large center-screen popups and the bundled EAT.ogg alert.

What it does

FoodGuard has four reminders:

# When Popup Sound
1 You leave base without Rested, enough biome food slots, or sufficient food duration yes, once per base exit yes
2 Required food reaches 25%, then each additional 5% step yes, quiet while in base by default at 10% and 5%
3 You are away from base without enough active food slots for the biome yes, every 30 seconds yes
4 You are in combat without Rested or enough active food slots for the biome yes yes

The food-slot requirement is one active food in Meadows, two in Black Forest, and all three in every later biome (including Ocean). Food duration is tracked separately by reminder #2.

Only food needed to maintain that biome minimum produces an expiry warning. For example, one expiring food is ignored when two foods are active in Meadows, and when three foods are active in Black Forest. In later biomes, all three slots are required, so any expiring food produces the warning.

Each reminder has a cooldown, and a global popup delay prevents messages from overwriting one another. All four reminders use the same 40-meter base scan and stay quiet inside a qualifying base where applicable.

How base detection works

No hotkey or saved location is required. FoodGuard uses Valheim's raid base-value calculation, with the requested detection radius expanded from the vanilla 20 meters to 40 meters:

player-base value within 40 meters >= 4

FoodGuard deliberately requires four nearby PlayerBase contributions—one more than Valheim's raid threshold. This keeps the workbench + stonecutter + stone-portal setup required for an Ashlands portal classified as an outpost, so food and combat-readiness alerts are not suppressed there. The check still follows the player, and the leave-base reminder fires after crossing out of a qualifying base. Portal travel preserves the departure-side base state, so arriving at an outpost can also count as leaving base.

Expiring-food popup

When an expiring food is needed to maintain the current biome minimum, it starts its own reminder sequence at FoodThresholdPercent (25% by default), then reminds again at 20%, 15%, 10%, and 5% until it expires. Refreshing or replacing that food rearms its sequence. The 10% and 5% reminders also play EAT.ogg.

The threshold decides when the popup fires, but the popup lists every currently active food—even foods above 25%. Each food uses its localized in-game name and gets its own line at 50% of the heading size with 75% line height:

Food expiring -- time to eat!
- Sausages: 18%
- Carrot Soup: 63%
- Eyescream: 81%

Settings from FoodGuard 0.1.2 such as BaseZoneMode, MarkBaseHotkey, and MarkedBaseCenter are no longer used. Old entries left in an existing config file are harmless; delete the config once if you want BepInEx to regenerate a clean one.

Configuration

After the first launch, BepInEx creates:

BepInEx/config/jg224.FoodGuard.cfg

The important settings and their shipped defaults are:

[General]
Enabled = true
DebugMode = false
FoodThresholdPercent = 25
EmptySlotCountsAsLow = false
PollInterval = 0.5
PostEatGraceSeconds = 15
RespawnGraceSeconds = 25
LoginGraceSeconds = 20

[Base]
SuppressLowFoodInBase = true

[Triggers]
LeaveBaseEnabled = true
LowFoodEnabled = true
BiomeFoodEnabled = true
CombatReadinessEnabled = true

[Sound]
AlertSoundEnabled = true
AlertSoundCooldown = 60
AlertVolume = 1

[Cooldowns]
LeaveBaseCooldown = 30
LowFoodCooldown = 30
BiomeFoodCooldown = 30
CombatReadinessCooldown = 30
PopupSpacingSeconds = 10

[Messages]
LeaveBaseNoRestedMessage = LEAVING BASE\nWithout RESTED buff
LeaveBaseNoFoodMessage = LEAVING BASE\nWithout FOOD
LeaveBaseNoFoodAndRestedMessage = LEAVING BASE\nWithout FOOD & RESTED buff
LowFoodMessage = Food expiring -- time to eat!
BiomeFoodMessage = Not enough food for {biome} -- EAT!
CombatNoRestedMessage = ENTERING COMBAT\nWithout RESTED buff
CombatNoFoodMessage = ENTERING COMBAT\nWithout FOOD
CombatNoFoodAndRestedMessage = ENTERING COMBAT\nWithout FOOD & RESTED buff

LowFoodMessage is the full-size heading shown above the automatically generated half-size food lines. All active foods are listed regardless of percentage. The centered list uses fixed-width, left-aligned food-name and percentage columns. Its optional {pct} token is replaced with the lowest remaining-food percentage. Readiness alarms and the 10%/5% milestones play the bundled EAT.ogg. The sound is boosted by 25% with peak limiting, and AlertVolume appears as a 0-to-1 volume slider in compatible BepInEx mod-options/configuration-manager screens. If the file is missing or cannot be decoded, the popup still appears.

The old LeaveBaseMessage, NoFoodOut..., CombatNoRest..., CombatReadinessMessage, CombatEnabled, CombatMinEmptySlots, CombatCooldown, and CombatMessage settings are no longer used. Old entries left in the config file are harmless.

Notes

  • FoodGuard suppresses reminders briefly after a successful eat, including when food is refreshed or replaced without changing the number of active slots.
  • Combat means a hostile creature is currently targeting the local player. A short clear window keeps the signal from flickering during retargeting.
  • EAT.ogg is a 1.07-second mono OGG Vorbis alert, boosted by 25% with peak limiting. Keep it beside FoodGuard.dll.