Forge a weapon, mix a potion – use the crafting system to create new items out of different ingredients.
Crafting Settings #
The crafting settings define some basic and default settings for the crafting system.
Crafting settings are found in Inventory > Crafting Settings & Types > General Settings.
Item Prefab Settings #
Define a default item prefab for all crafting recipes, overriding the default item prefab (defined in Inventory > Inventory Settings).
The item prefab is used when using an Item Collector component to spawn an item in a scene.
Default Audio Settings #
Crafting can play an audio clip depending on success, critical success and failed outcome.
The default settings are used by all crafting recipes, but each can override them with custom sounds.
Default Recipe Layout #
Define the default crafting recipe layout. Individual crafting recipes can override the default layout.
The crafting recipe layout is used in crafting menus to display information about a crafting recipe. You can set up how ingredients or the outcome of a recipe is listed.
Crafting Notifications #
Define notifications that will be used by the crafting system, e.g. when a new recipe was added or crafting succeeded or failed.
Learn more about notifications in this documentation.
Crafting Types #
Crafting types are used to organize crafting recipes by separating them into different types.
You’ll mainly use them to filter crafting recipes in the editor and in-game menus (menu screens). Crafting types can be sub-types of other crafting types for a more detailed organization.
The crafting type also defines the item type of it’s crafting recipes, e.g. for when they’re sold in shops or viewed in an inventory menu screen.
Crafting types are set up in Inventory > Crafting Settings & Types.
Crafting Recipes #
Crafting recipes use ingredients to create an outcome, i.e. add new items, equipment, etc. to the user’s inventory. They are set up in Inventory > Crafting Recipes.
Item Settings #
Define general item-related settings of a crafting recipe.
Enable Consume Recipe if a crafting recipe can only be used once, i.e. it works like an item, allowing the player to purchase multiple quantities of a recipe.
Price #
Crafting recipes define their purchase price in the default currency (i.e. the first currency in the editor list, index 0).
Optionally, crafting recipes can also be sold back to shops – the price settings also define how much they’re sold for, as well as if that is in percent (e.g. 50% of the buy price) or an defined value (e.g. 1 gold).
Shops can also override crafting recipe prices.
Prefab #
Crafting recipes can override the default item/crafting prefab that’ll be used by Item Collector components.
UI #
Define UI related settings for the crafting recipe.
Shortcut UI #
Crafting recipes are shortcuts and use the Shortcut UI settings to control how they’re displayed in menu screens and shortcut HUDs.
Learn more in this HUD documentation.
Portraits #
Add portraits to crafting recipes and display them in menu screens or HUDs.
Crafting recipes can also use prefab view potraits to display the prefab of the recipe as a portrait. This uses render textures and a camera.
Information Overrides #
Crafting recipes can override default number formatting, recipe layout, notifications and console texts.
Crafting Settings #
Define some basic crafting recipe settings.
Crafting Chance #
The success of a crafting recipe can optionally use a chance.
If the chance check fails, the crafting results in a fail, consuming the ingredients without creating the outcome.
Critical Chance #
Crafting can optionally have a critical outcome, similar to a critical hit in abilities or items. The critical outcome is defined separately from the regular outcome.
E.g. a critical craft could result in 2 potions instead of 1.
Audio Settings #
Optionally override the default audio settings (set up in the general settings).
Crafting can play an audio clip depending on success, critical success and failed outcome.
Use Conditions #
Allowing to use a crafting recipe can depend on valid conditions, e.g. combatant status or variable conditions.
E.g. only allow advanced crafting recipes when the user has a higher level or check a crafting-related status value.
Ingredients #
The ingredients define the items that are needed to create the outcome or critical outcome (both use the same ingredients).
Every inventory content can be an ingredient, i.e. currencies, items, equipment, other crafting recipes and AI behaviours/rulesets.
If an ingredient is consumed in the crafting process is defined by it’s chance. Set the chance to 0 to not consume an item – e.g. forging can require an anvil, but not consume it.
Outcome #
The outcome defines the items that are the result of a successful crafting attempt.
Like with ingredients, the outcome can be of any inventory content, i.e. currencies, items, equipment, other crafting recipes and AI behaviours/rulesets.
The individual outcome items can also depend on a chance.
Critical Outcome #
The critical outcome is the result of a critical success when crafting, i.e. they’re only available when using the critical chance.
The settings are the same as for the regular outcome.
Schematic #
Crafting can use schematics to implement custom systems in the crafting process.
There are different schematics available for pre-crafting, ingredients, outcome, critical outcome and failed outcome.
Dependong on which part uses a schematic, the user of the crafting recipe and the ingredients or outcome are available in the schematic.
Using crafting recipes #
Crafting recipes can be used in different ways.
Crafting menu screen #
The Crafting menu part in menu screens lists the crafting recipes of a combatant (via the combatant’s inventory), optionally separating them by crafting type.
The menu can use the crafting recipe layout to show information and available ingredients/outcome of a recipe.
Crafting list menu screen #
The Crafting List menu part in menu screens allows to add different items and try to craft something out of them – either by only using known recipes (i.e. crafting recipes in the combatant’s inventory) or allowing any recipe, learning unknown crafting recipes when successfully crafting them.
Items, equipment, etc. can be added to the crafting list via drag and drop or Inventory menu parts using the Crafting List menu action or sub-menu option.
Schematics #
Use a Use Recipe node to craft in schematics.
There are also other crafting related nodes available, e.g. adding a recipe to a combatant or the adding the needed ingredients of a recipe to a combatant’s inventory.
Shortcuts #
Crafting recipes are shortcuts, i.e. they can be used like any ability or item shortcut.
Assigning them to shortcut slots allows using them via control maps or shortcut HUDs.
Learn more about shortcut slots in this documentation.