# Status Effect Manager

<div align="left"><figure><img src="/files/Pxb9F1D6r6SRb7Q5t5rd" alt=""><figcaption></figcaption></figure></div>

The **Status Effect Manager (AC\_StatusEffectManager)** is a lightweight yet essential component responsible for managing status effects in the project, for both player and AI. It provides functionality to add, track, and manage the buildup and decay of status effects, ensuring seamless integration with gameplay mechanics.

It is added to the **Base Character** class by default **(B\_Base\_Character).**

### **How It Works**

1. **Adding Status Effects**:
   * Status effects can be added dynamically via multiple methods:
     * `TryAddStatusEffect`
     * `StartBuildup`
     * `AddOneShotBuildup`
   * When added, the manager checks if the effect is already active:
     * **If Active**: Won't re-instantiate the effect.
     * **If New**: Will insantiate the relevant UObject for the status effect and start tracking it.
2. **Tracking Active Effects**:
   * Keeps a map of active status effects for quick lookup.
3. **Buildup and Decay**:
   * Buildup mechanics allow effects to accumulate gradually over time (e.g., poison buildup from multiple hits).
   * Once the buildup threshold is reached, the effect activates fully.
   * Effects automatically decay or are removed based on their duration or external triggers.

### Example Usages

**B\_StatusEffectArea & B\_StatusEffectOneShot** are great example actors that demonstrate how the Status Effect Manager component can be utilized.

<figure><img src="/files/rdlUadumubn2qD7qeDvd" alt=""><figcaption></figcaption></figure>

#### Start/Stop Buildup:

<figure><img src="/files/YrquS2B4MQ24SL4E10pT" alt=""><figcaption></figcaption></figure>

#### Add One Shot Buildup:

<figure><img src="/files/WpPt6hcKaOLmmYWyOSca" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Both of these functions will call `TryAddStatusEffect` if the target Status Effect is not active. So it almost never has to be called manually.
{% endhint %}

### See Next: [How to Create/Edit Status Effects?](/workflow/creating-and-editing-status-effects.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://soulslike-framework.isik.vip/components-managers/shared-components/status-effect-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
