Writing a [DISABLE] script

jmh

What is cheating?
Joined
Dec 30, 2018
Messages
4
Reaction score
0
I am using mono dissection if that matters. I have written a script that nop outs a jl command. The original jl command is
CraftingWindowController:OnCraftButtonClicked+11f - jl CraftingWindowController:OnCraftButtonClicked+26b

The address resolves to different bytes every time the game is started. How do I get the address in my script so that I can restore it when the option is disabled?

Thanks,
JMH
 

Chucky

Expert Cheater
Joined
Mar 8, 2018
Messages
53
Reaction score
14
Use readmem: https://wiki.cheatengine.org/index.php?title=Auto_Assembler:readMem
 

SunBeam

Administrator
Staff member
Administrator
Joined
Feb 4, 2018
Messages
3,481
Reaction score
1,864
Your game uses Unity, thus IL, thus code compiled when needed. The reason these are not always constants..
CraftingWindowController:OnCraftButtonClicked+11f - jl CraftingWindowController:OnCraftButtonClicked+26b
..is the compiled code might use optimizations.

1) Try to write down that piece of code on every 5-6 runs of the game and see what and how it changes when you check it out in Memory View.

2) Check my script for BattleTech; I'm using a method to get to the prologue of the function (where it starts), then scanning for stuff inside the function to pin-point the location of my hook ;) Might work for you as well.
 

Csimbi

RCE Fanatics
Talents
Joined
Apr 29, 2017
Messages
386
Reaction score
409
jmh said:
I am using mono dissection if that matters. I have written a script that nop outs a jl command. The original jl command is
CraftingWindowController:OnCraftButtonClicked+11f - jl CraftingWindowController:OnCraftButtonClicked+26b

The address resolves to different bytes every time the game is started. How do I get the address in my script so that I can restore it when the option is disabled?

Thanks,
JMH
Why would you bother with that?
Just save a copy of the original code and restore that on disable.
That's my take on it anyway.
Saves a lot of headaches and works on all code, not just jumps.
 
Top