Asset Database and Inventory System

I’ve been watching many tutorials on creating an asset database and inventory system. I’ve about decided to make a custom editor script. My original idea was to have one massive list of items so that I can make random loot based on the a random number or have a specific item generated. The question comes should I have one massive list or break it up into specific items. One db list for armor, one for weapons since each will have a different set of attributes. I have a base item script with: id, name, description, value, weight, and a texture 2d for the icon.

Some things like weapons will have prefabs so you can see and use them once equipped. Armor needs a texture so you can apply it to a model body in the inventory. Any help would be appreciated. Also planning random encounters with a mob list. Thanks!

I think it depends upon how you wish to structure your game and how many items you want to have in your game. it’s a bit of an open question. Personally, i prefer a bit of semi-randomness maybe have each mob maybe drop 1 or 2 items from a list of (for example) 10-20 different loot objects. so a guard may drop a sword or a shield or a health potion or some papers or whatever but would never drop a blanket or a bunch of flowers, where as a farm-hand may drop the blanket or flowers but never drop a shield…

for ease i would probably go with one big list of items, with a number of attributes for each item. and have something like a string for the item name, an int for a unique identifier number, another string for a path to the item icon, an item type enum. then a number of ints /floats/strings etc after. these trailing vaules can be assigned totally different uses depending on what the value of the item type is. for example the first int after the item type could be used to store a power value if it’s a weapon, if it’s armour that same int could be used to store defence, if its a potion then the number could be used to dictate what the magical value of the potion is (0 = health, 1 = magic)