- Home
- Technical Documentation
- Runtime integration
Runtime integration
How the bridge talks to the game.
The runtime (sw::Runtime) is a singleton inside each mod DLL. It attaches to the main module of the game, checks it and offers:
- Address resolution from the mapping: Lua handlers by name, class vtables and constructors, RVAs.
- Hooks on function entries: the first instructions are decoded and relocated to a detour; the target must lie in the main module.
Hook::planruns the same decoding on arbitrary bytes without writing. - Memory access with a readability check; writing is explicit.
- Object identification from the vtable pointer.
Hook memory is allocated near the image so rip-relative displacements still fit. Callbacks run on the game thread that called the function.