# GUIs

## Custom GUI

A custom GUI, graphical user interface, is a feature within that gives players a unique way of enchanting. GUI's can be opened up by [Custom Blocks](https://wiki.darrionatplugins.com/plugins/custom-enchants+/custom-blocks) or with [commands](https://wiki.darrionatplugins.com/plugins/custom-enchants+/commands-and-permissions). Each GUI is animated, in the terms of items  moving around within the GUI while the player is interacting with it.&#x20;

### Enchanter

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jF8jNFj7sEuNKPFYk%2F-M6jGT4EbJuKPKzQLXYx%2F2020-05-07_09-13-52.gif?alt=media&#x26;token=319c376f-8396-442b-a975-f4a2283ef360" alt="GIF of the Enchanter GUI"></div>

As first GUI to be introduced to Custom Enchants+, it is definitely also the most important. The Enchanter is to be used to add [Enchantments](https://wiki.darrionatplugins.com/plugins/custom-enchants+/enchants). The Enchanter will refuse items with no remaining slots. The Enchanter will also refuse items types that are not able to be enchanted.&#x20;

#### Upgrading Existing Enchantments

The Enchanter has a chance to increase an item's already-existing enchantments when enchanting. The default percentage is 50%. This percentage can be configured within the [config.yml](https://wiki.darrionatplugins.com/plugins/custom-enchants+/configuration-files/config.yml). Every successful upgrade will roll a chance for an upgrade again. So by default: one upgrade is a 50% chance, two upgrades  is a 25% chance, three upgrades is a 12.5% chance, and so on.

### Tinkerer

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jV1F7JwZb67RaJEIl%2F2020-05-07_10-17-37.gif?alt=media&#x26;token=21151c07-2c46-4d02-a924-540be1132fee" alt="GIF of the Tinkerer GUI"></div>

The Tinkerer is a unique GUI that allows a player to remove their custom enchantments in return for EXP. The given is experience is determined by [`used_slots`](https://wiki.darrionatplugins.com/plugins/enchants#slots)`* enchantExpCost`. enchantExpCost is defined within the config.yml.

#### Obtaining Scrolls

[Scrolls](https://wiki.darrionatplugins.com/plugins/custom-enchants+/scrolls) can be obtained from tinkering. By default, each scroll has a 5% chance from tinkering, this percentage can be configured in the config.yml.

### Anvil

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jVN9k3ldnpWhod31b%2F2020-05-07_10-19-26.gif?alt=media&#x26;token=9e8d4d8e-39e3-49fc-b5dd-1f75eebde463" alt="GIF of the Anvil GUI"></div>

The Anvil GUI allows a player to forge two items together. At least one item must contain a custom enchantment to be utilized. The Anvil does support Vanilla enchantments. Forging two items costs the player experience. The total amount of experience is calculated by `the total amount of enchantments * forgeExpPerEnchantment`. Forging does not increase the max number of slots on either item. Books may be used within the Anvil GUI.

### Selector

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jdEZSpxaWzZyd-W7t%2Fimage.png?alt=media&#x26;token=9061d077-851b-442d-b881-4d2a653e7372" alt=""></div>

<div align="left"><img src="https://3456334028-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6fEY18VuCweySnZ3g-%2F-M6jQ9nnOScleptcNgv-%2F-M6jd9LkxFGa1Gh9dnbD%2Fimage.png?alt=media&#x26;token=85a7b1ac-e7d1-4a87-97c4-dd197e26fb21" alt=""></div>

The Selector GUI is displayed when a player activates either the [Enchantment Upgrade Scroll](https://wiki.darrionatplugins.com/plugins/scrolls#enchantment-upgrade) or the [Enchantment Removal Scroll](https://wiki.darrionatplugins.com/plugins/scrolls#enchantment-removal). It allows the user to select an enchantment for the scroll to perform its action.
