Health — Teaching Panels¶
The Teaching folder contains a set of lightweight IMGUI panels used for learning, debugging, and hands-on testing of the Health System directly inside your scenes.
These panels demonstrate how rules, shields, regeneration, combat state, and effects interact in real time.
Each panel is intentionally minimal and code-first — ideal for understanding behaviour, copying patterns, and wiring your own production UI later.
Status: Sample / Teaching UI — intended for development/testing scenes only. Not for shipping.
Define Guard:
REV_TEACHABLES+REV_HEALTH_PRESENTTeaching content never ships in a player build:
RevTeachablesBuildGuardraises a compile#errorwhileREV_TEACHABLESis set for a Player build, which is intended — a debug overlay in a shipped game is always a mistake.
To build, run Tools > RevGaming > RevFramework > Validate > Pre-Build Clean, or delete/moveAssets/RevFramework/Teaching.
Teaching Panel Categories¶
Health teaching panels are divided into two categories.
HostileConsumer¶
Panels that operate strictly through public APIs and supported extension seams.
These panels verify that the Health system can be used by an external project without internal access.
They act as API verification tools.
Demo¶
Panels designed to demonstrate behaviour interactively.
Demo panels may:
- rebuild shield stacks
- attach rules dynamically
- configure handlers for demonstration
These panels exist for learning and debugging, not API verification.
Panel Overview¶
| Panel | Category | Focus |
|---|---|---|
| RulesBasicsTagPanel | HostileConsumer | Pre-rule damage flow |
| CritExecuteBuffsPanel | HostileConsumer | Crits, execute, attacker buffs |
| DotHotStacksPanel | HostileConsumer | DOT/HOT stacks |
| RegenIFramesCombatPanel | HostileConsumer | Regen, i-frames, combat state |
| DeathFXHandlersPanel | HostileConsumer | Death pipeline |
| HealthSavePanel | HostileConsumer | What a save holds about health, and what it leaves out |
| ShieldsPanel | Demo | Shield systems & chaining |
| TeamsFriendlyFirePanel | Demo | Team damage behaviour |
| HealthDebugPanel | Demo | Live read-out of every HealthSystem in the scene |
Each panel is self-contained and demonstrates one clear concept.
All panels inherit from TeachablePanelBase and use pure IMGUI. None of them binds a Backquote toggle. A panel draws while its component is enabled; disable the component to hide it, and drag or resize the window at runtime. The one exception is HealthDebugPanel, which has a toggleKey field defaulting to F9 — it is a scene-wide read-out rather than a lesson, so it is the one panel you want to be able to hide without leaving Play Mode.
Learning Goals¶
Across all panels you’ll learn to:
- Preview and apply damage using engine-accurate calculations
- Understand rule ordering (pre-rule vs post-rule evaluation)
- Configure and test shield behaviours and chains
- Observe critical hits, execute rules, and buffs
- Manage regeneration, invincibility frames, and combat state
- Apply and inspect DOT/HOT effects and stack logic
- Test team rules and friendly-fire scaling
- Inspect death handling and effect pipelines
- See what a health save carries — and what
RestoreSnapshotdeliberately leaves out - Read every
HealthSystemin the scene at once through the debug panel
Example: Damage Preview vs Apply¶
Teaching panels demonstrate the same call patterns your production code will use:
var preview = health.PreviewDamage(ctx);
if (preview > 0)
{
var result = health.ApplyDamage(ctx);
}
No mock logic.
No demo-only shortcuts.
These panels show exactly what the runtime systems calculate.
Integration Tips¶
- Teaching panels are IMGUI-based and intended for development scenes only.
- They cannot reach a player build: the build guard raises a compile
#errorwhileREV_TEACHABLESis set for a Player build, so a Teaching panel left in a scene fails the build rather than shipping in it. - Safe to keep in dev scenes — they won’t affect runtime systems.
- Copy service calls, result handling, and rule configuration into your own UI.
- Ignore IMGUI/layout code — it’s scaffolding only.
Panels will clearly warn if required references or rules are missing.
Teaching Folder Layout¶
Teaching/Health/
├─ Demos/
│ HealthDebugPanel.cs
│ ShieldsPanel.cs
│ TeamsFriendlyFirePanel.cs
│
├─ HostileConsumers/
│ CritExecuteBuffsPanel.cs
│ DeathFXHandlersPanel.cs
│ DotHotStacksPanel.cs
│ HealthSavePanel.cs
│ RegenIFramesCombatPanel.cs
│ RulesBasicsTagPanel.cs
│
└─ Support/
HealthReasonText.cs
Teaching Support Helpers¶
The Support folder contains small helper utilities used by teaching panels.
Examples include:
HealthReasonText– maps damage rejection reasons to readable teaching text- formatting helpers shared across panels
These helpers exist purely for the teaching layer and are not part of the Health runtime API.
Quick Review¶
| Attribute | Summary |
|---|---|
| Audience | Developers integrating or exploring the Health system |
| Goal | Teach rule flow, effects, and combat behaviour |
| Style | Code-first, readable, and dependency-light |
| Location | Assets/RevFramework/Teaching/Health/ |
| Safety | Dev-scene focused; must not be shipped with scenes |
| Theme | IMGUI — consistent with all RevFramework teaching panels |
TL;DR¶
The Teaching folder is your in-engine classroom for the Health system.
Use it to explore damage rules, shields, effects, and death handling — then copy the patterns into your own UI.