Moving stairs to levels that shouldn't have them

Post here for all aspects of map making and level design. Click here to visit the Keep's official map site, Diabolic Cartography.

Moderator: Paul Siramy

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Moving stairs to levels that shouldn't have them

Post by FoxBat » Mon Jul 07, 2003 4:14 am

I am trying to move the stairs down from the catacombs into Andariel's throne room to create a new warp down. I'm having trouble getting it to work though. Andariel's room doesen't seem to have the proper "DT1s" or whatever, when I copy it over it appears as blanks instead of ground tiles. The maps don't link up at all, I can't take a warp from one of the other levels to this map via this new warp. I recalled people doing something like adding stairs or waypoints to tristram, but I couldn't find it in a search. Have there been any successes in this area?

On a somewhat related note, I'm also trying to put three stairs up into one of the treasure caves. I got it working somewhat. The problem is with the display. I had to copy the attributes of a stairs down to get it to work. If I copy the stairs down tile, then manually change it's background to stairs up, it looks fine. Until I highlight it that is, and then that tile and the three neighboring ones change to the graphic for stairs down. If I try playing with the vis special tile # at all, then the four graphics go this blank dark-green color instead of the expected tiles.
Last edited by FoxBat on Mon Jul 07, 2003 4:15 am, edited 1 time in total.

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by Paul Siramy » Mon Jul 07, 2003 6:09 am

I'm going to sleep right now, so I won't explain in details, but :

* if your ds1 don't have the dt1, then simply add it in a free slot of lvltypes.txt, and update the dt1mask of lvlprest.txt for that ds1 in order to be able to use it

* don't create tiles with warp, instead copy/paste them from the same ds1(but then take care to not use the same Vis number for 2 diferent stairs in the ds1), or from another (2 ds1 opened at once). It's because some special tiles (like some Vis) are invisible and must have a certain bit set, something my editor don't allow. But by copy/paste, it copy/paste that bit too. Always safer to take a model from a ds1 and copy/paste.

* do your change in levels.txt for Vis / Warp, again for Warp, folow the model you choose to take your Tiles from.

Hope it'll help, else in any case I'll be back for more details ;)
Good nightzzzzzzzz
Last edited by Paul Siramy on Mon Jul 07, 2003 6:12 am, edited 1 time in total.

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Re: Moving stairs to levels that shouldn't have them

Post by FoxBat » Mon Jul 07, 2003 6:41 am

Thanks, just what I needed, I've new working stairs in andy's lair. That DT1 mask tool is pretty handy. :D

The three-staires-up cave question is still a puzzle though... :-|
Last edited by FoxBat on Mon Jul 07, 2003 6:43 am, edited 2 times in total.

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by Paul Siramy » Mon Jul 07, 2003 4:36 pm

[quote=FoxBat";p="111984"]I had to copy the attributes of a stairs down to get it to work. If I copy the stairs down tile, then manually change it's background to stairs up, it looks fine. Until I ...[/quote]
Well, to me it looks like you're creating stairs up, but forget to change the warp column accordingly in levels.txt, so it keeps stairs down process (when highlight).

As always, I suggest to copy/paste stairs up from a ds1 and paste it in your cave ds1 , and copy/paste the warp values in levels.txt as well (I think that just doing the change in the .txt will solve your problem).

As a last note, lvlwarp.txt (and warp columns in levels.txt) are what handle the graphical effects of stairs/door... among other things. You'll see that there are offsets in lvlwarp.txt for instance, and I believe that it's used to define an area around the stair/door where your mouse need to be to command the game to display the tiles in highlight mode.

--> Warp lines in lvlwarp.txt are linked to their DT1 representation somewhat, so when you copy/paste a stair/door (a 'warp' then) from a DS1 to another, it's essential to use the same warp values in levels.txt that the DT1 needs.

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Re: Moving stairs to levels that shouldn't have them

Post by FoxBat » Mon Jul 07, 2003 4:49 pm

Right, but in this case I cannot copy any stairs as I want them to use a different Vis. Vis 0 and 1 are the only two stairs up for the cave, yet I want yet another stairs up, so that needs to be a Vis 2 or Vis 4 or such. No ds1 file has a sample of stairs up with vis4 though, so I would need to make it from scratch or else modify something, and none of those options seemed to work.

I guess maybe no-one has made a tool that can do this (or maybe it's hardcoded to the graphics in some manner.) I can live without this, just a bit confusing to have stairs down in one map lead to stairs down in another.

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by Paul Siramy » Mon Jul 07, 2003 6:50 pm

I have never *tried* but I'm confident that it'll works : you can make new DT1 warps.

Let's take data\global\tiles\ACT1\CATACOMB\catEWup.ds1 (ID=10, DEF=288). The stairs up are 2 special tiles, of Vis 0. If you right click you'll see that special tiles #06 and #07 are for the normal part of the stairs, while tiles #08 and #09 are the same but hilighted. What's important is to know in what DT1 they are and wich Orientation / Main index / Sub index they're using.

DT1 = Data\Global\Tiles\Act1\Catacombs\Upstr.dt1 (as indicated in front of the line of tiles).

Tiles #06 has :
* Orientation = 11
* Main index = 0
* Sub index = 0

Tiles #07 has :
* Orientation = 11
* Main index = 0
* Sub index = 1

Tiles #08 has :
* Orientation = 11
* Main index = 0
* Sub index = 2

Tiles #09 has :
* Orientation = 11
* Main index = 0
* Sub index = 3

In case you didn't know, the Vis numbers are indicated by the Main Index of the Special Tiles. Since all these 4 tiles have a Main Index of 0, they are making a Vis 0. So the idea is to take my DT1 tools, open Upstr.dt1, copy/paste the 4 stairs tiles at the end of the pcx, and copy/paste their datas in the .ini, but changing the Main Index from what you want (from 0 to 7).

It's your choice to either add these new tiles in the same DT1 or to make a new DT1, but just adding them in the same DT1 is easier I think, as you won't have to deals with lvlTypes.txt and DT1Mask to handle a new dt1. Beside, the size of this DT1 should be small, so it won't be a problem either.


EDIT : here's how to do this.

* download my DT1 Tools
* put upstr.dt1 in the DT1 Tools directory
* either edit all the 3 first .BAT, or make new ones.
  • 1-DT1debug upstr.bat

    Code: Select all

    @echo off
    dt1debug upstr.dt1 -pal d2pal\act1.dat
    You can see that this DT1 has only 4 Tiles in it (screenshot)
  • 2-DT1extr upstr.bat

    Code: Select all

    @echo off
    dt1extr upstr.dt1 -pal d2pal\act1.dat
    This bat will create 2 files, "upstr-wu.pcx" and "upstr.ini", we'll edit these 2 files.
  • 3-DT1make upstr.bat

    Code: Select all

    @echo off
    dt1make upstr.ini
    This will recreate the DT1 but with 8 tiles this time, not only 4.
So, let's open "upstr-wu.pcx" in Paint Shop Pro.The image is 640 * 288 pixels. Choose a background color different than the one you can see curretnly, for instance choose white. Now, make place to the right : Image / Add Borders (top, left, bottom = 0, right = 640). This create a white rectangle on the right of the tiles.

Select the 4 tiles and copy / paste them to the right. Here, the easiest way is to Ctrl + A (select All), choose the magic wand tool, place the mouse over the white area and then do a Ctrl + Left CLick. Then, Ctrl + C, Ctrl + E and place these 4 tiles over the white area, no white pixels should remain. Save it.

Edit the .ini now.
* change the 1st line from 4 blocks to 8 blocks ("nb_blocks = 8")
* Then copy the 4 next block of texts and paste them at the end of the file.
* edit the 1st new block of text like this :

Code: Select all

block       = 4
pcx_x       = 640
main_index  = 00000007
Instead of 7 you can put any values from 1 to 7, it'll be your new Vis.
Proceed the same way for the 3 other blocks :

Code: Select all

block       = 5
pcx_x       = 800
main_index  = 00000007

block       = 6
pcx_x       = 960
main_index  = 00000007

block       = 7
pcx_x       = 1120
main_index  = 00000007
Save.

Launch 3-DT1make upstr.bat, it'll create "NEW_upstr.dt1". Use that file in replacment of upstr.dt1 in your Mod (don't forget to rename it, no 'NEW_' in front of the name).

Now, editing back your ds1, change the 2 tiles from Vis 0 to the 2 corresponding ones. No Vis info is writen over them, because they're not 'santard' know Vis, but it's just my editor, in the game they ARE new Vis, and since their Main Index is 7, they are Vis 7 in levels.txt (screenshot).

For the warp, use the same as the tiles for Vis 0, since it's the same graphics we have used, we only have changed the internal data of main index.


EDIT 2 : typos errors.
Last edited by Paul Siramy on Mon Jul 07, 2003 7:34 pm, edited 3 times in total.

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Re: Moving stairs to levels that shouldn't have them

Post by FoxBat » Mon Jul 07, 2003 8:06 pm

I now have a second stairs up in Andariel's room, and I think I can fix my caves now. Thanks so much, you're a genius! :D

Edit: well the caves are a different story. First, the graphics they use are floor, not a wall. Second, the dt1 file the "special wall" with the vis refer to is ds1edit.dat, which I assume are general-purpose dt1s that you put in a convenient package for your editior. So I'm guessing I don't really need any more graphics, just have to pick the right one. I tried #23, a vis2 that had the same sub index, subframe, etc. but once again I'm getting the green tile, except this one doesen't even go anywhere (after the appropriate levels.txt edits.) :(
Last edited by FoxBat on Mon Jul 07, 2003 9:31 pm, edited 1 time in total.

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by Paul Siramy » Mon Jul 07, 2003 10:39 pm

Second, the dt1 file the "special wall" with the vis refer to is ds1edit.dat, which I assume are general-purpose dt1s that you put in a convenient package for your editior.
Right, it's just to have white diamond with numbers and smal description, draw on top of special tiles, it's absolutly not used by the game.

Now, for this warp problem you have, this is another story, that's because there's so many warp types in the game.

So, let's take a cave, like data\global\tiles\ACT1\CAVES\caveEnext1.ds1 (ID=3, DEF=88 ). This ds1 is using Floor tiles to draw its warp (upper stairs). But, as you seen, the Special Tiles (Vis 1, special tile #15 here) is in the Wall 1 layer, and has no gfx at all.

This type of Warp is different than the precedent. In the catacombs, the warp was Wall Tiles, so it was using a DT1. But not here. Here, there's a floor, but it's independant of the Vis. There's only an invisible Special tile. Here, the floor is draw as expected, but then the special tile has no gfx, so it has a bit set to make it invisible (else a green tile appear, your problem). And that's the problem of my editor : if you create a special tile it'll automatically be visible, and you can't make it INvisible. But you can copy/paste an already invisble Special tile and then, after, change its value, from Vis 0 to Vis 7 if you want.

So, take your cave ds1 and this caveE1next ds1, copy/paste the floor upper stairs with the Vis 1 Special tile into your ds1. This will ensure that the Vis 1 will be invisible (the bit that makes it invisible is kept during the process of copy/paste even between 2 different ds1). Then, change the special tile from Vis 1 to Vis 7 via a right-click.

Quiet a mess isn't it ? Well, check Lut Golhein's warps, you'll love them, I can ensure you :sick: Look especially for the Trap Door : there's an invisible special tile, that you can't access until the *object* wich is over is activated (check object.txt, there's a column telling that this trap door block the warp). That Trap Door is like the Shrine Stairs in Act 3 : you must first activate the object in order to gain access to the Warp that's beyond.

A summary ? Special Tiles used for Vis can have a gfx (from a dt1), but it's not necessary, as it depends how this special tile is used. If it's using a gfx from a dt1, this special tile must be visible. If the special tile don't have gfx from a dt1, it must be INvisible (else the infamous green tile will appear in the game). Now, this special tile is only used to place a 'logical' Vis, the actual warps effects (area where the mouse can activate it, enlightened effect...) are handle via the Warp column (index in LvlWarp.txt).

Note : in sewer there are 4 floor tiles used for downstairs, but these ones do have light effect... Warps are complex, but the golden rule is still : see how it is done and reproduce it by copy/paste (not only DS1 and DT1, but also using the exact same Warp index from LvlWarp.txt).
Last edited by Paul Siramy on Mon Jul 07, 2003 10:47 pm, edited 3 times in total.

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Re: Moving stairs to levels that shouldn't have them

Post by FoxBat » Tue Jul 08, 2003 12:12 am

Well I did a bit more experimentation.

It seems that you don't need to duplicate the graphics in the dt1, you can make your new tiles in the .ini reference the same graphics positions and it works fine.

Minor issue, it appears that newly made warps do not appear on the automap. I suppose I can live with it but I'm a stickler. :P Know of any solutions?

Also, the caves are very stubborn. :x Basically, if I try to change the special tile at all, it turns green, it appears that merely picking a different special tile flags that visisble bit. On the other hand, I can change the floor image without causing any green stuff showing up, but then of course my warp isn't quite right. For example, I've copied the down from the caves, then changed the background to the up, and this looks OK. That is until I highlight it, when it and the neighboring three tiles get painted over a highlighted down graphics. Probably some stuff is hardcoded here. :-|

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by Paul Siramy » Tue Jul 08, 2003 2:57 am

FoxBat";p="112256" wrote:It seems that you don't need to duplicate the graphics in the dt1, you can make your new tiles in the .ini reference the same graphics positions and it works fine.
8-O Never tought of that, but yep, no problems to do it that way. Good point here.
Minor issue, it appears that newly made warps do not appear on the automap. I suppose I can live with it but I'm a stickler. :P Know of any solutions?
Hmm, Red Havoc know more than me about it (I supose). It's a problem with automap.txt. This text file assign automap icons to DT1 Tiles. Since you have created a new tile, this one is't assigned an icon by current lines, so you'll have to create a new line too.
Also, the caves are very stubborn. :x Basically, if I try to change the special tile at all, it turns green, it appears that merely picking a different special tile flags that visisble bit.
Hmmm, bad news. And I don't know what to do here. Well, maybe I can add an key to make Visible the selected tiles, and another to make it invisible ? I'll check that when I'll have time.
For example, I've copied the down from the caves, then changed the background to the up, and this looks OK. That is until I highlight it, when it and the neighboring three tiles get painted over a highlighted down graphics. Probably some stuff is hardcoded here.
I think you're simply using a warp index in levels.txt for this Vis that is for a down stair, not up, so just change it and it should be fine.

User avatar
Red Havoc
Retired staff
Arch-Angel
Posts: 1191
Joined: Sun May 26, 2002 8:57 pm
Location: Berlin, Germany

Re: Moving stairs to levels that shouldn't have them

Post by Red Havoc » Tue Jul 08, 2003 1:02 pm

FoxBat";p="112256" wrote:It seems that you don't need to duplicate the graphics in the dt1, you can make your new tiles in the .ini reference the same graphics positions and it works fine.
In a similar fashion I was deleting tiles from dt1s which I don´t need: Just erase the blocks in the .ini file, then adjust block numbers and correct number of total blocks. No need to redraw the whole .pcx (luckily). :)
Minor issue, it appears that newly made warps do not appear on the automap. I suppose I can live with it but I'm a stickler. :P Know of any solutions?
Hmm, Red Havoc know more than me about it (I supose). It's a problem with automap.txt. This text file assign automap icons to DT1 Tiles. Since you have created a new tile, this one is't assigned an icon by current lines, so you'll have to create a new line too.
Maybe, let me try :lol:

If I followed that discussion here correctly, you added four new tiles to upstr.dt1 and these do not show up on the automap, right?
Here´s how I think you can make them visible:

Automap.txt indeed handles how tiles are shown on the automap. Your new tiles are not listed in automap.txt, so the game will not draw them. We need to add entries for the new tiles to make them visible and we do that by cloning the entries of the already existing stairs.
Open automap.txt and look for two lines (I´m only posting the first columns):

Code: Select all

1 Catacombs	wrd	0	0	0	WRD B	27
1 Catacombs	wrd	0	1	1	WRD A	26
In MS Excel these are lines 235 and 236. If I´m right (I think so :D ) these should be the lines that are assigning the automap graphics to the upstairs tiles. Let´s analyse them:

1 Catacomb means act 1 and there the catacomb level type. This is just a restriction to a certain set of .dt1s, we don´t need to care about it. wrd is probably some kind of orientation, we don´t care about it either as we didn´t change the orientation for the new tiles. Style is the main index of the tiles. You´ll see that the original upstairs tiles have main index 0. StartSequence/EndSequence is the range of sub indexes of this main index, the automap graphic is applied to. In the original dt1, the first line is only valid for one tile, actually the one with sub index 0, while the second line is applied to the tile with sub index 1. These are in fact the two non-highligthed tiles of the stairs. They will be displayed on the automap.
About WRD B/A and all the type columns I have no real clue what they do, they´re probably just descriptions. WRD B/A probably means "wall right down B/A". Keep them as they are.
Finally, there´s Cel1, this is telling the index of the frame from maximap.dc6/minimap.dc6 that is used on the automap. In our case it´s the two frames I´ve cicled in the image here. We´ll use the same frames for the new tiles.

So what you have to do is the following:
- copy the two lines and paste them into automap.txt, right below the original ones
- change the Style and Sequence values to the indexes of your new tiles
- keep the rest as it is

Now you´ve added entries for the new tiles, so I think this should work. :)
Last edited by Red Havoc on Tue Jul 08, 2003 1:07 pm, edited 1 time in total.
PLEASE READ THE TERMS OF SERVICE BEFORE POSTING

Avatar image is Scrat from 'IceAge' by Blue Sky Studios and Twentieth Century Fox

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Re: Moving stairs to levels that shouldn't have them

Post by FoxBat » Wed Jul 09, 2003 2:46 am

Hey that's pretty cool RedHavoc, wasn't even sure if adding lines to automap.txt would cause a crash. :D

While we are talking about levels... I know how to change a random level into a preset one (entirely contained in one ds1 file), and I know how to change a random level's type to another random one... but I want to change a fixed level of one type to a fixed level of another type. I have taken the andariel Dt1, renamed it, changed lvlprest.txt of treasure cave 5 to have andy's dt1mask and linked the file up to it, and in lvls.txt I changed the size and offsets to match andy's level. It almost works. I can see my andy level with the catacombs tileset and run around in it, and it's almost the right thing, except my map is cut off at the very bottom (black space instead of the proper wall), and when I run up towards my 2nd warp at the back of andy's room the game crashes with an HDungeon:init or similar error. (yes I have the double warp/vis set up for the cave level.) Earlier when I didn't have the size/offset/dt1mask right I would appear near the upper warp and could see that the game was trying to spawn random catacombs areas beyond the top but it wasn't quite working. Have people succeded in changing preset level types before? My searching skills might stink but I can't find this topic addressed...
Last edited by FoxBat on Wed Jul 09, 2003 2:49 am, edited 1 time in total.

User avatar
Paul Siramy
Retired staff
Principality
Posts: 2828
Joined: Sat May 25, 2002 2:39 pm
Location: La Garenne Colombes (near Paris)
France

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by Paul Siramy » Wed Jul 09, 2003 5:30 am

FoxBat" wrote:I have taken the andariel Dt1
I assume you wanted to write DS1 ?
, renamed it, changed lvlprest.txt of treasure cave 5 to have andy's dt1mask
If I understand it correctly, you're taking the ds1 of andariel and try to use it as a replacment of a treasure cave ? Then, in levels.txt for the line of that treasure cave, did you have changed the lvltype column too ? It should now use the same as the Andariel, else it'll continue to use the usual lvltype of caves.

If the problem is not that, I won't really be of good help here. My area of expertise is dt1/ds1 format, not levels generation ;)

User avatar
FoxBat
Forum Legend
Arch-Angel
Posts: 1048
Joined: Thu May 23, 2002 10:50 pm
Location: Pennsylvania

Re: Moving stairs to levels that shouldn't have them

Post by FoxBat » Wed Jul 09, 2003 8:32 pm

Ah, indeed it is possible to change preset level types, if you aren't stupid... :P

You just need to copy the row from lvlprest.txt, then change the ID back to the old one, and it will work just fine. My crash error also was actually because I forgot to change the warp. :roll:

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Sweden

Hand-picked

Re: Moving stairs to levels that shouldn't have them

Post by kingpin » Fri Jul 11, 2003 2:52 am

This is somethings i got into trouble recently also. When i used a act5 icecave as a act1 cave.

I found out why we got this black borders. We are using the wrong LevelType.

LevelType are linked to LvlTypes.txt and you need to use the same ID as the original ds1 have.

In your case its catacomb ID 10.

btw, i have wrote a topic in changeing random levels into preset and the opposite ;) (you can find it in GMM)

The Warp number in levels.txt are linked to LvlWarp.txt, but you probably knows that already ;)

Return to “Map Editing”