Plugin Documentation

VitalCore
Data-driven pawn vitals for single player and multiplayer

Add one Vitals component to any pawn or actor and it gets health, stamina, shields, mana or any other stat you name, with regeneration, damage resistances and armor, timed and stacking status effects, a downed state with bleed-out, death and revive, invulnerability, kill credit with assists, fall damage, stamina spending with exhaustion and save/restore. Everything is server-authoritative, replicated, and available from Blueprint and C++. Engine damage (Apply Damage, Apply Point Damage, Apply Radial Damage) just works.

v1.0
UE 4.27 & 5.8
Win64 & Mac
Category Gameplay
Replicated
C++ & Blueprint
Alpha XP

Overview

VitalCore replaces the usual hand-written "health float plus a few timers" with a complete, data-driven vitals system. Stats are defined in a data asset or inline on the component; effects are data assets; every value, timer and event is replicated from the server to all clients.

  • Any number of named stats (Health, Stamina, Shield, Mana...) with current, maximum and minimum values.
  • Regeneration per stat with a rate and a delay after damage or use.
  • Damage resistances per damage type class plus a flat armor value.
  • Shield that absorbs damage before health, with its own recharge delay and a break event.
  • Timed effects: damage or heal over time, stat drain or boost, with tick interval and duration.
  • Status effects with stacks, maximum stacks, refresh/extend policy and stat modifiers.
  • Downed state with a bleed-out timer, death and revive with a health fraction.
  • Invulnerability window after hits and revives, plus a god-mode toggle.
  • Multiplayer: server-authoritative, replicated stats and effects, events on every machine.
  • Engine damage hook: the engine's Apply Damage nodes work without extra code.
  • Hit info: last hit direction and angle, instigator tracking, kill credit and assists.
  • Fall damage from landing speed for characters, linear or curve based.
  • Save / restore of every stat and effect into one struct for your SaveGame.
  • Stamina spending with exhaustion lockout and a sprint drain helper.
  • VitalCore.Debug on-screen display and a Blueprint function library.

Requirements

RequirementDetails
Unreal Engine4.27 and 5.8
ModuleVitalCore (Runtime)
DependenciesNone (engine modules only; no other plugins are enabled)
OwnerAny actor. Pawns and characters get extra features (fall damage and sprint speed need a Character).
PlatformsWin64 and Mac (the module lists these platforms in the plugin descriptor). The code is platform-independent engine C++ with no OS-specific calls.
Network ReplicatedYes. The component replicates by default; all changes are made on the server.

Installation

  1. Install VitalCore from Fab into your engine, or copy the VitalCore folder into your project's Plugins folder.
  2. Enable VitalCore in Edit > Plugins and restart the editor.
  3. C++ only: add PublicDependencyModuleNames.Add("VitalCore"); to your Build.cs.
Verifying the installOpen any pawn Blueprint, click Add Component and search for Vitals.

Quick start

  1. Add the Vitals component to your character. It already has Health (100) and Stamina (100, +20/s after 1 s).
  2. Make sure the actor can be damaged (Can Be Damaged is on by default).
  3. From any weapon, call the engine's Apply Damage on the character. Health goes down; On Damaged fires on the server and on clients.
  4. Bind On Death to play a ragdoll or respawn; call Reset Vitals on respawn.
  5. In the console type VitalCore.Debug 1 to see every pawn's stats above its head.
Add a shieldIn Stat Definitions add an element named Shield (Max 50, Regen Rate 25, Regen Delay 3). It now absorbs damage before health and recharges 3 s after the last hit.

1. Stats

Component UVitalCoreComponent — displayed as Vitals. Stats come from an optional Data Asset UVitalCoreProfile (Add > Miscellaneous > Data Asset > Vital Core Profile) and from the inline Stat Definitions array; an inline stat with the same name replaces the profile's.

Stat definition fieldDefaultDescription
NameHealthUnique stat name.
Max / Min100 / 0Range. Health at its minimum means downed or dead.
Start Fraction1Starting value as a fraction of Min..Max.
Regen Rate0Per second; negative values decay.
Regen Delay0Seconds regeneration waits after the stat decreased.
Regen While DownedOffKeep regenerating while downed (never for health).
Component propertyDefaultDescription
ProfileNoneShared stats, resistances and armor.
Stat DefinitionsHealth 100; Stamina 100, regen 20/s, delay 1 sStats of this component.
Health Stat / Shield Stat / Stamina StatHealth / Shield / StaminaWhich stats play these roles. A missing shield stat simply disables the shield.

Runtime values are struct FVitalCoreStat (Name, Current, Max, Min, Base Max, Regen Rate, Base Regen Rate, Regen Delay, Regen Resume Time). Nodes: pure Get Stat, Get Stat Value, Get Stat Max, Get Stat Percent, Has Stat, Get Stats, Get Health, Get Health Percent, Get Shield, Get Stamina; server Modify Stat, Set Stat Value, Set Stat Base Max (Keep Percent), Set Stat Regen, Add Stat, Reset Vitals.

2. Regeneration

Every stat with a non-zero Regen Rate changes by that amount per second on the server. Any decrease (damage, drain, spending, sprint) restarts the stat's Regen Delay; damage that only hit the shield still restarts the health delay, and hits on an empty shield keep the shield waiting. Regeneration stops on death; while downed only stats with Regen While Downed continue (never health). Stamina does not regenerate while sprinting.

pure Get Regen Delay Remaining (Stat) returns the seconds until a stat regenerates again — handy for a shield recharge indicator. Status effects can add to or multiply the regeneration (see Status effects).

3. Resistances & armor

Every hit is processed in this order: Damage = Incoming × Damage Multiplier − Armor, then the shield, then health.

PropertyDefaultDescription
ResistancesEmptyList of FVitalCoreResistance: Damage Type (class), Multiplier (default 1; 0 = immune, 0.5 = half, 2 = weak) and Include Child Types (default on). All matching entries of the component and the profile multiply together.
Armor0Flat value subtracted after the multiplier. The profile's armor and Add Armor modifiers are added to it.
Minimum Damage0Smallest damage a hit deals after armor (never more than before armor). 0 lets armor block weak hits completely.

pure Get Damage Multiplier (Damage Type) and Get Effective Armor return the values in use, including status effects. server Apply Vital Damage (Amount, Damage Type, Instigated By, Damage Causer, advanced: Hit Location, Direction, Bone Name) applies damage directly and returns the health lost.

4. Shield

When the owner has the stat named by Shield Stat, it absorbs damage before health. Its regeneration rate and recharge delay are those of its stat definition, so the shield recharges on its own timer.

PropertyDefaultDescription
Shield Absorption1Fraction of each hit the shield takes while it has value (0.7 = 30% bleeds through to health).
Shield Break Absorbs OverflowOffThe hit that breaks the shield deals no damage to health beyond what passes through anyway.

event On Shield Broken fires when damage empties the shield (server and clients). FVitalCoreHitInfo reports the shield part of each hit in Shield Damage.

5. Timed effects

Data Asset UVitalCoreEffect — Add > Miscellaneous > Data Asset > Vital Core Effect.

PropertyDefaultDescription
Effect Id / Display NameNone / emptyId used to stack and remove (None = the asset name); name for UI.
Duration5Seconds (0 = until removed).
Tick Interval1Seconds between periodic changes (0 = modifiers only).
Tick On ApplyOffFirst tick immediately instead of after one interval.
ChangesEmptyList of FVitalCoreStatChange: Stat (Health), Amount (-5; negative drains/damages, positive heals/boosts), As Damage (off; a negative amount goes through resistances, armor, shield and kill credit, the stat is then ignored), Damage Type.
Scale Changes By StacksOnPeriodic amounts are multiplied by the stacks.

Ticks due when the effect ends still run, so 5 s at 1 s interval ticks exactly 5 times. Timed damage never starts the invulnerability window. Without an asset, server Apply Timed Change (Effect Id, Change, Tick Interval 1, Duration 5, Source) runs one change; applying the same id again refreshes it (an empty id gets a unique one).

ExamplesPoison: Changes Health -4, As Damage, Damage Type DT_Poison, Interval 1, Duration 6. Regeneration potion: Health +10, Interval 0.5, Duration 5. Mana burn: Mana -15, Interval 1, Duration 4.

6. Status effects

The same effect asset adds stacking and modifiers held while it is active.

PropertyDefaultDescription
Max Stacks1Stacks are capped here.
Stack PolicyRefreshOn re-apply: Refresh restarts the full duration, Extend adds the duration to the remaining time, Keep leaves the time unchanged.
ModifiersEmptyList of FVitalCoreModifier (Stat, Op, Value).
Remove On DeathOnRemoved at death and refused on dead owners.
OpEffect with N stacks
Add MaxMax + Value × N
Multiply MaxMax × (1 + (Value − 1) × N)
Add RegenRegen + Value × N
Multiply RegenRegen × (1 + (Value − 1) × N)
Add ArmorArmor + Value × N (stat ignored)
Multiply Damage TakenIncoming damage × (1 + (Value − 1) × N) (stat ignored)

Effective max is (Base Max + adds) × multipliers; the current value is clamped when the max drops. Nodes: server Apply Effect (Effect, Stacks 1, Source), Remove Effect (Effect Id, Stacks 0 = all), Remove All Effects; pure Has Effect, Get Effect Stacks, Get Effect Remaining Time (-1 = not active, 0 = no limit), Get Active Effects.

7. Downed, death & revive

PropertyDefaultDescription
Can Be DownedOffHealth at its minimum downs the pawn first instead of killing it.
Bleed Out Time10Seconds a downed pawn lasts before dying.
Downed Damage To Time0.1Seconds of bleed-out removed per point of damage while downed (0 = no damage while downed).
Allow Revive From DeadOnRevive also works on dead pawns (respawn in place).

States: EVitalCoreLifeState Alive, Downed, Dead. Nodes: server Revive (Health Fraction 0.5; minimum 0.01), Kill (Killer; ignores god mode and the downed state), Reset Vitals; pure Get Life State, Is Alive, Is Downed, Is Dead, Get Downed Time Remaining. Healing never raises the health of a downed or dead pawn: use Revive. On death, effects with Remove On Death are removed and sprinting stops.

8. Invulnerability

Property / nodeDefaultDescription
Invulnerability After Hit0Seconds of invulnerability after a hit that dealt damage (timed effect ticks do not start it).
Invulnerability After Revive1Seconds after a revive.
Set God Mode / Is God ModeOffManual toggle that blocks all damage (replicated).
Set Invulnerable For (Seconds)—Starts a window; never shortens a running one.
Is Invulnerable / Get Invulnerable Time Remaining—God mode or a running window.

Blocked hits fire event On Damage Blocked on the server with Blocked set in the hit info.

9. Multiplayer

The component replicates by default. Every change is made on the server; nodes that change state are authority only and do nothing on clients. Replicated: stats, active effects, life state, last hit, kill info, bleed-out end, invulnerability end, god mode, exhaustion and sprint state. All timers use the server world time (Get Vital Time), so remaining times read correctly on clients.

RepNotifies turn changes into the same events on clients: On Stat Changed, On Damaged, On Shield Broken, On Downed, On Death, On Revived, On Effect Applied / Stacks Changed / Removed, On Exhausted, On Exhaustion Recovered, On Sprint Changed. On Damage Blocked and On Fall Damage are server only. Set Sprinting is the one call clients may make: it is forwarded to the server with a reliable RPC (the owning client only).

OwnersControllers only replicate to their own player. In kill info on other clients use Killer Player State and Assist Player States.

10. Engine damage

With Hook Engine Damage (default on) the component binds the owner's OnTakeAnyDamage, OnTakePointDamage and OnTakeRadialDamage. The engine's Apply Damage, Apply Point Damage, Apply Radial Damage (and AActor::TakeDamage in C++) are counted once, through resistances, armor, shield and kill credit. Point damage provides the shot direction, hit location and bone; radial damage provides the direction from the explosion origin. With Negative Damage Heals (default on), negative engine damage heals health.

No double countingPoint and radial events only store the hit details; the damage itself is applied once from OnTakeAnyDamage, which the engine fires for every damage call.

11. Hit info & kill credit

struct FVitalCoreHitInfo: Damage (health lost), Shield Damage, Incoming Damage, Damage Type, Instigated By, Damage Causer, Source (credited actor: the instigating controller, else the causer's instigator controller, else the causer), Direction (travel direction), Location, Bone Name, Time, Periodic, Blocked. Get Last Hit returns it; Get Last Hit Angle returns where it came from relative to the owner's facing (0 front, 90 right, -90 left, 180 back) for hit indicators.

PropertyDefaultDescription
Assist Window10Seconds in which damage counts for credit and assists.
Assist Min Damage1Damage needed within the window to earn an assist.

At death, FVitalCoreKillInfo is built: Killer is the source of the killing blow; when the killing blow had no source (fall, bleed-out, environment) the most recent damager inside the window gets it. Assists lists the other sources, most damage first, with their player states. Get Kill Info returns it and On Death passes it. Get Recent Damage Sources (server) lists the damage per source.

12. Fall damage

For Character owners the component binds LandedDelegate and tracks the downward speed while falling.

PropertyDefaultDescription
Fall DamageOnEnables fall damage.
Fall Speed Threshold1000Landing speed (cm/s) below which nothing happens.
Fall ScalingLinearLinear or Curve.
Fall Speed Lethal / Fall Damage At Lethal Speed2000 / 100Linear: 0 damage at the threshold, this damage at the lethal speed, continuing linearly above.
Fall Damage CurveNoneCurve: X = landing speed (cm/s), Y = damage.
Fall Damage TypeNone (default type)Damage type of fall damage; resistances apply (e.g. 0.5 for a jump-boots buff).

event On Fall Damage (Impact Speed, Damage) fires on the server; On Damaged fires everywhere as usual.

13. Save / restore

pure Save Vitals returns FVitalCoreSaveData: every stat (current, base max, min, base regen, delay), every effect (soft reference to its asset, stacks, remaining time, inline changes), life state, bleed-out time, god mode, exhaustion and a Valid flag. Store it in your SaveGame object; all fields are marked SaveGame.

server Load Vitals (Data, Restore Effects = on) restores it: effects are rebuilt from their assets, bases and modifiers are applied before current values, and events fire for what changed. Stats that are not in the data keep their state; saved stats the component does not define are added.

// Blueprint-equivalent C++
MySave->Vitals = Vitals->SaveVitals();
UGameplayStatics::SaveGameToSlot(MySave, TEXT("Slot0"), 0);
// ...later, on the server
Vitals->LoadVitals(LoadedSave->Vitals);
Effect assetsEffects are saved by asset path. Effects created at runtime (not saved as assets) can only be restored when they are inline timed changes.

14. Stamina & sprint

PropertyDefaultDescription
Exhaustion Recover Fraction0.25Stamina that ran out locks spending until it is back to this fraction of its range.
Sprint Drain Rate15Stamina per second while sprinting.
Sprint Min Stamina10Stamina needed to start sprinting.
Sprint Drain Only When MovingOnNo drain while standing still (speed under 10 cm/s).
Sprint Speed0Character owners: walk speed while sprinting (0 = leave the walk speed alone). The previous speed is restored afterwards.

Nodes: server Try Spend Stamina (Amount) and Try Spend Stat (Stat, Amount) spend only when the full amount is available and the pawn is alive and not exhausted; pure Can Spend Stamina, Is Exhausted, Is Sprinting; call Set Sprinting (from the server or the owning client). Exhaustion stops sprinting and fires On Exhausted; On Exhaustion Recovered fires when spending unlocks.

Movement predictionSprint Speed is applied on the server and replicated to the owning client; the character movement may correct the client briefly when sprinting starts or stops. For fully predicted sprinting, drive the speed from your own movement component and use VitalCore only for the stamina.

15. Debug & Blueprint library

Console variable VitalCore.Debug 1 draws every Vitals owner's name, life state, god mode / invulnerability / exhaustion / sprint flags, each stat with its regeneration and delay, and the active effects with stacks and time, above the actor. It needs a HUD (the default HUD class is fine) and does nothing in shipping builds. Get Debug Text returns the same text for your own UI.

Function Library UVitalCoreLibrary — category VitalCore. Every node accepts an actor or a controller (its pawn is used).

NodeTypeDescription
Get VitalspureThe Vitals component of an actor (defaults to self).
Is AlivepureHas vitals and is alive.
Get Stat Value / Get Health PercentpureStat reads.
Apply HealserverHeals a stat (None = health).
Apply Vital DamageserverDamage through the full pipeline.
Kill / ReviveserverDeath and revive.
Apply Effect / Remove EffectserverEffects.
Get Percent Of StatpureFraction 0-1 of a stat struct.

Events

EventParametersWhere
On Stat ChangedVitals, Stat, Old Value, New ValueServer + clients (also every frame while regenerating)
On DamagedVitals, HitServer + clients
On Damage BlockedVitals, HitServer
On Shield BrokenVitalsServer + clients
On Downed / On RevivedVitalsServer + clients
On DeathVitals, Kill InfoServer + clients
On Effect Applied / Stacks Changed / RemovedVitals, Effect Id, StacksServer + clients
On Exhausted / On Exhaustion RecoveredVitalsServer + clients
On Sprint ChangedVitals, Is SprintingServer + clients
On Fall DamageVitals, Impact Speed, DamageServer

C++

#include "VitalCoreComponent.h"
#include "VitalCoreLibrary.h"

// In your character's constructor
Vitals = CreateDefaultSubobject<UVitalCoreComponent>(TEXT("Vitals"));
Vitals->bCanBeDowned = true;
Vitals->InvulnerabilityAfterHit = 0.2f;

// Server: damage, effects and stamina
Vitals->ApplyVitalDamage(25.f, UDamageType::StaticClass(), ShooterController, Weapon, HitLocation, ShotDirection);
Vitals->ApplyEffect(PoisonEffect, 1, ShooterController);
if (Vitals->TrySpendStamina(20.f)) { Dodge(); }

// Anywhere: reads
const float Health = UVitalCoreLibrary::GetStatValue(TargetActor, TEXT("Health"));
Vitals->OnDeath.AddDynamic(this, &AMyCharacter::HandleDeath);

Public headers: VitalCoreComponent.h, VitalCoreEffect.h, VitalCoreProfile.h, VitalCoreLibrary.h, VitalCoreTypes.h (all structs and enums).

Troubleshooting

SymptomCause and fix
Apply Damage does nothingThe actor must have Can Be Damaged on, the call must reach the server, and Hook Engine Damage must be on. Check god mode and invulnerability with VitalCore.Debug 1.
Nodes do nothing on clientsState changes are server only (authority). Call them from server logic or a server RPC; only Set Sprinting forwards itself.
The shield does not absorbAdd a stat named like Shield Stat (default Shield) with a max above its min.
No fall damageFall damage needs a Character owner; lower Fall Speed Threshold (a normal jump lands at about 400-600 cm/s).
Heal does nothingHealth cannot be healed while downed or dead; call Revive.
Killer is empty on other clientsControllers do not replicate to other players; use Killer Player State.
Debug text missingThe HUD must exist (default GameMode HUD class) and the build must not be shipping.

Credits

© 2026 Alpha XP — alphaxp.net · Support: support@alphaxp.net. Built for Unreal Engine 4.27 and 5.8.