You are viewing a potentially older version of this package. View all versions.
sighsorry-UsefulTankards-1.0.4 icon

UsefulTankards

Turn tankards into useful gear: store meads inside them, drink stored meads on use, move while drinking, tune animation speed, cooldown reduction, buff duration, durability, recipes, and ValheimCuisine Goblet of Kings support with ServerSync.

Date uploaded 3 weeks ago
Version 1.0.4
Download link sighsorry-UsefulTankards-1.0.4.zip
Downloads 98
Dependency string sighsorry-UsefulTankards-1.0.4

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 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.2351

README

UsefulTankards


Turn tankards into practical adventuring gear. They can store and serve meads, modify drinking movement and animation speed, apply effect bonuses, use durability, and expose server-synced recipe and gameplay settings. ValheimCuisine's Goblet of Kings is supported too.


Drink from a tankard without standing still. Movement and drinking speed are configurable.


Better tankards can extend buff duration and shorten potion cooldowns.


Tankards are not repairable by default, making Dvergr tankards especially valuable. Repairability can be enabled per tankard if your setup provides a valid repair path.


Tankards carry their own mead storage, and their tooltip shows both tankard bonuses and stored meads.


Modded meads can be stored too. ValheimCuisine's Goblet of Kings is detected and configured automatically.


When stored meads are currently usable, a tankard can drink them directly from its storage. Use DataForge if you want to align custom mead effect durations: https://thunderstore.io/c/valheim/p/sighsorry/DataForge/

What It Adds

  • Tankards store meads in a small inventory, include that storage in item weight and tooltips, and can drink usable stored meads directly.
  • Movement while drinking and drinking animation speed are configurable.
  • Pure recovery-over-time effects can get shorter cooldowns; other timed effects can get longer durations.
  • Configurable durability and repairability let tankards act as limited-use drinking tools.
  • Tankard and Anniversary Tankard recipes are configurable, and ValheimCuisine's Goblet of Kings is supported when installed.
  • ServerSync keeps gameplay-affecting settings aligned on dedicated servers.

Tankard Progression

Each supported tankard has its own settings for durability, repairability, potion cooldown reduction, buff duration bonus, and storage slots.

  • Tankard: small storage and a modest bonus.
  • TankardAnniversary: stronger than the basic tankard.
  • Tankard_dvergr: the strongest vanilla tankard profile.
  • VC_GoK: supported when ValheimCuisine is installed, using the Dvergr profile defaults.

Storage

Press the interact key while hovering a tankard in your inventory to open its internal storage. Only drinkable consumables with a consume status effect can be placed inside. Stored meads are saved on change, so tooltip contents, dropped tankards, and item weight stay in sync.

When a tankard is used, UsefulTankards checks the stored meads and drinks any that can currently be consumed. Food rules, potion categories, and active status effect categories are respected.

Potion And Buff Bonuses

UsefulTankards classifies each timed status effect before applying a tankard bonus.

  • A pure recovery-over-time effect has health, stamina, or eitr recovery over time without any additional timed stat modifier. It is treated as a potion-style effect and can receive cooldown reduction.
  • Every other timed effect receives the buff-duration bonus instead. This includes mixed effects that combine recovery over time with another modifier.

This makes tankards useful without turning every drink into the same kind of bonus.

Configuration

Configuration is server-synced by default.

General options include:

  • Movement While Drinking: 0 keeps the vanilla movement lock, 1 allows normal movement, and values in between allow partial movement.
  • Tankard Animation Speed: 1 keeps vanilla speed, 2 is twice as fast, and 3 is three times as fast.

Per-tankard options include:

  • durability
  • repairability
  • potion cooldown reduction
  • buff duration bonus
  • storage slots (values above five round the rectangular grid up to the next multiple of five)

Recipe options are available for:

  • Tankard
  • TankardAnniversary

Compatibility

UsefulTankards is designed to stay lightweight and config-driven. ValheimCuisine's VC_GoK is detected automatically when ValheimCuisine is installed.

Localization

UsefulTankards includes English and Korean tooltip text for the tankard storage prompt and tankard bonus lines. Any other selected language falls back to English.

Building And Checking Changes

Build with the .NET SDK, the .NET Framework 4.8 developer pack, and a Valheim installation containing BepInEx and the publicized game assemblies:

dotnet build UsefulTankards.csproj -c Debug -p:DeployToGame=true

GamePath supplies default dependency paths; BepInExPath, CorlibPath, and PublicizedAssembliesPath can also be overridden individually. After a successful Debug build and ServerSync merge, DeployToGame=true copies only the final mod DLL to the local Valheim BepInEx/plugins folder. Use DeployToGame=false to skip copying, or DeployToGameDirectory to select another plugin folder. Debug builds do not generate release packages. Release builds merge ServerSync and regenerate the Thunderstore manifest and ZIP.

Run the storage regression checks with the .NET 8 SDK or a compatible newer SDK:

dotnet run --project Tests/StorageRegression.csproj

These checks compile the production storage code against small game test doubles. They do not replace Valheim, Harmony, or multiplayer testing. See Tests/README.md in the source checkout for coverage and the remaining in-game checks.

CHANGELOG

Changelog

1.0.8

  • Fixed a false durability mismatch that could prevent filled tankards from reopening under Mono's extended-precision arithmetic.
  • Compare restored durability as rounded single-precision values while retaining checks for actual item changes and preserving the original storage data on failure.
  • Added isolated checks using the original game item reader and client/server Mono runtimes, including repeated save/reopen cycles and changed or invalid durability values.
  • Write package manifests as UTF-8 without a byte-order mark.

1.0.7

  • Validate each stored mead's identity, quantity, quality, variant, crafter information, and custom data after loading, including other persisted item fields.
  • Preserve the original storage data and block opening or consuming its contents when restoration loses or changes item information, even if item counts and total quantities still match.
  • Show a localized warning when storage cannot be restored safely and log the differing field. Normal item ordering, custom-data ordering, and supported game normalization remain accepted.
  • Added metadata-preservation regression coverage and expanded checks against the original Valheim item reader. This protection does not recover storage data already removed by another process.
  • Updated the packaged BepInEx dependency to denikson-BepInExPack_Valheim-5.4.2351.

1.0.6

  • Added optional EpicLoot 0.14.5 input compatibility so Use opens tankard storage before EpicLoot consumes the key.
  • Preserved EpicLoot socket modifier and confirmation-prompt behavior, and safely closes the socket UI before opening tankard storage.
  • Kept tankard tooltip hints orange when EpicLoot rewrites named color tags.
  • Added real Harmony class-processing checks to catch effective patch-order regressions.

1.0.5

  • Updated Harmony targets and private game access for Valheim 1.0.7, including the new tooltip, inventory insertion, crafting refresh, and inventory change signatures.
  • Updated tankard storage parsing for Valheim's compact v109 inventory format while preserving unsupported or incomplete payloads without rewriting them.
  • Rebuilt the bundled ServerSync library against the original Valheim 1.0.7 assemblies to support the new ZRoutedRpc.Everybody constant and current admin checks.
  • Switched compilation and ILRepack resolution from publicized assemblies to the original game assemblies.
  • Updated the packaged BepInEx dependency to denikson-BepInExPack_Valheim-5.4.2350 and added original-game contract checks for client and dedicated-server APIs.

1.0.4

  • Added opt-in local deployment for Debug builds with DeployToGame=true, copying only the final ServerSync-merged plugin DLL after successful post-processing.
  • Added DeployToGameDirectory for custom plugin destinations and documented the Debug build and deployment workflow.
  • Kept local Debug deployment separate from Release packaging and version publishing.

1.0.3

  • Reused an open tankard inventory for drinking and tooltip queries, preventing its old contents from overwriting a drink consumption when the storage closes.
  • Checked the attacking player's ownership and tankard inventory membership before consuming stored drinks, including after inventory callbacks.
  • Routed tankard quick-stacking through the local inventory UI instead of world-container RPCs.
  • Consolidated storage registration and skipped unused weight calculations during storage validation.
  • Detached configuration callbacks during plugin cleanup and prevented duplicate subscriptions when profiles are registered again.
  • Fixed builds that specify only GamePath while preserving individually overridden dependency paths.
  • Added storage regression checks for saved-data preservation, live inventory consumption, ownership changes, and cleanup.

1.0.2

  • Prevented stored-mead weight checks from instantiating item prefabs and consuming another mod's pending item-upgrade data.
  • Cached stored drink weight in tankard metadata, with automatic non-instantiating migration for existing filled tankards.
  • Removed repeated storage reconstruction from routine carry-weight calculations.

1.0.1

  • Hardened tankard storage loading and lifecycle cleanup to preserve stored meads across missing data, item drops, and UI transitions.
  • Fixed tankard use-context, animation cleanup, and recipe validation edge cases.
  • Simplified configuration, localization, and patch wiring while aligning documentation with actual behavior.
  • Updated Release packaging to derive the package version from the DLL, sync the manifest, and package the root README.

1.0.0

  • Initial release