I’d like some advice regarding how to approach implementing a system like this in UE4. I’m still relatively new to Unreal and am still getting back in the swing of coding, especially in C++, and so wanted to get opinions from more experienced, current developers. I won’t lie- asking questions also helps me think about the problem more. ANyway. here we go, and thanks/apologies to any who read all the way through:
The requirements:
I’d like to implement a faction and weight class system. Each character can belong to 1 of several different factions and 1 of 3 different weight classes.
Factions
- affect animation (e.g. running, jumping)
- restrict what equipment is usable
- control base statistics (e.g. additional health)
- provide additional abilities beyond the default (e.g. being able to wall jump, having a “mana” resource)
- influence the character model used
Weight
- further affects base stats
- further restricts which equipment is usable
- influence the character model used
How I’d like to Approach this:
Currently, I have a default character class that contains the basic, vanilla stats and functionality that all characters should have. It has health, it can run/jump/attack, has an inventory, a faction and weight etc etc. To create a new faction, I would extend this default character class to include any new, aforementioned abilities and difference to the vanilla stats and assign a faction type. Based on this new faction class, I would create 3 new blueprint that would further modify stats, as needed, assign a weight class, link the animation blueprint for the faction, and assign the character model created for that weight class/faction combo.
Thinking:
I’d ideally like to approach this by keeping base functionality in code and delegating simple things, like stats, or things related to art content, like which model to use to data blueprints. Furthermore, factions should be modular, with the ability to easily expand on and add to the current roster. Weight classes should be editable on a faction-by-faction basis in order to facilitate balancing.
Is my thinking on this right or is there a better way to approach this in Unreal? Specifically, is there a better way to implement additional character functionality, like the wall jump or “mana” resource? Is the handling of weight classes via blueprints clumsy or bulky?