Author |
Topic: Ds1 to Dt1 relations |
MPHG Forum Admin.
_fichiers/Admin1.gif) _fichiers/Admin2.gif) _fichiers/Admin3.gif) _fichiers/Admin4.gif) _fichiers/Admin5.gif)
Posts: 1600 From: simwhere Registered: Jun
2001 |
posted 24
March 2002 22:25
The Sub Index number on pauls
program is the item number for islweo's ds1 editor prop2
I checked it out with 99% of the items in the town (objects.dt1
& towne1.ds1) and all seem to corrospond.
Now all we need is a person talented enough to make a WYSWYG
editor _fichiers/smile.gif) might need to
look into automapping for the other props, but Map0 prop2 on town
seems to be dead on
looking into this more tomorrow morning _fichiers/biggrin.gif) and start
seening if i can figure this out
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 25
March 2002 00:26
Haaaaa, I knew there were some
answers of the dsi in the dt1. It's good you have found a
correlation.
[This message has been edited by Paul Siramy (edited 25 March
2002).]
_fichiers/ip.gif)
|
Joel Knight
_fichiers/sword.gif)
Posts: 59 From: Clermont Ferrand, France Registered: Feb
2002 |
posted 25
March 2002 05:38
eh guys exactly what i was
thinking to do
if someone would collaborate with me on this WYSIWYG level editor
( such by sending me some docs and source ) i'll be glasd to
product such a thing
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 25
March 2002 05:55
Original post of the ds1 analyse
: http://dynamic2.gamespy.com/~phrozenkeep/ubb/Forum4/HTML/001161.html
ds1 editor update and answers : http://dynamic2.gamespy.com/~phrozenkeep/ubb/Forum24/HTML/000106.html
dt1 analyse, just the topic near this one, I'm still working on
it.
As for the source, I have none myself, except for my dt1 viewer,
and I keep it for now, since it is in development and want to
upgrade it.
You know, I'm planing to make a ds1 editor too (who don't) so,
welcome
Just 2 pieces of code : the ones that decode the two
differents sort of tiles in dt1 (copy and paste in notepad for a
better readibility) :
code:
// ========================================================================== // draw a 3d-isometric sub-tile void draw_sub_tile_isometric (BITMAP * dst, int x0, int y0, const UBYTE * data, int length) { UBYTE * ptr = data; int x, y=0, n, xjump[15] = {14, 12, 10, 8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 12, 14}, nbpix[15] = {4, 8, 12, 16, 20, 24, 28, 32, 28, 24, 20, 16, 12, 8, 4}; // 3d-isometric subtile is 256 bytes, no more, no less if (length != 256) return; // draw while (length > 0) { x = xjump[y]; n = nbpix[y]; length -= n; while (n) { putpixel(dst, x0+x, y0+y, * ptr); ptr++; x++; n--; } y++; } } // ========================================================================== // draw a normal sub-tile (can be transparent, so there are "jump" coded) void draw_sub_tile_normal (BITMAP * dst, int x0, int y0, const UBYTE * data, int length) { UBYTE * ptr = data, b1, b2; int x=0, y=0;
// draw while (length > 0) { b1 = * ptr; b2 = * (ptr + 1); ptr += 2; length -= 2; if (b1 || b2) { x += b1; length -= b2; while (b2) { putpixel(dst, x0+x, y0+y, * ptr); ptr++; x++; b2--; } } else { x = 0; y++; } } }
[This message has been edited by Paul Siramy (edited 25 March
2002).]
_fichiers/ip.gif)
|
Joel Knight
_fichiers/sword.gif)
Posts: 59 From: Clermont Ferrand, France Registered: Feb
2002 |
posted 25
March 2002 06:46
ok ready to work i just need the
dstxt file and/or source thx !
------------------ ~~ Dasn el doute frappe encore ~~
_fichiers/ip.gif)
|
Joel Knight
_fichiers/sword.gif)
Posts: 59 From: Clermont Ferrand, France Registered: Feb
2002 |
posted 25
March 2002 06:52
just a q? what do you use to make
your prog ? vc 6 or other ?
------------------ ~~ Dasn el doute frappe encore ~~
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 25
March 2002 07:00
you need to extract the
data\global\tiles\act2\tomb\duriel.ds1 or something like that, as
long as the .dt1 you finf in there. Also the
data\global\items\palette\*.dat for the palette.
I programm in ms-dos, with Djgpp 2.95.2 and Allegro 3.9.34 wip.
Just in C, no c++. No windows. No brain-dammaged windows API
(personnal tought).
_fichiers/ip.gif)
|
MPHG Forum Admin.
_fichiers/Admin1.gif) _fichiers/Admin2.gif) _fichiers/Admin3.gif) _fichiers/Admin4.gif) _fichiers/Admin5.gif)
Posts: 1600 From: simwhere Registered: Jun
2001 |
posted 25
March 2002 14:49
a windows interface might make it
a tad more popular, for a editor of great scale.
2 frames left frame = tile right map = itself
but the main problem is this the maps are done in layers
meaning yo will have to make a array.
meaning... x,y location a,b,c [a = automap,b = tile, c =
walkible]
so basicly you would have to say
Tile(x,y) = Item(a,b,c)
just my thinking and rammblings, just fooling around with ideas
cause after this minor part is done you will have to make objects
that overlay making that item(a,b,c,d) then people paths that in a
grid alone i think... bah sorry , just rammbling
------------------ Come stay a night
at my Dragon's Inn
Remember to have your Deeds recorded on the Imperial Scrolls of
Honor.
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 25
March 2002 23:29
quote:
Originally posted by
MPHG: The Sub Index number on pauls program is the item
number for islweo's ds1 editor prop2
I checked it out with 99% of the items in the town (objects.dt1
& towne1.ds1) and all seem to corrospond.
Since I don't have this editor, tell me one thing : how many
layers are there in the .ds1 ? I was used to think there was 5, but
in the tiles\act1\town\townE1.ds1 it seems there are 6 layers (the
6th is empty), and there are 43 objects. The first object have these
properties. * type = 02 * param0 = 6E * param1 = A4 *
param2 = 51 (and param3 = 00, like always it seems)
Now, the 43th have : * type = 01 * param0 = 00 * param1
= 74 * param2 = 76 * param3 = 00
If you have exactly the same, it's good (if not, tell me, I may
be doing something wrong). But here's what I wanted to say : After
these 43 objets, the file is not finished ! There are more bytes
after, but the format don't seems to be objects. So, even I have put
the finger on another difficulties of the ds1 format, or I have a
big problem in my ds1'dumping program. Tell me what you have please.
Btw, about a windows editor. I can't do that. I don't have the
tools. And I master the programming of djgpp and alegro (well,
master is maybe too strong, but at least I'm feeling I'm in my
elements), while in windows I know NOTHING. I can't even make a
simple "Hello wolrd" prog in that. But If I make a lvl editor one
day, I'll give the source, and if I find time I'll make doc of the
dt1 and ds1 format (and surely send them to the keep). So, you'll
have your so-needed windows editor if a vc6 programmer fall on it.
[This message has been edited by Paul Siramy (edited 25 March
2002).]
_fichiers/ip.gif)
|
Joel Knight
_fichiers/sword.gif)
Posts: 59 From: Clermont Ferrand, France Registered: Feb
2002 |
posted 26
March 2002 07:48
actually I AM a VC 6 windows
programmer ...
so, i do grab all the basic concept of the dt1 some draft
progy will come out soon i think
------------------ ~~ Dasn el doute frappe encore ~~
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 26
March 2002 15:37
Well, you can take (link
outdated) that's the source of my .dt1 viewer. You'll still have a
problem, that's for the position of the bitmap, I don't know exactly
how it works.
As for the .ds1, you can take this
zip ,there are 2 exe and their sources. In order to use the
"allds1.exe" you HAVE to have the .ds1 on the D: drive (the prog
will check in all sub-directories from the root). Hey, it's like
that at home, and I didn't intended at first to give the exe, since
I gave the txt
That's all I can do to help for now. I'm on my way to make a .ds1
viewer (NOT yet an editor)
[This message has been edited by Paul Siramy (edited 31 March
2002).]
_fichiers/ip.gif)
|
RexxLaww Moderator
_fichiers/star2.gif) _fichiers/star2.gif) _fichiers/star2.gif) _fichiers/star2.gif)
Posts: 1071 From: USA Registered: Mar 2001 |
posted 27
March 2002 08:27
Its a good time to be a D2
modder.
------------------ The frost. Sometimes it makes the blade
stick.
Darkness Weaves
The UTC
Project
_fichiers/ip.gif)
|
Joel Knight
_fichiers/sword.gif)
Posts: 59 From: Clermont Ferrand, France Registered: Feb
2002 |
posted 27
March 2002 09:19
ok, that's great, i ll post a
screeny of the interface next week, just a prototype of menus,
layout etc... to have feedback of what is needed and what is not ..
By the way, i've started making a shell extension that allow you
tp edit directly the dcc main param (offset,length etc..) from the
right click, i'll post it at the keep (no more cv5 crashes when
calculating offsets )
------------------ ~~ Dasn el doute frappe encore ~~
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 27
March 2002 14:28
I'm sure we're all waiting both
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 30
March 2002 09:57
Ain't it looking good ?
With personalized tiles, it'll be a piece of nothing to decode
how the walls / floors in the ds1 are coded. Next step : puting some
debug info in the tiles, like indexs / frame / file , whatever...
EDIT >>> just change the gif, now have debug info.
[This message has been edited by Paul Siramy (edited 31 March
2002).]
_fichiers/ip.gif)
|
MPHG Forum Admin.
_fichiers/Admin1.gif) _fichiers/Admin2.gif) _fichiers/Admin3.gif) _fichiers/Admin4.gif) _fichiers/Admin5.gif)
Posts: 1600 From: simwhere Registered: Jun
2001 |
posted 30
March 2002 20:08
ok i must say I LOVE it
------------------ Come stay a night
at my Dragon's Inn
Remember to have your Deeds recorded on the Imperial Scrolls of
Honor.
_fichiers/ip.gif)
|
Myhrginoc Honorary Warlord
_fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif)
Posts: 893 From: Percussion U Registered: Dec
2001 |
posted 31
March 2002 08:21
quote:
Originally posted by
RexxLaww: Its a good time to be a D2 modder.
Truth!!!
Many people have delved deep to build the picture we have today
of the game's workings. But between Paul Siramy and Sir_General we
are making quantum leaps!
------------------ “It is an old maxim of mine that when you
have excluded the impossible, whatever remains, however improbable,
must be the truth.” -- Sherlock Holmes
_fichiers/ip.gif)
|
Alkalund Honorary Warlord
_fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif)
Posts: 569 From: Florianópolis, Santa Catarina,
Brazil Registered: Apr 2001 |
posted 31
March 2002 19:33
quote:
Originally posted by
Myhrginoc:
Many people have delved deep to build the
picture we have today of the game's workings. But between Paul
Siramy and Sir_General we are making quantum leaps! _fichiers/biggrin.gif)
Yep, Paul Siramy and Sir_General are the Heralds of the New D2
Modmaking Revolution
------------------ "Get me a balrog attack-1 hand-to-hand
animation, and I want it yesterday, the paladin is almost here!"
---> DMA1HTH @ offset 0006A480h. - Myhrginoc
[This message has been edited by Alkalund (edited 31 March
2002).]
_fichiers/ip.gif)
|
Olorin Honorary Warlord
_fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif)
Posts: 453 From: Gardens of Lórien, Valinor. Registered:
May 2001 |
posted 02
April 2002 09:26
Grin, Grin,
Grin, Grin, Grin
------------------ "For I am Olorin! And Olorin means
me!"
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 03
April 2002 13:54
Mmmmm, I don't know exactly how,
but the islweo's ds1 editor prop3 has something to do in the
determination of the dt1 from where the tile come from.
Summary : layer1.prop1 = orientation layer4.prop2 =
sub-index layer4.prop3 = something to do with choice of dt1
I'm working with a square of 5*5 tiles of tristram, and here is
what I have :
* when in the ds1 layer4.prop3 = 0, then it's a a tile from
town\floor.dt1
* when in the ds1 layer4.prop3 = 16 or 64 or 66, then it's a a
tile from tristram\town.dt1
* when in the ds1 layer4.prop3 = 192, then it's a a tile from
maybe outdoors\objects.dt1, or maybe outdoors\river, but certainly
not town\floor.dt1 not tristram\town.dt1
My progress are sooooooooooooo slow
[This message has been edited by Paul Siramy (edited 03 April
2002).]
_fichiers/ip.gif)
|
Alkalund Honorary Warlord
_fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif)
Posts: 569 From: Florianópolis, Santa Catarina,
Brazil Registered: Apr 2001 |
posted 03
April 2002 16:08
quote:
Originally posted by Paul
Siramy:
My progress are sooooooooooooo slow _fichiers/frown.gif)
Don't you worry Paul Siramy. Sometimes the path may seem long and
difficult, but once we are on the other side, we realize all our
efforts were worth it
Right now I'm trying to discover how the game handles skill
descriptions on screen, that thing just does not make sense!!
Lets kep trying, we will see light at the end of the tunnel
eventually
------------------ "Get me a balrog attack-1 hand-to-hand
animation, and I want it yesterday, the paladin is almost here!"
---> DMA1HTH @ offset 0006A480h. - Myhrginoc
_fichiers/ip.gif)
|
Myhrginoc Honorary Warlord
_fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif) _fichiers/sword.gif)
Posts: 893 From: Percussion U Registered: Dec
2001 |
posted 03
April 2002 19:50
quote:
Originally posted by Paul
Siramy: My progress are sooooooooooooo slow
Well stick me at the North Pole in January and cover me with
molasses! If what you have accomplished in the last three weeks is
your idea of slow, then what you consider fast must violate
relativity. Keep up the slow progress, you're moving plenty fast for
me! [Myhrginoc redefines “slow” in comparison.]
It is great work you're doing!
------------------ “It is an old maxim of mine that when you
have excluded the impossible, whatever remains, however improbable,
must be the truth.” -- Sherlock Holmes
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 04
April 2002 00:45
Well I'm feeling slow when I'm
trying to understand something for more than 2 days and I don't find
a damn hint
But here are some good news :
I'm only working in tristram for now, so maybe the things I'll
say won't work elsewhere. Ok, so... The layer 4 is mainly used for
the floors, and the layer 0 is used for the walls. The layer 1 is
for the corner (EDIT >>> but it is only for walls, not for
floors !). My prog draw the floors (layer 4) then the walls (layer
0). It's not perfect, but here are some correlations :
Take a cell (x and y coordinates). if in layer 1 prop 1 is equal
to 0 it's a floor of course. Then, in layer 4 the prop2 is the
sub-index and prop3 / 16 is the main-index (yep, only the high
nibble is the main-index, you need to right-shift them, hence the /
16) (EDIT >>> and orientation is zero of course).
If in layer 1 prop1 is not 0 then in layer 0, prop2 is the
sub-index of the wall, and prop3 / 16 is the main-index (EDIT
>>> the layer1.prop1 is then the orientation).
The problem is I still don't know which dt1 to take. In the
screenshot my prog made just above, there's only the tiles of the
"tristram\town.dt1". But I tried with "outdoors\river.dt1" and some
other, and it works not so bad too. I'm feeling better
EDIT >>> update of the gif AND come precisions of the
text
[This message has been edited by Paul Siramy (edited 04 April
2002).]
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 04
April 2002 02:08
The more tests I'm making, the
more i'm starting to think there is no infos of the dt1 to use in
the ds1 file. I think that there is only orientation / main-index
and sub-index that indicate which tile is to draw, and since there
can be the same combinations on differant dt1, it won't be possible
to put all graphism in a map. I'm thinking that the lvltypes.txt
indicate the order of the dt1 to take. See for tristram : first file
is town\floor.dt1 and the 2nd is tristram\town.dt1. That means (if
I'm correct) that the floor of the town which will have the same
orientation / main-index / sub-index of the ones in tristram won't
be draw : it will be the ones in the tristram (last dt1 erase old
dt1) that will be draw.
Need further checks.
_fichiers/ip.gif)
|
Paul Siramy Knight
_fichiers/sword.gif)
Posts: 73 From: Gannat, France Registered: Mar
2002 |
posted 04
April 2002 06:36
I just found an error in my
logic, so I have correct my prog, and I updated the above gif with
the new result. So in fact, now I draw the layer 4 first (same as
before), but at this moment, I don't take the orientation from
layer1, I take a zero !!!! I only use the layer 1 (corners) when i'm
drawing walls (layer0). With this, I have floors under the walls.
Now we really going somewhere
_fichiers/ip.gif)
| |