So, over the past… long time, I’ve been trying to develop a weapon system similar to the one used in Borderlands, only with interchangeable parts. I’ve sort of hit a brick wall here, though, and don’t know how to continue.
The idea is this: I have a Weapon with 9 Modules. Each Module has 5 Stats (accuracy, damage, etc.) which are used as multipliers for the Stats on the Weapon itself. I’ve developed two somewhat-working systems so far that I want to combine into one. The first system I developed took default UE4 static models in a set shape/arrangement. The ModularGun (MG) BP has 9 Static Meshes which I assigned the models to. It contains in it variables for Weapon and Module structs (every Weapon has 9 Modules, and every Module has 5 Stats, not including name; detailed below). The MG BP, on gameplay start, would break the Weapon struct then break the Module struct (since I’ve run into issues with iterating through arrays of Structs), generate a random number for each Stat, repeat 8 times for a total of 9 Modules, then assemble that back into a Weapon. The screenshot below sort of details how the finished product looks.
The second system, shown in the background of the above screenshot, works a bit differently. What I had wanted to do is for each Component imported (barrel, grip, etc.) give it set stats and have the MG BP pick from available Components to assemble a gun into the above system (as in, pick from a Heavy barrel, a Fast barrel, a Standard barrel, etc.). So far, this system takes imported fbx files, randomly picks from a for now hardcoded list, and snaps it all together using sockets. This system uses SkeletalMeshComponents in the BoneTest (BT) BluePrint.
What do you all think would be a good way to combine these blueprints? I simply cannot think of one. The MG Structs are detailed below; should I maybe add another variable to the Module so that I can put Components in there? Should it be another Struct? Should I scrap this entirely and start from scratch? The MG BP uses Static Meshes while the BT BP uses Skeletal Meshes, neither of which I can reference easily. I don’t think adding a blueprint for each Component I import would be a good idea, but it sort of seems like that’s the only way I can reference them as Actors.
I apologize for the large picture sizes, I do not know how to resize them.
Any help would be much appreciated.