so I am trying to protect my game from memory scanners without using a server the protection doesn't need to be 100% but I want to try and protect them from most of the cheats I have an idea to try and change the address of the variable once a few seconds or maybe even on the onUpdate method but I don't know how to do that on the code without breaking the game, I know that has to be possible since there are some add-ons in the unity store that gives you classes like ProtectedInt that are like the original data types but can't be detected by software like cheat engine I can buy the addons but I wanna try to do without buying it..
You might try using Windows Data Protection API exposed in .NET through System.Cryptography.ProtectedMemory, quick tutorial can be found here. Another writeup of the method includes a relevant note about copies of the unencrypted array being left in memory as a result of garbage collector defragmentation process.
General approach to protect different objects in your application would involve using binary de/serialization into an array, which you would then protect using the above method. Check out this answer to see how to do that. Once you have MemoryStream, use its method ToArray() to get the array.
I downloaded version 9.13 and loaded the ROM I wanted to play and opened the process in cheat engine, but the codes were no longer working properly because they were probably at a different address than they were with 9.11. Is there a way to get them to work without having to search for all the addresses again
A new search was preformed (in both versions) to find a number for quantity of items in SaGa 2: Hihou Densetsu - Goddess of Destiny
1st slot 1st character and the unique address was found and set to quantity of 1 less then what was in game.
Both versions preformed the searches exactly the same but when adding the code only the old version actually made the change.
4. Go back into the search menu, and this time run a search for 4. What actually happened is that in the above search the emulator found all of the addresses that at the time of the search were equal to 50 and saved them. This second search is called a filter search - it goes through the previous found addresses and finds the ones that changed to 4. This essentially weeds out addresses that matched the initial search by coincidence in order to find the desired address.
5. After the second search, the number of results shown should be considerably lower. At this time there are three options: either there is only one result left, there are more than one, or there are none. There were two results left in this case.
6. Click "view", and a window with the address and the value will appear. Click the line that holds the current health points value, and click "Add".
7. Change the value in the new window to 49 for one of them and 48 for the other one.
Then we go into game and see if one of those value replaced 50. In this case 48 uses replaced whatever item is placed in the first slot.
This worked for both the Long Sword and Potion (48 is not possible in the normal game for potion)
Whereas the process in the guide above worked for 0.9.11 it does not work in the new version.
The search system works fine in both versions give the same results (as it should with the same rom)
but when clicking ADD cheats they do not function in the new version.
I followed your steps to freeze coins at 22 in super princess peach (US) in desmume 0.9.13 by picking up the first 5 coins in 1-1 and using the ram search feature. The cheat was remembered inbetween desmume sessions. It found 02274ED4 which contains the ones and tens digit in BCD.
After the party creation and story intro finishes it takes 30s to search just like peach.
Before I even post on forum I double checked this. Sorry I if you didn't read into this I had tested this in several games.
I can repeat this for many other variables but so far its been the same the values only change in the older version.
super princess peach coins valued search value narrowed and set
new copy extracted to clean folder desmume 0.9.13
search works fine exactly as you suggested but the added codes do not change anything in game
Check mark next to code shows enabled
Nothing changed
I use ram search feature. You use cheat search. I used super princess peach US. You must have used EU because I don't recognize the address it found.
In 0.9.11 the cheat search gives me 0x02274ED4. It is a bus-relative address. This cheat will work.
In 0.9.13 the cheat search gives me 0x00274ED4. This is a main memory-relative address. This cheat will not work.
Your problem description "Cheat Engine codes not working with new version" is not accurate. A more accurate description is: "Cheat search results view produces strange cheats without 0x02 that don't work."
It was broken by 9767f793460917931a85735c7d9eaffe2fc691bc "support cheats to any address, not just main memory." At that time I blindly removed built-in assumptions that the cheat engine would work on main memory only, one of which was to add the initial 0x02xxxxxx to a xxxxxx main memory address in order to create the bus-relative address. TBH I didn't even really know that cheat search window exists (it's terrible and you should use ram search instead) so I didn't check to see whether it still works.
Since some time after Dolphin version 4.0.2 (I'm not exactly sure when it stopped working), you cannot use Cheat Engine to find the start of a game's RAM addresses. Because of this, Windows users cannot use the newer versions of Dolphin with Cheat Engine, because the addresses always change every time Dolphin is opened, and there is no way to set up a pointer for the addresses. I can only confirm this for the 64 bit version of Dolphin, as I only use a 64 bit system.
That post has nothing to to with this one. This one has been a problem for a long time, and it is simply that you cannot find the start of the game's RAM address. You would normally find this by searching for the game ID as a string, and it would show up as xxxx0000, but this doesn't work with versions of Dolphin after 4.0.2.
If that's not it, I believe one of the game properties settings caused problems for my Cheat Engine scans at one point. I want to say it was Synchronize GPU Thread, or maybe something related to MMU. So you could try messing with one of those settings.
I have those settings checked in Cheat Engine, and it still doesn't work, even for that specific version of Dolphin that you specified. I messed with those settings as well, and got no different results.
Perhaps I should specify: I can load up Dolphin 4.0.2 and do the scan for the game ID, and I will always find the address that it is supposed to be. Then, I can open a newer version of Dolphin, open it in Cheat Engine without messing with the settings at all, and do the scan, and the correct address will not show up. So to sum that up, Cheat Engine is not the problem.
Hmm... so on newer Dolphin, what addresses does the scan turn up for you? I actually tend to get 3 or 4 addresses ending in 0000 when I scan with a game running. For example, on 4.0-7365 I get 7FFF0000, 27FFF0000, 2FFFF0000, and 33FFF0000.
Those addresses do show up, but they will not work. You need addresses that are not that far into the memory. For example, on 4.0.2, the one that works for me is around the 0BD00000 area, and it can increase/decrease depending on how much memory is being used by my computer at the time.
I actually don't ever remember getting the 0B... address to "work" as far as finding useful addresses (such as position, velocity, health, etc.), yet I was able to work with 7FFF0000 and later. Maybe both of them work, but the offsets to find the useful addresses are just different?
You could try re-scanning for the addresses you are interested in (position, health...) and keep track of them based on, say, 7FFF0000. See if the address offsets remain consistent when you restart your game and restart Dolphin. Maybe the offsets will be different from what you were used to before, but as long as the offsets are consistent, that base address should be usable.
This is the problem though. The offsets do not stay the same. Every time you close and reopen Dolphin, the offsets will change. So if you use 7FFF0000 as the base, the offsets will change every time. Therefore, you can't use 7FFF0000 as a base address.
Does the offset from the base address change too? Just to be clear, here's what I mean by the offset: in Super Mario Galaxy, I can find the X value of the control stick input at (base address) + 0x61D3A0. So here I call 0x61D3A0 the offset of the X stick input.
c01484d022