Hollow Knight Modding generally requires changing the game's code using an assembly editor such as dnSpy. While this works, it means that each time the game releases a new version, all mods had to be recoded by hand. The Hollow Knight API aims to remove this requirement by exposing hooks to perform most needed operations without having to rewrite decompiled code.
We use the MonoMod patcher to greatly reduce the effort in patching the assembly. Go check it out! https://github.com/0x0ade/MonoMod
Building the API is fairly straightforward.
- Clone this!
- Go to
%HollowKnightGameInstallPath%/hollow_knight_Data/Managed/
and copy it's contents to theVanilla
folder in this repository. (Create the Vanilla folder if it does not exist.) - Open the solution in Visual Studio 2017 (May work in other versions, only tested on VS2017 Community Edition)
- Set the build configuration to Debug.
- The patched assembly should be in
RepoPath/OutputFinal/hollow_knight_Data/Managed/
(There is also a zip file inRepoPath/ModdingAPI.zip
ready to upload to Google Drive) - Copy Assembly-CSharp.* to
%HollowKnightGameInstallPath%/hollow_knight_Data/Managed/
Building the API is fairly straightforward. (Note that we're still building this in Windows, just using the Mac files for the game.)
- Clone this!
- Go to
%HollowKnightGameInstallPath%/Contents/Resources/Data/Managed/
and copy it's contents to theVanillaMac
folder in this repository. (Create the VanillaMac folder if it does not exist.) - Open the solution in Visual Studio 2017 (May work in other versions, only tested on VS2017 Community Edition)
- Set the build configuration to DebugMac.
- Build. The patched assembly should be in
RepoPath/OutputFinalMac/hollow_knight.app/Contents/Resources/Data/Managed/
(There is also a zip file inRepoPath/ModdingAPIMac.zip
ready to upload to Google Drive) - Copy Assembly-CSharp.* to
%HollowKnightGameInstallPath%/Contents/Resources/Data/Managed/