Crafting System UI [OUT OF COURSE CONTENT]

Alright so, I want to start working on the Crafting System on my game. My question here is, let’s assume I start with the Bank Setup we created in this thread by Brian, where I hit the UI off by copy-pasting my bank prefab and then tuning it to be an individual ‘Crafting UI’ prefab. What changes do I need to make to ensure the Inventory and my new Crafting UI can communicate effectively? I tried re-creating the UI solo, it was a bit of a nightmare tbh… Also what scripts will I need to include, and where? I just want a rough idea of what each script is expected to do, and I’ll give coding them an attempt on my own, before getting into debugging

I want to have 9 slots to input the crafting items from my inventory to craft a recipe, wait for some time (depending on the item you’re crafting) and then release the product on an individual 10th slot, and there’ll be a button in the middle to begin the crafting process, something that looks like this (but with 9 input slots, one output slot, probably a timer (still debating in my head on that one) and a cog button that does the crafting):

It’s quite possible that in this case, you may be putting the cart before the horse. UI should generally follow the underlying data…

First, we need a recipe, most logically in the form of a ScriptableObject holding the data for the recipe…
That’s a fairly simple one… a list of Ingredients (Inventory Items), and a resulting item that the recipe builds, along with other useful information such as crafting time.

You’ll need a component responsible for holding the recipes and waiting through the crafting process.

That may be quite a few ingredients at once… you may find it helpful to reduce the number of ingredients, and for things that would require a large amount of ingredients, break them into smaller recipes… For example, in World of Warcraft’s crafting system, most items are 2-4 components to make, but those may be intermediate components… so that then the intermediate components might take 2-4 components together to make the next stage, etc.

One issue I see that can be tricky with our existing drag and drop system is what happens if a player drags the ingredients into the crafting window (at which point, they are removed from the Inventory), what happens if the player closes the crafting window?

One solution may be to have the crafting window fill itself out… Putting a greyed icon of the required item in the CraftingSlotUI, making it the full icon if Inventory.HasItem() the item… Then nothing is actually removed from the player’s inventory until the target item is crafted.

Just some ideas for a starting point.

That’s an interesting one, and I absolutely believe we will return to try solve this problem out… For the moment, I’ve recently finished my draft of the User Interface, and I’m trying to get my Crafting table to actually get the UI to show up when we click on it. If you go to the bank forum, I left a question regarding this there, as my cursor doesn’t even identify the crafting table to begin with (Edit: 3 hours later, still can’t figure out why…!)

Privacy & Terms