Overview
BSM consists of runtime components (added to GameObjects) and ScriptableObject assets (created in the Project window). This page documents all components and their properties.
Runtime components
Data assets
GC2 integration
Save/load support
StatusEffectManagerComponent
Core component placed on any character/NPC that can receive status effects. Manages the full lifecycle: apply → tick → expire/dispel.
Inspector Properties
| Immunity Profile | Permanent immunity configuration (optional) |
| Max Active Effects | Limit total active effects (0 = unlimited) |
| Interaction Set | Reaction rules for this target (optional, falls back to EffectInteractionSet.Global) |
Key API Methods
// Apply an effect (optionally remembering who applied it)
StatusEffectInstance ApplyEffect(StatusEffectDefinition definition)
StatusEffectInstance ApplyEffect(StatusEffectDefinition definition, GameObject source)
// Remove effects
bool RemoveEffect(StatusEffectDefinition definition)
void RemoveAllEffects()
int DispelCategory(StatusEffectCategory category)
int DispelByTag(string tag)
int DispelByCleanseType(CleanseType cleanseType, int maxCount = 0)
// Stack management
int AddStacks(StatusEffectDefinition definition, int count)
int RemoveStacks(StatusEffectDefinition definition, int count)
// Queries
bool HasEffect(StatusEffectDefinition definition)
bool IsImmuneToEffect(StatusEffectDefinition definition)
bool IsOnCooldown(StatusEffectDefinition definition)
float GetRemainingDuration(StatusEffectDefinition definition)
float GetRemainingCooldown(StatusEffectDefinition definition)
// Immunity
void AddTemporaryImmunity(StatusEffectDefinition definition, float duration)
void AddTemporaryImmunityByCategory(StatusEffectCategory category, float duration)
void AddTemporaryImmunityByTag(string tag, float duration)
// Cooldown
void ClearCooldown(StatusEffectDefinition definition)
void ClearAllCooldowns()
// Source tracking (v1.2)
bool HasEffectFromSource(StatusEffectDefinition definition, GameObject source)
int CountEffectsFromSource(GameObject source)
int RemoveEffectsFromSource(GameObject source)
// Interactions (v1.2)
EffectInteractionSet InteractionSet { get; set; }
bool WouldReact(StatusEffectDefinition definition)
bool FindInteraction(StatusEffectDefinition definition, out EffectInteractionRule rule, out StatusEffectInstance present)
EffectReactionContext LastReaction { get; }
// Priority & resistance (v1.2)
StatusEffectInstance GetHighestPriorityEffect(StatusEffectCategory category)
int GetHighestPriorityInCategory(StatusEffectCategory category) // int.MinValue if none
float GetResistChance(StatusEffectDefinition definition) // 0-100
float GetEffectiveApplyChance(StatusEffectDefinition definition) // 0-1Events
event Action<StatusEffectInstance> OnEffectApplied
event Action<StatusEffectInstance> OnEffectTicked
event Action<StatusEffectInstance> OnEffectExpired
event Action<StatusEffectInstance> OnEffectDispelled
event Action<StatusEffectDefinition> OnEffectBlocked
event Action<StatusEffectInstance, int> OnEffectStacksChanged
event Action<EffectReactionContext> OnEffectReaction // v1.2
event Action<StatusEffectDefinition> OnEffectResisted // v1.2StatusEffectDefinitionScriptableObject
Defines an effect's properties, behavior, and visuals. Create via:Create → Game Creator → BSM → Effect Definition
Identity
| Display Name | Name shown to players |
| Description | Tooltip description text |
| Category | Parent category (optional) |
| Tags | Tags for filtering (e.g., "fire", "poison") |
| Icon | Sprite for UI display |
Duration & Ticking
| Duration Mode | Timed or Permanent |
| Duration | Seconds (for Timed mode) |
| Has Tick | Enable periodic tick events |
| Tick Interval | Seconds between ticks |
| Tick On Apply | Fire first tick immediately |
| Max Ticks | Limit total ticks (0 = unlimited) |
Stacking
| Stacking Mode | None, Stack, Refresh, RefreshAndStack, Extend |
| Max Stacks | Maximum stack count |
| Scale With Stacks | Multiply effects by stack count |
| Priority | Used by Exclusive categories: higher wins (default 0) |
Cooldown & Cleanse
| Has Cooldown | Prevent rapid re-application |
| Cooldown Duration | Seconds before can reapply |
| Cooldown Starts On Apply | Start cooldown on apply vs on end |
| Cleanse Type | Which dispels can remove this effect |
VFX & Audio
| Apply VFX/Sound | Prefab/clip when applied |
| Remove VFX/Sound | Prefab/clip when removed |
| Tick VFX/Sound | Prefab/clip on each tick |
| VFX Lifetime | Auto-destroy delay (0 = never) |
Resistance (v1.2)
| Apply Chance | Base success probability 0–1 (1 = always) |
| Resist Chance Stat | Target GC2 Stat read as 0–100 % chance to resist |
| Duration Resist Stat | Target GC2 Stat read as 0–100 % duration reduction |
Instructions (v1.2)
GC2 instruction lists that run directly from the definition. Self is the affected object, Target is the source/caster (or Self if unknown).
| On Apply | Runs when the effect is applied |
| On Tick | Runs on every tick (Has Tick required) |
| On Expire | Runs when the duration ends |
| On Dispel | Runs when dispelled or removed early |
StatusEffectCategoryScriptableObject
Groups effects and provides shared configuration. Create via:Create → Game Creator → BSM → Category
| Display Name | Category name for UI |
| Category Type | Buff, Debuff, or CrowdControl |
| Color | UI tint color |
| Max Concurrent | Limit active effects (0 = unlimited) |
| Replace Oldest | When at limit, replace oldest? |
| Exclusive | Only one effect of this category; higher Priority replaces, lower is blocked (v1.2) |
| Equal Priority Replaces | Equal Priority replaces (true) or is blocked (false) |
ImmunityProfileScriptableObject
Defines permanent immunities for a character. Create via:Create → Game Creator → BSM → Immunity Profile
| Immune Effects | Specific effects this entity is immune to |
| Immune Categories | Entire categories to block |
| Immune Tags | Block effects with these tags |
EffectInteractionRuleScriptableObject
One reaction between an incoming and a present effect. Create via:Create → Buff Status Effect Manager → Effect Interaction Rule
Trigger
| Incoming | Matcher for the effect being applied (Definition, Category, Category Type, Tag, Any) |
| Present | Matcher for an effect that must already be active |
| Min Present Stacks | Stack count the present effect needs (default 1) |
Outcome
| Incoming Action | Apply normally, or Block (consume) the incoming effect |
| Present Action | Keep, Remove, Remove Stacks (× Present Stacks To Remove) or Refresh |
| Present Duration Bonus | Seconds added to a kept, timed present effect |
| Result Effect | Optional effect applied to the target |
| Transfer Stacks | Result receives the present effect's stack count (capped by Max Stacks) |
Evaluation & Feedback
| Enabled | Disabled rules are skipped |
| Priority | Higher rules are checked first; only the first match fires |
| Chance | Probability 0–1 that a matching rule fires |
| Reaction VFX / Sound | Spawned/played on the target when the rule fires |
EffectInteractionSetScriptableObject
An ordered list of rules. Assign it to a StatusEffectManager's Interaction Set field, or make it the project-wide fallback with the Set Interaction Set instruction (scope: Global). Create via:Create → Buff Status Effect Manager → Effect Interaction Set
// Per target
manager.InteractionSet = mySet;
// Project-wide fallback for managers without a set
EffectInteractionSet.Global = mySet;
// Deterministic lookup (ignores Chance, no side effects)
EffectInteractionRule rule = mySet.FindMatch(incomingDefinition, manager.ActiveEffects, out var present);StatusEffectAuraComponent
Automatically applies effects to entities within a radius. Perfect for healing zones, poison clouds, or buff auras.
| Effect | The effect to apply to targets |
| Radius | Range in world units |
| Target Mode | All, AlliesOnly, EnemiesOnly, SelfOnly |
| Target Layers | Physics layer mask |
| Remove On Exit | Remove effect when leaving aura |
| Update Interval | Scan frequency in seconds |
| Active On Start | Start enabled? |
API
void Activate()
void Deactivate()
void Toggle()
void ForceUpdate()
IReadOnlyCollection<StatusEffectManager> GetAffectedTargets()StatsBridgeOptional Component
Bridges BSM effects to GC2 Stats modifiers. Add alongside StatusEffectManager on entities that use stat-modifying effects.
GC2_STATS in Player Settings.When configured, the StatsBridge automatically applies stat modifiers defined in StatusEffectDefinition when effects activate, and removes them when effects end.
StatusEffectRememberPersistence
Integrates with GC2's Save/Load system to persist active effects across game sessions. Add to any entity that should save its effect state.
Saves: Effect IDs, remaining durations, stack counts, tick progress and temporary immunities. On load, effects are restored with their correct remaining time. Effect sources (casters) are scene objects and are not persisted.