> For the complete documentation index, see [llms.txt](https://roogame.gitbook.io/roogame/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roogame.gitbook.io/roogame/roo-gameplay-framework/status-effects/creating-a-status-effect.md).

# Creating a Status Effect

A Status Effect Data Asset defines a Buff, Debuff, or neutral runtime effect managed by Roo Stats Component.

## Create the asset

In the Content Browser, right-click inside the destination folder and select `RooGame > Stat > Status Effect`.

Configure:

* A project-owned Status Effect Tag, for example `MyGame.Stats.StatusEffect.Burning`.
* Type: Neutral, Positive, or Negative.
* Max Stack: constant, Stat-driven, or Formula-driven integer value.
* Optional duration.
* Optional periodic Tick Interval.
* Add, Tick, and Remove actions.

Stats Designer manages Stat and Attribute roots only. Create Status Effect tags through Unreal Engine Gameplay Tags settings or project config. The included demo uses `RooRPGDemo.Stats.StatusEffect` for its example effects.

<figure><img src="https://2218703886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4YPyrdOyfjDGtlxlvjSd%2Fuploads%2Ff9l2hLct4HG2KUlvDC3V%2Fimage.png?alt=media&#x26;token=1be5d528-cb04-43c2-96f1-3d979049f0ba" alt=""><figcaption></figcaption></figure>

## Add the effect

Call Add Status Effect on the target Roo Stats Component.

Inputs:

* Status Effect: the Data Asset.
* Source Id: optional identity for the application source.
* Time Elapsed: starts the effect as though this amount of time has already passed.

Time Elapsed is useful when restoring state or applying an effect that began earlier.

## Remove and query

Runtime nodes:

* Remove Status Effect
* Clear Status Effects By Type
* Has Status Effect
* Get Status Effect Stack Count
* Get Status Effect Remaining Time
* Get Status Effect Progress
* Get Status Effect Display Remaining Time
* Get Status Effect Display Progress

Remove Status Effect removes up to Amount stacks and returns the number removed.

## Actions

Add Actions execute when a stack is applied. Tick Actions execute according to Tick Interval and Tick Execution Policy. Remove Actions execute when a stack is removed.

Each action can change a base, change or set a current value, add a modifier, or remove a modifier.

For a reversible AttackPower Buff:

1. Add Action: Add Modifier targeting AttackPower.
2. Remove Action: Remove Modifier with the same target, modifier type, and value.
3. Choose an appropriate Source Id when applying the effect.

For damage over time:

1. Set Tick Interval.
2. Add a Tick Action using Change Value.
3. Target the Health Attribute.
4. Use a negative constant or Formula result.

BlueprintNativeEvent hooks On Add, On Tick, and On Remove are also available for custom C++ or Data Asset Blueprint behavior.
