> For the complete documentation index, see [llms.txt](https://paw-studio.gitbook.io/paw-studio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paw-studio.gitbook.io/paw-studio-docs/litedungeon/example-of-creating-dungeon/swamp-hut.md).

# Swamp Hut

#### 1. Create a Dungeon

Open the dungeon menu:

```
/ldungeon menu
```

Click **Add** and configure:

```
Dungeon Type: STRUCTURE
```

Set a unique dungeon name.

***

#### 2. Enter Edit Mode

Select **Edit** to create the editing area.

To quickly open the dungeon menu while editing, use:

**Shift + Right Click AIR**

> **Note:** On most server cores, you need to hold an item in your hand. The API action may be ignored when the player's hand is empty.

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2F3HsXQYFw2ajMpI92aQte%2Fimage.png?alt=media&amp;token=879c72e2-73b4-43d9-bac0-5e381821717e" alt=""><figcaption></figcaption></figure></div>

***

#### 3. Build the Structure

Build your dungeon inside the generated editing area.

Once the structure is complete, define its boundaries through:

```
Dungeon GUI → Size
```

This determines which blocks will be included in the schematic.

<figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2FouKcmaS5CpFNtr4dCrlJ%2Fimage.png?alt=media&amp;token=be38489a-1aec-4814-b83d-d324df03315c" alt=""><figcaption></figcaption></figure>

***

#### 4. Adding a Loot Chest

You can configure a chest to automatically generate loot when the dungeon is spawned.

#### Add a Chest

Place a chest inside the dungeon structure.

#### Create a Chest Rule

Add a **new rule:**

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2FAHg76FHIxiPTItBNAYpl%2Fimage.png?alt=media&amp;token=ddb414de-6b4b-4cd9-8a55-3a0af6c22db8" alt=""><figcaption></figcaption></figure></div>

#### Add a Chest Block

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2FuZdytJShadUaQ97qzuQ7%2Fimage.png?alt=media&amp;token=ebe9f5c2-53d7-4869-b8db-8fc117e6f26d" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2FoL7OXJGV7jaaUqS7GYge%2Fimage.png?alt=media&amp;token=3ac2d56d-b33b-417d-b0d4-f39bc671bd94" alt="" width="333"><figcaption></figcaption></figure></div>

Activate the `BACK` item to complete the addition. The activity should glow lime.

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2Fp8KQ684IBOZ5HnY4DU4F%2Fimage.png?alt=media&amp;token=69dfb11f-c945-4408-b3d0-678a6c8d2704" alt="" width="306"><figcaption></figcaption></figure></div>

#### Create new Loot Table

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2FJbUjvQ52VlzKfTXKaeR9%2Fimage.png?alt=media&amp;token=da7487a1-4739-42f5-9d0f-95c2c097da85" alt=""><figcaption></figcaption></figure></div>

See: [Loot Table](/paw-studio-docs/overview/loot-table.md)

***

#### 6. Add Entity

Add a witch's spawn when generating a dungeon.

<div align="left"><figure><img src="https://1531616302-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc5pkLUGwdKw4D8TWEOGW%2Fuploads%2FkRWHmQsfLhhS9bHof4yo%2Fimage.png?alt=media&amp;token=46cfb06d-7cb3-4aa5-8a1d-ceb1e85b92cc" alt=""><figcaption></figcaption></figure></div>

#### 7. Save the Structure

Click **Save** to save the structure as a `.schem` file.

The dungeon is now ready to use.

***

#### 8. Unload the Structure

You can click **Edit** again to unload the structure from memory when you are finished editing it.

***

#### 9. Spawn the Dungeon

Click **Spawn** to generate the dungeon at the selected location.

The saved structure will be pasted into the world and the replaced terrain will be preserved for later restoration.

## Video Example

{% embed url="<https://youtu.be/n5u_hU1jJ6k>" %}

{% embed url="<https://youtu.be/IIqa6HymtGc>" %}
