Posted: Sun Sep 15, 2013 1:19 am Post subject: Basic Question - Green Address changing after restarting?
I'm very new to coding in general so please try to hold back the urge to punch me.
I found a green address which matches the value for the number of workers in the game, Starcraft 2. I double clicked that green address to add it into the cheat table. (eg. 0x030DF28C)
I then wrote a simple autohotkey script to read the value at that green address (0x030DF28C) and show me it. The results were as expected.
Then I restarted Starcraft 2 the autohotkey script didn't work anymore.
I then went back to Cheat Engine and selected the new Starcraft 2 process. Cheat Engine prompted me to "Keep current address/code list?" and I selected yes.
It seems cheat engine updated the address value in the cheat table so the address still shows me the number of workers I have. i.e. Cheat Engine changed the address to (0x0341F28C).
So what I want to ask is: how did Cheat Engine update the cheat table address? I'm hoping once I know that, I can make my autohotkey script find the address for my worker count in the same way.
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
Posted: Sun Sep 15, 2013 4:01 am Post subject:
Doubleclick the address in the cheat table to see how it is stored.
Probably something like sc2.exe+1234
That means the real address is the location that sc2.exe is loaded plus 1234
So, if sc2.exe is loaded at 03410000 then the address would be 03411234
And if sc2.exe is loaded at 030d0000 then the address would be 030d1234
To get the location of sc2.exe you must enumerate all loaded modules of that process and filter out sc2.exe and look at it's hModule which is the base _________________
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
Unfortunately I've been trying to create my (very simple) script by jumping in with no knowledge and randomly stabbing around in the dark so there are a lot of fundamental concepts that I am completely ignorant of.
I ended up searching around for a while and found a post on Autohotkey forums with a function for getting the base address of Starcraft 2 so lucky me
It's discussed on page2 of RHCP's Starcraft2-Hack/Macro Trainer post in case anyone is interested. I'd put the url but I can't post links.
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