Struct + Struct in UE4?

Hello everyone I’d like to create an inventory system, and what I have, is a universal struct, that contains things that items from every category should have (name, ID, description), and then I have structs for other things, such as a food struct for things that only food items should have (heal amount, eat speed). I’d like to combine the universal struct, with the struct that corresponds with any given items category. The problem is that there is no struct + struct, which means I can’t add this data into an array, how would I go about doing this?

While you can’t define a new struct using two existing structs, you can use the item blueprint classes themselves for that purpose. Lets say you have a base class Item and a subclass WeaponItem.

I would make a struct ItemInfo that contains general information and a struct WeaponInfo that contains weapon specific information (but not that general info). Then the Item blueprint has a ItemInfo variable. The WeaponItem blueprint inherits that variable, but adds an additional WeaponInfo variable. So in effect, the subclass has done “+ struct”. Does that work for your purposes?