You are viewing a potentially older version of this package. View all versions.
PatTheEvil-Dvergr_Pieces_Patch-1.2.0 icon

Dvergr Pieces Patch

Makes Tequila's Dvergr Pieces work on Valheim 1.0. Contains none of his files - it installs his mod as a dependency and repairs it in memory at load.

Date uploaded 2 weeks ago
Version 1.2.0
Download link PatTheEvil-Dvergr_Pieces_Patch-1.2.0.zip
Downloads 274
Dependency string PatTheEvil-Dvergr_Pieces_Patch-1.2.0

This mod requires the following mods to function

Tequila-Dvergr_Pieces-2.9.0 icon
Tequila-Dvergr_Pieces

Adds dvergr buildable pieces

Preferred version: 2.9.0
denikson-BepInExPack_Valheim-5.4.2350 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.2350

README

Dvergr Pieces Patch

Makes Tequila's Dvergr Pieces work on Valheim 1.0.

This package contains none of Tequila's files. It installs his mod as a dependency — your mod manager will fetch it alongside this one — and repairs it in memory when the game loads. His assembly is never modified, never patched on disk, and never redistributed.

Everything you actually build comes from his mod. This is one 12 KB plugin that makes it run again.


What was broken

1. The build menu threw on every refresh

Valheim 1.0 refactored PieceTable. The field m_availablePieces changed from List<List<Piece>> (pieces grouped by category) to HashSet<Piece> (a flat set), and the old per-category list was renamed to m_availablePiecesByCategory.

The PieceManager bundled inside Dvergr Pieces still reads m_availablePieces as List<List<Piece>>. Because the name still exists with a different type, this is not a load failure — its patches throw MissingFieldException the moment they run, the mod's category never gets its slot, and Hud.UpdateBuild then throws ArgumentOutOfRangeException on every frame the build menu is open. Over a thousand exceptions in a few minutes of play.

This patch removes those two broken patches from PieceTable.UpdateAvailable and installs equivalents that use the renamed field. Nothing else of PieceManager's is touched.

2. The pieces were missing from the new build menu

Valheim 1.0 replaced the old category tab bar with a tag-driven menu (ByUsagePieceList) that filters on a new field, Piece.m_usage. Prefabs authored before 1.0 have no usage tags, so they matched no category and only ever showed under "Show All".

The pieces are now tagged so they appear where you would expect them. m_usage is a flags field, so a piece can sit in more than one category — the chests and the shelf are both Storage and Furniture, and the pole and beams are both Building and Architecture.

Menu category Pieces Count
Furniture bed, table, chair, stool, both chests, shelf 7
Stairs metal spiral (left + right), marble spiral (left + right), wooden stairs 5
Building black marble block, wooden pole, wooden beam, wooden beam 2x1 4
Lighting black core torch, placeable lantern, wisp torch 3
Storage both chests, shelf 3
Architecture wooden pole, wooden beam, wooden beam 2x1 3
Walls both dvergr walls 2
Decor marble head, vines 2
Flooring wooden floor 1
Doors and Windows dvergr door 1
Crafting fermenter 1

That is 26 prefabs, covering all 24 pieces the mod advertises — the two spiral staircases each ship as a separate left and right prefab.

All of them also appear together under a "Dvergr" category, the way the original mod had them before 1.0. Because m_usage is a flags field, that is an extra bit rather than a move: the bed is under Furniture and under Dvergr. It can be turned off — see Configuration.

ByUsagePieceList builds its tag list into two instance arrays at construction, and the rest of the menu reads only those, so the category is added by appending one entry to each — no change to the enum and nothing patched in the BCL. The bit is picked from what the array actually holds rather than hardcoded, so a category added by another mod (Jötunn can do this since 2.30.1) will not collide with it.

3. The fermenter did not accept newer meads

A bug Tequila acknowledged in his 2.9.0 changelog and never got to. The Dvergr fermenter's brew list was baked into its asset bundle in 2024, so it refused everything added afterwards — seven meads in total, from Ashlands and Bog Witch.

Rather than hardcoding a list that would rot on the next update, the fermenter now copies any missing conversions from the vanilla fermenter at load time, so future meads work automatically. Its 30% faster fermentation is unchanged.

4. The original mod's config did nothing while the game was running

Editing Tequila.DvergrPieces.cfg — a crafting cost, a build table, anything — took effect only on a cold start. Removing a piece from the hammer did not even survive a world reload.

Valheim 1.0 turned ZRoutedRpc.Everybody from a static field into a const. A compiler inlines a const, so code built before the change still reads it as a field, and Mono throws MissingFieldException the moment such a method is JIT-compiled. That instruction sits in the handler the bundled ServerSync attaches to every synced config entry: change a setting and the handler throws, and because it is first in the invocation list, PieceManager's handler — the one that actually applies the change — never runs.

So the config was never being ignored. The code that applies it was being skipped.

The broken handler is now detached, and the rest of the chain runs normally — settings apply the moment you save the file again. Rewriting the instruction would have been neater, but it is not possible: Harmony has to compile a method in order to redirect it, so patching one of these is itself what throws. The only way out is to make sure the method is never called, which is also how this patch deals with the build menu.

The one thing this gives up: a config change is no longer sent to other players. That is all the detached handler did, and it never actually happened — it threw before getting that far — so nothing that used to work has stopped. It cannot be brought back from here, and for the same reason an admin adding or removing a piece at runtime on a server still fails. If everyone on the server keeps the same config file, none of this matters.

Nothing is wrong with ServerSync itself; rebuilding it against 1.0 fixes this with no source change. Only mods frozen on a pre-1.0 build are affected.


Installing

Install it with a mod manager and Dvergr Pieces comes with it. If you are installing by hand, you need both: Tequila's Dvergr Pieces 2.9.0 and this plugin, in BepInEx/plugins.

Load order does not matter — this plugin declares a hard dependency on his and BepInEx sorts it out. If his mod is missing, this one refuses to load rather than misbehaving.

Existing worlds, saves and configs are unaffected. His mod keeps its own plugin GUID and its own Tequila.DvergrPieces.cfg, which this patch does not touch, so everything you have already built and every crafting cost you have customised stays exactly as it was.

If you used Dvergr_Pieces_Reborn, remove it. That package bundled a patched copy of his DLL; this one replaces it and is the reason it was deprecated.

On a server, everyone needs it — including the server itself

In short: if even one person on your server is missing the patch, a newer mead can be destroyed when the Dvergr fermenter is tapped — including one you brewed yourself, on your own fermenter, with the patch installed. Either put it on every client and the server, or set Fermenter meads = false. Nothing else in the mod is affected.

Where Needed? Why
Every player yes any of them can be the one that processes a tap
The dedicated server yes it can own the fermenter when no player has claimed it

The build menu fixes are purely local and cosmetic, so a player without the patch just sees the pieces the way 1.0 left them. The fermenter is the part that matters, and the reason it is not enough to have the patch yourself is worth spelling out.

Fermenter.Interact sends RPC_Tap to whoever owns the fermenter's ZDO, and does not claim ownership first. RPC_Tap clears the stored contents immediately and schedules DelayedTap, which spawns nothing at all if its own copy of the brew list does not know the item. So if the peer that owns that fermenter lacks the patch, tapping a newer mead destroys it silently — the animation plays and nothing comes out.

The owner is not who built it, and not necessarily who clicked it. ZDOMan hands ownership to a peer that has the object in its active area, and only reassigns it once the current owner leaves — so ownership is sticky. A second player standing at your fermenter can be the one who processes your tap, and a dedicated server can own it when no player has claimed it. Having the patch yourself is therefore not enough.

This mismatch is one the patch itself creates: before it, nobody could ferment those meads, so nobody could lose one. If you cannot get it onto every client and the server, set Fermenter meads = false (see Configuration below). That leaves the fermenter exactly as Tequila shipped it, removes the risk entirely, and the build menu fixes keep working.


Configuration

BepInEx/config/PatTheEvil.DvergrPiecesPatch.cfg, created on first run. Both settings take effect after a restart.

Setting Default What it does
Dvergr category true Adds a Dvergr category to the build menu listing every piece of the mod. Purely cosmetic and purely local — it does not have to match between players. Turn it off to have the pieces only in the vanilla categories.
Fermenter meads true Lets the Dvergr fermenter accept every mead the vanilla fermenter does. Turn it off on a server where not everyone has the patch — see above.

Tequila's own config, Tequila.DvergrPieces.cfg, is separate and untouched. Crafting costs, stations and piece categories still live there.


Credits

Tequila — the mod itself: every model, texture, icon and piece of design, and every version up to 2.9.0. None of it is modified or included here.

Tequila's own credits from his page: @Azumatt, @CookieMilk, @GraveBear, @KG, @Marlthon, @Tjeb, @blaxxun, @GoldenJude, @Yggdrah, @MythikWolf, @GoldenRevolver and everyone at the Discord now known as the Azumatt Mod Hub.

Thanks to Azumatt and Arrowmaster for pointing out that the first version of this went about it the wrong way, and for saying so rather than just having it removed.

His mod has had no update since November 2024, and a February 2026 question on that Discord about contacting him went unanswered. I have not reached him myself. If Tequila updates the mod, this patch becomes unnecessary and will be deprecated.


Contact

CHANGELOG

Changelog

1.2.1

  • The mod's sounds follow the volume sliders now. The lantern, the fermenter, building and everything else played at full volume whatever the Master and SFX sliders said, and stayed audible with the game turned down to zero.
  • Both of Tequila's asset bundles carry their own copy of the game's audio mixer, and every sound in them was routed through a copy the sliders never reach. They are now rerouted to the matching group of the real mixer when a world loads.
  • Another mod that carries the same copy of the mixer gets the same treatment, since the copy cannot be traced back to the mod it came from.

Thanks to Simple205 for the report (#3).

1.2.0

  • The original mod's config works again while the game is running. Changing a crafting cost, a build table or anything else in Tequila.DvergrPieces.cfg took effect only on a cold start, and removing a piece from the hammer did not even survive a world reload. Both apply immediately now.
  • Valheim 1.0 turned ZRoutedRpc.Everybody from a static field into a const. The ServerSync copy compiled into Dvergr Pieces still reads it as a field, which throws MissingFieldException in the handler attached to every synced config entry — and because that handler runs first, the one that actually applies the change never got to run. That handler is now detached, so the rest of the chain runs normally.
  • A config change is no longer sent to other players. That is the only thing the detached handler did, and it never actually happened — it threw first — so nothing that used to work has stopped. It cannot be restored from here, and for the same reason an admin adding or removing a piece at runtime on a server still fails. Everyone keeping the same config file is unaffected.
  • tools/verify-compat.ps1 gained a check for this: a field that kept its name and its type but became a const. That is what made the bug invisible until it threw.

Thanks to Simple205 for the report (#1).

1.1.0

  • The pieces now also appear together under a Dvergr category in the build menu, the way the original mod had them before Valheim 1.0. It is an extra tag rather than a move, so each piece still shows under its vanilla category as well.
  • Added a config option, Dvergr category, to turn that off.
  • Added a config option, Fermenter meads, to turn the fermenter brew sync off. On a server where not everyone has the patch, an unpatched client cannot tap a newer mead and tapping destroys it - a mismatch this patch is what creates, so there is now a way out of it that does not mean uninstalling.

1.0.0

First release of the patch.

  • Repairs PieceManager's PieceTable.UpdateAvailable prefix/postfix, which broke on Valheim 1.0 when m_availablePieces changed from List<List<Piece>> to HashSet<Piece> and the old per-category list was renamed to m_availablePiecesByCategory
  • Adds Valheim 1.0 Piece.m_usage tags so the pieces appear in the new build menu's categories instead of only under "Show All"
  • Keeps the Dvergr Fermenter's brew list in sync with the vanilla fermenter, so it accepts every mead including the seven added since Ashlands, and will pick up future ones automatically. This fixes a known issue from Dvergr Pieces 2.9.0.

Note on Dvergr_Pieces_Reborn

This package replaces PatTheEvil-Dvergr_Pieces_Reborn, which has been deprecated.

That package redistributed Tequila's compiled assembly with the fix applied to it. Azumatt pointed out that bundling another author's copyrighted DLL is not acceptable even unmodified, and that the right shape is to depend on the original and patch it at runtime. He was right. This package does that instead, and contains no files of his.