Hollow Knight Build Utils
Hollow Knight Build Utils is a NuGet package that aims to aid in mod development.
Features
-
Automatically Pack Mods: Automatically pack the mod into a zip file and calculate the SHA256 value after the build.
-
Mods References Helper: Automatically download HKMAPI and other mods that depend on it when building.
-
Reflect Helper: Allows developers to directly access private fields and private types.
-
Mono Mod Hooks Helper: Allow developers to use MonoModHooks outside of
MMHOOK_Assembly-CSharp
andMMHOOK_PlayMaker.dll
. -
Mod Resources Helper.
Examples
How to use
Add a Nuget package reference to HKBuildUtils like this:
dotnet add package HKBuildUtils
or
<PackageReference Include="HKBuildUtils" Version="*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Migrating from the mod template made by BadMagic
To do this just a few steps are required:
- Add a Nuget package reference to HKBuildUtils.
- Remove all
<Reference />
items (for example, remove this:<Reference Include="UnityEngine.VehiclesModule" />
). - Remove
CopyMod
target.