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.
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.
| Date uploaded | 13 hours ago |
| Version | 0.1.13 |
| Download link | jg224-FoodGuard_-0.1.13.zip |
| Downloads | 15 |
| Dependency string | jg224-FoodGuard_-0.1.13 |
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.2333README
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.oggis a 1.07-second mono OGG Vorbis alert, boosted by 25% with peak limiting. Keep it besideFoodGuard.dll.
CHANGELOG
Changelog
0.1.13
- Removed per-frame boxed reflection reads and moved death-state evaluation behind the polling throttle.
0.1.12
- Kept the low-food popup centered while aligning food names and percentages into neat columns.
0.1.11
- Moved to the new Thunderstore package ID
FoodGuard_, which displays asFoodGuardwith the intended capitalization.
0.1.10
- Replaced leaving-base status details with condition-specific two-line alerts.
- Corrected the combined combat alert to say
FOOD & RESTED.
0.1.9
- Reduced the low-food list line height from 150% to 75% for more compact vertical spacing.
- Removed food-slot requirement details from combat popup text.
- Replaced the combat popup with a single condition-specific message for missing Rested, missing food,
or both; formatted each as a two-line alert and removed the separate
Rested: NOline. - Made biome food requirements suppress surplus-food expiry warnings: Meadows only needs one safe food, Black Forest needs two, and later biomes need all three.
0.1.8
- Added this complete, version-by-version changelog to GitHub and the Thunderstore package.
- No gameplay behavior changed from 0.1.7.
0.1.7
- Removed the r2modman installation section from the README.
- Removed the obsolete assembly-bundling note from the README.
0.1.6
- Reworked FoodGuard into four readiness alarms:
- Leaving base without Rested, enough biome food slots, or sufficient food duration.
- Per-food warnings at 25%, 20%, 15%, 10%, and 5%, with sound at 10% and 5%.
- Away-from-base warnings when active food slots are below the biome requirement.
- Combat warnings when either Rested or the biome food requirement is missing.
- Added biome food requirements: one active food in Meadows, two in Black Forest, and three in later biomes.
- Changed base detection to require four qualifying pieces within 40 meters, keeping the three-piece Ashlands stone-portal setup classified as an outpost.
- Preserved base-exit state through portal travel so arrival at an outpost can trigger the readiness warning.
- Bundled the custom
EAT.oggalert, boosted it by 25% with peak limiting, and added a volume slider. - Listed every active food in low-food popups at half-size text with increased line spacing.
- Reduced the post-death grace period to 25 seconds.
- Set biome-food and combat-readiness popup intervals to 30 seconds.
- Prevented failed popup attempts from starting a cooldown when Valheim's message HUD is unavailable.
0.1.5
- Made combat-without-Rested use the same automatic 40-meter base scan as food reminders.
- Suppressed the combat-without-Rested warning while inside a qualifying base.
0.1.4
- Expanded automatic base scanning from 20 meters to 40 meters.
- Added localized food names and remaining percentages to low-food popups, one food per line.
0.1.3
- Replaced the saved F7 base marker with automatic Valheim raid-style base detection.
- Added a two-poll stability check for food and Rested signals and debounced base-boundary crossings.
- Corrected empty food-slot accounting for combat warnings.
- Added successful-eating tracking so grace also works when refreshing or replacing an occupied food slot.
- Added global popup spacing to prevent center messages from overwriting one another.
0.1.2
- Changed the urgent combat-food condition from any low food to having at least two empty food slots.
- Added Thunderstore CLI project metadata and package-building support.
- Added clean DLL version metadata without an appended Git hash.
0.1.1
- Added a 20-second login and spawn grace period.
- Tuned reminder cooldown defaults and clarified trigger descriptions.
- Standardized the original combat alert on Valheim's perfect-block sound.
- Removed temporary sound-audition and prefab-diagnostic hotkeys.
0.1.0
- Initial client-side release.
- Added center-screen reminders for leaving base while food needed attention, low food duration, combat with low food, no food away from base, and combat without Rested.
- Added manual F7 base marking with configurable base modes.
- Added per-trigger cooldowns, post-eat and post-death grace periods, and optional combat alert sound.