Need some advice on building an ability system in blueprints

Lemme just preface this by saying I’m a character artist, not a software developer… so please bear with me here…

I’m trying to create a single player game that has a lot of abilities that all have their own custom logic. I’m trying to figure out:

  1. Where to put all the logic for each ability
  2. How to execute the logic associated with each ability

Unfortunately the solutions I’ve come up with myself aren’t very satisfying:

  1. Shove it all in one giant monolithic blueprint (probably the character blueprint), a custom event for each ability
  2. Hook the attack button up to an enormous enum switch with every ability in the game in it, that executes the appropriate event according to the enum input

I feel like this would work, but is a really ■■■■■■ way to handle this. I’m not even sure that doing a huge switch on enum every time I use an ability is even going to be performant.

Any advice on a better way to approach this would be greatly appreciated.

I would recommend building the foundation as an actor component. Build a good portion of the logic as a parent. Then, build each ability as a child of that component. The parent will contain commonly used logic, the children contain specifics such as numbers (damage, healing, armor added, etc), visuals (emitters), sounds, etc.

The goal is that to add an ability, you create a new child and simply plug in specific numbers and other variables to achieve the desired effect. The parent already contains the logic necessary to make the configuration fairly easy and quick.

At that point, all you need to do is add the specific spells to your character. This can be at runtime or in the editor.

Thanks so much man, I did some quick testing and I think this will work perfectly for what I need!