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 


How do some games make it so hard to change a basic value?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
horsedeg
Cheater
Reputation: 0

Joined: 26 Jun 2017
Posts: 27

PostPosted: Fri Jun 29, 2018 6:39 am    Post subject: How do some games make it so hard to change a basic value? Reply with quote

And how does one get around it?

I've been trying to find out how to hack money in The Sims 4. I search the value like 2 times, find the address, but of course it doesn't change anything. Nowadays it seems quite a bit of bigger single player games don't let you hack it that easily (though I'm not the most experienced so what do I know). So I'm not really surprised. Usually I just give up and hack an easier/older game. This time I really wanted to find out how to make it work.

I've made some progress and learned a bit, but I still can't figure it out. After some digging through the disassembler (a painfully slow amount of manual tracing with breakpoints that I'm sure I could have done more easily with some other method) I just gave up, but I ended up seeing that it loaded some address's value (the address changed every time so I gave up), the value being something like 0x80001F71, did a bitwise AND with 0x7F, left shifted 7 times, then did an OR with some other value to get the new money value (this is what it did after I bought a couch or something).

It makes me think: are these games encrypting these values or something? Why on earth does it even do that? It seems like an algorithm that the game uses to decode some value they use to store the money value, or maybe it's just really, really low-level code. I dunno.

So anyway, do games do encryption like that nowadays? Regardless, I really want to know how the hell you can change these values that aren't super easy like it is for older games.
Back to top
View user's profile Send private message
jgoemat
Master Cheater
Reputation: 22

Joined: 25 Sep 2011
Posts: 252

PostPosted: Sat Jul 07, 2018 11:39 pm    Post subject: Reply with quote

I'm not sure about the Sims 4, but yes some games have a display value which is what you probably found. When money changes, it sets the display value, but changing the display value won't affect the underlying variable. A few games encrypt them, some have different types,(i.e. scripting games sometimes have it as a string you can change, but keep the integer value for display), some have a multiplier (i.e. $1,000 will be 100000.

If Sims 4 is a scripting game and the same routine that changes money changes say every other integer in the game, it's going to be tough. Your best bet is to 'find what code changes this address'. Then when you have one, do a 'break and trace' on it. Set a condition on the breakpoint so it only breaks when the variable is the address you know the money is at. Then analyze the code and find a routine that called the generic 'set value to X' that works only for the value you're looking for.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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