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 


Finding the address of and changing a static value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
trifidix
Newbie cheater
Reputation: 0

Joined: 11 May 2022
Posts: 16

PostPosted: Fri Dec 09, 2022 12:23 am    Post subject: Finding the address of and changing a static value Reply with quote

I have a unit, this unit takes damage from fire. I want to find out where in the executable is this value stored, so that I can use a hex editor to change it later.

From searching for a bit, I understand that I need to find the unit's health address, attach a debugger to it, damage it using fire, add the instructions which come up to my codelist and analyse them... but this is where I get stuck, I somewhat understand what the code is doing, but I have no idea what to look for.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4715

PostPosted: Fri Dec 09, 2022 12:41 am    Post subject: Reply with quote

trifidix wrote:
I want to find out where in the executable is this value stored
That's not how it works. Most values are located in dynamically allocated memory, and even if this is a rare exception, modifying mutable static memory on disk probably won't do what you think it will in this case.

If you know how to read and write assembly, you can change it to do what you want. Be weary of instructions that access multiple values (right click in disassembler -> "Find out what addresses this instruction accesses"). Assuming the code that writes to the value is in the exe (not always the case) and the exe isn't packed with some kind of protection, then sure, you can modify the exe to permanently reflect those changes.

_________________
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
trifidix
Newbie cheater
Reputation: 0

Joined: 11 May 2022
Posts: 16

PostPosted: Fri Dec 09, 2022 1:12 am    Post subject: Reply with quote

I see this done on the same game, just a single value that is changed using what's essentially an automated hex editor to change unit stats, in this case I would want to change their fire resistance but the addresses for it (if it's actually this simple, but I don't see why wouldn't it be) aren't known.
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