So I’m making a survival game, but I’m stuck with the inventory and crafting system. I’ve made the inventory system by following this tutorial:
I want to create a crafting system, but I'm out of ideas. Any ideas on how to make a crafting system, using this inventory system, or maybe a new and simple inventory system, in order to make the crafting system?? :DIm not sure how that system works, but in theory, a simpler method might be:
Create an array of gameobjects
Get a gameObject thats actually just a panel with a image component attached to it, to store the visual of the item
Display these items in a certain order, however you choose, 4 x 4, 5 x 5, 9 x 2, whatever…
Then, have a “Crafting” or Formula Sheet" with your inventory, so when certain items are combined, it checks if its a real “craft” that exists.
For example, in your “Formula sheet”, 10 steel + 4 iron + 1 magic rod = Enchanted Sword, so if they only have 9 steel and try to craft something, the result is nothing, unless you have something to compensate for 9 steel as well.
Another way you could do it is, check both items. For example, if its steel + iron, its a sword, if its iron + tree bark, its a staff, and so on.
Theres 101 ways you can approach it, I guess it all really depends on exactly what your planning to do, how YOU specifically want both your inventory and crafting system to work. You can even go really advanced to the point that items have “quality” to them, and “durability”, and a chance of being destroyed in the process, and so on.