CRAFT 04 Crafting Proficiency & Critical Crafting

In this tutorial we’ll add crafting proficiency and critical crafting outcomes.

This tutorial continues the sub-series for setting up crafting.

We’ll use a global float variable for our proficiency system (key craftingProficiency) – you can also use a status value, but in that case the proficiency is bound to a single combatant. The global variable allows us to have a crafting proficiency independent from the used combatant.

The proficiency will be increased a bit by each craft and is used to check for critical outcome. A critical outcome will increase the proficiency even more and, depending on the item, add an additional item or increase the stats of crafted equipment. This’ll be done by using schematics.

We’ll also use the proficiency as conditions to lock some recipes until the player has crafted enough.

Crafting Success Schematic #

This schematic will be used by a regular crafting outcome and increase the proficiency by 0.1 to 0.3.

Change Variables #

Add Node > Value > Variable > Change Variables

This node is used to change variables, we’ll use it to increase our craftingProficiency.

Click on Add Variable.

  • Change Type
    Select Variable.
  • Variable Key
    Set to craftingProficiency.
  • Variable Origin
    Select Global.
  • Type
    Select Float.
  • Operator
    Select Add.
  • Float Value
    Select Value > Random.
    Set the first value to 0.1 and the second value to 0.3.

And that’s it for the schematic. Click on Save Schematic to save it, e.g. as CraftingSuccess.

Critical Crafting Success Schematic #

This schematic will be used by a critical crafting outcome and increase the proficiency by 0.5 to 1.

We’ll adjust the CraftingSuccess schematic and save it as a new schematic using the Save Schematic As … button.

Change Variables #

Change the Float Value setting.

  • Float Value
    Select Value > Random.
    Set the first value to 0.5 and the second value to 1.

And that’s it for the schematic. Click on Save Schematic As … to save it as a new schematic, e.g. as CriticalCraftingSuccess.

Weapon Critical Crafting Success Schematic #

This schematic will be used by a critical crafting outcome of weapon recipes, increase the proficiency by 0.5 to 1 and add an additional weapon damage bonus. The crafted items are available as local selected data via the key action, which allows us to access and change them.

We’ll adjust the CriticalCraftingSuccess schematic and save it as a new schematic using the Save Schematic As … button.

Change Selected Data Name #

Add Node > Value > Selected Data > Change Selected Data Name

This node is used to change the name of things stored in selected data.

We’ll change the equipment’s name to add a + at the end.

  • Data Key
    Set to action.
  • Data Origin
    Select Local.
  • Name
    Set to: <name>+

Change Equip Status Value #

Add Node > Inventory > Equipment > Change Equip Status Value

This node is used to change status value bonuses on equipment stored in selected data.

We’ll add a weapon damage bonus of 5 to the equipment.

  • Data Key
    Set to action.
  • Data Origin
    Select Local.
  • Status Value
    Select Weapon Damage.
  • Operator
    Select Add.
  • Value
    Select Value > Value.
    Set the value to 5.

And that’s it for the schematic. Click on Save Schematic As … to save it as a new schematic, e.g. as WeaponCriticalCraftingSuccess.

Equipment Critical Crafting Success Schematic #

This schematic will be used by a critical crafting outcome of other equipment recipes, increase the proficiency by 0.5 to 1 and add an additional defence bonus. The crafted items are available as local selected data via the key action, which allows us to access and change them.

We’ll adjust the WeaponCriticalCraftingSuccess schematic and save it as a new schematic using the Save Schematic As … button.

Change Equip Status Value #

Change the used status value to Defence.

  • Status Value
    Select Defence.

And that’s it for the schematic. Click on Save Schematic As … to save it as a new schematic, e.g. as EquipmentCriticalCraftingSuccess.

Updating Potion Recipes #

With the schematics set up, we can now update our crafting recipes to use a critical chance and our schematics.

Navigate to Inventory > Crafting Recipes and change the following settings for all recipes.

Crafting Settings > Critical Chance #

We’ll first do the critical chance setup for all recipes, as that’ll be the same for all of them.

  • Use Critical Chance
    Enable this setting.
  • Critical Chance
    Select Variable > Float Variable.
  • Variable Key
    Set to craftingProficiency.
  • Variable Origin
    Select Global.

Now, let’s look at the setup for the individual crafting recipes

Potion Recipe #

The potion recipe will add 2 instead of 1 on critical success.

Outcomes #

We’ll set up the schematic for the regular crafting outcome proficiency changes here.

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

The critical outcomes will use the critical success schematic and add 2 instead of 1 potion.

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select Potion.
  • Quantity
    Select Value > Value.
    Set the value to 2.

High Potion Recipe #

The high potion recipe will use a proficiency condition (5 or higher) and add 2 instead of 1 on critical success.

Crafting Settings > Use Conditions #

  • Use Conditions
    Enable this setting.

Click on Add Condition.

  • Condition Type
    Select Variable.

Click on Add Variable.

  • Condition Type
    Select Variable.
  • Variable Key
    Set to craftingProficiency.
  • Variable Origin
    Select Global.
  • Type
    Select Float.
  • Check Type
    Select Is Greater Equal.
  • Check Value
    Select Value > Value.
    Set the value to 5.

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select High Potion.
  • Quantity
    Select Value > Value.
    Set the value to 2.

Magic Potion Recipe #

The magic potion recipe will use a proficiency condition (2 or higher) and add 2 instead of 1 on critical success.

Crafting Settings > Use Conditions #

  • Use Conditions
    Enable this setting.

Click on Add Condition.

  • Condition Type
    Select Variable.

Click on Add Variable.

  • Condition Type
    Select Variable.
  • Variable Key
    Set to craftingProficiency.
  • Variable Origin
    Select Global.
  • Type
    Select Float.
  • Check Type
    Select Is Greater Equal.
  • Check Value
    Select Value > Value.
    Set the value to 2.

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select Magic Potion.
  • Quantity
    Select Value > Value.
    Set the value to 2.

Super Potion Recipe #

The super potion recipe will use a proficiency condition (7 or higher) and add 2 instead of 1 on critical success.

Crafting Settings > Use Conditions #

  • Use Conditions
    Enable this setting.

Click on Add Condition.

  • Condition Type
    Select Variable.

Click on Add Variable.

  • Condition Type
    Select Variable.
  • Variable Key
    Set to craftingProficiency.
  • Variable Origin
    Select Global.
  • Type
    Select Float.
  • Check Type
    Select Is Greater Equal.
  • Check Value
    Select Value > Value.
    Set the value to 7.

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select Super Potion.
  • Quantity
    Select Value > Value.
    Set the value to 2.

Revive Potion Recipe #

The revive potion recipe will use a proficiency condition (10 or higher) and add 2 instead of 1 on critical success.

Crafting Settings > Use Conditions #

  • Use Conditions
    Enable this setting.

Click on Add Condition.

  • Condition Type
    Select Variable.

Click on Add Variable.

  • Condition Type
    Select Variable.
  • Variable Key
    Set to craftingProficiency.
  • Variable Origin
    Select Global.
  • Type
    Select Float.
  • Check Type
    Select Is Greater Equal.
  • Check Value
    Select Value > Value.
    Set the value to 10.

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select Revive Potion.
  • Quantity
    Select Value > Value.
    Set the value to 2.

Antidote Recipe #

The antidote recipe will add 2 instead of 1 on critical success.

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select Antidote.
  • Quantity
    Select Value > Value.
    Set the value to 2.

Cough Drops Recipe #

The cough drops recipe will add 2 instead of 1 on critical success.

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

  • Schematic Asset
    Select the CriticalCraftingSuccess schematic.

Click on Add Critical Outcome.

  • Item
    Select Cough Drops.
  • Quantity
    Select Value > Value.
    Set the value to 2.

Updating Weapon Recipes #

Next, we’ll update the recipes for weapons. They’ll use the WeaponCriticalCraftingSuccess schematic for critical outcomes.

I’m not adding any use conditions to the rest of the recipes, but feel free to do so if you want.

The setup for all weapon recipes is the same:

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

Instead of adding 2 weapons, the schematic will add a status bonus to the crafted weapon.

We don’t need to set up the outcome again, we can just use the Use Regular Outcome setting to also use the already set up Outcome items on critical success.

  • Schematic Asset
    Select the WeaponCriticalCraftingSuccess schematic.
  • Use Regular Outcome
    Enable this setting.

Updating Equipment Recipes #

Next, we’ll update the recipes for the rest of the equipment (shields, armor, accessories). They’ll use the EquipmentCriticalCraftingSuccess schematic for critical outcomes.

I’m not adding any use conditions to the rest of the recipes, but feel free to do so if you want.

The setup for all equpment recipes is the same:

Outcomes #

  • Schematic Asset
    Select the CraftingSuccess schematic.

Critical Outcomes #

Instead of adding 2 equipment, the schematic will add a status bonus to the crafted equipment.

We don’t need to set up the outcome again, we can just use the Use Regular Outcome setting to also use the already set up Outcome items on critical success.

  • Schematic Asset
    Select the EquipmentCriticalCraftingSuccess schematic.
  • Use Regular Outcome
    Enable this setting.

Critical Audio Feedback #

Let’s add a sound effect when we had a critical success during crafting.

Navigate to Inventory > Crafting Settings & Types > General Settings, we’ll set up default audio settings for all recipes.

Default Audio Setting #

The default settings are used by all crafting recipes, but each recipe can optionally override them with their own setup.

  • Critical Clip
    Select the heal audio clip.

Updating Crafting Menu Screen #

Finally, we’ll add the crafting proficiency information to the crafting menu.

Navigate to UI > Menu Screens and select the Crafting menu screen.

Information Part #

Scroll down to the bottom of the settings to see the Add Menu Part button.

Click on the Add Menu Part button and select Information.

  • UI Box
    Select Blue Bottom Left Fit.
  • Update By Variables
    Enable this setting.
    The content of the UI box will be udpated when a global variable changes, e.g. our craftingProficiency.

Information Page 0 #

We’ll add the craftingProficiency variable’s value to the text using a text code that shows a float variable with a custom format (we’ll use 0.0 to display 1 decimal).

You can easily add these (and other) text codes using the buttons above the text area you’re editing by clicking on the More button – e.g. the variable text codes are available when afterwards selecting Variable.

  • Text
    Set to: Crafting Proficiency: <var.cfloat=craftingProficiency#0.0>

Save Changes #

And that’s it for our crafting proficiency!

Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.

Testing #

Hit play, open the crafting menu and craft some items.

The crafting proficiency will increase, and when passing the profiency tests on some of the items they’ll become available to craft as well.

We’ve got our materials, recipes and menu … and even crafting proficiency. But how do we get more of the needed materials?

Next, we’ll add crafting materials as loot.