NarrativeGMC — Attribute Mapping (GAS → GMAS)¶
Overview¶
NarrativePro uses GAS UNarrativeAttributeSetBase with FGameplayAttributeData fields.
NarrativeGMC uses GMAS FAttribute structs identified by FGameplayTag.
Attribute Mapping Table¶
| NarrativePro GAS Attribute | GMAS Tag | GMC Bound | Default | Clamp |
|---|---|---|---|---|
| Health | Attribute.Health |
Yes | 100 | Min: 0, MaxTag: Attribute.MaxHealth |
| MaxHealth | Attribute.MaxHealth |
Yes | 100 | Min: 1 |
| Stamina | Attribute.Stamina |
Yes | 100 | Min: 0, MaxTag: Attribute.MaxStamina |
| MaxStamina | Attribute.MaxStamina |
Yes | 100 | Min: 1 |
| StaminaRegenRate | Attribute.StaminaRegenRate |
No | 1 | Min: 0 |
| XP | Attribute.XP |
No | 0 | Min: 0 |
| AttackRating | Attribute.AttackRating |
No | 100 | Min: 0 |
| Armor | Attribute.Armor |
No | 0 | Min: 0 |
| AttackDamage | Attribute.AttackDamage |
No | 10 | Min: 0 |
| StealthRating | Attribute.StealthRating |
No | 0 | Min: 0, Max: 100 |
GMC Bound vs Unbound¶
- GMC Bound (
bGMCBound = true): Synced via GMC's movement channel. Supports client prediction and replay. Use for attributes that change during movement (Health, Stamina). - Unbound (
bGMCBound = false): Standard UE replication. No prediction. Use for attributes that change infrequently (XP, AttackRating).
Meta Attributes (Removed)¶
NarrativePro's Damage and Heal meta-attributes are NOT mapped to GMAS attributes.
Instead, they are implemented as GMAS effects:
- UNarrativeGMCDamageEffect — directly modifies Attribute.Health
- UNarrativeGMCHealEffect — directly modifies Attribute.Health
C++ Helper Access¶
#include "Attributes/NarrativeGMCAttributeHelpers.h"
float Health = UNarrativeGMCAttributeHelpers::GetHealth(MyActor);
float HealthPct = UNarrativeGMCAttributeHelpers::GetHealthPercent(MyActor);
bool bAlive = UNarrativeGMCAttributeHelpers::IsAlive(MyActor);
float AnyAttr = UNarrativeGMCAttributeHelpers::GetAttributeValue(MyActor, MyTag);
Setup¶
- Create a
UGMCAttributesDatadata asset in your project - Add all 10 attributes with the tags and defaults listed above
- Assign the data asset to
UGMC_AbilitySystemComponent::AttributeDataAssets