Description: Updated 1/14/13 - How to make a new preset level
Categories: Tutorials (1.1x) - Map Making
Ok, before I start it should be noted that a similar tutorial exists by ArCh4Ng3. His tutorial explains how to add a new maze level. This tutorial will show you how to add a new preset level. While both are similar, there is some differences that can cause you some headaches if you don't know them. I also intend to go more in depth with this tutorial, because understanding what you are doing is a vital part of modding. It should also be noted this tutorial is not meant for newbie mappers, some mapping experience is a must.
For the purpose of this tutorial we will make a new Act 1 outdoors area.
~MPQ Extraction Tool *Download*
~Excel Spreadsheat Editor *Download*
~String Table Editor *Download*
~Win_ds1edit GUI Loader *Download*
~DT1 Mask Calculator *Download*
[B]I. Installing extended levels plugin[/B]
In order to add a new level you need to have a plugin to extend levels.txt, or else your new level will crash. Depending on your version you will need a different version of the plugin, they are as follows:
Copy the provided dll's into your Diablo II directory.
Ok, first thing to do is open levels.txt
Now, go to the end of the file and make a new row. Now find the Tristram row, and copy it over to our new row.
Now that you have a base row, time to make it work for our new level. Here's an explanation of the columns that must be edited in order for your new level to work. Any columns unmentioned don't need to be changed for our level to work. I will put the values we will use in brackets and in [COLOR=blue]blue[/COLOR] text.
~Name: the name of your new level [COLOR=blue][Act 1 - New Level][/COLOR]
~Id: This is the id of your level, used for connecting warps to your level. Input the next available id, the id must be consecutive to that last one [COLOR=blue][/COLOR]
~Pal: This tells the game what pallet to use for your level. Using palletes from other acts will cause color problems. (0= Act1, 1= Act2, 2= Act3, 3= Act4, 4= Act5) [COLOR=blue][/COLOR]
~Act: This tells the game what act your map is in. (0= Act1, 1= Act2, 2= Act3, 3= Act4, 4= Act5) [COLOR=blue][/COLOR]
~Layer: Field related to automaps. Enter the next available value here. Like the level id, these values must be consecutive [COLOR=blue][/COLOR]
~SizeX: This is the y axis size of your level [COLOR=blue][/COLOR]
~SizeY: This is the x axis size of your level [COLOR=blue][/COLOR]
*[I]For Size [N] and Size [H] columns use the same values as your original Size X and Size Y[/I]
~OffsetX: The maps X position in the worldspace [COLOR=blue][/COLOR]
~OffsetY: The maps Y position in the worldspace [COLOR=blue][/COLOR]
~LevelType: This is the type of level, taken from lvltypes.txt [COLOR=blue][/COLOR]
~LevelName: This is the string key for the name of your level [COLOR=blue][New Level][/COLOR]
~LevelWarp: This is the string key for the entry name of your level [COLOR=blue][To The New Level][/COLOR]
~Position: Set to 0
EntryFile: This is the .dc6 text that is displayed upon entering your new level, more on this next step [COLOR=blue][a5l28][/COLOR]
Now save the file in the directory: Data/Global/Excel/
Ok, for this step we will make the entry .dc6 text I mentioned in the levels.txt step.
Use TXTDC6 to make a new entry text that reads: [I]entering The New Level[/I]
Now, make sure the file is named a5l28, and put it in this folder: Data / local / UI / Eng / expansion/
All new entry files [I]must [/I]be put in that folder!
[B]IV. Adding the Strings[/B]
Open up string.tbl and add the following entries:
Key: New Level
Text in key: New Level
Key: To The New Level
Text in key: To The New Level
Ok, begin by making a new row. Then find the Tristram row and copy it and paste it into our new row. As with levels.txt I will go over the columns that you need to work with when making a new level. I will put the values we will use in
brackets and in [COLOR=blue]blue[/COLOR] text.
~Name: Use the name we used in levels.txt [COLOR=blue][Act 1 - New Level][/COLOR]
~Def: Honestly I am not sure what this does, but like the id in levels.txt it must be consecutive [COLOR=blue][/COLOR]
~Levelid: The level id, taken from levels.txt [COLOR=blue][/COLOR]
~File1: This is the directory where your ds1 file is located [COLOR=blue][Act1/outdoors/newlevel.ds1][/COLOR]
~Dt1Mask: This column tells the game which dt1 files to use, calculated using lvltypes.txt [COLOR=blue][/COLOR]
~Expansion: Tell the game if the map is from the expansion or not [COLOR=blue][/COLOR]
Now save the file in the directory: Data/Global/Excel/
[B]VI. Making the DS1[/B]
Ok, extract the Tristram ds1 file from d2data.mpq (tri_town4.ds1)
Use the GUI Loader for win_ds1edit to open the file. On the menu, go to 'View'. From here, click 'Parameters'. You should now see a resize option become available. Select the box and resize the map to be X: 51 and Y: 51. Now go to 'File', and click 'Run'. Ok, now that you have the map open clear the ds1. Delete all the objects and all the tiles. Once you have a blank ds1, save it and exit the editor. Now, rename the ds1 to [COLOR=blue]newlevel.ds1[/COLOR].
Now move the ds1 to this directory: Data/Global/Tiles/Act1/Outdoors/
Do not try to open the renamed file with the editor just yet.
[B]VII. Configuring the editor to handle the new DS1[/B]
Open up the GUI Loader. Go to 'Edit' and select 'Loaders ini'.
From here click the 'Add' button. Here is what each column is for. As with before, the text in [COLOR=blue]blue[/COLOR] brackets is what we will use.
~File Name: The name of the DS1 file [COLOR=blue][newlevel.ds1][/COLOR]
~Level Name: The name of the level, taken from levels.txt [COLOR=blue][Act 1 - New Level][/COLOR]
~Game Path: The directory where the ds1 is stored [COLOR=blue][Data/Global/Tiles/Act1/Outdoors/][/COLOR]
~Lvltype ID: The id of the lvltype the map uses [COLOR=blue][/COLOR]
~Lvlprest Def: The value in the 'Def' column of lvlprest.txt [COLOR=blue][/COLOR]
Now click 'Ok' and your done. You should now be able to open your new level with the editor and begin editing it!
[B]Index 01: Related Errors[/B]
[I]Note: These error's are for version 1.10, 1.11 and above may/will have different error messages[/I]
Ok, here are some common errors you might come across:
[I]Thanks to the Phrozen Keep community for documenting these[/I]
Location : D2CommonDRLGPreset.cpp, line #2817
Expression : Level labeled as Preset, but no preset claims the level[/QUOTE]
Level is not properly assigned as a preset level, check drlgtype column in levles.txt and make sure you have added the level to
Location : D2CommonDRLGPreset.cpp, line #X
Expression : ptRegion->ptFile->nSizeX == ptRegion->tCoords.nSizeTileX[/QUOTE]
The actual size of the .ds1 is different from what is put in levels.txt.
Location: D2Hell/SRC/Archive.cpp, line #X
Expression: hFile [/QUOTE]
The Dt1Mask in lvlprest.txt is invalid. Either it has been calculated wrong or lvltypes.txt has incorrect entries.
[B]Index 02: Related Resources:[/B]
[URL=https://d2mods.info/forum/viewtopic.php?f=81&t=9098]Worldspace documentation #1[/URL]
[URL=https://d2mods.info/forum/viewtopic.php?f=4&t=60380]Worlspace doc #2 /misc info[/URL]
[URL=http://paul.siramy.free.fr/_divers/ds1/doc/tut01/index.html]Advanced winds1 edit doc[/URL]
Link to this article: Select all
[url=https://d2mods.info/forum/kb/viewarticle?a=315&sid=c683bfa49b8e18a9e876dcedbae23fa8]Knowledge Base - Making A New Preset Level[/url]