> For the complete documentation index, see [llms.txt](https://alex-plugins.gitbook.io/dungeonmmo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alex-plugins.gitbook.io/dungeonmmo/dungeon-creation/building-a-dungeon-part.md).

# Building a dungeon part

{% hint style="danger" %}
**Please read carefully this page before building dungeon parts. If some instructions are not complied with, your dungeon may not be connected at the end**
{% endhint %}

## Introduction

In DungeonMMO, dungeon is made of mutliple parts :

* **corridors** : they are 8x8 builds, there is only 4 kinds or corridos : bend, straight, triple and bridge. You have to create all of them.
* **entrance** : entrance is the arrival room for players. It must contain only **one** door.
* **boss** : boss room is the room where the boss spawn (see [Spawning System](/dungeonmmo/mob-spawning/spawning-system.md)). It must contain only **one** door.
* **unit** : unit is a room that has same characteristics as the entrance (must have only **one** door) but this won't be the player arrival. This room will appear one or zero times per dungeon generation.
* **mobs** : mobs rooms are rooms that can contain mobs, they must have more than one door.
* **special** : spcial rooms have same characteristics as mobs rooms, it's a way to define room rarity as you can choose how many special and mobs rooms there will be in dungeons in the instance file (see [Instances](/dungeonmmo/instances.md)).

Except corridors, all rooms must have a size of minimum (8\***k**)\*(8\***l**) where **k** and **l** must be **superior to 3**. It means that :

* 32\*24, 40\*24, 48\*32, 40\*40 are **valid** sizes
* 16\*24, 41\*45, 32\*12 are **non valid** sizes

## Doors

In every build, doors have to be 4 blocks long, it's the part that will be connected to other rooms or corridors. [Here](/dungeonmmo/dungeon-creation/using-the-selector.md#door-selection) you can find an example or room selection using selector.

## Build a corridor

In this part you'll see how to build corridors. Each cell represents one block (1x1).

**BLACK** cells represents walls.

<mark style="color:red;">**RED**</mark> cells represents door blocks you have to select using the selector (they have to be placed in the middle of the build).

**White** cells between doors must be empty, others can be whatever you want.

### bend corridor

<figure><img src="https://3801995436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2rdkbrELA0SxJQsCsxdZ%2Fuploads%2FNuJpa26gGJpAJBUbl099%2Fbend.png?alt=media&amp;token=efb92096-02c4-4367-b189-a5f96def4bb9" alt=""><figcaption><p>bend corridor</p></figcaption></figure>

After creation, this file must be named `bend.xml`

### straight corridor

<figure><img src="https://3801995436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2rdkbrELA0SxJQsCsxdZ%2Fuploads%2FXEJdmx8COM9ruxToSw98%2Fstraight.png?alt=media&amp;token=8bcf22f0-86b1-4338-b47d-3da58fc33145" alt=""><figcaption><p>straight corridor</p></figcaption></figure>

After creation, this file must be named `straight.xml`

### triple corridor

<figure><img src="https://3801995436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2rdkbrELA0SxJQsCsxdZ%2Fuploads%2FYSZWsN09jfdiE8tGB3Nc%2Ftriple.png?alt=media&amp;token=e18c12f0-4de2-4579-9024-b000688fff56" alt=""><figcaption><p>triple corridor</p></figcaption></figure>

After creation, this file must be named `triple.xml`

### bridge corridor

<figure><img src="https://3801995436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2rdkbrELA0SxJQsCsxdZ%2Fuploads%2FYnEdcuU1nZgJYcpju35n%2Fbridge.png?alt=media&amp;token=df3cfbca-3b56-47a9-b5df-419dd3ccfa76" alt=""><figcaption><p>bridge corridor</p></figcaption></figure>

After creation, this file must be named `bridge.xml`

## Build another room

Other rooms must follow the size rule defined in [Introduction](#introduction). In these rooms you can't build doors in corners. See the example below :

<figure><img src="https://3801995436-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2rdkbrELA0SxJQsCsxdZ%2Fuploads%2Fr1k5et9VyYwK3q2aUqe5%2F8%20blocs.png?alt=media&amp;token=9aa36a97-460c-4755-93bc-14ba5b621360" alt=""><figcaption><p>room build</p></figcaption></figure>

Cells in <mark style="color:orange;">**ORANGE**</mark> represent the corners where you cannot place doors.

Cells in <mark style="color:red;">**RED**</mark> represent an example of door placement for this room (the door must be placed in the middle of a 8x8 part).

Cells in **BLACK** represent walls.

After build, you can select your builds using the [selector](/dungeonmmo/dungeon-creation/using-the-selector.md).

### Permission

The permission for dungeon creation is `dmmo.dungeon_creation`.
