# Attributes

The value representation of a parameter/mechanic in our system.&#x20;

<figure><img src="https://585731495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPvnvgshL169KwwsLUx0q%2Fuploads%2FNq7dZZfgxPgfr5GDCjzR%2Fimage.png?alt=media&#x26;token=da5b850c-cef3-41ed-b6aa-d5c5d98b983c" alt="" width="483"><figcaption></figcaption></figure>

### There are 2 types of Attributes: Resources and Stats. &#x20;

1\. **Resources** use baseValue. They are expendable (e.g. HealthPoints, Potions, Ammo, Coins).

2\. **Stats** use currentValue. Not expendable (e.g. MaxHealth, MaxMana, JumpHeight, CritChance).

\*Create and assign all needed attributes via the Editor Inspector or on Awake(). Creating and assigning attributes during runtime is not supported currently.&#x20;

### AttributeName

Attributes have a property called AttributeName, it is a simple reusable ScriptableObject that assigns the name and type for an Attribute object.

You can create as many different attributesNames as you want to represent different values in your mechanics.

<figure><img src="https://585731495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPvnvgshL169KwwsLUx0q%2Fuploads%2F1hxD11YrJtBnQWW8hKgD%2Fimage.png?alt=media&#x26;token=d89ac0bf-f413-4ba6-a339-df3ffeebad33" alt="" width="178"><figcaption></figcaption></figure>

## Create different attributes for your game's mechanics:

#### Right click in Editor -> Create -> GAS -> AttributeName

\*AttributeNames must be in the same folder as their library (AttributeNameLibrary)



