Skip to content

Modernize build system, clean repo, rewrite README#243

Open
mrcook1e-ai wants to merge 12 commits intoRandyKnapp:mainfrom
mrcook1e-ai:fix/unity-6000-compat
Open

Modernize build system, clean repo, rewrite README#243
mrcook1e-ai wants to merge 12 commits intoRandyKnapp:mainfrom
mrcook1e-ai:fix/unity-6000-compat

Conversation

@mrcook1e-ai
Copy link
Copy Markdown

  • Remove 15 ZIP release archives and banner images (~241MB of junk)
  • Add Valheim.props: single source of truth for all game/BepInEx paths
  • Add build/FindValheim.ps1: auto-detects Valheim via Steam registry + libraryfolders.vdf, works with any Steam library location
  • Replace all hardcoded machine-specific paths (M:\Code\VapokModBase...) with MSBuild properties resolved at build time
  • Add BepInEx.AssemblyPublicizer.MSBuild NuGet package so Valheim assemblies are publicized automatically during build (no manual step)
  • Fix renamed assemblies for current Valheim version: ui_lib -> gui_framework, assembly_steamworks -> com.rlabrecque.steamworks.net
  • Update all Unity DLL references from unstripped_corlib/ to valheim_Data/Managed/ (folder removed in BepInEx 5.4.22+)
  • Rewrite README: project structure tree, developer quickstart, build system explanation, updated screenshots link

John Doe and others added 12 commits April 15, 2026 21:47
- Remove 15 ZIP release archives and banner images (~241MB of junk)
- Add Valheim.props: single source of truth for all game/BepInEx paths
- Add build/FindValheim.ps1: auto-detects Valheim via Steam registry +
  libraryfolders.vdf, works with any Steam library location
- Replace all hardcoded machine-specific paths (M:\Code\VapokModBase\...)
  with MSBuild properties resolved at build time
- Add BepInEx.AssemblyPublicizer.MSBuild NuGet package so Valheim
  assemblies are publicized automatically during build (no manual step)
- Fix renamed assemblies for current Valheim version:
  ui_lib -> gui_framework, assembly_steamworks -> com.rlabrecque.steamworks.net
- Update all Unity DLL references from unstripped_corlib/ to
  valheim_Data/Managed/ (folder removed in BepInEx 5.4.22+)
- Rewrite README: project structure tree, developer quickstart,
  build system explanation, updated screenshots link

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AugaHealthBar.cs: replace direct GuiBar.SetBar() call (became internal)
  with cached Reflection helper for Unity Editor preview
- Auga.cs: fix compile errors — add HasJewelcrafting field, switch
  HasChatter/HasSearsCatalog/HasJewelcrafting from ContainsKey to
  TryGetValue so the PluginInfo out-vars are actually declared
- Auga.cs: remove stale PTB version gate (Version.m_minor/m_patch
  no longer needed for current Valheim)
- EnemeyHud_Setup.cs: switch GetComponentInChildren<Text> → TMP_Text
  (Auga HUD uses TextMeshPro; old call returned null and would NPE)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AugaUnityLib: remove ImageConversionModule ref (CS1705/CS7069 with Unity 6);
  use reflection wrapper for LoadImage/EncodeToPNG at runtime
- AugaUnityLib: fix RecipeDataPair .Key/.Value → .Recipe/.ItemData
- AugaUnityLib: fix ZInput.GetAxis → Input.GetAxis for scroll wheel
- AugaUnityLib: fix FileHelpers.m_cloudEnabled → CloudStorageEnabled
- AugaUnityLib: fix AugaBindingDisplay.SetBinding for new ZInput/InputAction API
- AugaUnityLib: remove JetBrains.Annotations refs ([UsedImplicitly], [CanBeNull])
- Auga.csproj: convert to SDK-style; add AssemblyPublicizer + ILRepack NuGet refs
- Auga: exclude API.External.cs (constructor name bug, not in original compile list)
- Auga: fix RecipeDataPair .Key/.Value → .Recipe/.ItemData (PlayerInventory_Setup)
- Auga: remove Player.m_firstSpawn check (field removed in current Valheim)
- Auga: comment out Settings UI patches (Settings API fully redesigned)
- Auga: fix Minimap m_nameInput type TMP_InputField → GUIFramework.GuiInputField
- Auga: fix Hud_Setup undefined vars, duplicate iconMaterial, removed fields
- Auga: skip ILRepack for Debug builds (MSBuild task incompatible with dotnet CLI)
- Add APIManager stub DLL (Libs/APIManager.dll) and stub project (_stubs/)

Both AugaUnityLib and Auga now build with 0 errors under dotnet build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Set validateReferences=0 in Unity.Auga.dll.meta — Unity failed to
  load the plugin because Valheim runtime DLLs (gui_framework etc.) are
  absent from the project; they exist at runtime in Valheim, not in Editor
- Add FixMissingScripts.cs editor utility (menu: Auga > Fix Missing Scripts)
  to reimport Unity.Auga.dll and clean up stale missing-script references
  in prefabs after a DLL rebuild

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
APIManager.dll is embedded as a resource in Auga.dll but was missing
from the LoadDependencies() call, causing FileNotFoundException at
BepInEx chainloader startup. Added LoadEmbeddedAssembly for it before
fastJSON and Unity.Auga so it's available when Patcher.Patch() is called.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The CLR tries to resolve APIManager.dll when loading the Auga type for
AddComponent() — before Awake() is ever called. LoadDependencies() in
Awake() was too late. Added a static constructor that registers an
AppDomain.AssemblyResolve handler to load all embedded DLLs
(APIManager, fastJSON, Unity.Auga) on demand from manifest resources.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DamageText.AddInworldText: parameter 'float dmg' removed in current
  Valheim; replaced with 'string text' and parse damage from it
- Add gui_framework.dll (Fishlabs/IronGate) to AugaUnity/ExternalLibraries
  so Unity can resolve GuiInputField script references in prefabs when
  building AssetBundles; validateReferences=0, Editor platform only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced the BepInEx.AssemblyPublicizer.dll file, which is a tool for publicizing and stripping assemblies.
- This version includes various attributes and methods for handling assembly metadata and custom attributes.
- The addition enhances the assembly management capabilities within the BepInEx framework.
- Uncomment entire FejdStartup.Awake patch that replaces vanilla menu with Auga UI
- Fix type changes: Text -> TMP_Text, InputField -> GUIFramework.GuiInputField
- Skip server browser fields (completely redesigned in current Valheim, TODO)
- Add null safety to SetButtonListener/SetToggleListener helpers
- Add TabHandler null check before wiring tab click events
- Uncomment UpdateCharacterList, OnNewCharacterDone, ClearCharacterPreview patches
- Add missing usings: TMPro, UnityEngine.Events, System.Collections

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add FC<T>/FO null-safe helpers for all Find+GetComponent chains.
  Previously a single null Find caused the entire Prefix to crash,
  leaving all subsequent Replace/wire-up calls unexecuted.
- Wrap each Replace block in null check so one failure doesn't kill rest
- Fix SelectCharacter paths to match Auga prefab structure:
  Panel/Inset -> Inset, Panel/Start -> Start, Panel/Back -> Back, etc.
- Fix NewCharacterPanel paths: Content/Done, Content/NameExistsWarning,
  ToggleGroup/Toggle_Male, ToggleGroup/Toggle_Female
- Null-safe PlayerCustomizaton field transfer before Replace
- Null-safe Animator controller assignment
- All unknown paths now emit LogWarning instead of throwing NullRef

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Implemented PlayerCustomization class for managing player appearance, including hair and beard selection, color adjustments, and GUI interactions.
- Added Settings class to handle game settings, including audio, visual options, and user interface navigation.
- Integrated functionality for saving and applying settings, as well as handling input layout changes.
- Established a system for managing available customization options and ensuring user-friendly navigation within the settings menu.
…ndingDisplay

- Updated NewCharacterPanel initialization in MainMenu_Setup.cs to correctly reference UI elements and handle player customization.
- Added hidden stubs for selected hair and beard to prevent null reference exceptions.
- Improved toggle button listeners for gender selection to ensure proper functionality.
- Enhanced error handling in AugaBindingDisplay.SetBinding to provide fallback text and prevent crashes due to missing input bindings.
- Replaced direct access to private fields with reflection to avoid FieldAccessException.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant