forge-gameplay-rules is a thin, testable wrapper over HELIX’s native gameplay-rules system
(HGameplayRulesetComponent, which lives on the GameState). Rules are tag-based (GameplayRule.*
tags), either toggle (bool) or scalar (number). Base values are authored per-experience;
this package exposes server-authoritative runtime overrides behind FORGE’s Result convention.
Its first consumer is forge-health, which toggles the downed state and
auto-respawn at boot.
Concepts
- Toggle vs scalar. A rule is a boolean flag or a number. Read with a default; override at runtime.
- Overrides are server-only and reversible.
Override*sets a value;ClearOverride/ClearAllrestores the experience’s base value. - Reads are always safe. If the ruleset component isn’t up yet (no GameState), a read returns the
supplied default with
source = "default"rather than failing.
Exports
Well-known tags
Creators may read or override any
GameplayRule.* tag, not just these.
Result codes
Configuration
Enabled = false to register the service inert (all overrides then reject). Ships no content.