Finding addresses
game.exe+0x1A2B3C works great until the game updates. Then the code moves and your tweak points at nothing.
Module offsets
Section titled “Module offsets”@patch game.exe+0x1A2B3CFine for trying things out, but it breaks on most updates.
Signatures
Section titled “Signatures”A signature finds code by its bytes instead of where it is.
@patch sig("89 83 98 00 00 00 48 8B 5C 24 ??")?? matches any byte. Use it for parts that change between builds, like offsets and addresses baked into the code.
A signature must match exactly once. Start with the instruction’s bytes, then add the bytes after it until there’s only one match. The Names panel shows every signature in use and what it found.
Signatures can move from the match too.
Offset(4)adds to where it matched.Ripreads where the instruction there points, for things likemov rax, [rip+0x1234].
@sym player = sig("48 8B 05 ?? ?? ?? ?? 48 85 C0", Rip)Pointers
Section titled “Pointers”Values like health usually live somewhere different each time you play. Find a pointer that leads to them and use [ ] to read it.
@sym player = [game.exe+0x2F00A0] + 0x10That reads the pointer at game.exe+0x2F00A0, then adds 0x10.
Math works too, for things like arrays. *, / and % come before + and -.
@sym slot3 = [game.exe+0x2F00A0] + 0x20 + 3*0x18Give an entry in the Addresses list an id and it’s a name everywhere. Tweaks and scripts can both use it.
@sym armor = (player.health)+8@sym does the same inside one tweak. You can share address lists as .rwa.zon files with Export (Ctrl+E) and Import (Ctrl+I) in the Addresses panel.
Statics in the project’s schemas are names too, like GameStateManager.instance. A plugin’s have its name in front, like kai.GameStateManager.instance.
A name that’s there but can’t be found says why, like GameStateManager.instance: sig("48 8B 0D ?? ?? ?? ??", Rip) wasn't found. The Names panel shows the same for all of them.
After an update
Section titled “After an update”- Turn your tweaks on. Any that can’t find their code say so.
- Rescan all in the Names panel shows what each signature finds now.
- Find the code again the way you did the first time, and update the bytes.
expect helps here too, since a tweak that found the wrong spot won’t turn on.
Made with ♥ by Asgard
