# Progress Manager

<div align="left"><figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F8zU0siRqChDAuSwWHJrc%2Fimage.png?alt=media&#x26;token=ebedaaf3-5fe2-4aff-a733-4b3d2e2fde32" alt=""><figcaption></figcaption></figure></div>

The **Progress Manager (AC\_ProgressManager)** is a simple yet powerful component that tracks player progress using a **Gameplay Tag | EProgress** map. It integrates seamlessly with the [**AI Interaction Manager** component](https://soulslike-framework.isik.vip/components-managers/ai-only-components/ai-interaction-manager), allowing dialogues to dynamically adjust based on the player's progress. Additionally, it includes a **Gameplay Event System** that can be triggered from AI dialogues or other gameplay events.

It is added to the **PlayerController** class by default **(PC\_SoulslikeFramework).**

### **How It Works**

* **Storing & Managing Progress**
  * The component maintains a **map of Progress Tags | EProgress**. Each progress state is stored persistently, allowing the system to track **which objectives, quests, or interactions** have been completed.
* #### **Adjusting Progress States**
  * `SetProgress(ProgressTag, EProgressState)`
    * Updates the current progress of a given tag.
  * `GetProgress(ProgressTag)`
    * Returns the **current progress state** of a given tag.
* **Executing Gameplay Events**
  * **`ExecuteGameplayEvents(EventsArray)`**
    * This function processes a struct (`FDialogGameplayEvent`), which contains:
      * `EventTag`: Identifies what type of gameplay event it is.
      * `AdditionalTag`: Provides extra context for event handling.
      * `Custom Data`: A flexible **Instanced Struct** that can store **any type of data** dynamically.
    * When triggered, iterates through the **array of events**, extracting necessary data and routing them accordingly.
    * Using a switch statement, determines the **type of event**, executing the desired logic according to event tag.

### Example Usage

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Fm8LTCOCOJsyz39sxrCnx%2Fimage.png?alt=media&#x26;token=547488e1-c202-48d2-b6cd-63ca178be50d" alt=""><figcaption></figcaption></figure>

### Example Usage with the NPC Dialogues

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F8tjC9enXRdeiT2gLQvGC%2Fimage.png?alt=media&#x26;token=23245cf4-e3fa-447d-8f8e-1721d73c2b24" alt=""><figcaption></figcaption></figure>

### Example on Triggering Gameplay Events through Dialogue Tables

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FdZpYmZfPSKh70kSXJxYh%2Fimage.png?alt=media&#x26;token=dd7f7606-51a8-4163-8069-2f606e064f96" alt=""><figcaption></figcaption></figure>
