# Gameplay Effect (GE)

**GameplayEffects** define how abilities change **Attributes** and **GameplayTags**. They cause immediate **Attribute** changes like damage or healing, or apply long-term status buffs/debuffs like a movespeed boost or stunning. **GameplayEffects** also can trigger **GameplayCues**.&#x20;

<figure><img src="https://585731495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPvnvgshL169KwwsLUx0q%2Fuploads%2FZJOEsPQ93wHxgwoIiEft%2Fimage.png?alt=media&#x26;token=9d20fdc3-6af9-413d-a096-b69b07dec0b6" alt="" width="161"><figcaption></figcaption></figure>

### **Usage:**

Create a **GameplayEffect** ScriptableObject: \
1\. Right click in a folder on the editor -> Create -> GAS -> GameplayEffectSO\
2\. Select it, add **modifiers** and **tags** to describe the behaviour of the **GE**.\
\&#xNAN;*(Use ADD MODIFIER button on the bottom of the **GE** SO)*\
3\. Drag and drop it on a **GA**'s effectSO list\
\
\&#xNAN;***ATTENTION:*** \
To add the modifier, scroll down the GE scriptable object and click the "**ADD MODIFIER WITH TYPE"** button. Modifiers need to be instantiated with their type, otherwise they'll do nothing.

<figure><img src="https://585731495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPvnvgshL169KwwsLUx0q%2Fuploads%2FwSvABFvFXItxJTTM71uV%2Fimage.png?alt=media&#x26;token=e49f847c-e5fb-4d63-975b-e83320da594c" alt="" width="161"><figcaption></figcaption></figure>

## Duration

GameplayEffects have three types of duration: **Instant**, **Duration**, and **Infinite**.

**Instant** GameplayEffects make immediate permanent changes to attributes' base values. (e.g. Consume 5 mana points).

**Duration** and **Infinite** GameplayEffects make temporary changes to attributes' current values and apply gameplay tags that will be removed when the effect expires or is removed. (e.g. Increase MaxHealth for 30s, or Increase Strength while a sword is equipped (Infinite duration))

DurationValue defines how long the effect will last. This is ignored if durationType is **Instant** or **Infinite**.\
\
**Period** defines a periodic application. If **period** is bigger than zero (period > 0), the Modifiers will be applied every (period) seconds, while the GE is active (Duration or Infinite). Ignored if 0.\
(e.g. Health regen every period seconds)

## Modifiers

Modifiers define which attribute will change and what operation is going to be applied to its value.\
Read more in the [Modifier ](https://feliperoddd.gitbook.io/gasify/gameplay-effect-ge/modifier)section.&#x20;

## **Source & Target**

These are references to the ASCs the effect has been applied with.

## Cue Tags

Define what **GameplayCues** will be triggered when the effect is applied. Check the GameplayCues Library folder to know which prefab is associated with which tag.\
[gameplay-cue](https://feliperoddd.gitbook.io/gasify/gameplay-cue "mention")

## GameplayEffect Tags

**GrantedTags**\
**This is the most commonly used tag property.** Tags that live on the GameplayEffect but are also given to the ASC that the GameplayEffect is applied to. They are removed from the ASC when the GameplayEffect is removed. This only works for Duration and Infinite GameplayEffects.

**DescriptionTags**\
Tags that describe the GameplayEffect. They do not do any function on their own and serve only the purpose of describing the GameplayEffect.

**OngoingTagRequirementsRequired**\
If any of these tags IS NOT present continuously, this GameplayEffect will be removed

**OngoingTagRequirementsForbidden**\
If any of these tags IS present continuously, the GameplayEffect will be removed.\
\
**ApplicationTagRequirementsRequired**\
If any of these tags IS NOT present, the GameplayEffect will not apply.\
\
**ApplicationTagRequirementsForbidden**\
If any of these tags IS present, the GameplayEffect will not apply.

**RemoveGameplayEffectsWithTag**\
GameplayEffects on the Target that have any of these tags in their Granted Tags will be removed from the Target when this GameplayEffect is successfully applied.<br>

<br>
