Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Dev] Map Structure

Junior Spellweaver
Joined
Nov 19, 2014
Messages
132
Reaction score
12
not very important but, if you know nothing maybe this might help you.
View attachment 155295
if i have made mistakes (i know i have a lot of mistakes) feel free to make it right.
 
Last edited by a moderator:
Experienced Elementalist
Joined
May 10, 2015
Messages
278
Reaction score
146
Re: hey guys, my little project

not very important but, if you know nothing maybe this might help you.
View 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 ( ) or use a custom one (as i see, better dont made by you) ( ).

Cheerz, Aesir.
 
Junior Spellweaver
Joined
Nov 19, 2014
Messages
132
Reaction score
12
Re: hey guys, my little project

how can i get this program or what should i do ?
 
Last edited:
Joined
Apr 12, 2013
Messages
896
Reaction score
479
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
Murat Yereseren - [Dev] Map Structure - RaGEZONE Forums


I started my own one in Unity, but got stuck on model positioning, rotation etc.
Murat Yereseren - [Dev] Map Structure - RaGEZONE Forums
 
Last edited:
Junior Spellweaver
Joined
Nov 19, 2014
Messages
132
Reaction score
12
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
 
Experienced Elementalist
Joined
May 10, 2015
Messages
278
Reaction score
146
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
Murat Yereseren - [Dev] Map Structure - RaGEZONE Forums


I started my own one in Unity, but got stuck on model positioning, rotation etc.
Murat Yereseren - [Dev] Map Structure - RaGEZONE Forums

Yeah, i was stuck on those damned rotations too, but after a bit you can get how the vector3 are used.
 
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
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:

dat struct example.PNG - [Dev] Map Structure - RaGEZONE Forums

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
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Nov 19, 2014
Messages
132
Reaction score
12
i know bro, you are right but the truth is i am too lazy to write a program for that, even its too easy
 
Newbie Spellweaver
Joined
Jul 10, 2013
Messages
61
Reaction score
37
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.
 
Experienced Elementalist
Joined
May 10, 2015
Messages
278
Reaction score
146
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.
 
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
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 poop you produce. But at the end you've got something of value to be proud of :thumbup1:

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:
Newbie Spellweaver
Joined
Feb 4, 2011
Messages
76
Reaction score
2
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.

Murat Yereseren - [Dev] Map Structure - RaGEZONE Forums


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:
for(int i = 0; i < tmMapInfo.nObjectNumber; i++)
		{
	---->	       sprintf(szOffset, "[MAPOBJECT] Reading OFFSET : %#p\r\n", pOffset);
			g_pGlobal->WriteSystemLog(szOffset);
		
                 	memset(&ObjInfo, 0x00, sizeof(OBJECTINFOSERVER));
			memcpy(&tmObjClient, pOffset, sizeof(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_nMapIndex, tmObjClient.dwObjType);
				g_pGlobal->WriteSystemLog(szError);
				DBGOUT(szError);
				continue;
			}
Thank you in advance :)
PD: References: and all images you posted.
 
Retired (Goddamn idiots)
Joined
Dec 3, 2003
Messages
391
Reaction score
483
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 [B]MAP_DATA[/B]
{
	float	fTileSize;
	int		nVertexNumber;
	int		nTileInfoNumber;
	int		nObjectNumber;
};

struct [B]VERTEXINFO[/B]
{
	float[3]	pos;
	float[3]	nor;
};

struct [B]TILEINFOCLIENT[/B]
{
	int				useTexNumber;
	unsigned int	dwWaterType;
	int				waterHeight;
	short			waterTexNumber;
	unsigned char	bMove;
	int				bEnableLand;
	unsigned char	bEventType;
}

struct [B]OBJECTINFOCLIENT[/B]
{
	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?
 
Experienced Elementalist
Joined
May 10, 2015
Messages
278
Reaction score
146
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 [B]MAP_DATA[/B]
{
    float    fTileSize;
    int        nVertexNumber;
    int        nTileInfoNumber;
    int        nObjectNumber;
};

struct [B]VERTEXINFO[/B]
{
    float[3]    pos;
    float[3]    nor;
};

struct [B]TILEINFOCLIENT[/B]
{
    int                useTexNumber;
    unsigned int    dwWaterType;
    int                waterHeight;
    short            waterTexNumber;
    unsigned char    bMove;
    int                bEnableLand;
    unsigned char    bEventType;
}

struct [B]OBJECTINFOCLIENT[/B]
{
    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?

The problem here is that i see a lot of guys reading the structures value by value like this:
Code:
using (BinaryReader BR = new BinaryReader(Path, Encoding.ASCII))
{
    MyStruct str = new MyStruct();
    str.x = BR.ReadInt etc etc.;
    str.j = BR.ReadBoolean etc etc;
}
and after complaining because it dont work <_<
 
Initiate Mage
Joined
Jan 5, 2016
Messages
2
Reaction score
0
Re: hey guys, my little project

...
I started my own one in Unity, but got stuck on model positioning, rotation etc.
Murat Yereseren - [Dev] Map Structure - RaGEZONE Forums

Out of sheer curiosity, did you write your own DirectX X file parser or did you use the Microsoft one through .NET's DirectX API?

Because if you did and it also supports correctly reading/parsing animations, I could trade you the correct rotation/translation matrices you're missing for it.
 
Joined
Apr 12, 2013
Messages
896
Reaction score
479
Re: hey guys, my little project

Out of sheer curiosity, did you write your own DirectX X file parser or did you use the Microsoft one through .NET's DirectX API?

Because if you did and it also supports correctly reading/parsing animations, I could trade you the correct rotation/translation matrices you're missing for it.
I'm using an external program during runtime to export them, because natively unity only supports a few meshtypes.
 
Back
Top