Skip to content

Entity Stats

Overview

Entity stats define numeric attributes such as health, stamina, mana, and oxygen that are tracked per entity. Each stat file declares the value range, optional regeneration rules with conditional logic, and threshold-triggered effects. Stats are consumed by the combat system, movement system, and effect system to gate abilities, apply damage, and trigger status changes.

File Location

Assets/Server/Entity/Stats/

One JSON file per stat:

Assets/Server/Entity/Stats/
Ammo.json
DeployablePreview.json
GlidingActive.json
Health.json
Immunity.json
MagicCharges.json
Mana.json
Oxygen.json
SignatureCharges.json
SignatureEnergy.json
Stamina.json
StaminaRegenDelay.json

Schema

Top-level fields

FieldTypeRequiredDefaultDescription
InitialValuenumberYesStarting value of the stat when the entity spawns.
MinnumberYesMinimum value the stat can reach. Can be negative (e.g. stamina overdrawn state).
MaxnumberYesMaximum value the stat can reach. 0 means the cap is set dynamically (e.g. by equipment).
SharedbooleanNofalseIf true, the stat value is synchronised to all nearby clients for HUD display.
ResetTypestringNoHow the stat resets on respawn. Known value: "MaxValue" (resets to Max).
IgnoreInvulnerabilitybooleanNofalseIf true, modifications to this stat bypass invulnerability checks.
HideFromTooltipbooleanNofalseIf true, the stat is hidden from the player-facing tooltip UI.
RegeneratingRegenRule[]NoList of regeneration rules evaluated in order. Multiple rules can stack or conflict.
MinValueEffectsThresholdEffectsNoInteractions triggered when the stat reaches its minimum value.
MaxValueEffectsThresholdEffectsNoInteractions triggered when the stat reaches its maximum value.

RegenRule

FieldTypeRequiredDefaultDescription
$CommentstringNoHuman-readable note ignored by the engine.
IntervalnumberYesSeconds between each regeneration tick.
AmountnumberYesValue added (or subtracted if negative) per tick.
RegenType"Additive" | "Percentage"YesAdditive adds a flat value; Percentage adds a fraction of the max.
ClampAtZerobooleanNofalseIf true, the regen tick will not push the value below zero.
ConditionsCondition[]NoAll conditions must be met for this rule to be active.

Condition

FieldTypeRequiredDefaultDescription
IdstringYesCondition type identifier. Known values: "Alive", "Player", "NoDamageTaken", "Stat", "Wielding", "Sprinting", "Gliding", "Charging", "Suffocating", "RegenHealth".
InversebooleanNofalseIf true, the condition is negated (must NOT be met).
DelaynumberNoSeconds that must elapse since the condition was last true. Used with "NoDamageTaken" to create regen delays.
GameModestringNoRequired game mode. Used with "Player" condition, e.g. "Creative".
StatstringNoStat ID to compare against. Used with "Stat" condition.
AmountnumberNoThreshold value for stat comparison. Used with "Stat" condition.
ComparisonstringNoComparison operator. Known values: "Gte" (greater-than-or-equal), "Lt" (less-than).

ThresholdEffects

FieldTypeRequiredDefaultDescription
TriggerAtZerobooleanNofalseIf true, fires when the stat reaches exactly zero rather than the actual min.
InteractionsobjectNoContainer with an Interactions array of interaction objects (e.g. ChangeStat, ClearEntityEffect, ApplyEffect).

Examples

Health (Assets/Server/Entity/Stats/Health.json):

{
"InitialValue": 100,
"Min": 0,
"Max": 100,
"Shared": true,
"ResetType": "MaxValue",
"Regenerating": [
{
"$Comment": "NPC",
"Interval": 0.5,
"Amount": 0.05,
"RegenType": "Percentage",
"Conditions": [
{ "Id": "Alive" },
{ "Id": "Player", "Inverse": true },
{ "Id": "NoDamageTaken", "Delay": 15 },
{ "Id": "RegenHealth" }
]
},
{
"$Comment": "Player in creative mode",
"Interval": 0.5,
"Amount": 1.0,
"RegenType": "Percentage",
"Conditions": [
{ "Id": "Alive" },
{ "Id": "Player", "GameMode": "Creative" }
]
}
]
}

Immunity (Assets/Server/Entity/Stats/Immunity.json):

{
"InitialValue": 0,
"Min": 0,
"Max": 100,
"Shared": true,
"Regenerating": [
{
"Interval": 0.1,
"Amount": -0.1,
"RegenType": "Additive"
}
],
"MaxValueEffects": {
"Interactions": {
"Interactions": [
{
"Type": "ApplyEffect",
"EffectId": "Immune"
}
]
}
}
}