Login | Register


All times are UTC - 5 hours


It is currently Thu Mar 28, 2024 6:21 pm




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Adding a new map for dummies
PostPosted: Wed Jan 30, 2013 12:26 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
General introduction:

I'll write this up over the next week or 2.
Adding levels is one of the more fun aspects of modding D2 and is a great way to enhance your own SP experience by creating levels/bosses unique to your own SP game, to test your characters abilities.

There are a million errors to run into before you even get to see a blank map or start up the map editor.
This guide will hopefully explain how to avoid that headache and get down to the fun part (actually designing the maps).


Tools checklist
winDS1 Edit + Documentation
WinDS1Edit GUI Loader (this works with the program above)
TXTDC6 (used for creating "entering XXXXXX" messages)
DT1 Mask calc (Used to calculate required DT1 Mask)
D2Excel
AFJ Table Edit 1.11 (Used for adding strings (text))
WinMPQ

Planning your level

(work in progress)

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Wed Jan 30, 2013 12:33 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
Preparing your text files

The main .txt files you will be working with are:
Levels.txt
LvlTypes.txt
LvlPrest.txt
LvlWarp.txt

Open patch.MPQ using WinMPQ and find these files and extract to your HU/D2 folder. This will create a data folder with the files inside global>excel.

A few others you may want to use (for placing new bosses/SU's) or for testing stuff:
Monstats.txt
Monstats2.txt
MonPreset.txt
Cubemain.txt
UniqueItems.txt

You are ready to start editing files.

DT1's

A DT1 is a file that contains different tiles used by the game. You can create your own DT1 with your own tiles if you like, but I won't go into that here. Each DT1 you want to use on a map must be declared in leveltypes.txt for the level you are editing.

Example:
XXXX Level, uses leveltype 2. Only the DT1's entered in leveltypes.txt's leveltype 2 row can be used by that map.



DT1 Mask

The DT1Mask is used to tell the game what DT1's to use from its leveltypes row. You can use the DT1 calculator to find this, but i'll explain how it works and how to find it manually.

The number is a decimal reprisentation of a binary bitfilter. Sorry I can't find another way to explain it, but I'll use an example to illustrate.

You want to use leveltype X but only want to use tiles from the first, third, fourth, and tenth DT1's declared in the level type.
Open windows default calculator and set it to full scientific mode.
select the Bin (Binary) option and enter 1011000001
1 if you want to use the DT1 in that slot
0 if you dont want to use it.
so 1011000001 will enable the DT1 file in the first, third, fourth and tenth column. Easy :)
Now all you do is change the binary option to Dec (decimal) and that will give you your DT1 Mask.


Leveltypes.txt

This stores all the DT1 listings used by each leveltype. the fileX columns each contain a DT1, and can be enabled/disabled for each individual map via levelprest.txt and the desired DT1Mask.
In general, you won't need to edit this much unless you want to add some custom tiles. It's mostly used for reference.

Creating a new leveltype

Sometimes you may want to use a combination of tiles from different leveltypes (graveyard tiles in a jungle area or something like that).
To do that, you'll need to create a new leveltype that contains a mix of jungle .DT1's and graveyard.DT1's. You can also just add a DT1 to an existing leveltype. Existing maps won't be altered because they will be using a DT1Mask that doesn't include the additional tiles.

I you really need to make a new level type. Just clone an existing row and paste it at the bottom of the file. Give it a unique ID and add your DT1's to the FileX columns for that row. Make sure you set the act to the act column you are gonna use the leveltype in.


Lvlprest.txt

This file stores the path of your actual map file. You will be editing this every time you make a new level.
The name column isn't loaded by the game, it's just for reference. The Def column is like an ID, just follow the trend and increase it by 1 for every level you add.
LevelID = ID of the level in levels.txt that should use this map.
Populate = 0/1 (no/yes)
Outdoors = 0/1 (no/yes) (Used for rain effects etc.)
FillBlanks = 1
sizeX/Y = 0 (we are adding preset maps, so this value is read from levels.txt instead)
Automap = 0/1 (no/yes)
Scan = 1
Pops = 2
PopPad = 0
Files = 1-6 (Number of variations of this map to randomly choose from)
Files1-6 = the path of your map file.
Custom/NewMap.DS1 will search for your map(Named "NewMap") in data/global/tiles/Custom.
DT1Mask = the DT1Mask calculated for the leveltype you are using. (see above)


Levels.txt

This is the guts of the levels stuff. All the other level related files are referenced here and used together to create the level. (not the map, just the level)
A quick explination of the important columns:
Name = not loaded by the game, just for reference.
ID = ID of the level, must be unique and in order.
Pal = Pallette to use. (0= act1, 4= act5)
Act = what act is it in? (0= act1, 4= act5)
QuestFlag/QuestFlagEx = how you enable quest flags. I'll post a list of the numbers for each part of each quest further down for reference.
Layer = if 2 levels share the same layer, the automap will show both levels at the same time. I'll go into this more in a minute, but in short, if you are linking to levels together like an outdoor level, you want both levels to be on the same layer so the automap will join up.
SizeX/Y = number of tiles high/wide the map is. (set this 1 higher than your actual map size).
SizeX/Y N/H = keep this the same as norm/nm since we are working with preset maps and not mazes. (mazes are badly coded and not very customisable)
OffsetX/Y = the maps very top corner position in the worldspace.
This is important and is one of the most common causes of errors. The game has a set worldspace that it can place levels on. In the worldspace, levels don't need to be next to each other to be connected, but they must not overlap.
Just check the existing offsets that are used and create a unique one that wont overlap.
Ie. If you have a 100X100 level at X1000 and Y1000 in the worldspace, and want to place another 100X100 level. The safest place to put it would be X1150 Y1000 (leaving room for the existing 100X100 map) and 50 tiles in between as a safety net. You just need to find somewhare it will go without crossing over any other levels.
Notice, you only need to change X in that example, but sometimes you may need to change both or only Y. As long as there are no overlaps you are good.

Depend = LevelID of the level this map depends on for its X/Y pos.
This isn't used unless you are linking 2 levels together in a similar fassion to outdoor levels. The game places this level next to the levelID you place here. the offset columns are then used for offsets relative to the dependant levels top corner position.




Randomising preset maps
World Space
Linking levels with warps
Linking levels with portals

(WIP)

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Wed Jan 30, 2013 12:37 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
Creating your map

DS1 Edit (Program)
DS1 Edit Loader(Program)
Adding your map to the maplist

Placing objects and preset monsters
Adding a monster to placeable objects list

(WIP)

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Wed Jan 30, 2013 12:38 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
Testing your map

Tricks to make your life easier

(WIP)

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Thu Mar 21, 2013 4:52 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
Made a start on the text side of stuff, ran outa time. More soon, hopefully onto map generation/editing rather than text stuff.

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Fri Mar 22, 2013 2:09 pm 
User avatar

Joined: Tue Feb 01, 2011 5:48 pm
Posts: 1680
damn this is really fucking cool, hope I can find some time to mess with it

_________________
PureRage-DoD wrote:
Cowards die in shame, I ain't afraid to lose a char, it's not like it's important. :lol:


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Fri Apr 12, 2013 5:24 pm 

Joined: Wed Oct 19, 2011 11:32 am
Posts: 75
Btw is it possible, to add a whole new "chapter" (act), with new npc's and all the other stuff. Because after playeing HU (was really hard), I am interested in modding Diablo 2 for myself. However, atm I am modding for TES III Morrowind from Bethsoft, so no hurry with answering my post^^


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: Adding a new map for dummies
PostPosted: Mon Apr 15, 2013 3:16 pm 
Game Server Host
User avatar

Joined: Mon Aug 31, 2009 12:33 am
Posts: 4291
It's possible to emulate a 6th act, but it's a huge undertaking, and I mean really huge (especially if you want to add new quests and stuff).

Theres quite a few code plugins that you could use to make this easier though like Extended wps and D2Towns. You'd need to do quite a bit of custom code work .dll side too.

If I was doing it, I'd extend act 4, create a fake Diablo and have tyrael pop the portal to a second town in act 4 after killing the fake diablo. After that, you would recreate act 5, starting from your second town in act 4. The quest stuff would need to be redone for act 4, spreading it over act 4 and 5 quest pages, with extra quests slipped in. (this isn't simple, it's a vast undertaking.)
At the end of your new 5th act would be a reskinned diablo (using baal sprite) and after killing that, tyrael would pop the real portal to act 5 (now act 6).

After that you have a whole 6th act to play with, redesign/populate. You are not just creating 1 act, you need to recreate all of act 5 in the second half of act 4 + redesign act 5.

Why recreate act 5 in act 4? If you add levels after the real act 5, they won't be required to complete the game and will always be just an optional extension of act 5.

I should get some time this week to write a bit more on mapping stuff. Infact I might have a bit of time now :D.

Edit: or not... :x

_________________
Bron wrote:
There's no cure for being a cunt.


Top
 Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron