Author |
Topic: more infos on ds1 |
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 25 March 2002 22:12
I have extracted ALL the ds1 and
dt1 files I could found in the d2data.mpq, d2exp.mpq and
patch_d2.mpq (in that order, important for erasing some previous
existing files), and here are some stats :
2264 ds1 (map) total 21 MB 251 dt1 (tiles) total 148 MB
having made a program to automatically check the ds1, I made a
txt file, in the manner of all the common txt in the
global\excel\*.txt of the mpq : http://paul.siramy.free.fr/_divers/ds1/all_ds1.zip
(30 kB)
Having analyses all that, there are some files which can cause
problems. the very first data of the file is not a signature. It is
a sort of a flag, or a version. when it is set to 3 or 8, it will
cause problems :
* if set to 3 there is no act infos, and no x2 infos (x2 just
follow the act data). There is no x3 and no x4 infos as well.
* if set to 8, there IS the act info, but not the x2, not x3 and
not x4.
It is important to know that, because when I say the infos is not
here, it's not that these bytes are set to zeros, it's that there
are not present at all, and the bytes you are trying to read as
act/x2/x3/x4 are in fact another data.
Note about the act : it goes from 1 to 6 (coded as 0 to 5 in
file), so I wonder what this act 6 stand for ? It's some map of the
siege, but there are some siege's map which are set to act 5, not 6,
so ... ?
some other stats : width of maps : between 2 and 101
(inclusive) height : between 2 and 103 total (weight * height)
: between 4 and 7225 (85*85 : wildtemple of nilhatack)
there can be a max of 24 files in the header (the ones like
"\d2\data\global\tiles\expansion\wildtemple\interior.dt1"). Note
there are dt1 files, as well of tg1 files. But the tg1 does not
exist in the mpq, they are replaced by dt1. I think it indicates
which dt1 files the map use, andI hope that by adding some other
files you can use some other tiles than the original map.
that's all for now.

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 26 March 2002 01:10
Well, the layers are pretty more
complicated than it first seems. I was wondering why my program only
found so few maps having objects... Now I know : there is a variable
ammount on layers in the ds1 ! It depends of the x3 and x4 value,
but also something else I didn't yet found. Right know I have found
up to 11 layers (!) but ... it seems there are unused layers in this
case (set to 0). I continue the investigations.

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 26 March 2002 04:06
Now that I have found how the
number of layers is set, it's seem easy but ... it was hard to find.
As supected the x3 and x4 indicate the number, but the x2 too.
Here's a sample of code from my prog that indicate the differents
combination :
if (x2==0 && x3 == 0 && x4 == 1) maxlayer =
2; if (x2==0 && x3 == 0 && x4 == 2) maxlayer =
3; if (x2==0 && x3 == 1 && x4 == 1) maxlayer =
4; if (x2==0 && x3 == 1 && x4 == 2) maxlayer =
5; if (x2==0 && x3 == 2 && x4 == 1) maxlayer =
6; if (x2==0 && x3 == 2 && x4 == 2) maxlayer =
7; if (x2==0 && x3 == 3 && x4 == 1) maxlayer =
8; if (x2==0 && x3 == 3 && x4 == 2) maxlayer =
9; if (x2==0 && x3 == 4 && x4 == 1) maxlayer =
10; if (x2==0 && x3 == 4 && x4 == 2) maxlayer =
11;
if (x2==1 && x3 == 0 && x4 == 1) maxlayer =
3; if (x2==1 && x3 == 0 && x4 == 2) maxlayer =
4; if (x2==1 && x3 == 1 && x4 == 1) maxlayer =
5; if (x2==1 && x3 == 1 && x4 == 2) maxlayer =
6; if (x2==1 && x3 == 2 && x4 == 1) maxlayer =
7; if (x2==1 && x3 == 2 && x4 == 2) maxlayer =
8; if (x2==1 && x3 == 3 && x4 == 1) maxlayer =
9; if (x2==1 && x3 == 3 && x4 == 2) maxlayer =
10; if (x2==1 && x3 == 4 && x4 == 1) maxlayer =
11; if (x2==1 && x3 == 4 && x4 == 2) maxlayer =
12;
if (x2==2 && x3 == 0 && x4 == 1) maxlayer
= 3; if (x2==2 && x3 == 0 && x4 == 2) maxlayer =
4; if (x2==2 && x3 == 1 && x4 == 1) maxlayer =
5; if (x2==2 && x3 == 1 && x4 == 2) maxlayer =
6; if (x2==2 && x3 == 2 && x4 == 1) maxlayer =
7; if (x2==2 && x3 == 2 && x4 == 2) maxlayer =
8; if (x2==2 && x3 == 3 && x4 == 1) maxlayer =
9; if (x2==2 && x3 == 3 && x4 == 2) maxlayer =
10; if (x2==2 && x3 == 4 && x4 == 1) maxlayer =
11; if (x2==2 && x3 == 4 && x4 == 2) maxlayer =
12;
With this table, I found 1659 maps having objects, on the
2263 (it is 73% of the total maps ). There are a maximum of 181
objects right now. I have updated my txt file of all the ds1 infos.
Now it have all the properties of the objets as well. http://paul.siramy.free.fr/_divers/ds1/all_ds1.zip
(103 kB this time, due to the propperties of objects).
There is still some little problem. If you check the txt, you'll
see that there is some maps having 5000 in x3 and x4, or blank. And
that cause big problems in the detection of the objects. Another
thing to figure damn ! (but having a prog that can check all the ds1
for making a txt file in just 10 sec is sweet )
[This message has been edited by Paul Siramy (edited 26 March
2002).]

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 26 March 2002 07:53
Forgot the table above, there's a
more simple formula for that :
number of layers = 1 + x2 + (x3 * 2) + x4
But it only works when x1 is >= 16 (or maybe 15 ?) except for
just 2 DAMN files (crypcountess*.ds1) . When x1 is less there are
problems. I'll try to figure it out. No update of the txt right now.
There can be up to 12 layers (not 11 as I said previously) for now,
and 194 objects.
I wonder if the x2/x3/x4 datas are not use for some kind of
*type* of layer, and the number in this data tells how many layers
of that type they are in the .ds1 ?

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 28 March 2002 05:01
You know when you enter a house,
you look inside... I'm almost sure there are 2 layers. One for when
you you're outside, and another one when you're inside.
You don't see some informations that should be take for an
"optional transparency". Hence my tought this is coded in the ds1,
and not in the dt1. That does make sense. It's important to know,
because it will be a layer to identifie, and it shouldn't be too
difficult to find.
[This message has been edited by Paul Siramy (edited 28 March
2002).]

|
MPHG Forum Admin.
    
Posts: 1532 From: simwhere Registered: Jun
2001 |
posted 29 March 2002 19:00
if you have questions about ds1's
i would goto the only person that knows the code perfectly.
isilweo. if you download his map editor it give the email in
program also maybe you can get more info from that program
side note: your c++ are great, but how is a map editor going to
come of this? I'm not trying to be rude and if i sound it i'm
extremely sorry. I like the way your assembling the hut ,but here's
where I'm baffled is it going to be using the arrow keys to move map
and something else to place tile? just my little 2 cents if you
thought that far ahead.
------------------ Come stay a night
at my Dragon's Inn
Remember to have your Deeds recorded on the Imperial Scrolls of
Honor.

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 29 March 2002 21:01
He he, I was planing to use only
the keys in fact. Because I can't program in windows, and it's
painful to check all the possible configuration of the mouse. Using
a key, I say "this key is down, so let's move left". With a mouse...
"what's under the position of the mouse ? Are the coordinate between
(x1,y1) and (x2,y2) and the left button is down ? if so, le'ts move
left". Painfull. So my first ds1 viewer (later for the editor) will
using key. When I'll master the ds1 and dt1 format, and if no one
has released such a ds1-with-mouse-editor, I'll work on this. But
right know, I'm afraid you' ll have to use what you'll have It's just a matter of time. But
as soon as the dt1 and ds1 format will have a easy and complete doc,
I'm sure you'll see lots of editor. Right know I'm still decoded
it.

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 31 March 2002 01:19
quote:
Originally posted by
MPHG: if you have questions about ds1's i would goto the
only person that knows the code perfectly.
isilweo. if you download his map editor it give the email in
program also maybe you can get more info from that program 
Well, I checked again all the post talking about ds1 and ... each
linhs of the ds1 editor he made are break
(http://vdi.pl/~isilweo/ds1.zip). Is there another link I didn't
found ? And I think his email don't work too (isilweo@vdi.pl)
[This message has been edited by Paul Siramy (edited 31 March
2002).]

|
MPHG Forum Admin.
    
Posts: 1532 From: simwhere Registered: Jun
2001 |
posted 31 March 2002 08:36
his mail is very very buggy, that
is his only mail and I hope the ds1 will falling place for you as it
did him if you can not contact him. he spent 1~1.5 perfecting the
ds1 then quit d2 modding. I use to speak with hinm all the time,but
he's been very busy as I so basicly we're on seprate paths now :\
------------------ Come stay a night
at my Dragon's Inn
Remember to have your Deeds recorded on the Imperial Scrolls of
Honor.

|
Paul Siramy Knight

Posts: 62 From: Gannat, France Registered: Mar
2002 |
posted 31 March 2002 10:04
herm... when you say 1~1.5 you
speak of *year* ? 1 to 1 and 1/2 year on his editor ? Darn it, I
better have to stopped to work on the ds1 format right now

|
MPHG Forum Admin.
    
Posts: 1532 From: simwhere Registered: Jun
2001 |
posted 31 March 2002 13:46
months sorry.
------------------ Come stay a night
at my Dragon's Inn
Remember to have your Deeds recorded on the Imperial Scrolls of
Honor.

|