Creating a new dungeon

by Cosmic Gerbil

Creating a new dungeon can be fun, especially because it allows you to not only define the type of terrain in your dungeon, but also the types of monsters you want too.

Firstly open the file d_info in the lib/edit folder.This file is where all the dungeons are kept.Let’s look at the Mirkwood dungeon as an example.

N:1:Mirkwood
D:Mkw:a way to the Mirkwood Forest.
W:11:33:5:0:14:160
L:89:95:199:5:88:0
A:96:100:97:0:56:0:202:96
O:20:20:20:20
F:FILL_METHOD_0 | FLAT | NO_DESTROY | NO_DOORS | PRINCIPAL
R:100:0

The N at the front of the top line stands for number and shows that Mirkwood is the first dungeon.

The D line is the description line.The first three letters Mkw are the letters that appear in the bottom right hand corner of the screen when you enter the dungeon.The following is what you will see when you are about to enter Mirkwood.

W:11:33:5:0:14:160
The first two numbers correspond to the dungeon levels 11 and 33.Even though you enter Mirkwood from the wilderness, it starts at level 11, with level 11 monsters. There are 22 levels in Mirkwood.Dungeons vary in the number of levels they can have, it can be any number you choose, but it must not go beneath 127. This is because 127 is hardcoded into the game as the maximum dungeon depth.

The number 5 represents the minimum level the player must have reaches in order to enter the dungeon.Once again, this can be changed.As a general rule, the deeper level the dungeon starts at, the higher the player level should be.As an example, the Angband dungeon starts at level 67 and you can’t enter it until you have reached experience level 30.I don’t know what the last three number slots mean, but I don’t think they’re important.

L:89:95:199:5:88:0
This line deals with the feature types that will appear on the floor of the dungeon.The numbers mean floor type 1.Here it is number 89.Open the file f_info (features) and you will see that number 89 is a patch of grass. 95 is the percentage of the floor cover of floor type 1.So 95% of the floor will be grass.

Floor type 2. Number 199 in f_info is grass with Kingsfoil flowers.
5 is the percentage floor cover of floor type 2.5% of the floor is covered with grass with Kingsfoil flowers.

88 is floor type 3 and 0 percentage of cover of floor type 3.

A:96:100:97:0:56:0:202:96


This line is similar to the floor cover line, except here it deals with walls.So the number 96 (tree in f_info file) is wall type 1. 100% of wall type 1 is trees.
97 (mountain chain) is wall type 2.As you can see, there is 0% of mountain chain in Mirkwood.
The numbers 56 and 0 mean wall type 3 and percent of cover for wall type 3 respectively.
The final two numbers mean outer wall and inner wall.The outer wall, 202 is small tree in f_info.The inner wall, 96 is trees.

O:20:20:20:20 This is the object line and it shows what types of items you will find in a dungeon.The four numbers stand for treasure, combat, magic and tools.Here you have a 20% chance of finding each type.This only adds up to 80% though, so I would guess the remaining 20% of objects will be other things, such as food or junk.These numbers can be altered so for example, if you were creating a dragon’s cave dungeon, you may wish to add more treasure.

F:FILL_METHOD_0 | FLAT | NO_DESTROY | NO_DOORS | PRINCIPAL
These are the dungeon flags.There are lots of different dungeon flags.The help file “dungeon flags” lists them all and explains what most of them do.

R:100:0 This generates monsters in the dungeon and chooses what type will appear.Here the monsters will be of any random type.

Here are some examples of a dungeons with selected monsters:

N:4:Barrow-Downs

R:25:1

M:UNDEAD

R:75:0

Here 25% of the monsters will be undead.The “M” line deals with the monsters flags.The number 1 after the 25 means AND.Below are the four meanings of the numbers:

0 = No restriction

1 = AND

2 = NAND

3 = OR

4 = NOR

N:7:Submerged Ruins

R:20:0

R:80:3

M:AQUATIC | CAN_FLY | CAN_SWIM

Here 20% of the monsters can be any type.The number 3 after the 80 means OR so 80% of the monsters will be aquatic, or be able to fly, or be able to swim.

N:9:Cirith Ungol

R:2:0

R:49:3

M:R_CHAR_I | R_CHAR_a | SPIDER

R:49:3

M:ORC | R_CHAR_j | R_CHAR_m | R_CHAR_w

The R_CHAR flag allows you to select a group of monsters represented by a letter.Here 2% of the monsters can be of any type.49% will be insects or ants or spiders.49% will be orcs or jellies or molds or worms.

N:24:The Small Water Cave

R:10:0

R:10:3

M:AQUATIC

R:40:1

M:IM_COLD

S:BA_WATE

R:40:3

M:IM_COLD

The “S” line above is for monster spells.This means that monsters generated in this dungeon will be ones who are able to cast the water ball spell.

Finally some dungeons have guardians.These guardians may drop special artifacts.Here is an example below:

# The Lost Land of Numenor

# levels 35-50

# guarded by Ar-Pharazon the Golden, who has the stone "Coimir".

N:7:Submerged Ruins

F:FILL_METHOD_3 | FINAL_ARTIFACT_204 | FINAL_GUARDIAN_980 | NO_STREAMERS | WATER_BREATH

Where 204 corresponds to the number of the artefact in the a_info(artefact) file and 980 is Ar-Pharazon in the r_info (monsters) file.This also shows how useful comment lines are J

When you have designed your dungeon, you will want to use it in your mod.To do this, I have made a practise dungeon you can use as an example of how to do this.

N:42:The Dungeon of Doom

D:DoD:steps leading down into the Dungeon of Doom.

W:0:50:0:0:14:160

L:1:100:1:0:1:0

A:56:100:56:0:56:0:57:58

O:25:25:25:25

F:FILL_METHOD_0 | BIG | CAVERN | RANDOM_TOWNS |

R:100:0

To add in this dungeon, copy and paste it to the bottom of the d_info file.Then open the misc file in the edit folder.Scroll down until you find:

# Maximum number of dungeon types in d_info.txt

M:D:42

Change the 42 to a 43.Although it says that 42 dungeons are allowed here, you need to add on an extra dungeon because the wilderness counts as dungeon 0.

Open up the w_info (world map) file.Scroll down and you will see a list of dungeons, for example:

# Illusory Castle

W:E:17:15:96

The top line is a comment line and simply tells you the name of the dungeon.A comment line always has a # symbol in front of it.

The number 17 is the dungeon index in d_info and here is tells you that the Illusory Castle is dungeon number 17.

The last two numbers are the coordinates for where the dungeon will appear on the map.The first number measures down and the second number measures across.So to add in the new dungeon, copy and paste this into w_info:

# The Dungeons of Doom

W:E:42:21:38

This will put the new dungeon on the map, just a short distance east of Bree.Start up a game of FuryBand and when you leave Bree, travel east and you will find the Dungeons of Doom.