How to detect borders of level and walls? menu

User Tag List

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

    How to detect borders of level and walls?

    Hi people.

    Who knows how or have idea to define the boundaries of the maps, terrain objects and walls (waller ability)? Preferably without triangulation minimap

    I want to get the bounds for the character to possible movements to the programm kite monsters.

    I tried to start a reverse Diablo3, but it has 50 threads, and it is not clear where to start.
    It would be possible set breakpoints on D3D function, but the location of structures and their interaction can be a very different place.

    I'm confused, can someone tell me how to get to the proper structure and displacement? Or some algorithms begin to explore the structure of Diablo and get the basic structure?

    Thanks for help.

    How to detect borders of level and walls?
  2. #2
    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)
    Itterate the scenes in memory, then you can parse in the navmesh data from memory or load from the scenes corresponding .scn file in the mpqs.
    As for finding the scenes to itterate, they are inside a container inside objectmanager. Finding, counting, itterating has been dissucssed here, and structs with some values names are posted here and on blizzhackers as well.

    More spefic questions ill try and answer if you have as well.

  3. #3
    FireFenix's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for answer and I have some questions. Sorry if my post is to long...

    1) I have some knowledge of programming of various languages, some methods how to inject to process, and also know how to use ollydbg, IDA, ReClass and others. But I have almost no experience in reverse software bigger and better than CrackMe (basic lvl).
    At first, before writing the program, I am trying to understand the mechanism and the internal interactions of components/classes Diablo3.

    To start, I tried to find the value of an attribute in the memory and look about which structures it affects.
    I have read many forum pages from blizzhackers, ownedcore and others, there were advised to start with a simple attribute - life.
    I tried and found with Artmoney some 3 addresses (At first I tried integer values, but then spied some source code that the value can be a floating-point :P )
    Code:
    Value 1        18D76C08        338.0000        4 byte floating point
    Value 2        18D76C80        338.0000        4 byte floating point
    Value 3        1CC587F0        338.0000        4 byte floating point
    I'm set breakpoint on memory adress of Value 2 (18D76C80) in OllyDbg for check which code execute and get
    Code:
    CPU Disasm
    Address   Hex dump          Command
    00871491  |.  5E            POP ESI
    00871492  |.  85C9          TEST ECX,ECX
    00871494  |.  74 0B         JZ SHORT 008714A1
    00871496  |>  3941 04       /CMP DWORD PTR DS:[ECX+4],EAX
    00871499  |.  74 1C         |JE SHORT 008714B7
    0087149B  |.  8B09          |MOV ECX,DWORD PTR DS:[ECX]
    0087149D  |.  85C9          |TEST ECX,ECX
    0087149F  |.^ 75 F5         \JNZ SHORT 00871496
    008714A1  |>  25 FF0F0000   AND EAX,00000FFF
    008714A6  |.  8D0480        LEA EAX,[EAX*4+EAX]
    008714A9  |.  8B0CC5 1C0552 MOV ECX,DWORD PTR DS:[EAX*8+152051C]
    008714B0  |.  8B45 08       MOV EAX,DWORD PTR SS:[ARG.1]
    008714B3  |.  8908          MOV DWORD PTR DS:[EAX],ECX
    008714B5  |.  5D            POP EBP
    008714B6  |.  C3            RETN
    008714B7  |>  8B51 08       MOV EDX,DWORD PTR DS:[ECX+8]
    008714BA  |.  8B45 08       MOV EAX,DWORD PTR SS:[ARG.1]
    008714BD  |.  8910          MOV DWORD PTR DS:[EAX],EDX
    008714BF  |.  5D            POP EBP
    008714C0  \.  C3            RETN
    At first I was trying to understand where point offset and what kind of structure (MOV EDX,DWORD PTR DS:[ECX+8]), but then when I tried to trace it have attracted the attention of
    Code:
    MOV ECX,DWORD PTR DS:[ECX]
    Which gives iteration of the linked list in cycle.

    At first I thought it was one big structure for a particular object, until I met the code that points to the iterate of a linked list.
    I can't understand what kind of structure is in the linked list until looked inside source D3adventre, where found a similar function that I found (no idea what version of supremenerd88-d3adventure-1-5bc5887, but it is the most complete that I found). Structure proved to be an "Blizzhackers - Diablo III Offsets, Globals, Funcs, Structs, Classes, etc."
    Code:
    struct tAttribLink 
    {
        tAttribLink* Next;     // 0x000
        LONG AttribIndex;     // 0x004
        LONG Value;     // 0x008
    };
    Honestly, without D3Adventure and forum took me a very, very long time to come at least to some understanding of the structure.

    Of course I can use the structure which was already founded and found to perform back reverse find the offsets, but it does not give me a full understanding of the mechanics and the opportunity to use the knowledge in the implementation of the program and further research Diablo3.

    Questions: So, that would move on to study Diablo3, please tell me, how such great people as you can understand which specific structure by any address? In addition you will also find classes and functions, which also have some specific values. I think this is very hard!
    Did you make up complex logical chain, tried value to transfer into various functions and their values ​​almost randomly tried to link the available structures?
    Perhaps you have used some tricks or lost debug information in the beta version?
    Yes, perhaps this was done by people who reverse other projects of the Blizzard, but there is not enough people to help, which only work with Diablo3 (I think)

    Since the information is scattered forum post and no single description, I'm trying to understand the mechanism and the work of the game based on his research, pieces of bodies and their addresses in the forum post, and within projects D3Adventure, Demonbuddy, HellBuddy and some bots from neighboring threads.
    Can you advise your algorithms or tricks to identify links and game objects?

    2) Please check my understanding of the basic classes (simplistically):
    ObjectManager = Contains all information and pointers of all visible, logical and support object in game and their attributes/params.
    ObjectManager -> Actor = Contains all information and pointers of all game objects in created game.
    ObjectManager -> Actor -> Attribute = Contains all information and pointers of one attribute in attributes list of some actor.
    ObjectManager -> Scene = Contains all information and pointers of all object and their params/info at the current part of game such as actors, terrain, interface and other
    ObjectManager -> Scene -> NavMesh = Collection witch represent grid for actor to interaction with any action (walk, tuch and other)
    ObjectManager -> Scene -> NavMesh -> NavSquare = Represent one cell of grid NavMesh

    Questions:
    * Is the correct meaning of my representation of objects?
    * If actor is represent all game objects (Actors - Diablo 3 Lexicon), then objects like wall (skill of waller) or fire row behind the monsters (skill monster too) is actor too? I think it will be projectile, but not found.
    * GUI interface, hp/affixes bars of hero/monsters, labels, chat, speech bubbles of characters also actors? Yes, I saw this post "Blizzhackers - Diablo III Offsets, Globals, Funcs, Structs, Classes, etc." but I can not understand how interface connected to game objects
    * If one Scene contains information of all current object in the location, why scenes more than one (judging by what we get Id scenes may be a lot)? Performance initially are generated scenes for all locations?
    * If NavSquare represent cell of grid and may have actors or anything then it should change the status when thechanging state of destructible objects?

    3) Some areas in Diablo3 generated each time in different ways and I think it's best way is read from the memory NavMesh/NavSquare because in SNO of MPQ stores only static objects. Is this true?

    If get Vec3 position and direction of character in the world is quite simple, using examples. How to get out of memory NavMesh NavSquare and use them to define the boundaries?

    I'm trying to understand the hierarchy of structures:
    I found "Blizzhackers - Diablo III Offsets, Globals, Funcs, Structs, Classes, etc." post with the offsets of the structures
    Code:
    [[pObjectMgr+0x8F4]0x108] => SceneCount
    [[pObjectMgr+0x8F4]0x148] => SceneFirstScene
    SceneSize => 0x2A8
    which points on ObMan->Storage->Scenes as SceneCount and ObMan->Storage->Local as SceneFirstScene (if use structures from "Blizzhackers - Diablo III Offsets, Globals, Funcs, Structs, Classes, etc.") but I can not understand how these structures are associated with the structures described here "Blizzhackers - Diablo III Offsets, Globals, Funcs, Structs, Classes, etc." ?

    And after all, as of NavZone/NavSquare get which coordinats is pozition and size of are, and the state of the current cell (blocked, free, destructable, etc)?



    Perhaps my post is very large and covers different parts of the mechanism, but I try to make every effort to understand the structure of all objects / classes in the future to tie them into one project.
    I would really appreciate if you try to understand me, and share for me some experience, knowledges and skills.

    Thanks again to anyone who helps!

    P.S. Sorry if you will finded some mistakes, my natural language is russian.
    P.P.S. I change some links on posts from blizzhackers into "Blizzhackers - Diablo III Offsets, Globals, Funcs, Structs, Classes, etc." because this forum has limited count links to post

  4. #4
    loeal's Avatar Corporal
    Reputation
    1
    Join Date
    Jul 2012
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi, I'm in the same situation as you, I try to understand the structure of this game, overall you arrived at the same conclusion as me in ca you can add:

    Objman / ActorCommonData: it is the set of elements with which they interact little

    For attributes its:
    ObjMan / AttriBGroupContainer / AttribGroup (called FAG FastAttributGroup)

    For the 'Scenes' I confess that I have not looked closely, but it interests me.

    SNO is to see as libraries, which provide the structure of each elements (load only once so ...) all of which are identified in memory with a 'hash' of the name of this object.
    I've seen some people mixed IDs with the famous hash information for the code is as follows:
    Code:
    DWord d3_hash function (string stringKey) {
    DWord hash = 0;
    char c;
    foreach (c in stringKey) {
    hash = (hash * 0x21) + ord (c.toLowerCase ());
     }
     return hash;
    }
    and not an ID as I've seen here ... which made ​​me lose a lot of time. For my project I use this for items (SNO / GameBalance)

    To connect the different elements 'Scene' and 'navmesh' look at the information contained in the address 'SceneFirstScene' (information that I did not), to take one example ActorCommonData:

    offset + 004 -> name (string)
    offset + 0B4 -> Hash object
    offset + 120 -> ID in FAG
    etc ...

    it is best to look in the memory what you have.
    Last edited by loeal; 09-18-2012 at 05:08 PM.

  5. #5
    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)
    Everything you see in game that isnt part of the map is an Actor, Actor is the base class. Then Projectiles, NPCs,Monsters,Gizmos etc are all actors.

    1. Cant help you, Im in a similar position i can reverse to an extent but cant map out structures and stuff.

    2.
    ObjectManager -> Actor Container = Contains all information and pointers of all game objects in created game.
    ObjectManager -> Attribute Container = Contains all information and pointers of one attribute in attributes list of some actor.
    ObjectManager -> Scene Container= Contains Scene struct which holds info on the scene including navmesh info etc
    ObjectManager -> CutScenes Container - Contains cutscenes?
    ObjectManager -> WorldsContainer - Contains Worlds.
    May be a few more, havent looked to much.

    inside these containers will be a count/max/array of the items, (attribs,ACDS are not that straight forward but just generalizing)
    0x00 of the object is the GUID in most cases.
    Object will also have an SNO int somewhere, which you can use to load the corrosponding static SNO data from the MPQS. Check out mooege for MPQ parsing information.


    [[pObjectMgr+0x8F4]0x148] => SceneFirstSceneYou start reading from that address and you read 0x2a8 bytes, this many bytes maps to that structure. In my case i load the bytes then cast them to my struct


    A dungeon, or the outside world is called a "World"
    A World is made up of scenes, these range in size from 40x40 to 240x240 i belive.
    Individual Scenes do not change, to create the random worlds different scenes are loaded.

    So for your navigation you can get all the loaded scenes from memory, then you can read the navsquares/cells data for each scene from memory or you can load it in from the MPQ's as a scene is static. For better understanding of the scene/nav setup checkout mooeges file parsing. It loads each scene, and loads the navsquares and nav cells from the mpqs.


    Last edited by infotech1; 09-18-2012 at 08:15 PM.

  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)
    What are in the scn files? Can those convert to .obj files so we can view the scene in a third party program such as recast?

  7. #7
    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)
    Checkout mooeges .scn parser.
    .scn hold navmesh/navsquares, and mostly links to the rest of scene related data, like levelarea,apperance,physmesh,encounter etc etc etc

    Its 100% possible to convert the navmesh data in .scn or the .phm(Physmesh) or the .app(Appearance) into .obj
    https://dl.dropbox.com/u/32102951/app_phys_nav.JPG
    https://dl.dropbox.com/u/32102951/recast.JPG
    https://dl.dropbox.com/u/32102951/world.JPG
    Few old links from when i was playing with it last october.

  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 infotech1 View Post
    Checkout mooeges .scn parser.
    .scn hold navmesh/navsquares, and mostly links to the rest of scene related data, like levelarea,apperance,physmesh,encounter etc etc etc

    Its 100% possible to convert the navmesh data in .scn or the .phm(Physmesh) or the .app(Appearance) into .obj
    https://dl.dropbox.com/u/32102951/app_phys_nav.JPG
    https://dl.dropbox.com/u/32102951/recast.JPG
    https://dl.dropbox.com/u/32102951/world.JPG
    Few old links from when i was playing with it last october.
    Cool, thanks infotech,

    I've been checking out mooeges .scn parser and trying to figure out the structure of it, any good reads that could translate this information? I've never worked with navmesh's before, just started learning about recourse and detour. I know that the .obj files that those programs work with need a list of vertices, etc.. (Wavefront .obj file - Wikipedia, the free encyclopedia) and translating from navmesh data to list of vertices, where would I start?

  9. #9
    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)
    navmesh data is stored as an array of rectangles. where they store the x,y of one corner plus the width/height.

    So you can create a little loop that loops thru every navrectangle(navcell) and writes out a vertice for each corner of the rectangle. my code to do this is in Mooege under Map/Debug/DebugNavMesh.cs

    Physmesh is already stored as a verts/faces so an easy conversion to dump to .obj as well.

    .app you will have to google, I belive i got my info from an 010 editor template but unsure as i cant find it or any of my docs on .app files.

    *edit* Theres an app "D3AppConvert2Obj.exe" already.

  10. #10
    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 infotech1 View Post
    navmesh data is stored as an array of rectangles. where they store the x,y of one corner plus the width/height.

    So you can create a little loop that loops thru every navrectangle(navcell) and writes out a vertice for each corner of the rectangle. my code to do this is in Mooege under Map/Debug/DebugNavMesh.cs
    When you say your code to do this, do you have a repository somewhere public that I can take a look at?

    This is the code I have, but it doesn't really work how I intended it to, maybe scenes are not what I think they are. What scene would the map of Act I town be? Is it an array of scenes? How could I get an .obj file of Act I town?

    public void OutputToObjFile(string outFilePath)
    {
    // output vertices as:
    // v {X} {Y} {Z}
    // e.g.: v -21.847065 -2.492895 19.569759
    StringBuilder sb = new StringBuilder();
    foreach (NavCell nc in this.NavZone.NavCells)
    {
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Min.X, nc.Min.Y, nc.Min.Z));
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Min.X, nc.Min.Y, nc.Max.Z));
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Min.X, nc.Max.Y, nc.Max.Z));
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Max.X, nc.Max.Y, nc.Max.Z));

    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Max.X, nc.Min.Y, nc.Min.Z));
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Max.X, nc.Max.Y, nc.Min.Z));
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Max.X, nc.Min.Y, nc.Max.Z));
    sb.AppendLine(String.Format("v {0:0.000000} {1:0.000000} {2:0.000000}", nc.Min.X, nc.Max.Y, nc.Min.Z));
    }
    System.IO.File.WriteAllText(outFilePath, sb.ToString());
    }

  11. #11
    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)
    Mooege is still on github, plenty of branchs still as is mine. github.com/DarkLotus/mooege/

    You need to re read the .obj file format, as well since
    your only outputing vertices with no faces.


    Code:
     public void DumpNavMeshToObj()        {
                //Renders all the walkable cells into a 2d model. Output in http://en.wikipedia.org/wiki/Wavefront_.obj_file
                List<System.Windows.Point> Vertices = new List<System.Windows.Point>();
                List<face3> faces = new List<face3>();
                System.IO.StreamWriter fs = new System.IO.StreamWriter("world.obj");
                foreach (var rect in this.WalkableCells)
                {
    
    
                    Vertices.Add(rect.BottomRight);
                    Vertices.Add(rect.BottomLeft);
                    Vertices.Add(rect.TopLeft);
                    Vertices.Add(rect.TopRight);
                    faces.Add(new face3(Vertices.Count - 3, Vertices.Count - 2, Vertices.Count - 1, Vertices.Count - 0));
                }
                foreach (var x in Vertices)
                {
                    fs.WriteLine("v " + x.X + " " + 0 + " " + x.Y);
                }
                foreach (var x in faces)
                {
                    fs.WriteLine("f " + (x.i0) + " " + (x.i3) + " " + (x.i2) + " " + (x.i1));
                }
                fs.Close();
            }
            public class face3
            {
                public int i0, i1, i2, i3;
                public face3(int i1, int i2, int i3, int i4)
                {
                    this.i0 = i1;
                    this.i1 = i2;
                    this.i2 = i3;
                    this.i3 = i4;
                }
            }
    Last edited by infotech1; 09-25-2012 at 08:57 PM.

  12. #12
    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)
    thanks infotech! I got the DarkLotus mooege from github and found the relevant code, thanks again!

Similar Threads

  1. [ArcEmu] how do i remove the level and class restrictions.
    By fstenbergp in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 06-19-2010, 11:41 AM
  2. How to level, and how to make gold while doing it.
    By TehGoggles in forum World of Warcraft Guides
    Replies: 7
    Last Post: 08-13-2009, 07:32 AM
  3. How to take off rideing skill and level from mounts
    By manager2 in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 01-12-2008, 04:54 AM
  4. How to Detect Invisable Walls
    By idusy-org in forum World of Warcraft Exploration
    Replies: 3
    Last Post: 12-26-2006, 01:06 PM
All times are GMT -5. The time now is 03:56 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