A Simple Mans Guide to Adding a New Preset Level

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

Post Reply

Total votes: 1

User avatar
Retired staff
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia

A Simple Mans Guide to Adding a New Preset Level

Post by Drac0 » Tue Oct 11, 2011 6:13 am

A Simple Mans Guide to Adding a New Preset Level
By Drac0 (26 Sep. 11)

This guide is based on my experience in creating a new Act 4 lava level, linked to the Plains of Despair through a warp placed on Izuals section of the map. It draws on previous guides written on adding new levels but makes a few minor corrections & contains more specific information on changes to the files & connecting the new level to the rest of the worldspace.

It also uses information gathered from the file guides for Levels.txt & LvlPrest.txt.

While the process really is fairly simple you will need knowledge of creating/editing maps using Paul’s ds1edit. Additionally, you will need to know how to extract files from an MPQ & how to edit the text files/string tables.

It is a very long guide so I hope you have some time to spare.

NOTE: This guide is based on modding 1.10f. You will need to change the information to suit your own version.

Tools Needed
[What I use is in the brackets]
MPQ extraction tool (WinMPQ v1.64)
Text file editor (AFJ Sheet Edit)
String table editor (AFJ tbl Edit)
Win_ds1edit GUI Loader (optional, but makes things easier)

You will also need an extended levels plugin, I use D2Mod with this enabled.

Before You Start
There are 2 things you need to decide before you start anything – what type of area your new level is going to be & where is it going to connect it to. This will decide what files you need to use & what lines in Levels.txt/ LvlPrest.txt you will need to look at for your new level.

The information that follows is based on adding a new lava level but should work for other level types. It does NOT cover using a mixture of tile sets from different levels or a new tile set/level type. If you want to do that you will have to look at changing LvlTypes.txt & creating a new DT1Mask. That is beyond the scope of this guide.

Extract the Files
Having decided what level type you will use & where it will connect to it’s time to get the files. From the appropriate MPQ extract Levels.txt & LvlPrest.txt.

Based on the level type and the connecting level you chose, you will need to extract 2 .ds1 files. The first one is virtually any from the same level type of your new level. I created a lava map so I chose a lava .ds1 to use as a base.

The second one requires a little more thought. If you are connecting from a preset level it’s not a worry, just select that ds1. But if connecting to other types (maze/wilderness) you need select a map section that always appears in the game, otherwise the warp to the new level won’t always appear. This will most often be a map area that contains a Super Unique or required object (The Moldy Tome for example).

For me, the two maps I chose was one of the warp areas for the lava (WarpMesa.ds1) and Izuals map (Mid08X08Izual.ds1). The first was to save me having to add the stairs for the warp & the second because Izuals section of the map always appears (though this in itself can be an interesting twist....).

I also extracted a number of other lava maps so I could copy & paste areas into my new map using ds1edit. Just something to speed up making the new level.

You will also need to extract the string file of your choice.

Text File Edits
Fire up your text editor, it’s time to start work.

Open Levels.txt & copy the row of the same type of level for your new map to the bottom of the file. I made a lava map so I copied ‘Act 4 – Lava 1’. In this new row make the following changes.

Name – change this to what your new level will be called (Act 4 – Hell Labyrinth for mine).
Id - give this the next number in the sequence (137).
Pal - shouldn’t need to change.
Act - unless you’re putting the new level in a different act to the original you won’t need to change this. If you are, change this to the number 1 less than the act (ie: act 4 = 3).
QuestFlag/QuestFlagEx - should be blank.
Layer - this determines which ‘layer’ of the worldspace the level will appear in for the automaps. If you don’t want to share the layer, enter the next unused number in the column (100).
If you want it on the same layer as another area, you put in the same number as that level. Leaving it blank will put it on the top layer – the same level as act 1 wilderness. Levels on the same layer will appear on your automap when you’re close enough or scroll around.
I decided to leave this on the same layer as the other lava areas and didn’t change it.
SizeX/SizeY - The size of your new map. This is 1 less than the actual size of your map. So if you make a map 100x100, enter 99 in these columns. Use the same number for NM & Hell.
OffsetX/OffsetY - You need to change these so your new level won’t share space with other levels in the same act. In act 4, The Chaos Sactuary has offsets of 1500/1000 & a size of 120x120 so I set mine to 1700/1000. They are now on the same layer but mine is well clear.
Depend - should be blank.
Teleport to IsInside - Shouldn’t need to change.
DrlgType - Our new level is a preset so change this to 2.
LevelType to SubShrine - shouldn’t need changing.
Vis0 to Vis7[/b] - Changes here depend on what other levels you are connecting to. I’m connecting to Act 4 – Mesa 2 so I put its Id in Vis0 (105), leaving the others blank.
Warp0 to Warp7 - use the same warp number that you did for the Vis (warp0). This column determines how the game treats the warp in regards to highlighting on mouse over and such. You should use the same number as the level you copied. In my case this was 70, which is for Act 4 Lava to Mesa warps (a full listing of warp types is in LvlWarp.txt).
Intensity to SaveMonsters - Shouldn’t need to change unless you want to adjust the lighting on the new level.
Quest - Should be blank.
WarpDist - This sets how close to the warp monsters can spawn. If you place a monster closer than this using ds1edit the game will crash as you get near the warp! Discovered this the hard way when I set some random champions to ‘guard’ the new warp on the mesa. Game kept crashing & took me ages to figure out why.
Setting this lower allows monsters to spawn closer to the warp & higher keeps them further away. Up to you to determine what you want –I ended up leaving as is.
MonLvl1 to camt4 - controls what monsters/critters can spawn. Plenty of information available on this.
Themes & SoundEnv - shouldn’t need changing.
Waypoint - If your new level won’t have a fully functional waypoint, set this to 255 otherwise you need to set it to the appropriate waypoint.
EXTRA: to have a one-way waypoint, set this to 255 and place the waypoint anyway. You won’t be able to get to it from anywhere else but you can get from it to other waypoints you have activated, like town. A good way to get out after completing a level without swapping out another waypoint or using a waypoint plugin.
LevelName - The string that contains the name of the level. This is the one that appears in the top right corner of the automap. I used ‘Izuals Labyrinth’.
LevelWarp - The string for the text that shows when you put your mouse over the warp leading to your level. Used ‘to Izuals Labyrinth’.
EntryFile - This is the DC6 graphic file the displays ‘Entering [wherever]’ when you go into a new area. Can be named anything as long as it’s not being used. I kept the naming format used by the game. The last one for act 4 was A4L6 so I called mine A4L7. We will create this file later.
ObjGrp0 to Beta - Shouldn’t need changing.
That’s it for this row, but now we need to fix the row for where you’re coming from to get to your new level. For me that is Act 4 – Mesa 2. Find the row you need and make the following minor changes.
The only changes we need to make here are to the Vis & Warp columns. Mine has no other warps so I just put the Id for my new level (137) into the Vis0 and changed the Warp0 column to 69 (Act 4 Mesa to Lava). If you are adding a new warp, use an empty Vis/Warp column. If you are changing an existing warp, change the Vis to the Id of your new level. You will also need to fix the level that the warp originally linked to.

That’s it for Levels.txt, save it and open LvlPrest.txt.

Find the row for the map you selected as the base for your new map (Act 4 – Lava Warp N) and copy it to the bottom of the file. Now make the following changes.
Name - The name of your level (Act 4 – Hell Labyrinth).
Def - Next number in sequence.
LevelId - The Id of your new level in Levels.txt (137).
Logicals to KillEdge - Shouldn’t need changing.
SizeX & SizeY - Set these both to 0 as it gets the size direct from Levels.txt.
Automap - Should be 0. The 1 setting is generally reserved for towns where the full automap is always displayed.
Scan - Set this to 1. This tells the game there’s a warp on the map.
Pops & PopPad - Shouldn’t need changing. These are used for setting up disappearing walls & roof when you go inside a building.
Files - Set this to 1. If you make additional versions of the map, you will need to change this & the following section.
File1 - The path to & name of your new map relative to data\global\tiles\ folder (Act4/Lava/IzzyLab.ds1).
The rest of the columns shouldn’t need changing unless you add more maps or using different tile sets.
The only other thing to do is to go to the row for you ‘from’ map (Act 4 – Mesa 2 Izual) and make sure the ‘Scan’ column is set to 1.
Thats it, save the file.

Creating the EntryFile
Now we need to create the EntryFile. Thanks to Joel we have TXTDC6 to do this for us. Make a 2 column tab delimited text file with the name of the new EntryFile (A4L7) in the first column & ‘entering [your_level_name]’ in the second (without the quotes). Run TXTDC6 to create the DC6. Read the TXTDC6 documentation for correct usage. Make sure the name is correct then place it in \data\LOCAL\ui\eng\expansion. If replacing an existing level, you place the file the appropriate act folder instead. But for NEW levels it doesn’t matter what act you are making the level for, the EntryFile must go in this folder or the game will crash.

Adding the Text Strings
Open your chosen string file in the table editor & add the strings you put in Levels.txt (Izuals Labyrinth & to Izuals Labyrinth). Save the file.

Make the Map File
Open your base map file in the ds1edit GUI Loader. On the menu select View then Parameters. Check the box for Resize and enter the size your new map will be. These are the sizes you used in Levels.txt + 1.
If not using the GUI Loader please check the win_ds1edit documentation on how to get the same result as above.
Clear everything you don’t want to keep off the map, both tiles & objects. Save the map & exit the editor. Rename your map to the name you used in the File1 column of LvlPrest.txt (IzzyLab.ds1). This file needs to go into the directory you specified (data\global\tiles\Act4\lava)

Configure the Editor
Open the GUI Loader, select Options from the menu then Configure Loader. On the popup select Add. Another small popup should appear where you need to add the required details.
File - the name of the ds1 you just created (IzzyLab.ds1).
Name - name from Levels or LvlPrest.txt (Act 4 - Hell Labyrinth).
Path - the path where the ds1 is, relative to the data\global\tiles\ folder (Act4\lava).
LvlType ID - the LevelType specified in Levels.txt (28).
LvlPrest Def - the def column from LvlPrest.txt (1091).
Comment - any notes you might want to make.
Click Ok a couple of times to get back to the main screen & you’re done. The loader will now recognise your new level so you can open it & edit as you please.

Again, if not using the GUI Loader please check the win_ds1edit documentation on how to get the same result as above.

A Couple of Editing Tips
Copy & Paste is your friend. Open several maps as the same type as your new level along with it and use them to copy parts into your new map. There will be areas where you will need to go tile by tile but this will save you lots of time.

Make sure you spend some time getting in close (1:1 zoom) and making sure that the tiles go together properly. It will increase the overall appeal of the map if everything looks like it fits as it should.

Don’t be afraid to experiment, there’s always CTRL-U to undo......

Getting Those Warps Working!
Getting warps right can be a pain. But a little attention to detail & it can be a breeze.

First, check original files that use the same warp graphics (like lava stairs, or cave entrances/exits) and see exactly where the warp tile should be.

The warp tiles are special wall tiles. I find it best to put them on their own wall layer. If you’ve used wall layers 1 & 2, then use 3 or 4 for your warps. Makes it easier to work with them. Select the tile where the warp will be positioned, right-click the tile & select the wall layer you want. From the ‘Special’ tab, select a warp tile that matches the Vis you used in Levels.txt. If you use Vis0, then be sure to use a Vis0 tile. Vis7? Use a Vis7 tile of course.

After placing the tile, it needs to be hidden otherwise you end up with a green tile instead of a warp. Select the tile, hold down CTRL+SHIFT then right-click the tile. This opens the Advanced Tile Editing screen. The column on the left controls the visibility of each tile layer. Find the wall layer where your Vis tile is (w1, w2, w3 or w4) and click on the 0 in the first column. It should change to a 1, indicating the tile is now hidden.

You will need to do these changes for the maps at BOTH ends of the warp. I had to do it for my new level & Izuals map linking to it (Mid08X08Izual.ds1) to add the new warp.

Putting it All Together
First off, make sure all the files are where they should be. Text files in Data\Global\Excel folder. String table in Data\Local\LNG\ENG. Map files in Data\Global\tiles\Actx\xxxx (replace x’s with correct folders). EntryFile in Data\LOCAL\ui\eng\expansion.

Run the game in –direct –txt mode & with any luck you will have full access to your new level. If you have problems double-check your file locations & the text editing. If you still can’t figure it out be sure to see the mapping forum at the Phrozen Keep.

Xenast for LvlPrest.txt file guide.
Nefarius & Kingpin for Levels.txt file guide.
Author of ‘Making a New Preset Level’ tutorial.
ArCh4Ng3 for ‘Adding A Level With AFJ666s Extended Plug-in’ tutorial.
Paul Siramy for his great map editor & other utilities.
Everyone @ The Phrozen Keep who has shared the information to get modding workable, patch after patch.

*** EDITS ***
03 Oct 2011: minor changes & formatting changes to make it easier to read.
11 Oct 2011: a few more minor formatting fixes.
A Simple Mans Guide to Adding a New Preset Level.rar
RTF version of this guide
(13.44 KiB) Downloaded 254 times

User avatar
Posts: 46
Joined: Thu Jan 26, 2012 12:14 pm
Location: Istanbul, Turkey

Re: A Simple Mans Guide to Adding a New Preset Level

Post by MrOzturq » Wed Sep 12, 2012 9:37 pm

Thanks, very good guide! I will try these soon.
Ameteur Modding

Thanks to Paul Siramy, Brother Laz, Sir_General, Trevor and the other modders for their awesome jobs.

And thanks to kingpin for being a good admin.

Post Reply

Return to “Map Editing”