# Item Generation

## How it works ?

Item generation works the same for chests and mob drops. Each dungeon item in the chests.yml or mob\_drops.yml config has a probability to spawn when populating the chest or killing a dungeon mob.

## Adding an item

There are 3 differents kinds of items you can use in chests :&#x20;

**Vanilla items :**&#x20;

```
- ==: DungeonItem
  amount_min: 1
  amount_max: 2
  material: GOLD_INGOT
  probability: 0.5
```

This represent a Vanilla item stack with the defined [material](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html).

**DungeonMMO keys :**&#x20;

```
- ==: DMMOKeyItem
  amount_min: 1
  amount_max: 2
  instanceName: <instance_name>
  probability: 0.5
```

This represent a key to open the dungeon \<instance\_name>

**Nebula items :**&#x20;

```
- ==: NebulaItem
  amount_min: 1
  amount_max: 2
  nebulaType: powder
  probability: 0.5
```

This represent a Nebula powder item. Availables types are : **scroll**, **collector**, **book**, **powder**, **crystal**, **orb**.

**MMOItems items :**

```
- ==: MMOItemsItem
  amount_min: 1
  amount_max: 2
  mmo_item_type: SWORD
  mmo_item_id: SOULSTEALER
  probability: 1
```

To define items types and ids please follow the [guidelines of the plugin](https://gitlab.com/phoenix-dvpmt/mmoitems/-/wikis/Item%20Creation)
