Data Table Reference
This page documents the data table formats expected by the gameplay systems plugins. The most common table initializes values for UCharacterAttributeSet
when calling UAbilitySystemComponent::InitStats()
.
UCharacterAttributeSet Stats Table
Create a UDataTable
using a row struct that exposes each attribute as a float
. A typical CSV export looks like:
Name,Health,MaxHealth,HeadHealth,MaxHeadHealth,TorsoHealth,MaxTorsoHealth,LeftArmHealth,MaxLeftArmHealth,RightArmHealth,MaxRightArmHealth,LeftLegHealth,MaxLeftLegHealth,RightLegHealth,MaxRightLegHealth,Stamina,MaxStamina,StaminaRegenRate,BleedResistance,PoisonResistance
Default,100,100,30,30,40,40,25,25,25,25,25,25,25,25,50,50,5,0.1,0
When imported, the row name (e.g. Default
) can be referenced in InitStats
:
AbilitySystemComponent->InitStats(UCharacterAttributeSet::StaticClass(), StatsDataTable);
Each column maps to the corresponding property in UCharacterAttributeSet
.
GameplayEffect Tables
Gameplay effects can also be organized in data tables where each row specifies the effect class and default level. The table is then queried when applying effects via the ability system. A minimal JSON example:
[
{ "Name": "Bleeding", "Effect": "/Game/GAS/GE_Bleed.GE_Bleed", "Level": 1 },
{ "Name": "Heal", "Effect": "/Game/GAS/GE_Heal.GE_Heal", "Level": 1 }
]
Import this JSON as a data table using a struct with FSoftClassPath Effect
and int32 Level
fields.
UProjectileArchetypeDataAsset
Projectile archetypes define the physical and damage properties of each ammo type. They are usually stored as UPrimaryDataAsset
objects but can also be bulk imported from JSON. Required fields include mass, caliber, velocity, and damage information.
Example JSON snippet:
{
"ArchetypeName": "9mm Ball",
"ProjectileBehaviorType": "PT_Hitscan",
"RoundType": "RT_FMJ",
"BaseMassKg": 0.0075,
"BaseCaliberMm": 9.0,
"BaseInitialVelocity": 350.0,
"BaseDamageAmount": 20.0,
"DirectDamageGameplayEffectClass": "/Game/GAS/GE_ProjectileDamage.GE_ProjectileDamage"
}
UArmorArchetypeDataAsset
Armor archetypes define base durability and coverage for wearable pieces. They reference a material asset and specify which limbs are protected.
Example CSV snippet:
ArchetypeName,MaterialType,BaseMaxDurability,BaseArmorThicknessCm,BaseWeightKg,CoverageTags
"Basic Helmet","DA_Steel",100,0.5,1.2,"Tag.Limb.Head"
The CoverageTags
column contains a comma-separated list of GameplayTags describing which limbs the armor protects.
Data Flow Overview
The following diagram summarizes how table data is converted into assets and then consumed by the gameplay systems. CSV or JSON files are imported into Unreal as Data Assets, which then feed the four systems: Damage System (DS), Limb Health System (LHS), Armor System (AS), and Projectile Damage System (PDS).