Reverse-engineering workflow
Ballance is a Virtools 2.1 game: Player.exe hosts the Virtools runtime (CK2.dll, CK2_3D.dll, VxMath.dll) and loads Building Block DLLs (BuildingBlocks/*.dll, including the Terratools TT_*.dll and physics_RT.dll).
- Graphs first.
tools/has Python readers for the Virtools file format (ck.py,nmo.py) that dump every behaviour graph with its parameters and links; most questions are answered there. - Which Building Blocks are used.
tools/bbindex.py/bbmap.pylist every BB prototype the game uses and map its GUID to the DLL and function that implements it. - Decompile and disassemble. The DLLs are analysed with Ghidra headless (scripts in
tools/ghidra/) and, where the decompiler is unreliable (x87 float code, merged stack slots), read from the disassembly with capstone. - Specify, then port. Larger subsystems get a written specification first (the internals pages) and are ported from it, citing the original addresses in the code. Decompiler output is never pasted into the source.
- Verify with headless runs:
run_testtraces, probes and screenshots.
The original binaries and data are never committed.