Writing a [DISABLE] script

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
jmh
What is cheating?
What is cheating?
Posts: 3
Joined: Sun Dec 30, 2018 7:19 pm
Reputation: 0

Writing a [DISABLE] script

Post by jmh » Thu Jan 03, 2019 2:45 pm

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

User avatar
Chucky
Expert Cheater
Expert Cheater
Posts: 51
Joined: Thu Mar 08, 2018 4:01 pm
Reputation: 14

Re: Writing a [DISABLE] script

Post by Chucky » Thu Jan 03, 2019 4:04 pm


User avatar
SunBeam
Administration
Administration
Posts: 3099
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 1514

Re: Writing a [DISABLE] script

Post by SunBeam » Thu Jan 03, 2019 4:20 pm

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.

User avatar
Csimbi
RCE Fanatics
RCE Fanatics
Posts: 327
Joined: Sat Apr 29, 2017 9:04 pm
Reputation: 306

Re: Writing a [DISABLE] script

Post by Csimbi » Sat Jan 12, 2019 3:01 pm

jmh wrote:
Thu Jan 03, 2019 2:45 pm
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.

Post Reply

Who is online

Users browsing this forum: No registered users