hook
@1NEEDS A GRANTSubscribing to a game function by name, with a priority. The core owns the detour.
By name, never by address: the mod says which function and the host resolves it through the pack, so two mods on one function is ordinary rather than a collision. The core owning the detour is what makes that true, and it is also what makes unhooking something the host can do without asking the mod.
The core owns the detour, and a detour is the most direct thing a mod can do to a running process. Never automatic.
Types
HookId { index: u32, generation: u32 }Calls
Higher priority runs first. Two mods asking for the same priority are ordered by the resolved load order, so the answer is the same on every machine.
Events
hook: HookIdErrors
A call that returns Result crosses as a status: 0 is success, and the others are these errors, by their index in the capability.
UnresolvedNoPackDenied