Skip to content

ASAttributeSet

PT | EN
Inherits: Resource

Resource managing a collection of attributes and unlocked abilities.

Description

[ASAttributeSet] defines which attributes an actor has and which abilities are permitted for use (unlocked).

Properties

TypeNameDefault
ASAttribute[]attribute_definitions[]
Definitions for each attribute (limits, base).
Dictionary[]attribute_drivers[]
List of rules that drive an attribute value based on another (e.g., Strength driving Attack).
ASAbility[]unlocked_abilities[]
Abilities permitted for use by the actor.

Methods

ReturnName
voidadd_attribute_definition( attribute: ASAttribute)
Adds an attribute definition to the set.
voidadd_modifier( name: StringName, value: float, type: int = 0)
Adds a modifier to an attribute’s current value.
floatget_attribute_base_value( name: StringName) const
Returns the base value of the specified attribute.
ASAttributeget_attribute_definition( name: StringName) const
Returns the definition of the specified attribute.
StringName[]get_attribute_list( ) const
Returns a list of all attribute names in the set.
floatget_attribute_value( name: StringName) const
Returns the current value of the specified attribute.
boolhas_attribute( name: StringName) const
Returns true if the set contains the specified attribute.
voidremove_attribute_definition( name: StringName)
Removes an attribute definition from the set by its tag name.
voidremove_modifier( name: StringName, value: float, type: int = 0)
Removes a previously applied modifier from an attribute.
voidset_attribute_base_value( name: StringName, value: float)
Sets the base value for a specific attribute.

Signals

  • attribute_changed( attribute_name: StringName, old_value: float, new_value: float)

    Emitted when a value changes.

Constants

NameValue
MODIFIER_ADD0
Addition modifier type.
MODIFIER_MULTIPLY1
Multiplication modifier type.