[Diablo 3][[0.5.1.8101] Patch 9 - Info Dump Thread menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Diablo 3][[0.5.1.8101] Patch 9 - Info Dump Thread

    Keeping this going now that patch 9 is out.


    pRActors:
    [[base + 140593C]+8AC]
    that means:
    [[[base + 140593C]+8AC]] == "RActors"

    FirstActor:
    [[[base + 140593C]+8AC] + 0x148] = Start address of the first actor object

    Add 0x10C to get the number of slots in RActors. Add 0x42C to the FirstActor address to get the second actor, and iterate like this over each slot. If the first four bytes in any field equal 0xFFFFFFFF (a common indicator of "invalid" or "no data" in the client) skip over it, as the actor in that slot has been removed.
    Last edited by diablothree; 01-10-2012 at 12:50 AM. Reason: Corrected the info on how to enumerate RActors

    [Diablo 3][[0.5.1.8101] Patch 9 - Info Dump Thread
  2. #2
    chuanhsing's Avatar Member
    Reputation
    6
    Join Date
    Feb 2008
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    works fine for me, thanks

    RActors - Pastebin.com

  3. #3
    wraithZX's Avatar Active Member
    Reputation
    43
    Join Date
    May 2007
    Posts
    122
    Thanks G/R
    0/1
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just started actively looking at D3.... is it just me or is there some funky relocations going on?
    Functions don't seem to line up in the debugger compared to IDA, despite having the same base module address.


    Either way, in IDA, the function at 0x8240D0 seems to be a GetActorPtrFromGUID or equivalent (answering the question from previous thread), declaration:
        void* __thiscall GetActorPtrFromGUID(RActors* pRActors, DWORD guid);

    ...and GetPlayerGUID @ 0x944230:
        DWORD GetPlayerGUID();

    Using pattern matching should allow you to find them despite the relocations.

    Has anyone seen a programmatic version of the equivalent of WoW's enumerate objects with callback?
    It seems most of the actor-access functions iterate directly, curious if anyone's seen it.

    EDIT: Found it. 0x9835A0.
        BOOL __thiscall IterateActors(RActors* pRActors, DWORD& mask/*???*/, void** actor_ptr);

    EDIT2: It seems my 8101 IDA database was from a different 8101 build. (???) No idea. Rebuilt the DB and everything is correct. Weird.
    Last edited by wraithZX; 01-07-2012 at 07:23 AM.

  4. #4
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wraithZX View Post
        void* __thiscall GetActorPtrFromGUID(RActors* pRActors, DWORD guid);
    Nice find, I found similar code in a different method but lost track of it. Here's my C# implementation of the same method:

    (See my post below for a more generic method of converting an id/hash to a pointer in any of the container structures.)
    Last edited by diablothree; 01-10-2012 at 05:46 PM. Reason: Removed outdated code, referenced my post below

  5. #5
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They have about 80 different manager with different items, i've made a class that i can use on any as long as i know where the pointer for it is and the size of the object.
    Here's how RActors look

    Code:
        /// <summary></summary>
        public class Ractors : ObjectManager
        {
            /// <summary>Constructor.</summary>
            /// <param name="ptr">The pointer.</param>
            internal Ractors(IntPtr ptr) 
                : base(ptr, FastSize<NativeRActor>.Size)
            {
            }
    
            /// <summary>
            /// Gets all loaded RActors.
            /// </summary>
            /// <returns></returns>
            public List<RActor> GetAllLoadedRActors()
            {
                List<RActor> acdObjects = new List<RActor>();
    
                for (short i = 0; i < NumValues; i++)
                {
                    IntPtr result = GetItem(i);
                    if (result != IntPtr.Zero)
                    {
                        RActor a = new RActor(result);
                        acdObjects.Add(a);
                    }
                }
    
                return acdObjects;
            }
    
            /// <summary>
            /// Gets a RActor by the guid.
            /// </summary>
            /// <param name="guid">The guid.</param>
            /// <returns></returns>
            public RActor GetActorByGuid(int guid)
            {
                foreach (RActor ractor in GetAllLoadedRActors())
                {
                    if (ractor.Guid== guid)
                        return ractor;
                }
    
                return null;
            }
        }

    Last edited by Nesox; 04-04-2012 at 03:54 PM.

  6. #6
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good idea. I refactored the above code to handle any of the object managers.

    Code:
    uint IDToPtr(uint container, uint objSize, uint id)
    {
        const uint INVALID = 0xFFFFFFFF;
    
        uint shortID = id & 0xFFFF;
    
        if (shortID >= d3.ReadUInt(container + 256))
            return INVALID;
    
        uint v0 = d3.ReadUInt(container + 328);
        int v1 = d3.ReadInt(container + 396);
    
        uint ptr = d3.ReadUInt(v0 + 4 * (shortID >> v1)) + objSize * (uint)(shortID & ((1 << v1) - 1));
        if (d3.ReadUInt(ptr) == id)
            return ptr;
    
        return INVALID;
    }
    A few object sizes in 8101: RActors are 1068, ACDs (ActorCommonData) are 720, attributes are 384, scenes are 680.
    Last edited by diablothree; 01-10-2012 at 04:15 AM. Reason: Added scene size

  7. #7
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another member pointed out my description of how to enumerate RActors in the first post was incorrect. The info has been corrected (you need to grab the size of the array in RActors and skip over any 0xFFFFFFFF entries).

  8. #8
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (Ignore this post.)
    Last edited by diablothree; 01-10-2012 at 05:47 PM.

  9. #9
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    135
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by diablothree View Post
    Another member pointed out my description of how to enumerate RActors in the first post was incorrect. The info has been corrected (you need to grab the size of the array in RActors and skip over any 0xFFFFFFFF entries).
    There is a LinkedList will all Active ActorsGuids you can use aswel. Just go through the entire list and use GetObjectActorByGuid on the guids.

  10. #10
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To the people who are successfully rendering navcell maps: once you have the scene list, are you digging through navmesh/navcell structures attached to the scenes in memory or are you parsing the game asset files (mpq/sno)? Seems like the latter would be an easier approach but it would be good to hear from people who are further along in that area.

  11. #11
    Zaylek's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am reading the navmesh/navcell structures in memory. I know others have read them from the mpq files. Both are equally valid methods, just personal preference I guess.

  12. #12
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    135
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Zaylek View Post
    I am reading the navmesh/navcell structures in memory. I know others have read them from the mpq files. Both are equally valid methods, just personal preference I guess.
    The MPQ files are static and the world is dynamic and generated at server. Thus you can only get the layouts for the different scenes from the MPQ, while the actualy navmesh can only get fetched from the memory.

    Edit: Perhaps I should have read the entire context before answering... Sorry .

    To answer the question. I use memory reading : p
    Last edited by xzidez; 01-11-2012 at 07:49 AM.

  13. #13
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by xzidez View Post
    The MPQ files are static and the world is dynamic and generated at server. Thus you can only get the layouts for the different scenes from the MPQ, while the actualy navmesh can only get fetched from the memory.

    Edit: Perhaps I should have read the entire context before answering... Sorry .

    To answer the question. I use memory reading : p
    Can you provide more information on why the navmesh can only be fetched from memory? The .scn files in the MPQ archives all have navmesh/navcell structures in them. It's not clear to me why you couldn't just grab the active scenes in memory and use their snoIDs to lookup those scenes and their navmeshes from the MPQs.

  14. #14
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    135
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by diablothree View Post
    Can you provide more information on why the navmesh can only be fetched from memory? The .scn files in the MPQ archives all have navmesh/navcell structures in them. It's not clear to me why you couldn't just grab the active scenes in memory and use their snoIDs to lookup those scenes and their navmeshes from the MPQs.
    Ye I was under the impression that you were talking about getting the map from the MPQ without having the scenes. But just as you say, if you know the scenes you can grab the the rest from the memory afaik. (This is not my approach so I cant confirm it, but I would assume this is how it is)

  15. #15
    diablothree's Avatar Corporal
    Reputation
    6
    Join Date
    Jan 2012
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by xzidez View Post
    Ye I was under the impression that you were talking about getting the map from the MPQ without having the scenes. But just as you say, if you know the scenes you can grab the the rest from the memory afaik. (This is not my approach so I cant confirm it, but I would assume this is how it is)
    Ah ok we're on the same page now. Yeah, I'm able to fetch a list of scenes with code that looks something like this:

    Code:
    const uint INVALID = 0xFFFFFFFF;
    const uint OBJMANAGER = 0x140593C;
    const uint OBJMANAGER_SCENES_PTR_OFFSET = 0x8F0;
    const uint ARRAY_SIZE_OFFSET = 0x10C;
    const uint ARRAY_OFFSET = 0x148;
    const int SIZEOF_SCENE = 680;
    
    public List<Scene> GetScenes()
    {
        uint pScenes = GetScenesContainer();
    
        // Grab the size of the Scenes array
        int sceneArraySize = d3.ReadInt(pScenes + ARRAY_SIZE_OFFSET);
    
        // Grab the first scene
        uint pScene = d3.ReadUInt(pScenes + ARRAY_OFFSET);
    
        // Loop through the array and grab all valid scene objects
        List<Scene> scenes = new List<Scene>(sceneArraySize);
        for (uint i = 0; i < sceneArraySize; i++)
        {
            Scene scene = GetScene(pScene + i * SIZEOF_SCENE);
            if (scene != null)
                scenes.Add(scene);
        }
    
        return scenes;
    }
    
    private Scene GetScene(uint ptr)
    {
        if (d3.ReadUInt(ptr) != INVALID)
            return new Scene(d3, ptr, d3.ReadBytes(ptr, SIZEOF_SCENE));
        return null;
    }
    
    private uint GetScenesContainer()
    {
        uint pObjMgr = d3.ReadUInt(OBJMANAGER);
        uint pScenes = d3.ReadUInt(pObjMgr + OBJMANAGER_SCENES_PTR_OFFSET);
        if (d3.ReadASCIIString(pScenes, 7) == "Scenes")
            return pScenes;
        return INVALID;
    }
    Last edited by diablothree; 01-12-2012 at 04:12 PM. Reason: Cleaned up formatting

Page 1 of 2 12 LastLast

Similar Threads

  1. [Diablo 3][[1.0.2.9749] Retail Patch 2 - Info Dump Thread
    By st0724 in forum Diablo 3 Memory Editing
    Replies: 36
    Last Post: 06-24-2012, 06:36 AM
  2. [Diablo 3][[0.8.0.8815] Patch 14 - Info Dump Thread
    By Valtharak in forum Diablo 3 Memory Editing
    Replies: 18
    Last Post: 05-20-2012, 07:14 AM
  3. [Diablo 3][[1.0.1.9558] Retail Patch 1 - Info Dump Thread
    By KOS0937 in forum Diablo 3 Memory Editing
    Replies: 5
    Last Post: 05-19-2012, 10:26 AM
  4. [Diablo 3][[0.6.1.8350] Patch 11 - Info Dump Thread
    By Valtharak in forum Diablo 3 Memory Editing
    Replies: 0
    Last Post: 01-31-2012, 06:20 PM
  5. [Diablo 3][[0.5.0.8059] Patch 8 - Info Dump Thread
    By felheartx in forum Diablo 3 Memory Editing
    Replies: 2
    Last Post: 01-04-2012, 11:48 AM
All times are GMT -5. The time now is 03:25 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search