Hey there.
So I’ve got an inventory set up that stores a list of ScriptableObjects that make up all of my items, including weapons and armour, etc., as well as a “Spellbook” section for holding all of the player’s spell objects. The player can equip a sword SO that references a mesh, which will be displayed on screen, but all of the damage calculation happens through the stats held within the SO.
ScriptableObjects are great for quickly creating objects inside the editor, but if I want to implement some sort of system where the player can create their own objects with custom stats, is there any way to do this with SO’s?
I want the player to be able to go into a spellmaking interface, where they can select a “Fire Projectile” or “Heal Self” type and then set the variables for damage and speed inside that interface, then save all of this to a spell object that gets added to the “Spellbook” list. I guess what I’m describing is the process of making a SO through “Assets->Create” in the editor, but in the game instead. Is this possible?
This concept also extends to creating enchantments for weapons and armour as well. If the player has an Iron Sword that’s the same as all the other Iron Swords (due to being created through a SO), and they want to create an enchantment that modifies the damage of that weapon, or the weight or any of the predefined stats from the SO, would this be possible?
Basically will SO’s work with these ideas or will I have to go back to using prefabs with monobehaviours?
Thanks, hopefully that all made sense!