# Creating & Editing Buffs

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F0x40TOvnAKJp8B7XRL6c%2Fimage.png?alt=media&#x26;token=dd917583-f3f6-4f41-89f0-bf025852ad72" alt=""><figcaption></figcaption></figure>

### Using the Utility Tools to Create & Edit Status Effects

1. Run the **Soulslike Status Effect Creator** from the Soulslike Framework editor dropdown or head into **/SoulslikeFramework/\_Utility/Creators** and right-click and Run Utility Widget -> **EUW\_StatusEffectCreator:**

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FKA2u13kZtfgWJvPrGum1%2Fimage.png?alt=media&#x26;token=ac31d78e-f5e7-4b3a-9875-ca7879e7e531" alt=""><figcaption></figcaption></figure>

2. Fill in the details as you desire:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F0SsLjOgYlEEvxuoDXJfd%2Fimage.png?alt=media&#x26;token=ed3a0eb6-8dec-49f0-a710-e7745ad6597d" alt=""><figcaption></figcaption></figure>

3. On the **Ranks** dropdown, you might notice something different. The **RelevantData** property is of type **FInstancedStruct**. This property can be used to send in any type of data to the Status Effect logic class. Search for **"FStatus"** to see Status Effect related structs provided by the framework:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FxJqfZ5c1wAk5CUOgedA3%2Fimage.png?alt=media&#x26;token=ea7e408e-6631-4ce1-873a-cf8a37e353f8" alt=""><figcaption></figcaption></figure>

4. For this example, lets use **FStatusEffectStatChanges** to just adjust some stats when this status effect is triggered. We'll adjust FP & Stamina:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Ff2exJhrvLLjvCNS1Ckzf%2Fimage.png?alt=media&#x26;token=c910774f-770a-47ce-bcdc-fb098735a457" alt=""><figcaption></figcaption></figure>

5. Finalize by clicking **Create Status Effect.**
6. To test your new Status Effect, put one of the actors **B\_StatusEffectArea** or **B\_StatusEffectOneShot** into your level. Configure its **StatusEffectToApply & Effect Rank** properties:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FrJZllpXFmdFeZC9Yr1JW%2Fimage.png?alt=media&#x26;token=a021c9ce-a23c-4a09-8d6e-d8204670cc20" alt=""><figcaption></figcaption></figure>

7. You will notice the new Status Effect build up when overlapping this actor:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FiSTXlNoY78DELe7LhXJe%2Fimage.png?alt=media&#x26;token=6f6e1b7e-acfa-4ae8-a137-13d6bd07f4a2" alt=""><figcaption></figcaption></figure>

8. And when Buildup reaches 100%, your Status Effect will be triggered:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Fi2yycjyfFFunjEqnl7kz%2Fimage.png?alt=media&#x26;token=23c0e28e-64c5-49d5-8fe7-201ddb1b081d" alt=""><figcaption></figcaption></figure>

### Advanced: Creating Custom Trigger Behavior

If you want a unique trigger behavior for a Status Effect , you can easily override the `EffectTriggered` function inside your new Status Effect logic class and customize it.

{% hint style="info" %}
**DA\_StatusEffect\_Frostbite** is an example Status Effect that has custom behavior. When triggered, it will reduce stamina and **decrease the player's movement speed**. You can also inspect this Status Effect to get an idea on how to implement your own custom logic.
{% endhint %}

1. Start by creating a new **Struct** and add in properties that you will be relevant for your effect. In this example, we will make our new **Plague** status effect adjust the stats of the player AND reduce the scale of the player. For this, we will add 3 properties to our struct:
   1. **FStatusEffectStatChanges** (Stat Changes)
   2. **Float** (New Scale)
   3. **Float** (Duration)

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FPkAKyMyNnprqJ2OK0sze%2Fimage.png?alt=media&#x26;token=23b4eb9e-993f-43fb-ab33-dccbfaec4f60" alt=""><figcaption></figcaption></figure>

2. Run the **Soulslike Status Effect Browser** from the Soulslike Framework editor dropdown or head into **/SoulslikeFramework/\_Utility/Browsers** and right-click and Run Utility Widget -> **EUW\_StatusEffectBrowser.**

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F0iirx3CERdX3KtorJN4M%2Fimage.png?alt=media&#x26;token=8e49544c-a578-4ba3-b77e-430a77e4ff19" alt=""><figcaption></figcaption></figure>

3. Find our new Status Effect and adjust its **RelevantData** property to use our new Struct:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F8rwJGbWarrxnPWhJdaFx%2Fimage.png?alt=media&#x26;token=c401be6f-e759-49de-9517-ffb478c27af9" alt=""><figcaption></figcaption></figure>

4. Click on **Open Logic** to open the class blueprint. Override the `EffectTriggered` method and start writing your logic. You can take a look at the **parent Status Effect Object** class and/or the **Frostbite Status Effect** for reference.

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F3UWEiOsYRICUJQapPagz%2Fimage.png?alt=media&#x26;token=17cc0f7c-ca1b-48a4-974a-7a7a50baaaee" alt=""><figcaption></figcaption></figure>

The example above will:

* Adjust all provided Stats negatively
* Set the Owner (player character)'s scale to the desired value, and after the duration, reset it back to 1.0f.

{% hint style="danger" %}
**IMPORTANT:** Overriding the `EffectTriggered` method means that you lose access to the parent trigger functionality. This means that if you create a new Rank with a different **RelevantData** type, it will not execute unless you're specifically handling that data type.&#x20;

You can *Add Call to Parent* but this might result in unwanted behavior.

An acceptable way of doing this would be through copying some of the `EffectTriggered` logic from the parent **Status Effect Object** class to your new Status Effect class.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=6Sw_i3q22HY>" %}
