Page 1 of 1

Game crashing when NOPing

Posted: Sat May 11, 2019 9:05 pm
by nakte
Screenshots for reference:
https://i.gyazo.com/68d1b9637a8022dc70e ... 9acf3a.png
Image

I have 2 releases of a game, I'm using an older version of the game and I want to lock the camera focus (the target Z). If I just lock the address the camera will hop back and forth since something is writing to it so I tried NOPing that instruction. But doing so gives me the error you see above, ingame

This is very weird because when I try to do the same thing in the new version of the game it works as expected and keeps the camera focus in place, and I think I was even able to get this working in the old version of the game at some point because I have entries in my cheat engine table for "disabling camera target override", meaning this script would NOP the instruction overwriting target Z. I've tried reinstalling the older version of the game but I get the same error.

edit: I noping the instruction in a completely new table in case some script in my previous table was teh issue but i still got the error

So I'm throwing this out here hoping that someone would happen to know a solution or why this issue might occur.

Any help is appreciated

also, should I use this forum and or the "official?" forum.cheatengine.org?

Re: Game crashing when NOPing

Posted: Fri Jul 05, 2019 6:03 pm
by TheByteSize
First, you need to identify which addresses that the OpCode access/write then use Data Structure to uniquely identify the pointer for camera zoom, then put a check in your code to only skip this OpCode when that is matched.

Re: Game crashing when NOPing

Posted: Fri Jul 05, 2019 7:02 pm
by GreenHouse
Makes sense when that might write multiple addresses that are needed for the game to work. The error itself is telling you, there's a problem related to vectors. Just Google what is a vector and you'll see.

Re: Game crashing when NOPing

Posted: Fri Jul 05, 2019 7:32 pm
by SunBeam
Which game are you trying this on?

Most people in today's world with today's games don't really distinguish between several scenarios. They all think they have to read some tutorial and apply it per se. If something goes wrong or a crash occurs, then it's back to posting on forums and letting others figure out the problem for them.

Let's take them one by one:
  • these are most likely global:

    140E32CC7 - 0F29 01 - movaps [rcx],xmm0
    140E32D23 - 0F29 01 - movaps [rcx],xmm0

    You can actually see the first one's been hit 147 times, only for your on-access address. If you head to 140E32CC7 and set a normal F5 breakpoint in Memory View, you'll find that it's hit a gazillion times.
  • which module are these instructions part of? they're most likely not game engine-related, but rather Windows APIs that process information (perhaps "memcpy" or "memmove" APIs); CE will tell you this if you have symbols enabled
  • if the instructions are not part of some API, not game-engine related, then are we talking about an Unity Mono game? if so, you can use the Mono feature in CE to find what you need
Bottom line is the constant access of those 2 instructions (they are accessed very fast) will lead to crashes. Another thing you can do is actually using the "VEH Debugger" option in CE's settings - if not already selected - which would provide more stability.

In conclusion, I would look for alternate ways to get XYZ.