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 


How do i find the unit ID type in this case? :

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 174

PostPosted: Tue Sep 08, 2020 10:27 am    Post subject: How do i find the unit ID type in this case? : Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Sep 08, 2020 2:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 174

PostPosted: Thu Sep 10, 2020 11:04 am    Post subject: Reply with quote

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
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