# Enchanting

## Understanding Enchanting

Enchanting is handled through the [item-stack](https://stylishesper.gitbook.io/inventool/scripting/api/items/item-stack "mention") class. Each item has a [enchantment](https://stylishesper.gitbook.io/inventool/scripting/api/enchanting/enchantment "mention") struct, which simply stores enchantment data. An `ItemStack` stores a list of these since enchantments need to be a part of the item once they are enchanted.&#x20;

Basically, a successful enchantment is achieved only if an enchanter item is used to enchantable item, and the player has the currency to cover the cost (if costs were enabled).

### Enchanter Items

Enchanter items is a term that refers to an [item](https://stylishesper.gitbook.io/inventool/scripting/api/items/item "mention") which has an [item-type](https://stylishesper.gitbook.io/inventool/scripting/api/items/item-type "mention") with the [Enchantment Mode](https://stylishesper.gitbook.io/inventool/scripting/items/item-type#public-enum-enchantmentmode) set to `Enchanter` or `Both`.

### Enchantable Items

Enchanter items is a term that refers to an / which has an [item-type](https://stylishesper.gitbook.io/inventool/scripting/api/items/item-type "mention") with the [Enchantment Mode](https://stylishesper.gitbook.io/inventool/scripting/items/item-type#public-enum-enchantmentmode) set to `Enchantable` or `Both`.

### 'None' Enchantment Mode

If an item has an `EnchantmentMode` set to `None`, it cannot contribute to the enchanting system.

### Enchantment Cost

Enchanting may cost the player some currency if the cost was enabled.

## Enchantment Result

When an enchantment is successful, one stack of the enchanter item is used. The enchanter item's `enchantment` field will be added to the enchantable item stack's `enchants` list.&#x20;

If an enchantment fails, it simply means that the requirements were not met.
