Room Generation

From DoomRL Wiki

Jump to: navigation, search
This article discusses technical aspects of DoomRL and will be of limited interest to most players.

On levels that generate rooms (normal type, city type, single monster type), certain rooms can have special properties. These levels generate 7d2-7 special rooms.

To generate a special room, first the type of the special room is chosen. Then, a room is chosen to have the special feature. Some features have a requirement on the dimensions of the room. If no valid room exists, the placement of that particular special room will be skipped. There can only be 1 special feature per room.

The probability of room types is the same for normal and city type maps, but is different for single monster type maps (in particular, no vaults are generated).

Room Type Probability (normal) Probability (single) Width Height
warehouse room 19/50 19/50 8-78 8-20
fluid room 5/50 5/50 3-401 3-201
ammo room 5/50 5/50 3-78 3-20
teleporter room 5/50 5/50 3-78 3-20
lever room 11/50 16/50 4-20 4-15
vault 5/50 0/50 8-26 8-14

1: Fluid rooms have an additional requirement on size described below.

Here, dimensions include the walls of the room.

The special rooms are described in detail below.

Fluid Rooms

A fluid is completely filled with a fluid. The fluid is determined by a roll of 1d10 + floor(dlevel/5).

Roll Fluid
<5 water
5-9 acid
>10 lava

Rooms cannot be filled with fluid if their area is greater than 120 (including the walls).

Ammo Rooms

Ammo rooms contain additional ammunition beyond what is generated by the normal item spawning procedure. The type of ammunition is all the same, with the type determined by a roll of 1d3 + dlevel.

Roll Ammo Type
<5 24 × 10mm ammo
5-10 8 × shotgun shells
11-12 3 × rockets
>12 20 × power cells

The number of stacks of ammo is 1d3 + 2.

Teleporter Rooms

Teleporter rooms contain a teleporter. Teleporters cannot be placed unless they are adjacent to 3 floor tiles. In particular, they cannot be placed in hallways of width 1.

Lever Rooms

Lever rooms contain a single lever placed at random. The lever type is randomly determined. The number of charges is also random.

Lever Type Probability Charges
forces explosions 2/17 1
summons enemies 2/17 1d3
harms creatures 3/17 1
destroys walls 3/17 1
floods with water 1/17 1
floods with acid 1/17 1
floods with lava 1/17 1
Armor depot 2/17 1d3
MediTech depot 2/17 1d3

Several of the lever types have a chance of affecting the entire level. This determination is made when the lever is generated, and when it happens, a special level feeling occurs. These levers and their associated data is below:

Lever Type Probability Feeling
harms creatures 33% The smell of a massacre...
destroys walls 33% You hear the trumpets of Jericho echoing in the distance...
floods with water 50% The air is really humid here...
floods with acid 10% In the State of Denmark there was the odor of decay...
floods with lava 10% You feel that smell? That gasoline smell? Oh hell...


Vaults contain extra items and monsters beyond what are generated by the above procedures. These monsters and items do not count against the limits described above. Each vault on the level generates a feeling, one of You feel excited!, There's the smell of blood in the air!, and There's something special here... uniformly at random.

The layout of a vault is unusual. A vault contains an inner room that takes up its entire space except for a path of width one all the way around it. There is a single door to the inner room.

The difficulty of the monsters and the quality of the loot are determined by a single roll of max(1d5 + dlevel + (difficulty - 2) * 3, 1).

The monster type is determined as follows:

Roll Monster Type
<4 former human
4-9 lost soul
10-14 demon
>14 cacodemon

If the roll is at least 30, a nightmare monster might be used instead depending on the roll modulo 6. If the roll modulo 6 is 3, nightmare imps are used; for 4, nightmare cacodemons are used; for 5, nightmare demons are used. (This calculation has the unusual side effect that some enemies will never be generated for certain combinations of dlevel and difficulty, even for high dlevel.)

The number of monsters spawned in a vault depends on the difficulty level.

Difficulty Number of Monsters
I'm Too Young to Die 1d4
Hey, Not Too Rough 1d4 + 2
Hurt Me Plenty 1d4 + 1d2 + 2
Ultra-Violence 2d4 + 2
Nightmare! 1d6 + 1d4 + 2

The number of items spawned in a vault is 1d3+2. These items are chosen from armors (not boots), ammunition, ranged weapons, and packs. Packs refer to all items that appear in the use menu including mods and reusable unique items. The items are selected from the list for dlevel = roll+3. (This is always higher than the normal dlevel.) Also, weights of unique items are doubled.

Sometimes vaults can be locked. A locked vault must choose an auxiliary special room that is at least 4 × 4 tiles large with an empty tile. If such a room exists, then there is a min(dlevel - 1,25)/100 chance of a locked vault.

A locked vault has no door to its inner chamber, and the walls of the inner chamber cannot be destroyed by weapons. Instead, a "destroys walls" lever is created in the auxiliary room that removes the inner chamber walls of the vault. This key lever cannot be destroyed by explosions.

In locked vaults, the weights of unique items are tripled.

For small vaults, it is important to note that monsters are placed before items. It is possibles for too many monsters to fill up a vault and reduce the number of items inside, especially on high difficulty levels.

Personal tools