In Dough or Die, players must manage and fulfill customer orders in their Grandmother's italian bakery while also building their giant bread golem to fight OTHER golems in awesome underground fights. Maybe they'll find some upgrades for the bakery along the way...
The Problem
The Dough or Die programming team created a perk system which allowed players to obtain and activate various abilities and upgrades. However, the system was spread out across too many different Blueprints and managers, and the team didn't have a unified approach to managing and accessing these perks that didn't involve copying and pasting hardcoded node sequences constantly.
What I Did
Because their team was busy with other systems, I read through their existing code base myself to ensure I could add, remove, and modify around their existing work without causing conflicts.
Dough or Die only uses Unreal Blueprint systems so I created a Blueprint Function Library containing different nodes- each meant to fulfill a different requirement or solve a different problem posed by the team.
These nodes call functions created by me inside the Game Instance Blueprint. Utilizing a minimal amount of nodes organized to enhance readability was important, especially for a large team of programmers who may or may not all be familiar with the codebase. Comments were left within the functions for clarifications.
Data Assets are King
To solve the problem of easily creating and modifying perks without needing to touch the Blueprint functions themselves, I created a system of Data Assets. Each perk is represented by a Data Asset which contains all the information about that perk- its name, description, icon, and most importantly, the nodes that need to be executed when the perk is activated (relative to a given Enum!).
This way, designers and programmers assigned to this part of the project can easily create perks within strict guidelines and cannot add extra details that could possibly break the game.