Reading scene information from memory menu

User Tag List

Results 1 to 8 of 8
  1. #1
    darthsidious's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading scene information from memory

    Trying to read scene information from memory using D3 adventures (pasted code below) and getting bad data, the nav zone data comes back with with bad data, null pointers, no nav cells, etc... has anyone done this successfully with out memory injection?

    I'm trying to get the dynamic nav cell information of a dungeon so I can move around the area,


    Code:
    public static uint objectManager = 0x1543B9C;
    public static uint itrObjectManagerA { get { return mem.ReadMemoryAsUint(objectManager); } }
    
    
        public static class SceneManager
        {
            public static Scene[] getScenes()
            {
                uint offset = Offsets.itrObjectManagerA + 0x8F4;
                uint sceneCountPtr = Globals.mem.ReadMemoryAsUint(offset) + 0x10c;
                uint sceneListPtr = Globals.mem.ReadMemoryAsUint(offset) + 0x148;
                sceneListPtr = Globals.mem.ReadMemoryAsUint(sceneListPtr);
    
                int numScenes = Globals.mem.ReadMemoryAsInt(sceneCountPtr);
    
                List<Scene> scenes = new List<Scene>();
                for (int i = 0; i < numScenes; i++)
                {
                    Scene s = new Scene(new IntPtr(sceneListPtr));
                    scenes.Add(s);
    
                    sceneListPtr += 0x2A8;
                }
                return scenes.ToArray();
            }
        }

    Reading scene information from memory
  2. #2
    MisguidedRage's Avatar Private
    Reputation
    1
    Join Date
    Jun 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Theres a post about this just below yours, read down a bit.

  3. #3
    darthsidious's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MisguidedRage View Post
    Theres a post about this just below yours, read down a bit.
    What's the title of the post? The one about detecting borders mentions this and I'm using the code to do it but the returned scene class has bad data in it (i.e. has the memory structure changed for scenes?)

  4. #4
    infotech1's Avatar Member
    Reputation
    3
    Join Date
    Jan 2007
    Posts
    43
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the struct is wrong in d3adventure, you need to add an extra int before the position info, not sure where exactly off the top of my head. but most stuff needs to move down one Int of space then it all lines up properly.

  5. #5
    DarthTon's Avatar Contributor
    Reputation
    171
    Join Date
    Apr 2010
    Posts
    108
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    These structures work correctly in my project:

    Scene data from Object manager:

    Code:
    //sizeof = 0x54
    class NavZoneRaw 
    {
    public:
       DWORD id_navzone;       // 0x000
       DWORD id_world;         // 0x004
       DWORD id_unknown_008;   // 0x008
       Vec2 unknown_00C;       // 0x00C
       DWORD unknown_014;      // 0x014
       Vec2 zoneMin;           // 0x018
       Vec2 zoneMax;		   // 0x020
       DWORD unknown_028[8];   // 0x028
       DWORD pNavZoneDefRaw;   // 0x048
       DWORD pSceneRecord;     // 0x04C
       DWORD unknown_050;      // 0x050
    };
    
    //sizeof = 0x1C8
    class NavMeshRaw 
    {
    public:
       DWORD id_navmesh;		// 0x000
       DWORD id_world;			// 0x004
       DWORD unknown_008[3];	// 0x008
       DWORD sno_levelarea;		// 0x014
       DWORD unknown_018[3];	// 0x018
       DWORD sno_portalWorld;	// 0x024
       DWORD unknown_028[10];	// 0x028
       float unknown_050;		// 0x050
       DWORD unknown_054[5];	// 0x054
       float unknown_068;		// 0x068
       DWORD unknown_06C[8];	// 0x06C
       DWORD sizeX;				// 0x08C
       DWORD sizeY;				// 0x090
       AABB  unknown_094;		// 0x094 
       AABB  unknown_0AC;		// 0x0AC
       DWORD unknown_0C4[5];	// 0x0C4
       DWORD id_sno;			// 0x0D8
       DWORD unknown_0DC[4];	// 0x0DC
       Vec2 MeshMin;			// 0x0EC
       DWORD unknown_0F4[16];	// 0x0F4
       AABB bounds;				// 0x134
       AABB boundsMarker;		// 0x14C
       Vec2 MeshMax;			// 0x164
       float unknown_16C[3];	// 0x16C
       DWORD unknown_178;		// 0x178
       NavZoneRaw* pZone;		// 0x17C
       DWORD unknown_180[9];	// 0x180
       DWORD unknown_1A4;		// 0x1A4 Read by D3::NavMesh::GetFlags
       DWORD unknown_1A8;		// 0x1A8
       DWORD unknown_1AC[7];	// 0x1AC
    };
    
    //sizeof = 0x2A8
    class SceneRaw 
    {
    public:
    	int id_scene;			// 0x000
    	NavMeshRaw navmesh;     // 0x004
    	DWORD unknown_1CC[55];	// 0x1CC
    };
    SNO related:
    Code:
    //sizeof = 0x10
    class DataPtr
    {
    public:
    	DWORD file_offset;		// 0x000
    	DWORD size;				// 0x004
    	DWORD mem_offset;		// 0x008
    	DWORD unused;			// 0x00C
    };
    
    //sizeof = 0x8
    class DataPtr2
    {
    public:
    	DWORD file_offset;		// 0x000
    	DWORD size;				// 0x004
    };
    
    
    //sizeof = 0x8
    class NavMeshSquare
    {
    public:
    	float z;					// 0x000
    	NavCellFlagsDW flags;		// 0x004
    };
    
    //sizeof = 0x6
    class NavGridSquare
    {
    public:
    	NavCellFlagsW Flags;		// 0x000
    	WORD W1;					// 0x002
    	WORD CellLookupIndex;		// 0x004
    };
    
    //sizeof = 0x20
    class NavCell
    {
    public:
    	Vec3 Min;					// 0x000
    	Vec3 Max;					// 0x00C
    	NavCellFlagsW Flag;			// 0x018
    	WORD NeighbourCount;		// 0x01A
    	DWORD NeighborsIndex;		// 0x01C
    };
    
    //sizeof = 0x4
    class NavCellLookup
    {
    public:
    	NavCellFlagsW Flags;		// 0x000
    	WORD WCell;					// 0x002
    };
    
    //sizeof = 0x128
    class NavMeshDef
    {
    public:
    	DWORD SquaresX;				// 0x000
    	DWORD SquaresY;				// 0x004
    	DWORD pad_008;				// 0x008
    	DWORD SquareCount;			// 0x00C
    	float pad_010;				// 0x010
    	DataPtr2 Squares;			// 0x014
    	DWORD pad_01C;				// 0x01C
    	NavMeshSquare* array_ptr;	// 0x020
    	DWORD pad_024;				// 0x024
    	char name[256];				// 0x028
    };
    
    //sizeof = 0x84
    class NavZoneDef
    {
    public:
    	DWORD NavCellCount;			// 0x000
    	DWORD pad_004[3];			// 0x004
    	DataPtr2 NavCells;			// 0x010
    	DWORD NeighbourCount;		// 0x018
    	DWORD pad_01C[3];			// 0x01C
    	DataPtr2 NavCellNeighbours; // 0x024
    	float pad_02C[2];			// 0x02C
    	DWORD pad_034;				// 0x034
    	Vec2 V0;					// 0x038
    	DWORD pad_040[3];			// 0x040
    	DataPtr2 GridSquares;		// 0x04C
    	DWORD pad_054[4];			// 0x054
    	DataPtr2 CellLookups;		// 0x064
    	DWORD BorderDataCount;		// 0x06C
    	DWORD pad_070[3];			// 0x070
    	DataPtr2 BorderData;		// 0x07C
    };
    
    
    //sizeof = 0x30C
    class SNOScene
    {
    public:
    	MemHeader header;			// 0x000
    	AABB AABBBounds;			// 0x010
    	AABB AABBMarketSetBounds;	// 0x028
    	NavMeshDef navmesh;			// 0x040
    	DataPtr2 Exclusions;		// 0x168
    	DWORD pad_170[14];			// 0x170
    	DataPtr2 Inclusions;		// 0x1A8
    	DWORD pad_1B0[14];			// 0x1B0
    	DataPtr2 MarkerSets;		// 0x1E8
    	DWORD pad_1F0[14];			// 0x1F0
    	char lootlink[64];			// 0x228
    	DataPtr2 MapTrigEvent;		// 0x268
    	DWORD pad_270[4];			// 0x270
    	NavZoneDef NavZone;			// 0x280
    	DWORD SNOAppearance;		// 0x304
    	DWORD SNOPhysMesh;			// 0x308
    };

  6. #6
    darthsidious's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarthTon View Post
    These structures work correctly in my project:

    Scene data from Object manager:
    DarthTon how do you read in those structures in your project? Are you using DLL injection or memory reads?

  7. #7
    DarthTon's Avatar Contributor
    Reputation
    171
    Join Date
    Apr 2010
    Posts
    108
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOP memory reads. You can find out more from my code: http://www.ownedcore.com/forums/diab...framework.html ([C++] My D3 OOP framework)

  8. #8
    darthsidious's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarthTon View Post
    OOP memory reads. You can find out more from my code: http://www.ownedcore.com/forums/diab...framework.html ([C++] My D3 OOP framework)
    Sweet, thanks DarthTon!

Similar Threads

  1. Replies: 1
    Last Post: 07-28-2015, 03:53 PM
  2. AutoIT Example - Reading a value from memory
    By mechtn in forum SWTOR Bots and Programs
    Replies: 10
    Last Post: 02-01-2012, 11:48 AM
  3. [Question] Reading DBC's from memory?
    By -Ryuk- in forum WoW Memory Editing
    Replies: 7
    Last Post: 09-05-2011, 04:52 PM
  4. [Guide][VB.NET] Read a string from memory
    By Gothian in forum Programming
    Replies: 14
    Last Post: 08-18-2008, 04:39 PM
  5. [Guide][VB.NET] Reading a String From Memory
    By Gothian in forum WoW Memory Editing
    Replies: 14
    Last Post: 01-18-2008, 12:08 PM
All times are GMT -5. The time now is 01:17 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