#scriptable object 'item' management.

1 messages · Page 1 of 1 (latest)

rigid mango
#

So I'm back at it again cranking away on this new project that is wildly different from anything I've ever done, and I feel like I'm beating my head against the wall over an inventory system of all things.

I'm having some issues fully wrapping my head around scriptable objects, I've used them before and they're super great, but mostly I seem to use them as a kind of Swiss army enum.

Everybody and their brother seems incredibly keen on using scriptable objects and implementing them as a key part of their inventory system, I seem to be getting hung up on exactly how it is they are instanced.

For example if I want every human NPC to have their own inventory, (a cloth I intend on cutting the player actor from as well) and I want most items to have a durability stat that gets referenced and manages when the item breaks, are SOs really the best thing for that?

Because as I understand it, any change to the value in play mode is reflected in the inspector, this changes on build after run time apparently but is this really the kind of thing I want managing 10 dozen identical copies of peasant overalls?

somber rapids
#

Ideally, you would use SOs to store the base data of Items (like name, max durability, value, armour and damage values, ...), and have individual inventory instances manage stuff like stack count or current durability. That way, multiple Inventory instances can share the same Item SO, and still have different values for each Slot.

rigid mango
#

Ok that's what I was thinking was kind of the go to move, thank you for confirming my suspicions.