RevFramework — Status Effects • Bridges¶
Optional interop components that connect Status Effects with the Pickups system.
These are not required for normal Status operation — they simply allow items or pickups to apply statuses using the same controller and metadata.
Overview¶
The Bridges folder provides a minimal integration layer between the Status Effects and Pickups modules.
It adds two key types:
| File | Purpose |
|---|---|
StatusApplyEffect.cs |
Pickup effect that applies a StatusEffectDefinitionBase to a target via StatusEffectController. Supports context-aware item use. |
StatusPickupEffectDefinition.cs |
ScriptableObject wrapper that defines a pickup effect which applies a configured status. |
These bridges allow pickups, consumables, or weapons to trigger status effects (e.g. Poisoned, Burning, Haste) when used — without introducing hard dependencies between modules.
What Bridges Are (and Aren’t)¶
✔ What Bridges Are¶
- An optional interop layer
- A way to reuse the Status pipeline from Pickups
- Context-safe (item source, slot index, analytics)
- Automatically excluded when Pickups is not present
✘ What Bridges Are Not¶
- Required for Status Effects
- A gameplay system
- A replication layer
- A substitute for Pickups logic
If you remove this folder, both Status Effects and Pickups continue to function independently.
Key Concepts¶
StatusApplyEffect¶
A runtime PickupEffect that applies a status through StatusEffectController.
- Uses
ApplyOrRefreshto centralise stacking and refresh behaviour - Supports both context-free and
ItemUseContext-aware application - Delegates all logic to the controller (stacking, potency, immunity, duration)
public class StatusApplyEffect : PickupEffect
{
protected override void OnApply(IDamageable damageable, GameObject target)
{
if (target.TryGetComponent(out StatusEffectController ctrl))
ctrl.ApplyOrRefresh(() => def.BuildEffect(), StatusContext.None);
}
}
When context is available, item metadata is forwarded via StatusContext, enabling:
- Source attribution
- UI feedback
- Analytics or logging
StatusPickupEffectDefinition¶
ScriptableObject authoring wrapper that exposes a status as a pickup effect.
[CreateAssetMenu(menuName = "RevFramework/Pickups/Status Effect", fileName = "StatusPickupEffect")]
public class StatusPickupEffectDefinition : PickupEffectDefinitionBase
{
public StatusEffectDefinitionBase statusEffect;
public override PickupEffect CreateCoreEffect()
=> new StatusApplyEffect(statusEffect);
}
This allows any pickup definition to apply a status without duplicating logic.
Requirements¶
- Requires the
REV_PICKUPS_PRESENTcompile define - No runtime dependency when Pickups is absent
- Safely stripped from builds without Pickups installed
Typical Use Cases¶
| Example | Behaviour |
|---|---|
| Poison Bomb | Applies a PoisonStatus on impact |
| Health Potion | Applies a RegenStatus |
| Weapon Buff Scroll | Applies temporary HasteStatus or ThornsStatus |
All effects route through StatusEffectController, preserving:
- Stacking rules
- Potency & resistance
- Immunity checks
- Status context metadata
Notes & Gotchas¶
- Safe to delete if your project does not use Pickups
- Does not handle replication — relies on your existing pickup/netcode logic
- Does not bypass authority rules on
StatusEffectController - All gameplay decisions remain in Pickups or Status, not the bridge