OSMod aims to fix incompatible mods in recompilation projects
OSMod is a new open-source mod framework that lets mods for decompiled and statically recompiled games work together.
Decompilation and static-recompilation projects give games readable source code, but each project tends to invent its own way to mod it. Mods for the same game often break each other when they patch the same function.
OSMod, an open-source mod framework created by irpina, introduces a standard approach with hook buses, per-game cores, and a checking builder. Mods target named events like controller reads or frame ticks, so they don’t patch memory addresses. A reference Python builder checks for clashing mods, missing events, and version mismatches before compilation.
To test the framework, you need Python 3.10+, CMake, and a C++20 compiler. Clone the repository and build the included example:
cd examples/toy-recomp/project && cmake -S . -B build && cmake --build build --config Releasepython -m osmod build --compile --target examples/toy-recomp/target --tree examples/toy-recomp/project examples/toy-recomp/core examples/toy-recomp/mods/hello- Restore stock code with
python -m osmod restore --target examples/toy-recomp/target --tree examples/toy-recomp/project
The project is at Draft 1. The source-recomp adapter works only for projects whose generated code gives every function the same signature, which is typical for static recompilers. Decompilations with ordinary C signatures need per-function wrappers, and that adapter is still planned.