Server-authoritative overhaul of Valheim's Rested/Comfort system: config-driven comfort, resting conditions and rested duration, plus a new Well Rested buff for sleeping a full night in your own claimed bed.
New: Well Rested — a separate buff from the comfort-driven Rested, granted for sleeping through a server-confirmed full night in your own claimed bed (health regen, stamina regen and a stacking skill XP bonus, all configurable, toggleable via EnableWellRested).
Fixed: the skill XP multiplier while Rested was miscalculated as roughly 201x instead of the intended 3x. The underlying field is additive to a 1.0 baseline multiplier, not a percentage scaled by 100 - a leftover from an earlier, incorrect assumption about the value's units. Every world running the default SkillXPMultiplier was getting a game-breaking XP bonus while Rested; it now applies correctly.
Fixed: Player.IsSafeInHome() could disagree with whether you actually had the Resting buff. The mod overrides vanilla's resting conditions, but the flag other systems read to ask "is this player safe at home" was still being computed from vanilla's original, un-overridden logic - so a server running AllowRestingNearEnemies could grant Resting while the game still considered the player not safe at home. It's now derived from the same config-driven decision the Resting buff itself uses.
Fixed: ServerSync.dll was not actually being bundled into the shipped plugin DLL. The merge step existed but pointed at a library search path that didn't exist, so it silently failed - meaning the mod as previously built would refuse to load on any machine that didn't happen to already have ServerSync.dll sitting in BepInEx/plugins from another mod. This is the library the server-authoritative config locking depends on, so it's now verified to be correctly merged and internalized into the single shipped DLL.
Hardened the comfort-scan-interval patch to match the same safety net the comfort-radius patch already had (stops after the first match, logs an error if the expected value ever isn't found), so a future Valheim update can't cause it to silently corrupt an unrelated value.
Chore: reference assemblies now come from the shared libs-Tools folder instead of a per-project copy, removed an unused Jotunn dependency and a leftover scratch file.
[1.0.0]
Initial build: config-driven Rested duration/XP, resting conditions, comfort radius/update interval, and sitting/lying bonuses, all server-synced and admin-lockable.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.