Hooks
Hooks (more formally known as events) are the main way to interact with Hollow Knight's code. We can use them to wait for an event to happen in game, then intercept data related to that event and trigger some code and potentially return different data to what we received.
There are 3 major type of hooks in the Modding API each of which will be explained below.
ModHooks
ModHooks are hooks that are built into the Modding API that allow us to interact will Hollow Knight code.
- Explanations for modhooks can be found in ModHooks Page
- A list of all hooks can be found in the API Documentation
On Hooks
On Hooks are a type of hooks that are generated by MonoMod HookGen. This allows you to hook onto and replace any method in the games code.
- Indepth explanation for On Hooks can be found in the OnHooks Page
IL Hooks
IL Hooks are a way to directly modify the code of a method.
- Indepth explanation for IL Hooks can be found in the ILHooks Page
Todo General
- how use custom values from player data & language (@dandy)