Crafting System v0.2
RPG Crafting System
This is a simple crafting system for the GameDev.tv RPG course. This crafting system was highly inspired by Valheim.
Changes in v0.2
- Recipes can now have a required level specified. The player can only craft these recipes once their level is equal or above the required level
Setup
Cursor Type
- Add a new entry to the
CursorTypeenum and call itCrafting - Add a new mapping to the
PlayerControllerfor thisCursorTypeand select an icon that will represent crafting
Crafting Table
- Place a crafting table model somewhere in the scene and add the
CraftingTablecomponent to it. You can have multiple crafting tables.
Crafting UI
- Add the
Crafting UIto theUI Canvasgame object in theCoreprefab
Recipes
- Make some recipes (be sure to remove the demo recipe or it will appear in your game)
Notes
- I made an extension method for the inventory system to check if an item is in the inventory and get the amount if any. It's ever so slightly less performant, but saves me from having to change the
Inventoryclass and explain here how to do it, since I can't add it to this package. - This package is dependent on the RPG course - especially the inventory system. The UI uses sprites that are included in the course and are therefore not in this package. Sprites that are not in the course were either created by myself, or modified from course images (I made a horizontal scrollbar from the vertical ones) and are included here.