Is it possible to implement with Blueprint Structs?

I working on an Inventory system, and i have an Item struct which contains the name and the value of the item, but i stuck on the idea, how can i make a proper way to contain both the item dmg and the armor it provides. The problem is, that if i use all variables in 1 struct i get a tonns of unused data if I create only a weapon (in that case armor is 0 for example, and unused).

Is there a way to implement a weapon item from the main Item struct via blueprints, and still can refers as an item obj?

Like this.

Hello,

Create a struct armor who contain dmg and armorAmount.

In the first struct put a bool bIsArmor and add a armorStruct as var.

So in this way if bIsArmor is true read the struct else don t.

You haven’t in this way tons of solutions.

The greatest solution in your case would be to create data bp only and use inheritance by this way you got your master item class who contain all infos for all objects like names,weight etc… and then inherit from the master to create item armor class where you store values like protection amount, parts of body, etc…

Thank you! I will try to fix this ASAP :smiley:

Make the question as solved plz.