UnknOwned, I really appreciate the sample code. It helped me get a better grip on where to start as far as memory reading goes. I'm pretty sure I have the requisite skills to be able to do this, I'm just missing pieces on how to put everything together.
If you don't mind answering some basic questions, I'd like to go through some code snippets, line-by-line to understand them better.
Code:
global $ofs_ObjectManager = 0x01580A2C
global $ofs__ObjmanagerActorOffsetA = 0x8b0
global $ofs__ObjmanagerActorCount = 0x108
global $ofs__ObjmanagerActorOffsetB = 0x148
global $ofs__ObjmanagerActorLinkToCTM = 0x380
global $_ObjmanagerStrucSize = 0x428
These constants mean the following (please correct me if I'm wrong):
* 0x01580A2C -> The base address of the object manager pointer
* 0x8b0 -> The offset within the object manager where the Actor list pointer is located (it seems like the start of a pointer chain)
* 0x108 -> The offset starting from where the Actor list pointer is located, which contains the number of actors
* 0x148 -> The offset to the next link in the actor list pointer chain
* 0x380 -> used for click to move, which I'm not trying to figure out right now
* 0x428 -> The size of an Actor struct
Code:
global $_itrObjectManagerA = _MemoryRead($ofs_ObjectManager, $d3, 'ptr')
global $_itrObjectManagerB = _MemoryRead($_itrObjectManagerA+$ofs__ObjmanagerActorOffsetA, $d3, 'ptr')
global $_itrObjectManagerCount = $_itrObjectManagerB+$ofs__ObjmanagerActorCount
global $_itrObjectManagerC = _MemoryRead($_itrObjectManagerB+$ofs__ObjmanagerActorOffsetB, $d3, 'ptr')
global $_itrObjectManagerD = _MemoryRead($_itrObjectManagerC, $d3, 'ptr')
global $_itrObjectManagerE = _MemoryRead($_itrObjectManagerD, $d3, 'ptr')
Here's how it works from my understanding:
*$_itrObjectManagerA Address of the Object Manager as pointed to by a static memory location
*$_itrObjectManagerB -> Address of a structure that holds what I will call an ActorList** pointer and also the number of actors
*$_itrObjectManagerC -> Address of an ActorList* pointer.
*$_itrObjectManagerD -> Address of the actual ActorList.
*$_itrObjectManagerE -> I'm not sure what this is for.
Where did you get the structure definitions from?
I've been trying to find resources (read all of this forum and blizzhackers), but I can't seem to find how you actually go about determining what the structs store. I'm particularly interested in the Scene structs.
Ideally, I'd like to make a maphack that only reads process memory (it won't hook into the process). I will do that by overlaying a graphic on the screen. I'll certainly share whatever I can make. Right now I just don't know were to get information.