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 


value being written to multiple addresses

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
prunedanish
How do I cheat?
Reputation: 0

Joined: 22 May 2023
Posts: 4

PostPosted: Mon May 22, 2023 10:12 am    Post subject: value being written to multiple addresses Reply with quote

Hi!

I've been having some trouble accessing pointer paths for a flash game. There's a value that's supposed to increment by 1 at various points in the game. I found the initial address for that value by decompiling the game and putting in a crazy high number and then scanning for it. However, that value starts to change at seemingly random times in the game. In most tutorials I see, once they scan for a value and find the right number, that value always represents that variable. For me though, I'm finding the right number, but then it randomly changes to other things that it shouldn't (without restarting the game). Please let me know if anyone has experienced this.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon May 22, 2023 11:42 am    Post subject: Reply with quote

The really old actionscript 1/2 interpreters seemed to use immutable values: "changing" a value meant allocating new memory for it.

actionscript 3 can also exhibit this behaviour if it's programmed that way.

_________________
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
prunedanish
How do I cheat?
Reputation: 0

Joined: 22 May 2023
Posts: 4

PostPosted: Mon May 22, 2023 11:59 am    Post subject: Reply with quote

Thank you for the reply! I had a feeling there was something weird with the way actionscript was writing these values. Is there any way that you could think of to get around this issue?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon May 22, 2023 1:04 pm    Post subject: Reply with quote

Change the bytecode to whatever you want. The good part about interpreters is you don't have to worry about JIT compilation: changing the bytecode will always work.

There's no easy way of getting the value.

If you absolutely need the value, try the pointer scanner. I doubt there are any static pointers, but there's probably a level 1 or 2 non-static pointer. Uncheck "Only find paths with a static address" in the pointer scanner options. These pointers stop working if you restart the game.

Maybe you could use code injection to get the address of the value, but interpreters make that process quite annoying.

_________________
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
prunedanish
How do I cheat?
Reputation: 0

Joined: 22 May 2023
Posts: 4

PostPosted: Mon May 22, 2023 1:20 pm    Post subject: Reply with quote

what exactly do you mean by change the bytecode? How would I go about doing that?

for some context, I'm looking to make an autosplitter for livesplit, which I believe requires a pointer address to read what's going on in the game. Do you have any links to videos or threads talking about changing bytecode?

Thanks again!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon May 22, 2023 1:54 pm    Post subject: Reply with quote

"Bytecode" refers to the bytes the interpreter runs in order to do what the programmer wants the game to do. Changing bytecode pretty much means reprogramming the game to do what you want the game to do. e.g. you can make everything in a shop free if you remove the code that subtracts money when you buy something.
There are plenty of tutorials online, but most of them are for actionscript 3 flash games. Search for "cheat engine flash bytecode decompiler" or something.
Regardless, if you're not making cheats, it's not terribly useful.

Other tools (i.e. livesplit) would almost certainly require pointer paths with a static module base. I'm not sure if you can find one for flash games. You'll probably have better luck if you don't use a browser to play the flash game.
Use the pointer scanner if you want to try. Check "Only find paths with a static address", uncheck "Allow stack addresses of the first threads to be handled as static" (livesplit probably can't handle that), and play with the max offset value and max level.
See this video on step 8 for an example of how to use the pointer scanner (including using multiple pointerrmaps):
https://www.youtube.com/watch?v=3dyIrcx8Z8g

_________________
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
prunedanish
How do I cheat?
Reputation: 0

Joined: 22 May 2023
Posts: 4

PostPosted: Mon May 22, 2023 2:09 pm    Post subject: Reply with quote

Gotcha. So, I'm playing on a standalone version of the game (not in browser). Based on what you said, I intend to use the pointer scanner, but the problem is I don't really know what to use it on.

The only time I'm able to find that value is when I mod the game and set that value to something that's easily scannable. the problem with that, is that it changes the value type to a double, when I'm sure it's usually a 4-byte in the vanilla version. If I pointer scan that double, I assume it'll probably have a different pointer path, but correct me if I'm wrong.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon May 22, 2023 2:55 pm    Post subject: Reply with quote

A union type? The pointer path shouldn't be that different, if at all. It depends on the interpreter.

You can find a node in the pointer path that doesn't change by doing what I previously said about finding non-static pointers.
Pointer scan for the value- try to make it a fairly unique value (e.g. absolutely not 0). Non-static addresses, low-level (1 or 2). Do something to change the value in-game and rescan for the new value. Keep rescanning like this until results don't get removed anymore.

Pick one of them and do an actual pointer scan using the path you picked. Scan for the address the pointer path you found points to. Maybe set the "Pointers must end with specific offsets" if you want. Be careful with using multiple pointermaps, because the address being pointed to might change arbitrarily. Maybe pause the game while the pointermap is being generated (advanced options window).

Again, none of this is guaranteed to work. It's not unlikely there's no good static pointers to the value you want.

_________________
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
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