Need help with dmap files

10/07/2005 03:35 MrTeenie#1
Ok I am going to quote the post off of the Qonquer forums by the admin. I have no clue how to do this, and not sure anyone else does. So I figured it'll get done faster here.

Quote:
Originally posted by "Admin"
I REALLY need to decode the .DMap files. I have made some progress on this but still not cracked it fully. The data I have atm is rather messy so I'm going to try to arrange it into something suitable for posting here.

Ok here we go
Each DMap file seems to contain much information, not all of the info in it is needed by the server, just the cell levels (height) and accesssibility. I.e. a map cell can either be inaccessible or have a height value. Hex editing the files I've come up with what I think the basic structure is.

Bytes 268 to 271 = map x limit in cells (low endian 32 bit)
Bytes 272 to 275 = map y limit in cells (low endian 32 bit)

from that point on, each cell appears to be defined by 6 bytes. The problem I am having is the arrangement of these bytes. They don't seem to simply start from 0,0 and work down, it looks like they start mid way somewhere, plus the height value of each cell is proving difficult to narrow down.

I picked a relatively simple map, arena.DMap, to run a few tests on. In this test output a 0 represents a cell in which all 6 bytes are 0. If any of the 6 bytes are not 0, then the cell is represented by a 1.
Code:
111111111111111111111111111111111111111100000000000000000000000000000000011111111111111111111111
111111111111111111111111111111111111111111000000000000000000000000000000000111111111111111111111
111111111111111111111111111111111111111111100000000000000000000000000000000011111111111111111111
111111111111111111111111111111111111111111111000000000000000000000000000000011111111111111111111
111111111111111111111111111111111111111111111100000000000000000000000000000011111111111111111111
111111111111111111111111111111111111111111111111000000000000000000000000000011111111111111111111
111111111111111111111111111111111111111111111111100000000000000000000000100011111111111111111111
111111111111111111111111111111111111111111111111111000000000000000000000111011111111111111111111
111111111111111111111111111111111111111111111111111100000000000000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111000000000000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111100000000000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111000000000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111100000000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111000000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111100000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111000000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111100000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111000000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111100000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111000111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111100111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100001111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000001111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000011111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000001111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000111111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000001111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000111111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000001111111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000000001111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000000000111111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000000000001111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000000000000111111111111111111111111111111111111111111
111111111111111111111111111111100000000000000000000000011111111111111111111111111111111111111111
111111111111111111111111111111110000000000000000000000001111111111111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000101111111111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000000111111111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000000001111111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000111111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000111111111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000001111111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111100000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111110000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111111000000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111111110000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111111111000000000000000000000000000000000001111111111111111111111111
111111111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111
As you can see, the 0's seem to represent accessible areas of the map, whereas the 1's are inaccessible. This suggests that a cell that has all 0's in its 6 bytes is a ground level accessible cell. Seeing as there is only 1 level, the ground level, on Arena.DMap , this seems to make sense. There also appears to be a hell of a lot of "space" around the edges of a map, I suspect that a great deal of the map file is unused white space, probably something to do with the angled nature of the cells.

You can take a look at the arena map in game by typing
@mm 1005 50 50 (WARNING: Don't go through the warp portal in there)
10/07/2005 07:53 DeathWalker#2
So what exactly you want us to do? Crack it? Btw, if we switch the 1 to 0s on client side, i suppose it would read invalid coords and dc u.
10/07/2005 18:55 unknownone#3
I can help. Waiting for account activation on qonquer forums.
10/07/2005 19:47 Qonquer#4
Quote:
Originally posted by DeathWalker@Oct 7 2005, 07:53
So what exactly you want us to do? Crack it? Btw, if we switch the 1 to 0s on client side, i suppose it would read invalid coords and dc u.
The 1's and 0's in that post is a debug test output generated by the PServer software so I had some way of posting a visible representation of the data it is analizing., it doesn't have anything to do with the client. But yea, I do need to try to crack exactly how the files are arranged.
10/08/2005 06:01 einhornchen#5
dumb bastards, i told you exactly how to do map work and you blocked me off your damn site. hopefully, you dumn shits will realize how idiotic you've really been...coulda saved months of work

-einhornchen
10/08/2005 06:08 Qonquer#6
This topic can be closed now, we've done it.
10/08/2005 06:09 MrTeenie#7
you were blocked because we are reverse engineering the client, not building a new one. Only way we could had done your way was if we were making new. We have to figure out how TQ did it.