For an inventory item system, would a PrimaryDataAsset, Object and Actor be overkill?
Would having a primary data asset, UObject and possibly an actor be overkill for what defines an item in my game?
I have been working on a slot based inventory system with items defined as PrimaryDataAssets containing a struct for base item properties. I have a wrapper struct for slots that holds the item struct and a quantity.
My inventory component has a TArray of the wrapper slot struct to track item orders and quantities in an inventory.
The item primary assets are loaded using the asset manager and data from the assets populate the wrapper structs' item struct when an item is added to the inventory.
Now I am onto the "logic" of items. I would like all items to have some base functions like OnUse, OnPickup, make use of inheritance, and store data that would be needed at runtime like durability or random stats.
I was thinking a UObject for all items, including one for each "stack" of an item, and an optional Actor soft reference on the primary data asset for items that can be dropped in the world. The object and actor could have a reference to the data asset they are associated with.
I am not sure if I am making this harder than it has to be...my goal is to support a large number of items in inventories and the game world.