Struct formats?

Fist person shooter. I’m trying to create a weapon manager blueprint, one script that handles all the firing logic and will be fed by “weapons” made of structs telling it the range, spread, pellets per shot, etc. I want to make 1 struct that I can then base all the weapons off of, so that if I add a variable to the main struct, all the others will get it too, but with each of them storing their own data for it. I know it was possible to do this sort of thing in unity (though I don’t remember how).

Follow up question, how do I then take the same variable from different structs depending on which weapon I have selected? For instance, one node that reads blunderbussdamage and then flechette gundamage when I change guns?

If you want inheritance you probably need to make a blueprint class

I would say create a base blueprint class (let’s say BP_Weapon_Base) inheriting from Primary Data Asset

Then create children of it for each of your weapons
Any variable or method that the base class has will be inherited by your children classes

Then in your weapon manager, you can have a reference to a BP_Weapon_Base object, and if you assign for example BP_Weapon_Blunderbuss to that and access the Damage value, the blunderbuss’ damage will be read

So then the only thing you’d need to do is somehow, when changing weapons, notify the weapon manager what your current weapon is (or have the manager react to for example a OnChangedWeapon event)