# Creating Enchantments

### How to create your own enchantments

Creating enchantments is a simple process, and you can customize each one to your likings. You can create enchantments via the YAML file or the Web Panel.

{% hint style="info" %}
Using the Web Panel will require you to generate a link in-game via /ee upload
{% endhint %}

```yaml
  headless: #[Name (Lowercase)]
    name: "Headless" #[Display Name]
    description: #[Description]
      - 'Victims have a chance of'
      - 'dropping their head on death.'
    group: "SIMPLE" #[Group]
    applies: "SWORD" #[Application Group]
    type: "KILL" #[Type]
    levels: 
      1: #[Level Number]
        souls: 20 #(OPTIONAL)
        chance: 2.5 #[Chance] (OPTIONAL)
        cooldown: 5 #[Cooldown] (OPTIONAL)
        condition: "isHolding BOW" #(OPTIONAL)
        effects:
          - 'DROP_HEAD:TARGET' #[Effect]
```

{% hint style="success" %}
NEW: You can now add multiple types and execute different effects depending on the effect type you have triggered
{% endhint %}

```yaml
  test:
    name: "Test"
    description:
      - 'Test enchantment to show the'
      - 'multiple type feature'
    group: "SIMPLE"
    applies: "SWORDS"
    type: "KILL,ATTACK"
    levels:
      1:
        chance: 15
        effects:
          - 'ATTACK;HEAL:ADD:1:3' # Activate on Attack
          - 'KILL;DROP_HEAD:TARGET' # Activate on Kill
          - 'MESSAGE:Can be activated on both:PLAYER'
```

|         Value        |                                                                        Description                                                                       |
| :------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------: |
| **Name** (Lowercase) |                 This is the id you will use to fetch the enchantment via commands and how the plugin will fetch the enchantment backend.                 |
|   **Display Name**   |                       This is the name that gets displayed on the enchantment item and when the enchantment is applied to an item.                       |
|    **Description**   |                                                      This is the text used on the enchantment item.                                                      |
|       **Group**      |          This is the enchantment group, This can control the color, position, and activation depending on the values you set in the groups.yml.          |
|      **Applies**     | These are the items that the enchantment can be applied to. This can be overridden by any user with permission to apply the enchantment using a command. |
|       **Type**       |                      This is the trigger event, meaning when this happens, the enchantment will activate if all conditions are met.                      |
|      **Effect**      |                                               These are the custom abilities triggered by the enchantment.                                               |
