Status Effects Using a Base Actor Component and a Data Table

Hey everyone, second post on here. Was just wondering if there was a way to implement status effects, using the architecture I’ve already made. I used a data table to store every single status effect I plan on using in my game, and I’d really like to use that data table in the implementation, so as to not waste my time and energy. I’d like to not use GAS, as while it is within the bounds of what I can do, I’d rather try and figure out a system on my own rather than using someone else’s work.

To describe what I have so far, I have an Actor Component that I use for the basis of every status effect, and I have five functions:

  • GetStatusEffects, which just returns the array of Active Status Effects
  • AddEffects, which simply adds a specified Effect to the array of Active Status Effects
  • RemoveEffects, which simply removes a specified Effect from the array of Active Status Effect
  • AttemptApplication, which is empty right now, but will help with adding these effects to the Player Character
  • StatusEffectLogic, which is somewhat empty right now, but will help adding the logic in for each StatusEffect.

I only have one variable right now, which is the ActiveStatusEffects array, as well as two EventDispatchers, which just “announce” when an effect is added or removed respectively.

I’d also like to just use a single actor component to apply these status effects, as I’d rather not have to make a whole new child actor component just to make a new status effect. However, if there is no other solution, then I can make new child actor components.

To clarify on what my goal is with these status effects, I’d like to be able to:

  • Have a specific stat be modified, like Jump Height, movement Speed, etc. (I already have Enums listed for this, so switch statements could be used)
  • Have modifiers on how those stats are modified, such as flat addition, additive multipliers, and multiplicative multipliers (I already have a firm grasp on how to implement that)
  • Have it be able to have a set duration or none at all, either being an instant or neverending effect (Useful for things like instant health or an always active buff)

And also, I’m not asking anyone to fully code this for me. I’m more so asking for guidance on how to continue with implementation, as I find it helpful to ask people for advice when doing coding. If you would like to give me coding examples or pseudocode, that would be appreciated, however!

Thanks a ton if you can and do help, it’s always greatly appreciated!