How to store different structures in a structure

Honestly I’d simplify it overall. I wouldn’t pack all of that into a single parent struct.

Have an Inventory variable for each “type” of inventory item. Types would be items using the same data structure. As @3dRaven said… database. You’d have a table (variable) for each specific type following a strict field type structure (struct).

  • Health/Meds
  • Consumables
  • Ammo
  • Weapons
  • Gear
  • Armor

Keep the prototyping setup as simple as possible to reduce breaking. Once you figure out the final requirements, then start packing structures and arrays.

1 Like