🧪 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, shields, thorns, 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_STATUS_EFFECTS_PRESENT⚠️ If a Teaching panel is present on a GameObject in a shipped scene, it will be visible and interactive at runtime.
Shipping with Teaching panels attached is a developer error, not a framework bug.
🧩 Panel Overview¶
| Panel | Focus | Notes |
|---|---|---|
| StatusBasicsPanel | Apply / refresh / stacking | Presets, caps, per-source stacks, lifecycle events |
| StatusCleanseDispelPanel | Removal & protection | Cleanse, dispel, immunity, resistance |
| StatusPotencyAurasPanel | Receiver-side scaling | Potency multipliers and aura patterns |
| StatusMovementCcPanel | Movement & CC | Slow, haste, stun via movement sinks |
| StatusShieldsThornsPanel | Defensive bridges | Shields and thorns via Health bridge |
| StatusSnapshotsTimePanel | Persistence & time | Snapshots and time modes |
Each panel is self-contained and demonstrates one clear concept.
All panels inherit from TeachablePanelBase, use pure IMGUI, anchor top-left, and toggle with the Backquote (`) key.
🎯 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
- Bridge statuses into shields and thorns
- 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(source);
var result = controller.Apply("poison", duration: 6f, magnitude: 1f, ctx);
if (!result.Success)
{
Debug.Log(result.ToUserMessage("Apply"));
}
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 are excluded from player builds unless explicitly enabled and left in a scene.
- 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
- 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¶
StatusEffects/
├─ Teaching/
│ ├─ StatusBasicsPanel.cs
│ ├─ StatusCleanseDispelPanel.cs
│ ├─ StatusPotencyAurasPanel.cs
│ ├─ StatusMovementCcPanel.cs
│ ├─ StatusShieldsThornsPanel.cs
│ └─ StatusSnapshotsTimePanel.cs
└─ Samples/
└─ Matching demo scenes
🧠 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/Runtime/Systems/StatusEffects/Teaching/ |
| 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.