class

MAbilitySystemComponent

Module
Game
Header
#include "Game/MAbilitySystemComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
static constexpr uint32_tkStatusDeadDead bit in AbilitySystemStateComponent::statusFlags. Default 1u << 0.
boolinitDefaultAttributesDefault true.
floatdefaultMaxHealthDefault 100.0f.
floatdefaultMaxManaDefault 100.0f.
floatdefaultMaxStaminaDefault 100.0f.

Constructors

SignatureNameDescription
MAbilitySystemComponent()MAbilitySystemComponent
~MAbilitySystemComponent() override~MAbilitySystemComponent
MAbilitySystemComponent(const MAbilitySystemComponent&) = deleteMAbilitySystemComponent

Public functions

ReturnsNameDescription
MAbilitySystemComponent&operator=
voidBeginPlay
voidTickComponent
voidEndPlay
std::vector<FReplicatedActiveEffect>GetReplicatedActiveEffectsEvery attribute (not just the six the mirror component names) and every active effect replicate as fast arrays bound to the owner's entity: the server publishes from its ASC, a ghost adopts the attributes into its ASC and keeps the effect list for UI.
int32_tGetActiveEffectCount
floatGetActiveEffectRemaining
int32_tGetActiveEffectStacks
voidInitDefaultAttributesSeed Health/MaxHealth/Mana/MaxMana/Stamina/MaxStamina/MoveSpeed and the clamp rules.
voidPushAttributesToNetStateServer → wire: copy the ASC's current attributes + dead flag into the replicated component (call each server tick before replication).
voidPullAttributesFromNetStateWire → client: read decoded attributes back into the ASC (current values).
uint16_tPredictActivationClient-side prediction On the owning client: predict the activation on the local ASC now (cost/cooldown/cue land this frame) and stamp the request the client will send the server with the returned prediction key.
uint16_tRequestAbilityActivationThe one-call client entry point: predict locally, then route the request — over the wire when this process is a connected client, straight into the authority mailbox otherwise (offline / listen local player).
uint32_tAbilityWireIdStable cross-process wire id for an ability tag — FNV-1a32 of the tag PATH.
FGameplayTagResolveAbilityWireIdGranted ability whose wire id matches, or an invalid tag.
voidExecuteGameplayCueFire a cosmetic cue EVERYWHERE.
voidExecuteLocalGameplayCue
voidConfirmPredictedActivationReconcile the server's verdict for a prediction key.
voidRollbackPredictedActivation
boolHasPendingPrediction
voidInitAttributeDelegating GAS API (full surface available via Abilities()).
floatGetAttribute
uint32_tApplyEffect
voidGrantAbility
boolTryActivateAbility
boolHasTag
AbilitySystemComponent&Abilities
floatGetAttributeValueThe reflected face: tags and attributes by their string path, since a graph pin carries neither an FName nor an FGameplayTag.
voidSetAttributeBase
boolActivateAbilityByTag
boolRequestAbilityByTag
boolHasGameplayTag
boolIsDead

Function details

MAbilitySystemComponent

C++
MAbilitySystemComponent()

~MAbilitySystemComponent

C++
~MAbilitySystemComponent() override

MAbilitySystemComponent

C++
MAbilitySystemComponent(const MAbilitySystemComponent&) = delete

operator=

C++
MAbilitySystemComponent& operator=(const MAbilitySystemComponent&) = delete

BeginPlay

C++
void BeginPlay() override

TickComponent

C++
void TickComponent(float deltaSeconds) override

EndPlay

C++
void EndPlay() override

GetReplicatedActiveEffects

C++
std::vector<FReplicatedActiveEffect> GetReplicatedActiveEffects() const

Every attribute (not just the six the mirror component names) and every active effect replicate as fast arrays bound to the owner's entity: the server publishes from its ASC, a ghost adopts the attributes into its ASC and keeps the effect list for UI. This is the list a client reads.

GetActiveEffectCount

C++
int32_t GetActiveEffectCount() const

GetActiveEffectRemaining

C++
float GetActiveEffectRemaining(const std::string& effectId) const

GetActiveEffectStacks

C++
int32_t GetActiveEffectStacks(const std::string& effectId) const

InitDefaultAttributes

C++
void InitDefaultAttributes()

Seed Health/MaxHealth/Mana/MaxMana/Stamina/MaxStamina/MoveSpeed and the clamp rules. Idempotent — safe to call again. Called from BeginPlay when initDefaultAttributes is set.

PushAttributesToNetState

C++
void PushAttributesToNetState(AbilitySystemStateComponent& net) const

Server → wire: copy the ASC's current attributes + dead flag into the replicated component (call each server tick before replication).

PullAttributesFromNetState

C++
void PullAttributesFromNetState(const AbilitySystemStateComponent& net)

Wire → client: read decoded attributes back into the ASC (current values).

PredictActivation

C++
uint16_t PredictActivation(FGameplayTag abilityTag)

Client-side prediction On the owning client: predict the activation on the local ASC now (cost/cooldown/cue land this frame) and stamp the request the client will send the server with the returned prediction key. Returns 0 when the local CanActivate check failed — nothing predicted, no request to send. Fill net.lastRequestedAbility / net.lastRequestedPredictionKey from the return and route ServerActivateAbility with them.

RequestAbilityActivation

C++
uint16_t RequestAbilityActivation(FGameplayTag abilityTag)

The one-call client entry point: predict locally, then route the request — over the wire when this process is a connected client, straight into the authority mailbox otherwise (offline / listen local player). Returns the prediction key (0 = CanActivate failed, nothing predicted, nothing sent).

AbilityWireId

C++
static uint32_t AbilityWireId(FGameplayTag tag)

Stable cross-process wire id for an ability tag — FNV-1a32 of the tag PATH. FName indices are per-process and must never cross the wire.

ResolveAbilityWireId

C++
FGameplayTag ResolveAbilityWireId(uint32_t wireId) const

Granted ability whose wire id matches, or an invalid tag.

ExecuteGameplayCue

C++
void ExecuteGameplayCue(FGameplayTag cueTag, EGameplayCueEvent event, float magnitude = 0.0f, const Vec3& location = Vec3(0.0f, 0.0f, 0.0f), MObject* instigator = nullptr)

Fire a cosmetic cue EVERYWHERE. On the authority it plays locally and fans out to every ghost through MulticastGameplayCue; off the authority it does nothing at all, because the server's multicast is what will play it — firing here too would double it on the client that asked. For a cue a client should play IMMEDIATELY as part of a prediction (the muzzle flash on the ability it just predicted), use ExecuteLocalGameplayCue: local only, never replicated, so the incoming multicast is the ghosts' copy and not a second one for the predictor.

ExecuteLocalGameplayCue

C++
void ExecuteLocalGameplayCue(FGameplayTag cueTag, EGameplayCueEvent event, float magnitude = 0.0f, MObject* instigator = nullptr)

ConfirmPredictedActivation

C++
void ConfirmPredictedActivation(uint16_t predictionKey)

Reconcile the server's verdict for a prediction key. Confirm keeps the local result; reject rolls the ASC back to the captured baseline. The authoritative attributes then converge through PullAttributesFromNetState.

RollbackPredictedActivation

C++
void RollbackPredictedActivation(uint16_t predictionKey)

HasPendingPrediction

C++
bool HasPendingPrediction(uint16_t predictionKey) const

InitAttribute

C++
void InitAttribute(FName attr, float base)

Delegating GAS API (full surface available via Abilities()).

GetAttribute

C++
float GetAttribute(FName attr) const

ApplyEffect

C++
uint32_t ApplyEffect(const GameplayEffectSpec& spec)

GrantAbility

C++
void GrantAbility(const GameplayAbilitySpec& a)

TryActivateAbility

C++
bool TryActivateAbility(FGameplayTag tag)

HasTag

C++
bool HasTag(FGameplayTag tag) const

Abilities

C++
AbilitySystemComponent& Abilities()

GetAttributeValue

C++
float GetAttributeValue(const std::string& attribute) const

The reflected face: tags and attributes by their string path, since a graph pin carries neither an FName nor an FGameplayTag.

SetAttributeBase

C++
void SetAttributeBase(const std::string& attribute, float value)

ActivateAbilityByTag

C++
bool ActivateAbilityByTag(const std::string& tagPath)

RequestAbilityByTag

C++
bool RequestAbilityByTag(const std::string& tagPath)

HasGameplayTag

C++
bool HasGameplayTag(const std::string& tagPath) const

IsDead

C++
bool IsDead() const
Generated from Game/MAbilitySystemComponent.h via game.json · Nov 5, 2026Version 1.0.0