Valheim
Install with App

Details

Latest version
1.0.2
Last Updated
First Uploaded
Downloads
33
Likes
0
Size
15KB
Dependants

Categories

ADDatHost Valheim hosting
€1

ReefPacksAzuUIFix 1.0.2

Direct final-text compatibility patch for ReefPacks + AzuCraftyBoxes. Replaces the unsuccessful 1.0.0/1.0.1 UI-bank approach.

Installation

Close Valheim. Replace the old ReefPacksAzuUIFix.dll in your active profile's BepInEx/plugins/ReefPacksAzuUIFix/ folder with the new DLL. Keep only one copy of this plugin. Restart Valheim and view the Hammer recipe. This release has not been installed into your profile automatically.

The release zip uses Thunderstore layout. Source and build scripts are provided separately. Version 1.0.2 can be uploaded as an update under the same Thunderstore team/package.

What changed

The plugin now patches only InventoryGui.SetupRequirement, with a Harmony POSTFIX marked [HarmonyPriority(Priority.Last)] and [HarmonyAfter("Azumatt.AzuCraftyBoxes")]. Registration also orders it after the other owners already present on that method. Other Harmony owners are allowed. Mods installed later with conflicting explicit ordering, or separate UI refresh paths, cannot be guaranteed to run before this patch.

It finds elementRoot.transform.Find("res_amount"), obtains TextMeshProUGUI, reads the resource shared name from Piece.Requirement, and adds the worn ReefPack count to the displayed available numerator. The denominator is preserved. Examples:

  • 0/3 + 37 Wood -> 37/3
  • 10/3 + 37 Wood -> 47/3
  • 0/2 + 40 Stone -> 40/2

When the corrected count meets the displayed requirement, the component color becomes white. Otherwise Azu's existing color remains. Only text.text and text.color are written. No return value, recipe, inventory, eligibility state, consumption method, container list or UI-bank cache is changed. No UiItemBank methods are patched or invoked. No binary hashes or owner allowlists are used.

This is the explicitly requested additive display correction. It assumes Azu's displayed numerator excludes the ReefPack. It does not query containers to determine whether a future Azu release already includes the pack. If native integration starts including it, disable this compatibility plugin to avoid counting it twice. Azu's abbreviated K/M numerator can be parsed, but the original abbreviated count is already rounded, so the resulting sum is approximate. Unsupported custom formats are left unchanged and logged.

Equipped-pack access

Uses the inspected ReefPacks PackUi.WornPack(Player) method, which reads the local player's shoulder equipment reference and recognizes ReefPack items. Only that exact item's existing PackData.cache entry is accessed through TryGetValue; PackData.Item identity is checked and PackData.Inv is read. No carried-pack scanning, main-inventory membership assumption or frame-cache check is performed. Item matching uses the shared name and Valheim's world-level filter.

Never calls PackData.Get, because it can initialize, resize, save or eject items. An unavailable cache entry contributes zero and produces a diagnostic. Missing dependencies/API signatures prevent registration; runtime nulls or exceptions skip only the individual UI element and future elements retry.

Configuration and diagnostic session

BepInEx/config/local.ReefPacksAzuUIFix.cfg:

[General]
Enabled = true
DiagnosticLogging = true

Logging is enabled for testing. Repeated identical messages are suppressed; changing results are logged, up to 200 messages each launch. Disable DiagnosticLogging after the test. Startup reports both dependencies and successful InventoryGui.SetupRequirement registration. Expected messages:

SetupRequirement postfix executed
SetupRequirement $item_wood original=0/3 pack=37 corrected=37/3; read worn pack
SetupRequirement $item_stone original=0/2 pack=40 corrected=40/2; read worn pack

Read BepInEx/LogOutput.log or Valheim's Player.log after opening the Hammer recipe. These diagnostics distinguish missing pack data, an unsupported text format and successful correction later overwritten by another UI path. Errors do not disable the entire session.

Build and tests

Built against the installed Valheim 1.0.12, TextMeshPro and BepInExPack 5.4.2350 assemblies. No compile-time ReefPacks/Azu/Hearthkeeper/ValheimQoL references are needed. Use Visual Studio Build Tools with MSBuild and C# compiler:

.\build.ps1 -GameDir 'D:\SteamLibrary\steamapps\common\Valheim' -BepInExDir 'C:\path\to\profile\BepInEx'
.\tests\run.ps1 -Compiler 'C:\path\to\Roslyn\csc.exe' -HarmonyDir 'C:\path\to\profile\BepInEx\core'
.\package.ps1

The complete .csproj uses the Roslyn MSBuild task and Valheim's Mono assemblies; no .NET SDK/NuGet download required. Output is dist/ReefPacksAzuUIFix.dll. Game and dependency DLLs are not redistributed.

38 automated checks pass, including an actual Harmony detour proving this postfix runs after a simulated Azu postfix even when both use Priority.Last. The test compiles production source against game/mod test doubles, not a running Valheim world. See TEST-CHECKLIST.md for the required game retest. Versions 1.0.0 and 1.0.1 did not fix the user's game display; 1.0.2 has not yet been game-validated.

Independent compatibility plugin, MIT license. Not an official ReefTeam/Azumatt release. Public source examined: AzuCraftyBoxes. ReefPacks APIs were inspected from the installed 0.2.0 managed DLL for interoperability.

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