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 


in-game value not refreshing

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

Joined: 19 Oct 2023
Posts: 7
Location: Russia, Norvinsk, Tarkov

PostPosted: Sun Oct 29, 2023 1:23 pm    Post subject: in-game value not refreshing Reply with quote

Hello,
I found the value of powerups in a game and I can edit them as I want in my game (eg 3 --> 10) and I can see it is effective immediately, but the counter IG doesn't change. Thus, I upgrade my powerup through normal in game way to refresh it, and the value increases like expected (10 --> 11) but the IG counter increments like if I hadn't changed anything (3 --> 4).
Looking for the shown value in game didn't bring anything intresting (even with "all" memory type), it seems that the game is able to magically increment a value that is stored absolutelly nowhere.
How is this possible ?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Oct 29, 2023 3:06 pm    Post subject: Reply with quote

There are different types of values. Some values are actual values, such as, when you change them, the change occurs in-game, and you can actually see that the effect has been applied (e.g. increased ammo that actually gives you increased ammo), so you can actually benefit from the change.

Other values are visual-only values, such as, when you change them, they appear to change in-game (e.g. a number on the screen), but the change does not actually affect anything, so you cannot actually benefit from the change.

In terms of why you cannot find a particular value, there are a number of possibilities. It does not mean that the value is not being stored somewhere. It could just mean that the way that the value is calculated or interpreted, is different from what you expect.

One example of this would be the ammo value, as some games may handle this differently. In some games, the ammo that can be fired before reload is treated as a separate value, whereas, in other games, the ammo value is calculated from a total value (ammo that can be fired before reload, as well as the ammo that is remaining in the reserve clip etc.).

Another example is where the value may be calculated based on the amount that is needed for leveling up, instead of the amount that you actually have.

This is why performing 'exact value' type scans may not yield the results that you are looking for, and why you may need to use 'unknown initial value', and then changed/unchanged/increased/decreased scans to narrow in on the value that you are looking for. This is also why you should not assume that the value is increasing, but could actually be decreasing. Some values are broken up into parts, as well, for example, a time clock of 1:19:22, may be broken up into 3 or even 5 separate values.

Some values may be encrypted, but in this case, since you are able to change the actual value, but not the visual value, then that does not seem likely. You may find that the visual value is somewhere close, within the same data structure as the actual value, but this may not always be the case. A quick way to check this is by copying the address that you found, and just increasing/decreasing the offset by 4/-4 a few times, to see if the visual value is stored nearby. You can also use the data structure dissection tool.

But do not assume that the value is 10, just because the screen says 10. Do not also assume that the value is 4byte or float etc.. There are also other data types that can be discussed, but this should cover the basics.


Last edited by ++METHOS on Sun Oct 29, 2023 3:17 pm; edited 2 times in total
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Sun Oct 29, 2023 3:13 pm    Post subject: Reply with quote

The value you found is only used for UI. The real value is probably derived at runtime as needed from other values. e.g. available powerups = total powerups - spent powerups

It could also be obfuscated. I've seen some games use trivial add / sub / bitwise operations to hide a value.

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

Joined: 19 Oct 2023
Posts: 7
Location: Russia, Norvinsk, Tarkov

PostPosted: Tue Oct 31, 2023 10:45 am    Post subject: Reply with quote

The game I am on has been written in a matter of days by a single dude, so no AC or obfuscation messing around, at least not to prevent cheats.
Looking for any value with unknown initial value gave no resulsts. Looking around the values in the ram I can see similar structures to the original storage of the real powerups values (25powerups*4bytes+20), but they are pretty empty and never changes when I pickup a powerup. They kinda looks like wasted space as there are around a 100 of these seemingly usless structures. Sad
ParkourPenguin it seems that you haven't even read my post, this is the exact opposite problem that I have.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Tue Oct 31, 2023 11:42 am    Post subject: Reply with quote

rustyy wrote:
I found the value of powerups in a game and I can edit them as I want in my game (eg 3 --> 10) and I can see it is effective immediately, but the counter IG doesn't change. Thus, I upgrade my powerup through normal in game way to refresh it, and the value increases like expected (10 --> 11) but the IG counter increments like if I hadn't changed anything (3 --> 4).
I don't even know what this says.
I'm guessing you mean you can find and change a certain value in CE but doing so doesn't seem to have the desired effect in-game.
The advice I gave was under that assumption. If this isn't the case, try to explain your situation more.

_________________
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
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Oct 31, 2023 12:23 pm    Post subject: Reply with quote

Depending on what was used to create the game (e.g. renpy, flash, java), or if the value is encrypted, you may need to consider some type of calculation in order to find the value that you are looking for. Some popular examples that I have seen:

display value x 8 = searched value
(display value) + (display value + 1) = searched value

If the value is encrypted, it may be difficult, as you may need to search for unknown initial value, then search for changed/unchanged. Even though you think that the value is increasing, it may not be, and vice versa. With some targets, you cannot assume anything. Be sure to include all data types for your scans (check your settings). I've seen games that use double type for basic things like money, when you would normally expect it to be 4-byte, for example. There are some that even use strings.

There are ways to remove encryption, though.

I've even seen targets where hotkeys must be used for searching, because every time that you remove focus on the target window, the addresses change. Meaning, you will never find the values that you are looking for unless you use hotkeys to search for them.

Do not assume that just because the game was developed quickly, by one person, that values will not be encrypted, as some encryption schemes come built-in with whatever is being used to create the game, and the developer may or may not even have much control over that.

Depending on what was used to create the game, you may consider trying a game save editor. Here is one that supports a handful of options:

https://www.saveeditonline.com/

Here is one that supports multiple types as well, with some better options, but all in Japanese:

https://web.save-editor.com/tool/

As mentioned, if the issue that you are having involves the display value, then you can try looking at the data structure for the value that you found, that actually works, as it may be located nearby. You can also check to see what is accessing the value that you found and examine the assembly code near each instruction to see if the display value is being written anywhere nearby.

It's unusual behavior. Usually, when you change the actual value in a game, the display value will change with it. However, changing the display value will not always change the actual value. So this problem is the opposite of what people usually experience, which may have caused some of the confusion. The original post was not super clear, admittedly.
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