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 


"Static" pointer isn't consistent/persistent

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

Joined: 13 Jul 2015
Posts: 12

PostPosted: Mon Jul 13, 2015 10:23 pm    Post subject: "Static" pointer isn't consistent/persistent Reply with quote

Noob alert - just found cheat engine last night (v 6.3), so I'm very new to all this.

I am trying to apply this wonderful tool to Company of Heroes (2.700.2.42). Please note I have not yet "given up"; meaning right now I am still looking to understand Cheat Engine as my solution, rather than "here you go, use this". In other words, teach me to fish, don't give me a fish.

Here is where I am getting stuck. I am attempting to lock the Manpower, Munitions, and Fuel values at some number of my choosing. In the following image, I am using "500" for each. I can now use the pointer to lock the values.

Ah, well I can't post "URLs" yet, and this board apparently considers an "IMG" is a URL, so...

So far, so good. To get to this point, I open the window (what's it called?) to see what writes to my address, usually get only one line of code to choose, get the extra info, get the address, go back to the main window and search for the pointer.

"Green" means "static", right? I use that pointer. In the example image, Manpower is at the base address, and Fuel is offset +4, Munitions +8, so I use the same pointer with offsets.

This all works great until I close the "debug" windows. You know, the window that comes up when I ask to see what code writes to this address.

Then the pointer-based values in my main window go to "???", though the actual address entries continue to function (unless I change mission or reload the game).

If I once again "show me what writes..." on the memory entries, and follow this process, I get a new pointer value - the old one no longer works!

The addresses are still valid, but the pointers are broken. All I do to trigger this calamity is stop/close those "debug windows" (or whatever they are called).

I'm really confused. I've read enough to realize that modern games may not use static pointers, but this game is from what, 2006? In any case, surely these pointers would be stable while the game was running. I'd figure if they changed after a game restart I'd have to use something like Rydian's advanced solution (sorry, I can't post the url). But this is happening while the same game session, even the same mission is still running. The addresses, which do change, are still correct for my current operation. How have the pointers changed? How can my closing those windows in CE cause the actual pointers in the game to change? Well, I suspect it hasn't, but when I search again, the pointer I get will be different, will be green, and will work so long as I don't close those windows.

What am I doing wrong? I feel like I'm missing some vital step. The "static" pointers, even if they are not truly static, should be okay during this "session" of testing. That they appear to change makes me think I am doing something wrong. Haven't a clue what I've broken though.

Ideas?
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Mon Jul 13, 2015 10:57 pm    Post subject: Reply with quote

1 - "Green means static" doesn't really apply now, and hasn't applied for many years. It's technically one form of "static" but it's NOT the form that means "this will always be the same address on launch".

And it's not a recent change either. Games have been slowly moving towards dynamic things for a while as their complexity and needs have increased.

2 - You've probably seen me say this in other threads, but don't bother trying to dig up pointers manually unless you really know what you're doing, there's faster and easier methods now to make cheats that will stick after a relaunch.

(Admittedly the forum guides do need updating, since they keep pointing users to methods that may not actually work on a lot of modern games.)

Anyways, two options.

1 - Pointer scanner and/or AOB to data if you just want the address.
http://forum.cheatengine.org/viewtopic.php?t=572465

2 - AOB/injection if you want more overarching hacks.
http://forum.cheatengine.org/viewtopic.php?t=570083

_________________
Back to top
View user's profile Send private message
ConanOfOz
Newbie cheater
Reputation: 0

Joined: 13 Jul 2015
Posts: 12

PostPosted: Tue Jul 14, 2015 2:43 am    Post subject: Reply with quote

Thanks Rydian. Those links I have already been reading. I don't follow it (yet), but I'm reading it.

I am still trying to resolve, however, why CE stops "seeing" the data via a pointer once I close the window "The following opcodes write to...".

I just completed a mission. as expected, the addresses changed. this time (maybe I screwed up before) the pointers turned out to be the same. But I had to close the "debug" window (what do we call that window anyway?), find my 0-offset address (Manpower), and ask "what writes to...". as soon as I did that, ALL of my pointer-based values came to life and started working.

This isn't an issue of the pointers changing, as I had thought. But why are they "dying" till I renew a scan on what writes to my core address? What does that "debug window" do for me that I have to have? and how do I set things so that this necessary "link" happens without me manually searching and "renewing" it each time?

On the other hand, are you saying that using your advanced method will simply sidestep this problem altogether?

It just seems that what I have "works", it just has to be turned on again for each mission. I still feel like I'm missing some step that's going to make me palm-slap myself when I realize what I was(not) doing.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Jul 14, 2015 2:49 am    Post subject: Reply with quote

green means static yes, it is always the same address, as long as you write it as modulename+offset

but, do not assume it is the correct one. If there are more results then the correct one can be one of the black ones as well, which means you have to dig deeper.
(and sometimes you'll have to deal with code that adds something to the base which also needs to be added to the offset abd subtracted from the address to scan)

and you can always fall back on the pointerscanner

_________________
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
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Tue Jul 14, 2015 1:37 pm    Post subject: Reply with quote

Could you give us a specific example? For a screenshot you can just post the URL without the http://www. part and put spaces between the periods or something like that.
_________________
Back to top
View user's profile Send private message
ConanOfOz
Newbie cheater
Reputation: 0

Joined: 13 Jul 2015
Posts: 12

PostPosted: Wed Jul 15, 2015 10:44 am    Post subject: Reply with quote

Here is the address of the image

https :// farm1.staticflickr dotcom/359/19651192406_48b30a9e0c_b.jpg

As I explained, when the mission ends and the addresses change, the addressed values above go to invalid information, and the pointers go to ?? as their value. Once I find "Manpower"'s address, check the pointer (it DOES change), everything is good again.

If I close the debug window during a mission, the addresses keep the correct values, but the pointers go to ?? again, till I click on Manpower (which is +0 offset and is the pointer I use for all the others), and activate the debugger.

The debugger window has to remain open I guess...

-----

On a different note, I got the code working following your example for "AOB To Data".

However, after each mission, I have to turn off the script, then turn it back on again to "reset" it. Is there a way to make it refresh itself?

P.S. As an interesting aside, even scanning 128 bytes from the start of the "resources" data produced nothing usable except 0s. and the script failed to find any pattern. I resolved this problem by trying the 64 bytes immediately prior to my target data, and added hex40 to my offsets. Seems to be working great with the aforementioned "difficulty". Thanks for you help thus far.
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Wed Jul 15, 2015 3:42 pm    Post subject: Reply with quote

... hunh.

Could you show us one of the pointers and one of the scripts?

_________________
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