Hi, i’m trying to make an inventory system that has similar features to breath of the wild or dark souls. I need to be able to create a large variety of weapons, where duplicates can be picked up, but each still retaining individually managed states. For example, from one weapon base class i’d like to be able to create a ‘hammer’, with specific weight, price, max damage, icon etc. Players could find multiple hammers during their playthrough, but each hammer has an individual value for durability which is lowered during gameplay, or an upgradable stat like the dark souls upgrade system.
My trouble is figuring out how to model this data in unreal in a way that serializes easily but also lets me individually edit the different items and reference them in blueprints/levels. (I have no issues programming in BP in unreal, this is a question of modeling the data in an editor/serialization friendly way). To be clear i’m not trying to serialize actors, i know this should be just data with simple variables and references.
What I’ve tried so far:
Data tables. Easy to define a struct with all the stats i want, but as development continues this means I have to make sure to reference the particular item’s row in a way that doesn’t break at runtime. If i change the order of rows, or mistakenly type an identifying string, the reference will be broken or corrup and fail to load correctly. This is very frustrating because management of data is manual and passed by value instead of reference. It also doesn’t allow for individuation of items as each one is simply a reference to the same index on a data table.
DataAssets. Works very well for editing and referencing. You can easily make as many assets from a certain primary data assset as you want, and drag and drop their references into bp/levels, excelllent! But there’s no ability to individuate them at runtime. If i have two ‘references’ of the same sword dataasset, changing any variable on the asset will change the asset everywhere (even in the origin in the editor!!)
Am I missing something about using these techniques? Am I doomed to do this all in some complicated C++ way?