 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Freiza Grandmaster Cheater
Reputation: 22
Joined: 28 Jun 2010 Posts: 662
|
Posted: Sat Jul 31, 2010 11:19 pm Post subject: how to find unit id in rts games |
|
|
how to find unit or player id.
what i know is:
1. Search for address of one of my unit's life.
2. View the values near this address in Hex Editor, usually before it. Take a look at the data's structure.
3. Sometimes there is a digit before my player's life value that represents the owner of the unit. Ex.: If it is a player's unit, digit is 1. If it belongs to the computer, it is 0.
4. Search for address of one of the computer unit's life.
5. View the values near this address in Hex Editor, usually before it. Take a look at the data's structure.
6. Compare the two data structures to see the differences.
or someone can tell me a better way to hack
|
|
Back to top |
|
 |
Geri Moderator
Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Sun Aug 01, 2010 4:07 am Post subject: |
|
|
Here is how would I start:
1. Search for the unit's life.
2. Find out which code writes to the life.
3. Using the code which is writing to the life to get the health of some of my units and some of the enemies. It is best if the units are the same type. Eg. lets say to find the health of 2 friendly and 2 enemy GI so most of the data will be the same for them.
Let's say the the addressess are:
01246290 friendly GI 1
01247290 friendly GI 2
01248290 enemy GI 1
01249290 enemy GI 2
4. Now checking the code which is writing to the life address, let's say it is:
mov [esi+80],eax
5. In this case ESI will be most likely the starting address of the unit's data structure, so You should start checking the data from healthaddress-80 (hex) bytes.
6. Open the memory browser and start Tools->Dissect data/structures
7. We have four units to observe and we have only one slot where we can type in addresses, so we need to open 3 more by using File->Add extra address or pressing CTRL+A. Now we have four slots for addresses.
8. Now we want to see the data from ESI, so we need to deduct 80 bytes from every address.
01246210 friendly GI 1 starting point
01247210 friendly GI 2 starting point
01248210 enemy GI 1 starting point
01249210 enemy GI 2 starting point
We fill in these addresses in order.
9. Now we click on Structures->Define new structure. Clicking OK and YES for the question unless You know what You are doing and want to change anything.
10. At the moment, You should see the data of the units in this order from left to right. Lets say You found some interesing addresses:
friendly GI 1 friendly GI 2 enemy GI 1 enemy GI 2
0030 1 1 2 2
Now You need something like that. An address where the value is the same for friendly units and for the enemy units. In this case, [esi+30] will be most likely the player ID and if it is 1, then the unit is friendly.
It is sometimes not that easy. It may happen that You will find a pointer instead of an obvious player ID. And the pointer will point to an area where the player's data is stored.
Example:
friendly GI 1 friendly GI 2 enemy GI 1 enemy GI 2
0040 00162030 00162030 00192030 00192030
The data dissector is showing where the pointers are pointing so check these addresses too. Now You have to find something that is different in the friendly pointer area and in the enemy pointer area and search for a player ID. For example it may happen that pointer+10 is always 1 for Your and something different value for the enemy. In this case, that is the player ID.
It may get even more complicated but these are the main methods.
These addresses and codes are just examples, they have nothing to do at all with RA2 or with any game. I have no clue how it is working in RA2.
EDIT:
About Your post, if You would use hex editor to observe all these data structures, You would waste Your time. That is why the Data dissector has been created in CE so I suggest to learn to use it. If there is a difference in data, it will show it in RED. Also it will display the type of values, pointers etc. Pretty cool stuff. I would say it is one of the most useful options in CE.
_________________
|
|
Back to top |
|
 |
Freiza Grandmaster Cheater
Reputation: 22
Joined: 28 Jun 2010 Posts: 662
|
Posted: Sun Aug 01, 2010 7:07 am Post subject: |
|
|
Suppose we want to see particular or all values in hex or in any other numeric format can we see it in data disector.
|
|
Back to top |
|
 |
Geri Moderator
Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Sun Aug 01, 2010 7:16 am Post subject: |
|
|
If You want You can change the type of the value by double clicking on it in the dissector. If You want define a type for all the values in the area, I have no clue.
_________________
|
|
Back to top |
|
 |
|
|
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
|
|