[Dev] Map Structure

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Hardcore Member Murat Yereseren is offline
    MemberRank
    Nov 2014 Join Date
    132Posts

    [Dev] Map Structure


    RaGEZONE Recommends

    RaGEZONE Recommends

    not very important but, if you know nothing maybe this might help you.
    Attachment 155295
    if i have made mistakes (i know i have a lot of mistakes) feel free to make it right.
    Last edited by Future; 04-01-16 at 10:22 AM. Reason: Tagged properly / added descriptive title (feel free to change that but do say what you're talking about)


  2. #2
    struct { int:-!!(1); } Aesir is offline
    True MemberRank
    May 2015 Join Date
    MadnessLocation
    262Posts

    Re: hey guys, my little project

    Quote Originally Posted by Murat Yereseren View Post
    not very important but, if you know nothing maybe this might help you.
    Attachment 155295
    if i have made mistakes (i know i have a lot of mistakes) feel free to make it right.
    Your structure is fucked up, the order isnt right, some values does not exist, the method that you're using isnt right in all code languages because you're reading all value by value.
    You should go better using the MSS mapeditor (Screenshot by Lightshot) or use a custom one (as i see, better dont made by you) (Screenshot by Lightshot).

    Cheerz, Aesir.

  3. #3
    Hardcore Member Murat Yereseren is offline
    MemberRank
    Nov 2014 Join Date
    132Posts

    Re: hey guys, my little project

    how can i get this program or what should i do ?
    Last edited by Murat Yereseren; 03-01-16 at 03:20 PM.

  4. #4
    struct { int:-!!(1); } Aesir is offline
    True MemberRank
    May 2015 Join Date
    MadnessLocation
    262Posts

    Re: hey guys, my little project

    Quote Originally Posted by Murat Yereseren View Post
    how can i get this program or what should i do ?
    Write it or get the MSS mapeditor.

  5. #5
    [Dev] Map Structure St34lth4ng3l is offline
    True MemberRank
    Apr 2013 Join Date
    __FILE__Location
    816Posts

    Re: hey guys, my little project

    I have to agree with Aesir, try to write your own one.
    As a tip: Here are some basic structs for the .dat files


    I started my own one in Unity, but got stuck on model positioning, rotation etc.
    Last edited by St34lth4ng3l; 03-01-16 at 04:02 PM.

  6. #6
    Hardcore Member Murat Yereseren is offline
    MemberRank
    Nov 2014 Join Date
    132Posts

    Re: hey guys, my little project

    what is MSS Mapeditor and how can i get it is there a link to download or buy it please help me mate...

    thnx St34lth4ng3l

  7. #7
    [Dev] Map Structure St34lth4ng3l is offline
    True MemberRank
    Apr 2013 Join Date
    __FILE__Location
    816Posts

    Re: hey guys, my little project

    MSS = MasangSoft
    So it's the official Mapeditor, but it sucks, so it's better to write your own one

  8. #8
    struct { int:-!!(1); } Aesir is offline
    True MemberRank
    May 2015 Join Date
    MadnessLocation
    262Posts

    Re: hey guys, my little project

    Quote Originally Posted by St34lth4ng3l View Post
    I have to agree with Aesir, try to write your own one.
    As a tip: Here are some basic structs for the .dat files


    I started my own one in Unity, but got stuck on model positioning, rotation etc.
    Yeah, i was stuck on those damned rotations too, but after a bit you can get how the vector3 are used.

  9. #9
    [Dev] Map Structure Future is online now
    SupervisorRank
    Dec 2011 Join Date
    1,840Posts

    Re: [Dev] Map Structure

    I got just one question. If you have the source code of the game, why do you still use a Hex Editor for visualizing the structure? You could write something very simple for only showing the objectinfo entries in the .dat files, without any map editor or any kind of rendering:

    Click image for larger version. 

Name:	dat struct example.PNG 
Views:	52 
Size:	28.4 KB 
ID:	155310

    This can give you a basic idea of how things work. @St34lth4ng3l posted the structs in the source already. This is an easy start for making an editor of any kind you want even if you don't know what happens in the Scene Data initialization




    Quote Originally Posted by A Wise Man
    P-Servers are NOT dead. Bugs need squishing. Quests need fixing. Unfortunately, majority of people don't know the difference between a computer and a toaster so...

  10. #10
    Hardcore Member Murat Yereseren is offline
    MemberRank
    Nov 2014 Join Date
    132Posts

    Re: [Dev] Map Structure

    i know bro, you are right but the truth is i am too lazy to write a program for that, even its too easy

  11. #11
    Member burgers is offline
    MemberRank
    Jul 2013 Join Date
    59Posts

    Re: [Dev] Map Structure

    Quote Originally Posted by Murat Yereseren View Post
    i know bro, you are right but the truth is i am too lazy to write a program for that, even its too easy
    Then stop right there. If you're too lazy to do something properly, don't do it at all. You say ".. even if it's too easy", but I am confident you mean because you do not know how.

    It's great that you provided some information for others to use if and when needed, but seriously consider and think about what others like Aesir, Future and Stealth have said. Otherwise, you'll make it difficult for yourself, you might not learn anything of value, and you might not make any real progress regarding Ace development.

  12. #12
    struct { int:-!!(1); } Aesir is offline
    True MemberRank
    May 2015 Join Date
    MadnessLocation
    262Posts

    Re: [Dev] Map Structure

    Quote Originally Posted by burgers View Post
    Then stop right there. If you're too lazy to do something properly, don't do it at all. You say ".. even if it's too easy", but I am confident you mean because you do not know how.

    It's great that you provided some information for others to use if and when needed, but seriously consider and think about what others like Aesir, Future and Stealth have said. Otherwise, you'll make it difficult for yourself, you might not learn anything of value, and you might not make any real progress regarding Ace development.
    Is right, this is not lazyness, this is lack of knowledge. Write a program (like the one posted by Future) with the released structures of Stealth is a work of more or less 5 minutes.

  13. #13
    [Dev] Map Structure Future is online now
    SupervisorRank
    Dec 2011 Join Date
    1,840Posts

    Re: [Dev] Map Structure

    Quote Originally Posted by Aesir View Post
    Is right, this is not lazyness, this is lack of knowledge. Write a program (like the one posted by Future) with the released structures of Stealth is a work of more or less 5 minutes.
    Well xDD
    If you act a bit more intelligent than I did, I hope... I tend to waste too much time on the most simple stuff (like setting up that grid view with a combobox and the parsing between) xD
    The main thing with this, also related to the posts by @burgers and @Aesir, is to keep trying. You might fail. You might get a serious laughing attack from the shit you produce. But at the end you've got something of value to be proud of

    Anyw. If I fixed some more displaying bugs and went over my code again, I might share that simple objectinfo viewer for .dat files and try my luck on one of these map editors.
    Last edited by Future; 05-01-16 at 02:21 AM. Reason: GRAMMAR :<




    Quote Originally Posted by A Wise Man
    P-Servers are NOT dead. Bugs need squishing. Quests need fixing. Unfortunately, majority of people don't know the difference between a computer and a toaster so...

  14. #14
    Member Davidc96 is offline
    MemberRank
    Feb 2011 Join Date
    Rubí, CatalunaLocation
    75Posts

    Re: [Dev] Map Structure

    Hello, I'm trying to make a tool like FutureAR did but i need help understanding the data on .dat

    I modified the Field Server logs showing the offset and the ObjNum in order to understand the .dat structure.

    This is the Field Server Logs

    Code:
    01-05 13:03:36|################## Load Map(2002) : Map Size(256, 256) ##################
    01-05 13:03:36|CVMem::AllocVMem VirtualAlloc() success, TypeSize[   36] PoolCnt[ 1592] CommitSize[   57344] vectorSize[2] Address Range(0x7CF50000 ~ 0x7CF5E000)
                        Load Monster Info ==> # of MonsterInfo: 0
                        Tatal Monster Count : [   0]
    01-05 13:03:36|[MAPOBJECT] Header Data Offset: 0X06680020 
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698305C
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3083300
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X069830CC
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3082700
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698313C
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3079500
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X069831AC
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3185000
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698321C
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3185200
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X0698328C
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3083400
    01-05 13:03:36|[MAPOBJECT] Reading OFFSET : 0X069832FC
    01-05 13:03:36|[MAPOBJECT] Reading OBJECTNUM : 3080000
    The Header Data Offset (0x0020) shows me where is the mapId (Hex Values: 32 30 30 32 ASCII: 2002)

    The problem is when i go to the next Address (305C).

    According to the structure DAT_STRUCT_MAPOBJECTS I think the first 4 Bytes are the ObjectNum(hex) but when i go there are no values as you will see on the image.



    Just in case i checked the Address 305C0 but the values 00 00 A0 42 in decimal, are not the same as the ObjNum said in Field Server.

    The prints are located in

    PHP Code:
    for(int i 0tmMapInfo.nObjectNumberi++)
            {
        ---->           
    sprintf(szOffset"[MAPOBJECT] Reading OFFSET : %#p\r\n"pOffset);
                
    g_pGlobal->WriteSystemLog(szOffset);
            
                         
    memset(&ObjInfo0x00sizeof(OBJECTINFOSERVER));
                
    memcpy(&tmObjClientpOffsetsizeof(OBJECTINFOCLIENT));
                
    pOffset += sizeof(OBJECTINFOCLIENT);
                
    DBObjectInfo m_pMapWorkspace->m_mapMapObjectInfo.findEZ(tmObjClient.dwObjType);
            
           ----->              
    sprintf(szOffset"[MAPOBJECT] Reading OBJECTNUM : %d\r\n", (DWORD)tmObjClient.dwObjType);
                
    g_pGlobal->WriteSystemLog(szOffset);[/B]
        

                if (
    DBObjectInfo.Code != tmObjClient.dwObjType)
                {
                    
    char    szError[1024];
                    
    sprintf(szError"[Error] CMapProject::LoadMFile_ SearchObjectInfoError error, MapProject[%04d] m_dwObjType[%10d]\r\n"
                        
    m_nMapIndextmObjClient.dwObjType);
                    
    g_pGlobal->WriteSystemLog(szError);
                    
    DBGOUT(szError);
                    continue;
                } 
    Thank you in advance :)
    PD: References:https://en.wikipedia.org/wiki/C_data_types and all images you posted.

  15. #15
    Retired (Goddamn idiots) DragonLord is offline
    True MemberRank
    Dec 2003 Join Date
    /dev/urandomLocation
    553Posts

    Re: [Dev] Map Structure

    This is getting really sad at this point.
    You guys have the source available and you're making all this enormous mess and pointless threads.

    Every .dat file is essentially an .obj container.
    By default, the first entry of a .dat file is the map info itself, and it consists of the following:

    Code:
    struct MAP_DATA
    {
    	float	fTileSize;
    	int		nVertexNumber;
    	int		nTileInfoNumber;
    	int		nObjectNumber;
    };
    
    struct VERTEXINFO
    {
    	float[3]	pos;
    	float[3]	nor;
    };
    
    struct TILEINFOCLIENT
    {
    	int				useTexNumber;
    	unsigned int	dwWaterType;
    	int				waterHeight;
    	short			waterTexNumber;
    	unsigned char	bMove;
    	int				bEnableLand;
    	unsigned char	bEventType;
    }
    
    struct OBJECTINFOCLIENT
    {
    	unsigned int	dwObjType;
    	int				nObjCount;
    	float[3]		vPos;
    	float[3]		vVel;
    	float[3]		vUp;
    	unsigned int	dwObjectMonsterUniqueNumber;
    	unsigned char	bObjectTexIndex;
    	unsigned int	nObjectSrcIndex;
    	unsigned char	bBodyCondition;
    	int				bIsEvent;
    	unsigned char	bEventType;
    	short			sEventIndexFrom;
    	short			sEventIndexTo;
    	short			sEventIndex3;
    	char			strEventParam[40];
    }
    MAP_DATA, followed by VERTEXINFO * nVertexNumber, followed by TILEINFOCLIENT * nTileInfoNumber, and finally OBJECTINFOCLIENT * nObjectNumber.

    Was it really so hard to gather all this information from the source?
    Insanity - Doing the same thing over and over again, expecting different results - Albert Einstein


    R.I.P. Akaruz - We miss ya buddy




Page 1 of 2 12 LastLast

Advertisement