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 


Swapping values / addresses?
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Fri Dec 07, 2012 3:07 pm    Post subject: Reply with quote

Ok wow it does get complicated now! Haha. Thanks Smile

As for the continues writing: it's true that I can't freeze anything in the game at all (I already tried freezing other stuff such as nitrous or time, even with 0.1 ms interval it didn't work).

Is this possibly to avoid cheating?

You say that I've probably found a property of the car, but that lets me think of something. What if that's those 14 values? Like the first would be the mode, the second the mass, the third the price, the fourth the speed, etc. Because why would there be 14 of these?

The code I gave you was only for one of them, where I said it seems to be the most realistic one because it switches to zero when no car is selected.

So probably it's one of the others, or maybe I need to do that will all of them!

As far as the code goes: Stupid question, but where exactly do I insert that?

I'll try adapting it to my codes / stuff and come back then with a result hopefully Smile So if I got this right it's meant to keep the game behave normally and not crash, so I guess if this time I manage to do the earlier steps (replace by code that does nothing) and freeze it or something (but then again, we figured this doesn't work), then it should be able to swap the car, but most likely nothing should happen I guess?

Also as for the counter: Might it be the speed? When I pause the game it stopped, but it was still counting when I was just standing with the car (not driving). But it would be the closest one to explain why the counter is keeping to write.

Edit // Also I think I'll be setting up the pointers for those 14 values as it's a pain to find them everytime Razz (I have the values but there's around 40 black sheep in there each time, which I need to get rid off)

Might that be easier then to work with? I guess we'll be working with the base addresses then.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Fri Dec 07, 2012 4:54 pm    Post subject: Reply with quote

Ozzy25 wrote:
As for the continues writing: it's true that I can't freeze anything in the game at all (I already tried freezing other stuff such as nitrous or time, even with 0.1 ms interval it didn't work).
Don't bother going below 10ms because windows timers can't go below that (unless Dark Byte implemented a custom high accuracy timer, but I don't see why he'd do that).
Ozzy25 wrote:
Is this possibly to avoid cheating?
I doubt it. When you write a number somewhere you need to know what number, so that number is either the result of a calculus, or a raw copy from somewhere else.
-If it's a simple copy it's pointless since you're going to find both both addresses when scanning. Actually I LOL'd quite a lot when I found The One Company (softhouse chara) that thought they could "protect" their variables by quickly copying back and fro between 2 storage locations.Stop process, change both, resume process, kthxbye (ok fine I actually took the time to disable their protection for the lulz).
-If it's the result of a calculus, then you should focus on the source(s) that once processed result in that number. If your car selection was protected against cheating, you'd look for an encrypted variable which you would find by only using the changed/not changed filtering options, which is what you did. Of course you could imagine complicated protection schemes that would defeat (un)changed filtering, but let's start by assuming your game is simple to hack.

Ozzy25 wrote:
You say that I've probably found a property of the car, but that lets me think of something. What if that's those 14 values? Like the first would be the mode, the second the mass, the third the price, the fourth the speed, etc.
Except that you said those 14 addresses have the same value, and I doubt the car's mass=its price=its speed=the mode=....
Ozzy25 wrote:
Because why would there be 14 of these?
Good question.
-It can be that several parts of the game code need that value, which is the result of some complex calculation, so instead of recalculating it over and over, they'd rather store multiple copies...Which doesn't fit with the fact that it's continuously rewritten...
-Or it can be that those are 14 different properties, with coincidentally the same value, for example the scale factor for the main car body=each wheel's scale factor=each door's scale factor=...
-Or it can be something else I don't know...

Ozzy25 wrote:
So probably it's one of the others, or maybe I need to do that will all of them!
Hack one, see what it does first.

Ozzy25 wrote:
As far as the code goes: Stupid question, but where exactly do I insert that?
click on the main cheat engine window, press ctrl+v. A new line should appear in your cheat list.

Ozzy25 wrote:
Also as for the counter: Might it be the speed?
Not at all. I explained that in my previous post.

Ozzy25 wrote:
Edit // Also I think I'll be setting up the pointers for those 14 values as it's a pain to find them everytime Razz (I have the values but there's around 40 black sheep in there each time, which I need to get rid off)

Might that be easier then to work with? I guess we'll be working with the base addresses then.
If finding pointers isn't a headache, why not. Here is a tip for the address that was written by movss [ebx+00D4],xmm0 : you can use "pointers must end with specific offsets: D4".
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Fri Dec 07, 2012 7:48 pm    Post subject: Reply with quote

About the 14 values: I was actually kind of reverse thinking, like if the addresses would be addresses for speed, model, etc. and they would be referring to the value which is the value of the car, so perhaps there is an address that has a value that determines these other addresses which link to the car, and therefore the information of the car (found in those 14 values) gets loaded into the "slots" / addresses. But I think I'm just very tired Laughing

For pointers, I know how to get them, I've found an easy tutorial already Smile

For the rest I'll see tomorrow and I'll try to paste that where you said I should paste it, I'm curious already about the result! Razz
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Sat Dec 08, 2012 1:50 pm    Post subject: Reply with quote

Alright I now first tried to change the type of the value from 4 bytes to float, like you said, and yes there seems to be a simpler value. It was something like 2.xxxxxx for the car I selected.

Why can I do use only the byte option by the way? It shows the simplest number of all of them Razz

I clicked on "Find out what writes to this address" for each of the addresses and then the game froze and it told me that all 4 debuggers are full, and that therefore I need to empty one. I've searched around on how to empty them but I can't find anything about this, however I did find a lot of people with the game freezing / crashing. Probably they didn't empty those debuggers. So how do I do that?

I haven't yet pasted the code in there since I've been first trying to find the address with the code I posted here out of the 20 that there is actually. So I need to find out how to empty that debugger first, before being able to go on I guess Smile
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Sat Dec 08, 2012 2:48 pm    Post subject: Reply with quote

Ozzy25 wrote:
Why can I do use only the byte option by the way? It shows the simplest number of all of them
I didn't understand what you said here. So all I can say is:
1-since your data is truly a float it is best to consider it that way.
2-There a way more chances that a single byte is equal to 0 than chances for a sequence of 4 bytes to be equal to 2.x as a float (yeah, btw a float takes 4 bytes), so you'll find A LOT less results if you scan for a 4 byte pattern (using or not the float option for convenience) than if you scan for a 1 byte pattern.

Ozzy25 wrote:
I clicked on "Find out what writes to this address" for each of the addresses and then the game froze and it told me that all 4 debuggers are full, and that therefore I need to empty one. [...]So how do I do that?
Each time you use a "Find out what *" function you use a debug register. Each time you STOP the finder (you don't need to close the associated window) you free one debug register.
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Tue Dec 11, 2012 1:36 pm    Post subject: Reply with quote

I'll try it again then! Smile (I need a little break sometime to be able to think clearly again, hehe)

But I have a question, isn't it possible to scan the values only in a file of the game? Like the file in which the vehicles are "set"? If something like this was possible it surely would be easy, no?
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Tue Dec 11, 2012 8:45 pm    Post subject: Reply with quote

Ozzy25 wrote:
But I have a question, isn't it possible to scan the values only in a file of the game?
As in wait until the game loads a file into ram, and limits the scans to the memory where the file is loaded?
if yes: it is possible, but in this case why don't you just edit the file on your hdd instead of waiting until it is loaded? This is actually called modding the game btw.

if no: please rephrase.

Ozzy25 wrote:
Like the file in which the vehicles are "set"?
proper word: [...] the vehicles are defined.

Ozzy25 wrote:
If something like this was possible it surely would be easy, no?
Looking back at your posts it seems the car files are "out in the open" not in an archive or anything. So yeah you can try comparing the file(s) that define the car that is available right off the bat and the cars that are to unlock. That could work for decent quality games, but in indie/budget games that property MIGHT be hardcoded in the exe.
Aside that did you try swapping the file(s) between 2 cars?


Note: due to real life business I probably won't reply for the next few days.
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Tue Dec 11, 2012 9:12 pm    Post subject: Reply with quote

Gniarf wrote:
Ozzy25 wrote:
Why can I do use only the byte option by the way? It shows the simplest number of all of them
I didn't understand what you said here. So all I can say is:
1-since your data is truly a float it is best to consider it that way.
2-There a way more chances that a single byte is equal to 0 than chances for a sequence of 4 bytes to be equal to 2.x as a float (yeah, btw a float takes 4 bytes), so you'll find A LOT less results if you scan for a 4 byte pattern (using or not the float option for convenience) than if you scan for a 1 byte pattern.

Ozzy25 wrote:
I clicked on "Find out what writes to this address" for each of the addresses and then the game froze and it told me that all 4 debuggers are full, and that therefore I need to empty one. [...]So how do I do that?
Each time you use a "Find out what *" function you use a debug register. Each time you STOP the finder (you don't need to close the associated window) you free one debug register.


Just to answer this quickly, you said I should click on "4 byte" and select "float" instead. I tried also selecting other options (such as byte). Why can't I use this option? Because we know 100% that it's float? Those byte values look so simple and easy Smile Hehe but that was kind of obvious Very Happy

Gniarf wrote:
Ozzy25 wrote:
But I have a question, isn't it possible to scan the values only in a file of the game?
As in wait until the game loads a file into ram, and limits the scans to the memory where the file is loaded?
if yes: it is possible, but in this case why don't you just edit the file on your hdd instead of waiting until it is loaded? This is actually called modding the game btw.

if no: please rephrase.

Ozzy25 wrote:
Like the file in which the vehicles are "set"?
proper word: [...] the vehicles are defined.

Ozzy25 wrote:
If something like this was possible it surely would be easy, no?
Looking back at your posts it seems the car files are "out in the open" not in an archive or anything. So yeah you can try comparing the file(s) that define the car that is available right off the bat and the cars that are to unlock. That could work for decent quality games, but in indie/budget games that property MIGHT be hardcoded in the exe.
Aside that did you try swapping the file(s) between 2 cars?


Note: due to real life business I probably won't reply for the next few days.


That's kind of what I mean yep! Not possible to open them because they're encrypted! Not possible to decrypt them anyhow! There's only small parts where there is actual text, I tried swapping the names of vehicles and it didn't work sadly. However there WAS a change, which was that one car was appearing replaced lots of other cars (not all, but many). But this happened to matter what I changed in that file. So probably some error or something…


And no problem! I'm patient hehe Smile
Back to top
View user's profile Send private message
mindfreak516
Newbie cheater
Reputation: 0

Joined: 13 Nov 2011
Posts: 24

PostPosted: Wed Dec 12, 2012 4:56 pm    Post subject: Reply with quote

can you tell me which game are you talking about?
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Sat Dec 15, 2012 1:22 pm    Post subject: Reply with quote

mindfreak516 wrote:
can you tell me which game are you talking about?


Hey, it's an old NFS Smile
Back to top
View user's profile Send private message
mindfreak516
Newbie cheater
Reputation: 0

Joined: 13 Nov 2011
Posts: 24

PostPosted: Sat Dec 15, 2012 1:50 pm    Post subject: Reply with quote

which one exactly?
i would like to try doing that myself, and if i can figure it out, i'll create a little tutorial for you.. it's the easiest way of explaining things to people for me..
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Sun Dec 16, 2012 8:19 am    Post subject: Reply with quote

Pmed you all infos Smile it's complicated…
Back to top
View user's profile Send private message
mindfreak516
Newbie cheater
Reputation: 0

Joined: 13 Nov 2011
Posts: 24

PostPosted: Sun Dec 16, 2012 8:49 am    Post subject: Reply with quote

i read the pm.. just waiting the game to download.. then i'll get into it..
Back to top
View user's profile Send private message
Ozzy25
Cheater
Reputation: 0

Joined: 07 Nov 2012
Posts: 34

PostPosted: Wed Dec 19, 2012 3:55 pm    Post subject: Reply with quote

Thanks!

I shall try out Gniarfs version first (who knows, maybe it's the solution?).

The problem are still those debuggers. I click on "Find out what writes to this address" and this launched the debugger, however after the 4th address that I check everything seems to freeze and finally crash. I made sure to click the "stop" button and then close the window, but after trying to check a 5th address it told me something like "All 4 debug registers are currently used up. Free one and try again". Unless I solve this, I can't go on at the moment. What am I doing wrong? I thought "stop" would actually stop the process.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Fri Feb 15, 2013 10:57 am    Post subject: Reply with quote

My "next few days" are FINALLY over, so I'm available to answer questions. As for the debug registers I already answered that in a PM.

Ozzy25 wrote:
Not possible to open them because they're encrypted! Not possible to decrypt them anyhow! There's only small parts where there is actual text
Actually if you see human-readable text and that text is not a filename, it is likely that the data is NOT encrypted but just in binary format instead of text format. So if your car has a top speed of 250 mph you can scan for 250 in the file (cheat engine can do that, use file->open file, and do scans as usual) and one of the matched might be your top speed. Don't try this if the car file is more than a few tens of kilobytes.

If all the car definition files have the exact same size, try to look for a value that has a value for the car you have at the beginning of the game, but another one for all other cars.

Ozzy25 wrote:
I tried swapping the names of vehicles and it didn't work sadly. However there WAS a change, which was that one car was appearing replaced lots of other cars (not all, but many).)
That car is probably car0.

@Moderators: Sorry for the 2 month necrobump, my real live issues took 10-30x more time than expected.
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
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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