We set out with the goal of making a roguelike game so having a lot of abilities was very important to us. As a result most of my time on this project was spent working on creating a modular ability system. This system was created entirely in blueprints and allowed the creation of abilities to greatly speed up over the course of the project.
Before starting on this project I had barely any experience working with blueprints. My previous experience with coding in other engines engines (Godot, GMK, Unreal, Unity, Voxel) greatly amplified my ability to learn blueprints.
Functions required extensive comments to ensure everyone could work with it if they wanted to.
Video displaying the "Deadly Volley" ability
The video shows one of the abilities in action during the earlier stages of development. It is made using the following settings:
- Condition: When something dies
- Action 1: Create a Volley bullet at each bullets location and fire it towards the closest enemy.
- Action 2: Destroy all non Volley bullets in the room.
It took about ten minutes to make this ability including revisions. The power of the system is partially that it allows designers to prototype with visuals. Ideas for abilities can be created quickly to see if they actually work.
The system would have also allowed to shoot bullets from any other object in the room. Even things like floor tiles or walls would have been valid.
How the system works
The system consisted of three parts that all belonged to the larger struct called "S_Ability." (we followed the standard naming convention on the project.)
The first part contained information for the UI such as the ability name and color.
The second part contains all the conditions in order to make this ability trigger. (Think: When actor X does Y to actor Z for N amount of times)
And the last part are the actions, in sequence of execution, that will be executed once all the conditions are met.
Abilities could have multiple actions and conditions and designers were encouraged to mix and match as many of them as they'd like.