> 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/dungeon-configuration/treasure-map.md).

# 🗺️Treasure Map

LiteDungeon allows you to create custom **Treasure Maps**, similar to vanilla Minecraft treasure maps found in shipwrecks.

A map can point players toward a dungeon, display a custom image at its location, and generate the dungeon when the map is activated.

### Configuration

```yml
map:
  enable: true
  image: skull.png
  item:
    material: CREEPER_BANNER_PATTERN
    display_name: §x§E§3§D§B§B§0Desert Pyramid Map
    lore:
    - <gray>Activate the map to find
    - <gray>the nearest §x§E§3§D§B§B§0Desert Pyramid.
  result_item:
    material: MAP
    display_name: §x§E§3§D§B§B§0Desert Pyramid Map
    lore:
    - '<1>Location: <2>%world% | %x%, %y%, %z%'
  player_range:
    min: 200
    max: 500
  worlds:
  - world
  biomes:
  - desert
  animation:
    sound:
      name: minecraft:ui.cartography_table.take_result
      pitch: 1
      volume: 1
    particle:
      name: minecraft:poof
      amount: 20
      range: 0.2
      speed: 0
      offset:
        y: 1
```

#### Image

```
image: skull.png
```

Defines the image displayed on the treasure map at the dungeon's location.

Images are stored in:

```
plugins/LiteDungeon/configs/map_images/
```

PNG images are automatically processed and converted into Minecraft map pixels.

#### Item

Defines the item used as the **inactive treasure map**.

The item contains a special NBT tag that identifies it as a LiteDungeon map and stores the required map information.

#### Result Item

Defines the item given after the map has been activated and the dungeon location has been determined.

The following placeholders can be used:

```
%world% %x% %y% %z%
```

They are replaced with the dungeon's actual location.

#### Player Range

Defines the distance range used to find the dungeon location relative to the player.

For example:

```yml
player_range:  
  min: 100  
  max: 1000
```

A random location is selected **100–1000 blocks away from the player** in a random direction.

#### Worlds

Defines which worlds can contain the generated dungeon.

```yml
worlds:  
  - world  
  - world2
```

If multiple worlds are specified, one is selected randomly.

If the list is empty, the dungeon is generated in the **world where the player activates the map**.

#### Biomes

Defines which biomes are valid for dungeon generation.

```yml
biomes:  
  - desert
```

The dungeon will only be generated in the specified biomes.

#### Animation

Defines the animation played when the map is activated or the dungeon is generated.
