| View previous topic :: View next topic |
| Author |
Message |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Tue Sep 08, 2020 10:27 am Post subject: How do i find the unit ID type in this case? : |
|
|
Im having difficulty completing a very cool little hack i made.
So my hack is simple yet super useful.
In age of empires 2. You have a button that if you click it, it goes to a random idle villager (villager is a worker that gives you resources).
So when you have idle villagers, and you need to check them you press that button.
But i made an hack in C++, that not only does that. It also reads the memory and compares via square roots which of the vils is closer to you.
But the problem is. Im reading the sprites. Not the unit ID type.
I made a comparison of data. And found so far the only difference between units a little string that changes according to what the unit is doing.
For example if the unit is idle it will have FN. Otherwise something else.
So sometimes some vils will change their sprite to idle for a split second.
Its very rare but it happens. And that can ruin it.
So what are your tips to go around this problem? How can i find the specific unit id?
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Sep 08, 2020 2:19 pm Post subject: |
|
|
If you know where the 'FN' string is stored, try using the 'Find What Accesses This Address' feature of CE and see if there is a normalized function that is indexing a list of things like units. That is a common thing to happen to find where/how a game is iterating its entity lists or how it handles its units in general.
You can often also use that to find where the starting address is for that block of memory and what the offset is to that string. Use that to try and find multiple entities/units then compare their memory regions against each other to find something that would be used as an ID or similar.
_________________
- Retired. |
|
| Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Thu Sep 10, 2020 11:04 am Post subject: |
|
|
Thank you Atomos. Ive been doing something similar. But to no avail.
I have been trying to find patterns. But it seems sometimes this FN, of VMFAR_FN meaning Villager Male Farm _ FN, pops up sometimes in villagers that are not idle.
So since this is just the sprite of the unit. I think i cant rely on it.
And i must find something that is directly related to the unit being idle.
But i have been using the Find what writes to address, and other techniques.
And it has been days and i couldnt figure it out yet.
You think perhaps DBVM is the only chance here?
|
|
| Back to top |
|
 |
|