In this tutorial we’ll set up the items (and a currency) of our status system.
Potions, lots of potions – and more.
- healing potions for HP and MP
- curing potions for various status effects
- revive potion to revive dead players
- a small key
- magic crystal (used later for upgrading abilities)
Learn more about items in this documentation.
For now we’ll only set up the items and their status changes – we’ll handle animating them (using schematics) later. Before setting up the items, we’ll also take a look at the inventory settings and set up the game’s currency.
Inventory Settings #
Navigate to Inventory > Inventory Settings, we’ll check how the inventory system is set up. Learn more about the inventory system in this documentation.
We’ll use the group inventory (i.e. all combatants in a group share the inventory), auto stack items and equipment and not use any kind of quantity or stack size limit.
- Inventory Type
Select Group. - Item Stack Type
Select Auto Stack.
Items will automatically stack when added to the inventory. - Equipment Stack Type
Select Auto Stack.
Equipment will automatically stack when added to the inventory. - Limit Quantity
Disable this setting. - Limit Stack
Disable this setting.
There’s a lot more settings available to control inventory related things, but we don’t really need to change anything for now. We’ll later revisit this, e.g. to set up item collection dialogues.
Currencies #
Next, we’ll set up the currency for our game. You can add multiple currencies, but we’ll just use one. Learn more about currencies in this documentation.
Navigate to Inventory > Currencies and change the settings of the already added Default currency.
Content Information #
- Name
Set to Gold. - Description
Set to Used to pay for goods.. - Sprite (Icon)
Select icons_116.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Base Settings #
- Item Type
Select Special Items.
And that’s it for the currency, we’ll now start with setting up the items.
0: Potion #
A regular potion, healing 150 health.
Navigate to Inventory > Items and change the already added Default item.
Content Information #
- Name
Set to Potion. - Description
Set to Restores 150 health.. - Sprite (Icon)
Select icons_164.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings #
- Item Type
Select Potions. - Dropable
Enable this setting. - Stealable
Enable this setting.
Price Settings #
- Buy Price
Select Value > Value.
Set the value to 10. - Sellable
Enable this setting.
The default sell price settings should already be correct, selling for 50% of the original price.
- Sell Price
Select Value > Value.
Set the value to 50. - Sell In
Select Percent.
Use Settings #
- Useable In
Select Both.
Target Selection Settings #
- Target Selection Type
Select Default Ally > Ally Single.
User Settings > Use Cost #
- Consume
Enable this setting. - Show Notification/Console
Disable this setting.
We don’t want to show a notification or console text that the item is removed from inventory on use (even though we didn’t set one up yet). - Auto Consume
Select No.
This’ll only consume the item when the use result is calculated.
You can also use other options, e.g. already consuming it (i.e. removing from inventory) when the target was selected.
Target Settings > Target Changes #
Click on Add Target Change.
Click on Add Status Change.
- Change Type
Select Status Value. - Status Value
Select Health Points. - Operator
Select Add. - Change Value
Select Value > Value.
Set the value to 150.
Healing doesn’t use modifiers.
1: High Potion #
A larger potion, healing 1000 health.
Copy the Potion item and change the following settings.
Content Information #
- Name
Set to High Potion. - Description
Set to Restores 1000 health.. - Sprite (Icon)
Select icons_167.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings > Price Settings #
- Buy Price
Select Value > Value.
Set the value to 75.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Change Value
Select Value > Value.
Set the value to 1000.
2: Magic Potion #
A magic potion, healing 100 MP.
Copy the High Potion item and change the following settings.
Content Information #
- Name
Set to Magic Potion. - Description
Set to Restores 100 MP.. - Sprite (Icon)
Select icons_155.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings > Price Settings #
- Buy Price
Select Value > Value.
Set the value to 50.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Status Value
Select Magic Points. - Change Value
Select Value > Value.
Set the value to 100.
3: Super Potion #
A potion, fully restoring health and MP.
Copy the High Potion item and change the following settings.
Content Information #
- Name
Set to Super Potion. - Description
Set to Fully restores health and MP.. - Sprite (Icon)
Select icons_181.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings > Price Settings #
- Buy Price
Select Value > Value.
Set the value to 500.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Change Value
Select Value > Value.
Set the value to 100. - Change In
Select Percent.
Copy Status Change 0 and change the following settings (in the new Status Change 1).
- Status Value
Select Magic Points.
4: Revive Potion #
This potion revives a dead combatant and restores 1 health.
Copy the High Potion item and change the following settings.
Content Information #
- Name
Set to Revive Potion. - Description
Set to Revive a dead target with 1 health.. - Sprite (Icon)
Select icons_173.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings > Price Settings #
- Buy Price
Select Value > Value.
Set the value to 100.
Use Settings #
- Revive Target
Enable this setting.
Target Selection Settings #
We need to be able to target dead combatants – let’s limit the use on dead combatants.
We’ll set up a Custom target selection, but you can also set up a new target selection template (or later create a template out of the custom setup).
- Target Selection Type
Select Custom. - Target Type
Select Ally. - Target Range
Select Single. - Is Dead
Select Yes.
If you select Ignore you can also target alive combatants.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Change Value
Select Value > Value.
Set the value to 1.
5: Cure Potion #
This potion works like the Cure ability, removing the latest negative status effect.
Copy the High Potion item and change the following settings.
Content Information #
- Name
Set to Cure Potion. - Description
Set to Cures the latest negative status effect.. - Sprite (Icon)
Select icons_185.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings > Price Settings #
- Buy Price
Select Value > Value.
Set the value to 15.
Target Selection Settings #
We’ll use another custom setup, instead of dead combatants, we’ll target based on a status condition checking for any negative status effect being applied.
- Target Selection Type
Select Custom. - Target Type
Select Ally. - Target Range
Select Single.
Conditions > Target Conditions #
We’ll limit the targets to combatants with negative status effects.
- Use Conditions
Enable this setting.
Click on Add Condition.
- Condition Type
Select Combatant Status.
Click on Add Status Condition.
- Condition Type
Select Status. - Status Needed
Select Status Effect Type. - Status Effect Type
Select Negative. - Is Applied
Enable this setting.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Change Type
Select Status Effect. - Change
Select Remove. - Use Effect Type
Enable this setting. - Status Effect Type
Select Negative. - Remove Type
Select Last.
6: Antidote #
This potion cures the Poison effect.
Copy the Cure Potion item and change the following settings.
Content Information #
- Name
Set to Antidote. - Description
Set to Cures poison.. - Sprite (Icon)
Select icons_174.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings > Price Settings #
- Buy Price
Select Value > Value.
Set the value to 5.
Target Selection Settings > Conditions > Target Conditions > Condition 0 > Status Condition 0 #
We’ll limit the targets to poisoned combatants instead of any negative effect.
- Status Needed
Select Status Effect. - Status Effect
Select Poison. - Is Applied
Enable this setting.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Use Effect Type
Disable this setting. - Status Effect
Select Poison.
7: Eye Drops #
This potion cures the Blind effect.
Copy the Antidote item and change the following settings.
Content Information #
- Name
Set to Eye Drops. - Description
Set to Cures blind.. - Sprite (Icon)
Select icons_200.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Target Selection Settings > Conditions > Target Conditions > Condition 0 > Status Condition 0 #
We’ll limit the targets to blinded combatants.
- Status Effect
Select Blind.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Status Effect
Select Blind.
8: Cough Drops #
This potion cures the Silent effect.
Copy the Eye Drops item and change the following settings.
Content Information #
- Name
Set to Cough Drops. - Description
Set to Cures silence.. - Sprite (Icon)
Select icons_205.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Target Selection Settings > Conditions > Target Conditions > Condition 0 > Status Condition 0 #
We’ll limit the targets to blinded combatants.
- Status Effect
Select Silent.
Target Settings > Target Changes > Target Change 0 > Status Change 0 #
- Status Effect
Select Silent.
9: Small Key #
We’ll use this item later in our levels to open … locked things.
Create a new item from scratch.
Content Information #
- Name
Set to Small Key. - Description
Set to Opens locked things.. - Sprite (Icon)
Select icons_120.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Item Settings #
- Item Type
Select Special Items. - Dropable
Disable this setting. - Stealable
Disable this setting.
This item isn’t sold in shops and can’t be sold to them, so we don’t have to change the default price settings.
Use Settings #
- Useable In
Select None.
This item can’t be used.
10: Magic Crystal #
We’ll use this item later to level up abilities (using research trees).
Copy the Small Key item and change the following settings.
Content Information #
- Name
Set to Magic Crystal. - Description
Set to Improves a magic spell.. - Sprite (Icon)
Select icons_53.
Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.
Save Changes #
And that’s it for the item setup.
Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.
Next, we’ll set up equipment slots and slot set templates.