Soulslike Framework Docs
  • Welcome to Soulslike Framework!
  • Framework Overview
    • About the Framework
    • Features & Systems
    • Before Purchasing
    • Personal Assistance
  • Getting Started
    • Setting up Animations
      • Setup Locomotion Blendspaces
      • Setup Custom Montages
    • Using the Utility Tools
      • Easy Setup Tool
      • Asset Creators
      • Asset Browsers
    • Actor Tags
    • Finding References
  • Workflow
    • Using a Custom Character
    • Creating & Editing Actions
    • Creating & Editing Stats/Attributes
    • Creating & Editing Status Effects
    • Creating & Editing Buffs
    • Creating & Editing Items
      • Creating & Editing Weapons
    • Creating an Enemy
    • Creating Cinematics
  • Animation Notifies
    • Damaging & Combo's
      • Register Attack Notify
      • Weapon Trace Notify
        • AI Weapon Trace Notify
      • Fist Trace Notify
        • AI Fist Trace Notify
      • Area of Effect Damage Notify
      • Spawn Projectile Notify
        • AI Spawn Projectile Notify
    • Defensive
      • Try Guard Notify
      • Hyper Armor Notify
      • Invincibility Frame Notify
    • Feedback
      • Weapon Trail Notify
        • AI Weapon Trail Notify
      • Camera Shake Notify
        • World Camera Shake Notify
      • Launch Field Notify
      • Chaos Field Notify
      • Footstep Notify
    • Miscellaneous
      • Input Buffer Notify
      • Interrupt Montage Notify
      • Camera Sequence Notify
      • Set Movement Mode Notify
      • AI State Notify
      • AI Rotate Towards Target Notify
      • Adjust Stat Notify
  • Components / Managers
    • Player Specific Components
      • Input Buffer
      • Action Manager
      • Combat Manager
      • Interaction Manager
      • Inventory Manager
      • Equipment Manager
      • Ladder Manager
      • Progress Manager
      • Save/Load Manager
      • Radar & Radar Element Components
      • Central Debug Component
    • Shared Components
      • Stat/Attribute Manager
      • Status Effect Manager
      • Weapon Collision Manager
      • Buff Manager
      • Loot Drop Manager
    • AI-Only Components
      • AI Interaction Manager
      • AI Behavior Manager
      • AI Combat Manager
      • AI Boss Manager
  • Extending Functionality
    • Using Motion Warping
    • Custom Saving/Loading
    • Adding New Settings
    • Extending Weapon Animsets
    • Weapon Specific Impact Sounds
    • Resetting Enemies After Resting
Powered by GitBook
On this page
  • How It Works
  • Adjusting Which Stats/Attributes to Initialize
  • Example Usages
  • See Next: How to Create/Edit Stats/Attributes?

Was this helpful?

  1. Components / Managers
  2. Shared Components

Stat/Attribute Manager

PreviousShared ComponentsNextStatus Effect Manager

Last updated 3 months ago

Was this helpful?

The Stat Manager (AC_StatManager) is responsible for managing all stats and attributes in the project, both for player and AI. It works similarly to the Action Manager by instantiating each stat as a UObject at runtime, based on either a provided map or a data table. This component is designed to be data-oriented and event-driven, ensuring real-time responsiveness and integration with other systems.

It is added to the Base Character class by default (B_Base_Character).

How It Works

  1. Stat Initialization:

    • At startup, the AC_StatManager:

      • Loads stats from the provided data table or Stats[] map.

      • Creates an instance of each stat as a UObject for modular and extensible management.

    • The player's class asset provides base values for the attributes.

  2. Stat Tracking:

    • Maintains a centralized map of stat instances, allowing quick retrieval through Gameplay Tags.

  3. Stat Modification:

    • Provides methods to:

      • Increment or decrement a stat by a given value (e.g., apply damage, buffs).

      • Query the current or base value of a stat.

      • Level up the player.

  4. Event Dispatching:

    • Changes to stat values automatically trigger event dispatchers, which are typically listened to by:

      • UI Widgets (e.g., updating health bars, stamina meters).

      • Other Components (e.g., triggering status effects or activating abilities).

Adjusting Which Stats/Attributes to Initialize

The Stats/Attributes a character will have depends on what the Stat Manager is provided. Stats can be provided through a data table or through the Stats[] map in AC_StatManager:

Example Usages

Adjust Stats:

Find/Get Stats:

Toggle Regeneration for Compatible Stats/Attributes:

Adjust Player Level Manually

Player level is handled automatically through attribute increase from the Campfire. However, you can also manually increase/decrease level using the Stat Manager.

Compare Stat to a Threshold Value

See Next:

How to Create/Edit Stats/Attributes?
Will adjust "MyPrimaryStat"'s Current Value by +1 and level up the player.
GetStat() will return the Stat/Attribute Object, as well as the Stat Info struct.
Will try to Toggle Regeneration on the Stat Object with the provided tag.
Will increase player level by 1.
Will check if Stamina is ≥ 25.0f.