Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


can you prevent a value from changing without NOPing?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
bapebola
How do I cheat?
Reputation: 0

Joined: 11 May 2019
Posts: 4

PostPosted: Wed Aug 12, 2020 6:22 am    Post subject: can you prevent a value from changing without NOPing? Reply with quote

I have an adress for the camera position which I want to lock in place. I found the adress that acesses it but when I NOP it the game crashes. So is there another way to prevent the camera position from chagning? Can I like inject code somehow that overrides the new camera position with a static position every cycle or something?

any help is appreciated
Back to top
View user's profile Send private message
cheatcode
Newbie cheater
Reputation: 0

Joined: 09 Aug 2020
Posts: 23

PostPosted: Wed Aug 12, 2020 7:01 am    Post subject: Re: can you prevent a value from changing without NOPing? Reply with quote

Can anyone help?
this is my second topic but another asked this question

I have the same problem
Even using (use threat for freeze 0ms) still laging
Some addresses change their values momentarily
That is, by changing the value of the address, the value does not remain constant
The only way is to find the address, which returns the default value but this is impossible

However, some trainer maker,make the address value super freeze that mean without any lag
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Wed Aug 12, 2020 11:34 am    Post subject: Reply with quote

Use code injection. Conditionally permit the write depending on the address being written to. See step 9 of the CE tutorial for more information.

(if simply changing an address's value doesn't work, changing the value written to the address usually won't work either- you just found the wrong value)

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
bapebola
How do I cheat?
Reputation: 0

Joined: 11 May 2019
Posts: 4

PostPosted: Wed Aug 12, 2020 1:36 pm    Post subject: Re: can you prevent a value from changing without NOPing? Reply with quote

cheatcode wrote:
Can anyone help?
this is my second topic but another asked this question

I have the same problem
Even using (use threat for freeze 0ms) still laging
Some addresses change their values momentarily
That is, by changing the value of the address, the value does not remain constant
The only way is to find the address, which returns the default value but this is impossible

However, some trainer maker,make the address value super freeze that mean without any lag


in my case i got it to work by just freezing the value like normal but i had to go to settings and change the freeze delay from 100ms to 1 ms (and enable the thread thingy)



ParkourPenguin wrote:
Use code injection. Conditionally permit the write depending on the address being written to. See step 9 of the CE tutorial for more information.

(if simply changing an address's value doesn't work, changing the value written to the address usually won't work either- you just found the wrong value)


i will try the step 9 thingy. However I don't think I have the wrong value unless I'm misunderstanding you. When I freeze the value my camera snaps back and forth (meaning its trying to freeze it but the game is also trying to update it): i . gyazo . com/80d2669a28a95a9bf11ead9cdd0034bb . mp4

does your first tip about step 9 apply if what im assuming here is correct?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Wed Aug 12, 2020 2:22 pm    Post subject: Reply with quote

Yes, it should work. If there's some other instruction writing to that address, you may need to inject code there too.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
bapebola
How do I cheat?
Reputation: 0

Joined: 11 May 2019
Posts: 4

PostPosted: Wed Aug 12, 2020 3:57 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Yes, it should work. If there's some other instruction writing to that address, you may need to inject code there too.


So I've tried both NOPing the instruction that writes to the camera position and injecting code where i simply comment out the original code, but the game crashes in both scenarios, albeit in slighty different ways. Would it be possible to make the injection be something like:

variable = camera position (12 bytes)
original code ...
...
...

camera position = variable


ok i got it to work ty

would you happen to know what the instruction names and stuff are for accomplishing this? I guess I would need to push and pull the previous content of the variable as well.

that way im not really messing with the original code but i can still make sure the camera position isnt updated by storing its value and then putting it back?
Back to top
View user's profile Send private message
zhaihouxi
Newbie cheater
Reputation: 0

Joined: 27 Jul 2020
Posts: 17

PostPosted: Fri Aug 14, 2020 6:41 am    Post subject: Reply with quote

maybe use short jump
eb 02
02 is the jump distance
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Fri Aug 14, 2020 1:58 pm    Post subject: Reply with quote

and an answer to the more experienced users:

besides code injection and nop you can always use a breakpoint and change rip to jump over the instruction

or you could inject an exeption handler, mark the whole page as unwritable and on write check in the exception handler if it's the correct address and then either skip the instruction or make it writable, single step, make unwritable, continue

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Fri Aug 14, 2020 2:10 pm    Post subject: Reply with quote

That seems extremely inefficient to go through the kernel's interrupt handler when compared to just changing assembly. The first method permanently wastes a hardware breakpoint, and the second seems like it could noticeably slow the game down with false positives.

They are more generic and possibly easier (certainly faster to implement) solutions than dealing with shared code.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites