Projects

AutoHookGenPatcher

Modding
.NET
BepInEx
MonoMod

An improved version of a tool called HookGenPatcher, which makes modding Unity Mono games more convenient.

An abstract image

What is It?

AutoHookGenPatcher is a tool that automatically generates helper hook assemblies using MonoMod.RuntimeDetour.HookGen to make hooking methods in C# convenient.

It’s a fork of HookGenPatcher, with the biggest difference being this:

Instead of only having a fixed list of files to generate MMHOOK files for, AutoHookGenPatcher will get the MMHOOK file references from installed plugins, and generates those MMHOOK files if possible.

It also has caching optimizations to prevent this from feature causing performance issues, which is arguably the most complicated part of the software.

Usage in Modding

The Content Warning modding community is fairly new and so it only uses this tool for generating hook helper files. As of writing this post, the tool has just over 600K downloads.

More about the tool on GitHub