Table of Contents

Namespace ElectricDrill.AstraRpgFramework.Attributes

Classes

AttributeSO

Represents a character attribute that extends BoundedValue functionality. An attribute is a measurable characteristic such as strength, dexterity, luck, and so on. Can have a min and a max value.

AttributeSetInstance

Represents a runtime instance of an AttributeSet with actual values for each attribute. Provides methods to manipulate and access attribute values during gameplay.

AttributeSetInstanceExtensions

Extension methods for converting SerializableDictionary to AttributeSetInstance.

AttributeSetSO

A ScriptableObject that defines a collection of attributes for use in character systems. Attribute sets are usually used to group attributes that can be shared across different characters or classes. For example, any character of any class could have the same attribute set, including attributes like strength, dexterity, constitution, intelligence, and luck.

EntityAttributes

Manages the attributes of an entity. This component calculates attribute values by combining base values, flat modifiers, percentage modifiers, and spent attribute points. It requires an ElectricDrill.AstraRpgFramework.Attributes.EntityAttributes.EntityCore component on the same GameObject.

FixedAttributeValues

Serializable wrapper around a set of fixed base attribute values. Usable inline in a MonoBehaviour field or embedded in a dedicated ScriptableObject.

FixedAttributeValuesSO

Standalone asset holding fixed base attribute values, reusable across multiple EntityAttributes components. Mirrors the inline FixedAttributeValues wrapper's shape but owns its own AttributeSetSO reference so it's self-contained.

Structs

AttributeChangeInfo

Immutable structure that contains information about an attribute value change. Used to track and communicate attribute modifications across the system and for payload-aware condition evaluation.

AttributePointsChangeInfo

Immutable structure that contains information about an attribute-points budget change (available and/or total attribute points moving), raised whenever level points, bonus points, or per-attribute spend/refund alter the budget.

EntityAttributes.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.

Interfaces

IAttributeReader

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

IFixedAttributeSource

Supplies fixed (non-class-derived) base attribute values to an EntityAttributes component. Implementations can back this with the inline FixedAttributeValues wrapper, a dedicated ScriptableObject asset, or any custom data source (save files, procedural generation, live-ops config) via SetFixedAttributeSource(IFixedAttributeSource).

IHasAttributeSet

Interface for objects that expose an AttributeSet definition.