Lorwyn How do I cheat? Reputation: 0
Joined: 12 Jul 2018 Posts: 1
|
Posted: Thu Jul 12, 2018 11:03 pm Post subject: Trouble determining locations of mob structures |
|
|
I am creating a bot for a 2D game -- have made a lot of progress, but the monster structures are giving me a hard time. I have found the monster memory structures and this is the information I know for sure:
- There is a static pointer to the top of a monster array in memory
- Each monster in the monster array is 0x20C in space
- Monsters and NPCs and People all go in the same monster structure
- There is info such as Coordinates, graphics, etc in each structure
- the first 4 bytes are either a pointer indicating that the mob is allocated (exists on the screen)
-- OR -- a pointer to an 'unallocated' memory slot for a monster (i.e. a pointer chain that you can follow to find all 'unallocated' slots)
- When you load the game, the game has a finite number of slots, somewhere around 40
- If you need more slots than the game originally had space for on load, then a new contiguous slot in memory is opened up to house monsters -- I call this 'overflow' memory
- If overflow memory is activated, the static pointer that pointed to the top of the monster structure will point to the new location in memory that was just opened up.
- Once overflow memory is activated, that memory will stay activated until the game is closed, however the overflow memory is used as a lower priority for assigning monsters
-----
What I am having trouble with is that I am looking for things that are allocated, not unallocated. If I were to try to code around the unallocated list, I wouldn't necessarily know where all monsters are located in memory. The things I know about these monster arrays seem to indicate that there should be a linked list for these monster structures, however I cant find any pointers that are contained within an allocated monster that point to the next allocated monster. Similarly, I cannot find an array of pointers or any pointer chain that points to allocated monsters. The only solution I can come up with right now is to create a list of where monsters could be that comes from the unallocated pointer chain, but that doesn't feel like a good solution.
Does anyone here have any ideas of things that I could search for in cheat engine that maybe would uncover a little more about how this game knows where all these monsters are in memory? Or maybe a little insight based on the information I provided that could point me to a different style of monster array that I am not aware of? (i.e. dont look for a linked list, look for X)
Thank you in advance to anyone who takes the time to read all of this.
|
|