Inventory Discussion: Object Items vs. Actor Items

there is a million good reasons to separate things, of course. I just wanted to add a counter point because it is very easy for some beginner to come along and misinterpret something that they think is a “best practice” and then they just make life harder for themselves.

i think you’ll find it very helpful if you consider using a single class for all inventory items and getting all static data from data table. And anything to be updated at runtime can be managed in actor components.

this way you get infinite extensibility that is modularized to components but you also get the ease of tweaking balance from spreadsheets.

based on the type of item you can find its static data from table and then add whatever behavior components needed when it is created.

this can all work with uobject or hybrid approach as well. I just would recommend test if thats necessary or not if you find the additional lifetime management to be a hassle.

this sort of data oriented approach is how I am handling everything in my games these days. minimizes total number of classes you need and moves much of the game to spreadsheets so it is easy to tweak / balance.

1 Like