# Mana

The mana configuration is where you setup the mana for your characters including links to Unity UI elements to display health during play.&#x20;

Abilities can be setup to [use mana](https://dicelockstudio.gitbook.io/abc-toolkit/abc-components/general-settings/settings#notable-settings) when activating, stopping any activation if the character does not have the mana needed&#x20;

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-Mjn4XFexLDEBas1Bgfn%2F-MjnJaNs8-Ldhl-6gcC3%2FMana.PNG?alt=media\&token=d5216c95-2b6a-4d18-8e74-4ba0392dace1)

## Mana GUI&#x20;

Mana GUI can be added which will show the Current and Max mana in sliders and text. This is updated during play.

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjVH9S6Q7ftViUejjzR%2F-MjYdu14PoHNEiib4WOv%2FHealthBar.PNG?alt=media\&token=555b1d99-910a-49af-8d78-732a95bc93cd)

{% hint style="info" %}
Multiple sliders and text can be setup on the entity by pressing the “+ Add Mana GUI” button and can be removed by clicking the “X” for each mana  GUI section.
{% endhint %}

Once a mana GUI section is added the following settings will appear:

![](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-Mjn4XFexLDEBas1Bgfn%2F-MjnKEqDPJEs-gii-ms0%2FManaGUI.PNG?alt=media\&token=a743ba6d-894d-44ce-9114-29fbee109436)

**Mana Slider**

This setting requires a Unity Slider object which can be created from the Unity menu: GameObject > UI > Slider. The slider will show the current mana during play and will always make sure the max value matches the max mana to accurately represent how ‘filled’ the bar should be.

If the load default icon ![Image showing the Load Default Button](https://1755795481-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjPRj72OIJdbRL9FGPC%2F-MjV2j6coFkqZApYLdbD%2FLoadDefault.png?alt=media\&token=f8e7ba6c-a822-4434-b053-3aefa6e02bf5) is clicked then the ABC\_GUI default prefab will be added to the Hierarchy and the "sliderMana" object will be added to the setting. This example can be used, referenced or edited.

**Only Show Sliders When Selected**

If enabled then the sliders setup in this section will only show whilst the entity is being targeted by another ABC entity. If disabled then the sliders will always show.

**Mana Text**

This setting which requires a Unity text object which can be created from the Unity menu: GameObject > UI > Text. This object can be placed anywhere on the screen and will display the current health and the max health in the following format: CurrentMana/MaMana\
If the load default icon ​![Image showing the Load Default Button](https://firebasestorage.googleapis.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-MhJfX9-yykdmh_ePph_%2F-MjPRj72OIJdbRL9FGPC%2F-MjV2j6coFkqZApYLdbD%2FLoadDefault.png?alt=media\&token=f8e7ba6c-a822-4434-b053-3aefa6e02bf5) is clicked then the ABC\_GUI default prefab will be added to the Hierarchy and the "txtManaValue" object will be added to the setting. This example can be used, referenced or edited.

**Only Show Text When Selected**

If enabled then the text object setup in this section will only show whilst the entity is being targeted by another ABC entity. If disabled then the text will always show.

## Notable Settings

|       **Setting**       | **Description**                                                                                                                                                                                                              |
| :---------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|       **Max Mana**      | This setting configures the max mana the entity can have. This accepts float values but will always be rounded to display a whole number in any game UI setup. The max mana can be changed during play from ability effects. |
|     **Current Mana**    | Setting displays the current mana of the entity, this will never go below 0 or higher then the max mana . This value will change during play if an ability uses mana.                                                        |
|   **Regen Per Second**  | This setting determines how much mana is recovered every second. This accepts floats values. If 0 then no health is recovered.                                                                                               |
| **Full Mana On Enable** | If ticked then the entities current health will always be full to the max whenever the object is enabled during play. Useful for objects that ‘respawn’.                                                                     |

{% hint style="warning" %}
It is highly recommended to read the tooltips in the blue boxes for a full description on what each setting does&#x20;
{% endhint %}
