Hey. I am developing inventory for the game. I would like to learn from the community the best way to implement data storage on items.
Use this link to actor I consider it absolutely wrong, as many think.
At the moment, I am more inclined to use a separate DataTable for each type of object (weapons, ammunition, etc.). To do this, I created a parent structure that describes all items (ID, price, icon) and from it I inherit structures for a particular type (for example, for a weapon the maximum number of cartridges).
But there are drawbacks: for example, when shifting an object from the chest to the inventory, you will have to transfer all the structures at once, of which only 1 will be filled. I wanted to make a wrapper using UObject, but as it turned out it doesn’t support replication and I had to refuse.
Use 1 structure and 1 DataTable for all types of items I also find wrong, as the cartridges do not need to know about the recharge time.
As you have done the inventory?