game-hooking-patterns

Installation
SKILL.md

Game hooking and runtime modding patterns

Prefer the lightest route that reaches the goal; every step down the list costs more maintenance per game update.

Route Use when Examples
1. Data/assets the idea fits the game's data files ESP/ESM plugins, Paradox scripts, JSON content packs, pak overrides, xdelta patches
2. Loader API the community already built a loader with hooks tModLoader, SMAPI, BepInEx+Harmony, UE4SS Lua, REFramework Lua, SKSE/OBSE/xNVSE plugins, ModEngine2/me3, Fabric/Forge
3. Managed patching .NET/Mono/IL2CPP/Java, no API for the idea Harmony prefix/postfix/transpiler, MonoMod, Mixin
4. Native hooks native C/C++ engine without a loader proxy DLL + MinHook/SafetyHook/Detours/retour, signature scans
5. Reimplement/decomp/recomp total control or new platforms see engine-reimplementation, decomp-matching-workflow
Always search first: python3 ../gamedecomp-library/scripts/hub.py prior-art "<game or engine>" (decomp projects, agent field notes, engine playbook). If a loader exists, use it.

Hard rules (non-negotiable; reasons in references/safety-and-etiquette.md)

  1. Only games the user owns; single-player/offline or servers the user hosts.
  2. Never inject into, attach to, or scan an online client protected by anti-cheat (EasyAntiCheat, BattlEye, Vanguard, VAC on official servers, Ricochet, ACE, Javelin). Offline modes launched through official or community-sanctioned means (e.g. ModEngine2/me3 launching an offline copy) are the norm; never online.
  3. Never write cheats against other players; never bypass anti-cheat, DRM, or ownership checks. If a route needs a DRM-patched exe, stop and tell the user.
  4. Back up saves/config first; kill processes by exact PID; bind bridges/debuggers/MCP to 127.0.0.1 with a token; ask before installing loaders into game folders, editing the registry, driving the user's mouse/keyboard, deleting anything, or publishing.
  5. Do not publish game files, extracted assets, decompiled source, or retail offsets baked into shipped code. Publish your code and converters that read the user's own files.
Installs
8
GitHub Stars
1
First Seen
Oct 10, 2026