forge-combat owns the damage pipeline. As of v0.2 it no longer keeps its own HP ledger: health is
HELIX native health. Every combatant is an actor with an HCharacterHealthComponent, and
forge-combat drives it through the documented native globals (DamageTarget, HealTarget,
GetHealth, IsDeadOrDying, …). Damage is still pure Lua and needs no cooked assets. The package
is decoupled from rewards: it fires events and lets content react.
This reverses the old ADR-0001 “FORGE HP is authoritative, native health neutralized via
SetEntityInvincible” model. Native health is now the single source of truth; forge-combat is a
thin, testable driver over it. Player downed/respawn UX lives in forge-health.Concepts
- Combat id. A
character_idfor players; NPCs use their own id and register a pawn. - Native-backed vs entity pool. Player pawns take damage through native
DamageTarget. NativeDamageTargetis ignored on AI (NPC) pawns, so an NPC can opt into a session-only Lua HP pool by passing{ hp = N }toRegisterCombatant. Pool combatants take damage/heal/death entirely in Lua; the pawn stays registered for position, FX and ragdoll. The pool is not persisted. - Damage validators. A veto chain: registered validators (friendly fire, invulnerability) can
block a hit before it lands. Pass
ctx = { attacker, spec }toDealDamageto run it. - Health and armor are separate pools. Native damage absorbs into armor before health; both are
surfaced (armor gets its own HUD bar). HELIX has no runtime max-health setter, so
SetMaxHPabove the native base is represented as armor. - Death is an event. For NPCs, reaching 0 fires
diedinline. For players, downed is enabled, so a player at 0 goes downed (not dead); real death arrives from the native machine (bleed-out, give-up, lethal) via the delegate bridge, avoiding a doubledied.
Exports
HP verbs
Combatants, validators, archetypes
Events
Native access (
DamageTarget, GetHealth, the death/downed delegates) goes through injectable
seams (H.PawnFor, H.Api.*), so combat logic is unit-tested headless with an in-memory fake
component, no live world needed.Configuration
forge-combat ships no content; these are fallback tunables used when a native max can’t be read.
See also
- forge-health, the player downed screen + give-up respawn over native.
- forge-gameplay-rules, the runtime toggle of downed/AutoRespawn.
