Skip to content

Sein Ability Data

Struct · FSeinAbilityPayload : FSeinPayload

Parent: Sein Component Data

#include "Components/SeinAbilityPayload.h"

deterministic: safe in simulation code

The abilities an entity has: the ability classes it is granted, its Move Ability, and the command mappings that choose an ability for an order such as a right click. Add it to an entity as Sein Ability Data.

TArray<TSubclassOf<USeinAbility>> GrantedAbilities

Editable in defaults and on instances · Blueprint read-only

Ability classes granted to this entity (designer-authored on the entity bridge’s ComponentData array; instantiated at spawn into the ability pool).

TSubclassOf<USeinAbility> MoveAbility

Editable in defaults and on instances · Blueprint read and write

The ability rally points and out-of-range orders use to move this unit first. Choose a granted, non-passive Point ability with a unique Ability Tag; empty turns automatic movement off, and directly ordered abilities still work. It grants nothing and has no fallback. Changing it affects new automatic orders; queued orders keep the tag they captured.

TArray<FSeinCommandMapping> DefaultCommands

Editable in defaults and on instances · Blueprint read-only

Default command mappings for this entity. Maps input contexts (tag sets) to ability tags. The player controller’s smart-command resolver runs these to pick which ability to activate on right-click. Sorted by priority at resolve time — highest priority match wins.

See FSeinCommandMapping for detailed usage examples.

FGameplayTag FallbackAbilityTag

Editable in defaults and on instances · Blueprint read-only

Fallback ability tag when no command mapping matches. Typically SeinARTS.Ability.Move so unmapped contexts default to move. If empty, no command is issued for unmatched contexts.

C++ members (8)
  • USeinAbility* GetActiveAbility(const USeinWorldSubsystem& World) const; Resolve ActiveAbilityID to a live ability ref via the world’s pool. Returns null on INDEX_NONE / unregistered ID / null world.
  • TArray<USeinAbility*> GetAbilityInstances(const USeinWorldSubsystem& World) const; Materialize the live ability instance array from AbilityInstanceIDs. Result is sized + filled in iteration order; null entries indicate freed pool slots (rare; typically the whole component is removed before slot release). Hot-path callers iterate the IDs instead to avoid the array copy.
  • TArray<USeinAbility*> GetActivePassives(const USeinWorldSubsystem& World) const; Same shape for active passives.
  • USeinAbility* FindAbilityByTag(const USeinWorldSubsystem& World, const FGameplayTag& Tag) const; Find an ability instance by its AbilityTag. Walks AbilityInstanceIDs, resolving each ID through the pool.
  • bool HasAbilityWithTag(const USeinWorldSubsystem& World, const FGameplayTag& Tag) const; Check whether this component has an ability with the given tag.
  • bool HasAbilityOfClass(const USeinWorldSubsystem& World, const UClass* AbilityClass) const; Check whether this component holds an instance of the given class.
  • int32 GetAbilityGrantCount(const USeinWorldSubsystem& World, const UClass* AbilityClass) const; Read the outstanding grant refcount for an instance of AbilityClass. Returns 0 if the entity doesn’t hold it; otherwise the number of outstanding grants (1 = single source, 2 = two sources, etc.).
  • FGameplayTag ResolveCommandContext(const FGameplayTagContainer& Context) const; Resolve a command context to an ability tag. Walks DefaultCommands in priority order; returns FallbackAbilityTag if no mapping’s RequiredContext is satisfied. Pure data lookup — doesn’t need the world.