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 


AOB scan - From exact enemy entity to enemies array

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
ranseier
Newbie cheater
Reputation: 0

Joined: 27 Sep 2015
Posts: 23

PostPosted: Sun Oct 04, 2015 2:16 pm    Post subject: AOB scan - From exact enemy entity to enemies array Reply with quote

Hi,

I hope this question isn't too dumb...

usually I am using the pointer scanner to find the enemy array doing the following steps:
- find a address of a specific value (x coordinate of a single enemy)
- pointer scan for this address, repeat until you get a static pointer (with offsets) to the x coordinate
- enter the pointer in the Dissect Data/Structure window and expand the treeview: first offset, second offset, third offset until you find something that holds all the enemies. done.


Now I am trying the AOB scan but I don't know how to get the enemy array here.

Steps I have done:
- find a address of a specific value (x coordinate of a single enemy)
- find out what accesses this address
- show in disassembler

Using these bytes found in the memory browser only leads to the same specific enemy I guess. But I am looking for a way to get the address that holds all the enemies.

Thanks
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Oct 04, 2015 2:26 pm    Post subject: Reply with quote

That instruction likely accesses all enemies. Possibly the player as well.
If you wanted to immediately do something to each enemy, that would be the place.
So if you want to freeze everyone, prevent that instruction from updating addresses.
If you want to vacuum everyone, set each address to your own value.
But, chances are you will never find a pointer to an array of every enemy's structure.
Back to top
View user's profile Send private message
ranseier
Newbie cheater
Reputation: 0

Joined: 27 Sep 2015
Posts: 23

PostPosted: Sun Oct 04, 2015 2:33 pm    Post subject: Reply with quote

Using the pointer scanner on Assault Cube gave me a pointer with several offsets. Adding these offsets to the pointer step by step revealed an array of all bots in the game at the third offset if I remember correctly.

Now I am trying to get the same result with the AOB scan technique because pointer scans sometimes take a long time to finish and I have heard the AOB scan technique is more realiable.

Thanks
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Oct 04, 2015 2:40 pm    Post subject: Reply with quote

Well, you would first want to get that pointer from a pointer scan. Once you determine you're able to increment one of those offsets to find the next enemy, you would remove that offset and all of the ones after it. Then you would find out what accesses the new pointer address. From there, you would save the value into a custom variable using an AOB injection.
Back to top
View user's profile Send private message
ranseier
Newbie cheater
Reputation: 0

Joined: 27 Sep 2015
Posts: 23

PostPosted: Mon Oct 05, 2015 5:06 am    Post subject: Reply with quote

Thanks.

I am facing the problem that sometimes the array of enemies/bots is unrealiable. Either this array does not contain all bots or the array no longer shows any bots.

Will the technique you described in your last post help me here or does it mean I have made a mistake using the pointer scanner and found an unstable pointer?

My goal is to have a more reliable way to find the enemies array in games. I thought I can do a sig scan instead of a pointer scan but I seems that I have to do both now.
Back to top
View user's profile Send private message
vng21092
Grandmaster Cheater
Reputation: 15

Joined: 05 Apr 2013
Posts: 644

PostPosted: Mon Oct 05, 2015 8:06 am    Post subject: Reply with quote

may I ask what game this is? Usually there are instruction(s) that handle all entity coordinates (player + NPC), find that, and apply a filter, and have them jump to two different scripts of your own, now you'll have one specifically handling your coordinates, and one that handles all the enemies coordinates.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Oct 05, 2015 5:19 pm    Post subject: Reply with quote

Would be an unstable pointer, but if you've already found the base of the array, find out what instructions access the offset before it.
You can setup an injection that will populate a custom variable with whatever address passes through.
Hopefully the game only keeps a single list and you've only been having problems because it recreates it every so often.
Back to top
View user's profile Send private message
vng21092
Grandmaster Cheater
Reputation: 15

Joined: 05 Apr 2013
Posts: 644

PostPosted: Tue Oct 06, 2015 9:14 am    Post subject: Reply with quote

Here is a sample table I just made demonstrating what I've stated above, hopefully you can try and understand this rather then looking for pointers. The script covers all entities coordinates in a given map, but with a simple filter, one script only watches the player, while the other only watches the enemies. So whatever you want to do with the enemies, you'd put that in the "notMe" section, whereas anything player related would go to the "isMe" section, in the event that the instruction does access something that applies to neither filter, it'll jump directly to the original code.




ac_client.CT
 Description:

Download
 Filename:  ac_client.CT
 Filesize:  2.48 KB
 Downloaded:  610 Time(s)

Back to top
View user's profile Send private message
ranseier
Newbie cheater
Reputation: 0

Joined: 27 Sep 2015
Posts: 23

PostPosted: Tue Oct 06, 2015 2:36 pm    Post subject: Reply with quote

Thank you guys.

vng21092: I will check this out tomorrow. Just a quick question: You are using an AOB scan. How did you find the address you want to AOB-scan for?
Did you find it using the technique described by Zanzer? - Doing a pointer scan, remove the offsets until you are on the pointer that holds all enemies, do a "what accesses" on it --> show in disassembler. write an AOB scan from parts of bytes of the instructions around.
Is this correct?
Back to top
View user's profile Send private message
vng21092
Grandmaster Cheater
Reputation: 15

Joined: 05 Apr 2013
Posts: 644

PostPosted: Tue Oct 06, 2015 3:21 pm    Post subject: Reply with quote

uhhhh no. What I did has nothing to do with pointers. I found my Z coordinate (you could look for X,Y or Z, doesn't matter). I found out what wrote to it, and I checked what else that instruction accessed. Just so happens the instruction wrote to every entities Z coordinate on the map. The AOB scan is looking for that instruction I'm using as an injection point. The instruction handles all coordinates, that way I don't have to search for anything. If you wanted a Big Mac, you wouldn't go around to every deli and food cart asking if they serve Big Macs, because you know only McDonald's serves them. Therefore, by finding a McDonald's, you're guaranteed to find a Big Mac, the same way if you found the instruction accessing all coordinates, you'd have access to all coordinates.
Back to top
View user's profile Send private message
ranseier
Newbie cheater
Reputation: 0

Joined: 27 Sep 2015
Posts: 23

PostPosted: Tue Oct 06, 2015 3:53 pm    Post subject: Reply with quote

vng21092 wrote:
uhhhh no. What I did has nothing to do with pointers. I found my Z coordinate (you could look for X,Y or Z, doesn't matter). I found out what wrote to it, and I checked what else that instruction accessed. Just so happens the instruction wrote to every entities Z coordinate on the map. The AOB scan is looking for that instruction I'm using as an injection point. The instruction handles all coordinates, that way I don't have to search for anything.


Ok, this seems to work with Assault Cube. Now I am having trouble with a different game where I found enemies in different pointers. Sometimes enemies disappear from one pointer, appear in another. It seems there is no single place where I find them all.
I don't know if I can solve this by using a deeper pointer scan in combination with Zanzer's idea. I also definately try out what you have recommended. Maybe there is a general instruction that writes all coordinates.

vng21092 wrote:
If you wanted a Big Mac, you wouldn't go around to every deli and food cart asking if they serve Big Macs, because you know only McDonald's serves them. Therefore, by finding a McDonald's, you're guaranteed to find a Big Mac, the same way if you found the instruction accessing all coordinates, you'd have access to all coordinates.


Great analogy Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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