Posted March 28, 2025 by fralopor
This week, I focused on building the foundation for the Relics system in our game. As of now, we have two fully functional relics: one that increases a specific stat on the player’s current shadow, and another that allows players to capture the shadow they are currently battling and add it to their active shadow party structure. While developing these systems, I ran into a significant roadblock involving how we manage and manipulate data within our custom shadow-related structures—specifically, modifying values such as Individual Values (IVs), base stats, and general shadow info.
After digging into the issue, I realized the root of the problem stemmed from Unreal Engine’s handling of custom structs in Blueprints. Initially, trying to directly modify complex structs proved frustrating and inconsistent, especially when dealing with nested or deeply structured data like our "ShadowInfo", "BaseStats", and "IV's". Attempting to update individual properties manually was cumbersome and error-prone.
Thankfully, Unreal provides a more elegant solution through the use of "Set Members in Struct" Blueprint nodes. These nodes allow you to update specific fields within a struct without needing to break and rebuild the entire structure each time. By switching to this approach, I was able to cleanly and reliably apply stat modifications and shadow captures, ensuring that all relevant data was preserved and updated correctly within the shadow party system.