Page 1 of 1

format of dungeon.dat/db11/expool used by csbwin

Posted: Wed May 14, 2008 9:48 pm
by greatstone
Hello,

I would like to know if anybody (Paul?) can take some time to explain me a specific part of the internal structure of the dungeon.dat file used by csbwin, as I am currently trying to extract all the information for my sck tool (http://greatstone.free.fr/dm/index.html).
I try to understand the structure of the items list 11 (unused in DM/CSB), coded as DB11 class in csbwin source code, and called also "expool".
I understand that it contains the global game information (special location, extended cell flags, skins, database of variables and statictics) but the DB11 data structure is not clear.

Here is where I am:

Code: Select all

1 dungeon.dat, containing:
  ...
  number of DB11 items (to have x)
  ...
  x DB11 items, containing:
    for each DB11
       1 uint16 to store the RN link (2 bytes)
       1 uint16 to store the common size of each part of this item (2 bytes)
       252 bytes of data, containing:
          1 uint32 to store ????
          y global data part (which can be different data for the same DB11), containing:
             for each global data part
                1 uint32 to store the global data key
                size-2 uint32 to store the values themselves
                1 uint32 to store ????
          some others uint32 (sometimes empty, sometimes not) to store ????
So, I have 3 ???? parts and a unknown y value.
Maybe I have missed something but I don't know what...
Any help will be greatly appreciated.

Regards,
GreatStone.

Posted: Thu May 15, 2008 2:02 am
by Paul Stevens
You will have to study the code a bit
to figure this out. I can tell you:

1) It is a hash table.
2) Each block (DB11 item) contains records of only one size
3) Each record has a unique 32-bit identifier.
4) There is an index block at the front pointing
to the first block containing each hash code.
5) There is provision for a second level index.
6) Each block has a link to the next block of
data with the same hash-code.

I don't remember much more. I don't remember
if the empty records are linked or how we find
an empty record when an insert is processed.
It is designed to be quick to reference.

Posted: Thu May 15, 2008 9:36 am
by greatstone
Thanks a lot, Paul, for your quick answer.

OK. So it seems that some missing data are hash code.
I have already deeply digged into the code, allowing me to decode nearly all the csbgraphics and dungeon.dat.
I will go on the study to fully understand the DB11.

Paul,
Is it possible for you to publish on your own site the last source code of csbwin and csbuild? It will help me to understand better the last extra data like monster names or cursor filter.

GreatStone.

Posted: Thu May 15, 2008 2:53 pm
by Paul Stevens
Sure...I just posted:

CSBuild291Sorurce.zip
CSBwin10_056Source.zip

Edit:
Fixed the name to be:
CSBuild291Source.zip

Posted: Thu May 15, 2008 2:59 pm
by greatstone
Thanks!
I will have a look and go on the work.

G.