Table of Contents

Namespace ElectricDrill.AstraRpgFramework.Stats

Classes

EntityStats

Component that manages the statistics of an entity in the game. It handles base stats, flat stat modifiers, stat to stat modifiers, and percentage stat modifiers.
Base stats can either be fixed or come from the entity's class (if one is available on the Game Object). When stats change because of a modifier of any kind, the assigned StatChangedGameEvent is raised.

StatSO

Represents a stat in the RPG system that extends BoundedValue with attribute scaling capabilities. Stats can be scaled based on entity attributes and provide equality comparison based on name.

StatSetInstance

Represents an instance of a StatSet with actual values for each stat. Implements IEnumerable and IStatContainer to provide collection functionality.

StatSetSO

A ScriptableObject that defines a collection of stats that can be used by entities. Implements IStatContainer to provide stat containment functionality.

StatToStatModifier

A ScriptableObject that defines how one stat can scale upon another stat basing on a percentage. Used to create relationships between different stats in the RPG system.

Structs

EntityStats.BulkUpdateScope

Disposable bracket returned by BeginBulk(). Dispose flushes deferred events when the outermost bracket closes. Declared as a ref struct so it cannot be boxed or captured across async boundaries — each bracket must be confined to a single stack frame.

StatChangeInfo

Immutable structure that contains information about a stat change event, including the owning entity, stat, and old/new values. Used for tracking and responding to stat modifications and for payload-aware condition evaluation.

Interfaces

IHasStatSet

Interface for objects that provide a source of stat sets. Defines the contract for accessing a StatSet that contains stat definitions.

IStatReader

Read-only interface for querying stat values from an entity. Use TryGet(StatSO, out long) as the safe access path; Get requires Contains(T) to be checked first.