Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
last week
Downloads
94
Size
16KB
ADDatHost Valheim hosting
€1

ReefPacksAzuUIFix 1.0.0

Client-side BepInEx compatibility plugin that adds the currently worn ReefPack's missing materials to AzuCraftyBoxes' displayed UI count. It does not alter crafting eligibility, resource consumption, inventory contents, or container registration.

Download and installation

Use dist/ReefPacksAzuUIFix-1.0.0.zip (Thunderstore folder layout), or copy dist/ReefPacksAzuUIFix.dll into your active profile:

BepInEx/plugins/ReefPacksAzuUIFix/ReefPacksAzuUIFix.dll

For Thunderstore Mod Manager, open Settings > Browse profile folder, close Valheim, and copy the DLL to that location. For manual installations, use Valheim's BepInEx folder. Restart the game. Install this UI plugin on clients; it is not needed on a dedicated server. Keep your existing ReefPacks/AzuCraftyBoxes installation.

This project has not installed itself into your game or modified your profile.

First launch creates BepInEx/config/local.ReefPacksAzuUIFix.cfg:

[General]
Enabled = true

Set Enabled = false to return the original UI result. An in-game config manager can change this live; restart after manually editing the config file. The postfix remains registered while disabled but returns immediately. Removing the DLL and restarting also restores the original behavior.

Startup logs explicitly report whether AzuCraftyBoxes and ReefPacks were found and whether the patch was applied. A successful line contains:

UI compatibility patch successfully applied: UiItemBank.GetTotalAnyQuality(string). Enabled=True

Compatibility and safeguards

Built against the installed Valheim 1.0.12 managed assemblies and the active profile's BepInExPack 5.4.2350 (loader 5.4.23.5) assemblies. The inspected mods are:

  • fedorovdgap-AzuCraftyBoxes 1.8.18, the unofficial Valheim 1.0 rebuild, with plugin GUID Azumatt.AzuCraftyBoxes.
  • ReefTeam-ReefPacks 0.2.0, plugin GUID reef.packs.

The exact inspected mod DLL SHA-256 hashes are checked at startup. An updated or repacked binary is deliberately unsupported until reviewed, even if its version string matches. This prevents an upstream native integration from receiving an additional backpack count. Do not remove this guard merely to make another release load.

Missing dependencies, changed member signatures, hash mismatches or unreadable assemblies leave the plugin inactive with a warning. A runtime compatibility exception or another Harmony owner on the patched UI method disables correction for the rest of the session and emits one warning. It does not suppress exceptions from the original mod.

Hearthkeeper and ValheimQoL are neither referenced nor patched.

Exactly what is patched

One Harmony postfix, priority Last, on:

AzuCraftyBoxes.Util.Functions.UiItemBank.GetTotalAnyQuality(string) -> int

It changes only the returned integer and never edits Azu's cached totals. Repeated calls cannot accumulate additions. Both known callers are UI code: crafting requirement labels and the building HUD's available-piece display. Consequently both displays can improve; no eligibility or consumption method is patched.

GetTotalAtQuality is deliberately not patched: it has no callers in the inspected installed binary. Its container path also passes the quality argument to an extension that actually treats that argument as a minimum amount; this plugin does not broaden scope to repair that unused upstream code.

Equipped-pack access was determined from the actual ReefPacks 0.2.0 DLL, not guessed:

  1. ReefPacks.PackUi.WornPack(Player) reads the shoulder/cape equipment slot and validates it with ReefPacks' own pack recognition.
  2. Confirm that exact item reference is still in the local player's inventory.
  3. Read ReefPacks.PackData.cache, a ConditionalWeakTable<ItemDrop.ItemData, PackData>, through TryGetValue only.
  4. Verify PackData.Item identifies that same item, and read PackData.Inv.

Never calls PackData.Get: inspection shows it can reload data and call EnsureSize, which can eject overflow items and save. Never creates or loads a pack inventory. A pack not yet initialized by ReefPacks contributes nothing until ReefPacks initializes it naturally (for example through normal weight/UI processing).

Counts use shared item names, stack sizes and Valheim's world-level filter. They read the physical inventory list rather than calling globally patched count methods. No unequipped backpack inventory is enumerated from ReefPacks' cache.

Double-count protection

ReefPacks adds a Container component to players. PackUi.Open assigns the worn pack's inventory to that component; OnUnequip replaces it with an empty inventory. Azu's vanilla-container registry can therefore already include this pack under some circumstances.

  • If any current UI-bank container exposes the same inventory reference, the original total is returned unchanged, preserving Azu's own leave-one behavior.
  • Item references already present in player/container inventories are not added again.
  • A baseline reconstructed from physical player inventory plus the UI bank's existing container contributions must exactly match the original result. An unexpected contribution (such as a patched player count) or a stale cache causes correction to be skipped rather than guessed.
  • Unsupported future DLLs are refused before patching. Other Harmony owners on the UI counting method are also refused.
  • Azu's cached context must belong to the current frame. Pack contributions are read live on every query, so no separate stale pack-count cache is introduced.

Azu's existing per-frame caching can still cause its normal one-frame refresh delay. If Azu already includes an unequipped/stale container, this plugin does not rewrite that existing count. In the inspected ReefPacks implementation, unequipping clears the player-container inventory.

Newly added pack counts use the full stack amount (49 Wood -> 49). Existing nearby-container totals retain Azu's Leave One Item policy. For exact summed raw counts in checklist C, turn that Azu option off; otherwise subtract one per contributing nearby container. If the pack is already counted natively, its original leave-one adjustment is likewise preserved.

Build from source

Requires Windows, Visual Studio/Build Tools with MSBuild and the C# compiler, a local Valheim installation, and BepInEx 5.4.2350. No NuGet downloads, .NET SDK, or compile-time ReefPacks/Azu references are needed. Game and third-party DLLs are not redistributed in the source package.

.\build.ps1 -GameDir 'D:\SteamLibrary\steamapps\common\Valheim' -BepInExDir 'C:\path\to\profile\BepInEx'

Pass -MSBuild 'C:\path\to\MSBuild.exe' if discovery is unavailable. The complete .csproj uses the Roslyn Csc MSBuild task and Valheim's Mono assemblies directly; it targets the .NET Framework 4.x/Mono surface and is not an SDK-style dotnet build project. Output: dist/ReefPacksAzuUIFix.dll.

Run tests with:

.\tests\run.ps1 -Compiler 'C:\path\to\Roslyn\csc.exe' -HarmonyDir 'C:\path\to\profile\BepInEx\core'

Validation status

Release compilation succeeded with warnings treated as errors. 27 harness checks passed, compiling the production source unchanged against test doubles and exercising a real Harmony detour with the installed profile's Harmony library. See TEST-CHECKLIST.md for coverage and the remaining in-game acceptance tests.

Not yet validated in a running Valheim world. The harness simulates inventory changes; it does not craft a Hammer or verify real save files/network state. No claim is made that acceptance tests A-G or a clean post-install Player.log have already been observed.

Sources inspected

  • Latest AzuCraftyBoxes source, reporting version 1.8.19 when inspected on 2026-09-13: Patches/InventoryGui.cs, Patches/HUDPatches.cs, Util/Functions/UiItemBank.cs, Util/Functions/Boxes.cs, and container implementations. The installed 1.8.18 IL was checked separately.
  • ReefPacks package: 0.2.0 package has an empty source URL. Downloaded and installed DLLs have identical hashes. Managed IL inspected for interoperability using Mono.Cecil; third-party implementation code is not included in the release.

See RESEARCH.md for exact binary hashes and findings.

Thunderstore packaging

The release zip contains manifest.json, README.md, a 256x256 icon.png, license, checklist, and BepInEx/plugins/ReefPacksAzuUIFix/ReefPacksAzuUIFix.dll. Its dependencies name the exact installed rebuild and ReefPacks version. It has not been published. The manifest intentionally has an empty website URL until a real project repository exists. If publishing, select Thunderstore's AI Generated category as requested by its current upload guidance.

License: MIT. This plugin is an independent compatibility fix, not an official ReefTeam or Azumatt release.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro