Status Effects — Teaching Panels¶
The Teaching folder contains a set of lightweight IMGUI panels used for learning, debugging, and hands-on testing of the Status Effects System directly inside your scenes.
These panels demonstrate application, refresh, stacking, cleansing, potency, movement/CC, saving, snapshots, and time control using the real runtime systems.
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_STATUS_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.
Panel Overview¶
| Panel | Focus | Placed in scene | Notes |
|---|---|---|---|
| StatusBasicsPanel | Build / apply / inspect | 00_StatusBasics | Registry build, preflight, the Active list, lifecycle events |
| StatusStackingPolicyPanel | Stacking policy | 00_StatusBasics, under Support Panels | Per-id caps, per-source stacks, repeat applies, queries and bulk removal |
| StatusCleanseDispelPanel | Removal & protection | 01_Cleanse_Dispel_Immunity_Resistance | Cleanse, dispel, immunity, resistance |
| StatusPotencyAurasPanel | Receiver-side scaling | 02_Potency_Auras | Potency multipliers and aura patterns |
| StatusSnapshotsTimePanel | Persistence & time | 03_Snapshots_Authority_Time | Snapshots and time modes |
| StatusSavePanel | Save files | 04_Save | Restoring active effects, and the factory line that decides whether it works |
Five scenes, six panels: 00_StatusBasics carries two, because stacking policy is the question the Basics panel raises and does not answer.
Each panel is self-contained and demonstrates one clear concept.
All panels inherit from TeachablePanelBase and use pure IMGUI. None of them binds a show/hide key. A panel draws while its component is enabled; disable the component to hide it. Each window is draggable and resizable at runtime, and each carries a Teach toggle for the explanatory text. (The one keyed component in this system is the DemoHealthDebugPanel helper under Support/, on F9, and only when ENABLE_LEGACY_INPUT_MANAGER is defined.)
Learning Goals¶
Across all panels you’ll learn to:
- Apply, refresh, and remove timed and non-timed statuses
- Configure stacking rules, caps, and per-source behaviour
- Use cleanse, dispel, immunity, and resistance policies
- Apply potency multipliers and auras safely
- Drive movement speed and crowd control via sinks
- Save and restore active effects, and see the factory line that decides whether it works
- Capture and restore status snapshots
- Switch and test time modes (scaled, unscaled, paused, custom)
Example: Apply vs Refresh¶
Teaching panels demonstrate the same call patterns your production code will use:
var ctx = StatusContext.FromAbility("venom_strike", instigator: attacker);
controller.ApplyStatus(new PoisonStatus(duration: 6f, damagePerSecond: 4f), ctx);
// ApplyStatus returns nothing. Immunity, authority or a stacking rule can refuse the
// apply, so ask the controller what actually stuck rather than assuming it did.
if (!controller.HasStatus(StatusRegistry.Id.Poison))
{
Debug.Log("Poison was refused - immune, unauthorized, or replaced by a stronger stack.");
}
No mock logic.
No demo-only shortcuts.
These panels call the real status APIs used at runtime.
Integration Tips¶
- Teaching panels are IMGUI-based and intended for Editor use 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 status application, result handling, and policy logic into your own code.
- Ignore IMGUI/layout code — it’s scaffolding only.
- Teaching panels are self-contained and do not require
Samples/to be present.
Important notes:
- Potency is absolute; implementations should recalc from base values
- Resistance affects duration centrally on apply/refresh
- Per-source stacking keys instigator/def/slot/source id — all four, and the source id is the one
StatusStackingPolicyPanel's Apply A / Apply B buttons vary - Health bridges safely no-op when Health is absent
- Custom time modes require an
ITimeSourceimplementation
Panels will surface clear warnings when dependencies are missing.
Teaching Folder Layout¶
Teaching/StatusEffects/
├─ HostileConsumers/
│ ├─ StatusBasicsPanel.cs
│ ├─ StatusSavePanel.cs
│ └─ StatusStackingPolicyPanel.cs
├─ Demos/
│ ├─ StatusCleanseDispelPanel.cs
│ ├─ StatusPotencyAurasPanel.cs
│ └─ StatusSnapshotsTimePanel.cs
└─ Support/
└─ Demo helper components used by the panels above
Samples/Systems/StatusEffects/
└─ Matching demo scenes
The split is not cosmetic. HostileConsumers panels prove the public API is usable from outside the framework — they touch nothing they do not own. Demos panels attach helper components from Support/ to a bound target so receiver-side seams can be shown in a scene that is not already wired for them, which is why they are not treated as proof of the public surface. Both use only public APIs.
Quick Review¶
| Attribute | Summary |
|---|---|
| Audience | Developers integrating or exploring Status Effects |
| Goal | Teach lifecycle, policies, and runtime behaviour |
| Style | Code-first, readable, and dependency-light |
| Location | Assets/RevFramework/Teaching/StatusEffects/ |
| Safety | Editor-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 Status Effects.
Use it to explore stacking, cleansing, potency, CC, and time control — then copy the patterns into your own UI.