Next thing on the list – let’s create some items … refreshing potions, some status effect stuff and books teaching abilities.
In this game tutorial we’ll focus on creating the items and item types we need, to learn more about items in general read this how-to.
Types!
Yes, we start – again – with creating different item types. They are used to separate our items in menus into their different categories – and to keep order. We’ll create the following types:
- Potions
For refreshing potions. - Scrolls and Books
For scrolls (use status effects) and books (teach new abilities). - Special Items
For special items like money or quest items (we’ll add them in a later game tutorial). - Weapons
For weapons – equipment is also separated into item types.
Will be used in a later game tutorial. - Armors
For armors – will be used in a later game tutorial.
Open the ORK Framework editor and navigate to Inventory > Item Types. We need five item types, so add the needed number and change the following settings.
Item Type 0
- Name
Change to Potions.
Item Type 1
- Name
Change to Scrolls and Books.
Item Type 2
- Name
Change to Special Items.
Item Type 3
- Name
Change to Weapons.
Item Type 4
- Name
Change to Armors.
That’s it for the item types.
Currency settings … money!
ORK Framework uses a multi-currency system. You can have multiple currencies in your game, set up exchange rates and change them in a running game. This feature is optional, if you don’t need multiple currencies, simply don’t create more than one.
Currencies are created in Inventory > Currencies. We’re only going to use one currency in our little game, so let’s change the following settings of the default currency (Gold).
- Name
Change to Gold. - Description
Change to You can buy stuff with it.. - Icon
Select ShopEvent.psd.
Can be found in Assets/Gizmos/. - Item Type
Select Special Items. - Dropable
Enable this setting.
We can drop gold back into the game world. - Item Prefab
Select ItemPrefab.
Can be found in Assets/Tutorial Resources/Prefabs/Items/.
That’s it for the currency settings.
Creating the items
Like with the abilities – we’ll bother with animating the items later. For now, we’ll create the following items:
- Potion
Restores 150 HP. - Magic Potion
Restores 50 MP. - Revive Potion
Revives the dead … spooky! - Cure Potion
Removes all negative status effects. - Fire Scroll
Applies the Enchant Fire status effect. - Paralyse Scroll
Applies the Blind (50 % chance) and Block (25 % chance) status effects. - Book of Health
Teaches the passive ability Health Bonus. - Book of Immunity
Teaches the passive ability Immune.
So, we’ll be adding eight items for now – the rest will follow in later tutorials (quests!). Navigate to Inventory > Items and change the following settings.
Item 0: Potion
The potion will restore 150 HP of a single ally. It should be useable in the field an in battles.
The item should cost 10 Gold and sold back to stores for 50 % of the original price.
- Name
Change to Potion.
Item Settings
- Item Type
Select Potions. - Dropable
Enable this setting. - Stealable
Enable this setting.
Prefab Settings
- Item Prefab
Select ItemPrefab.
Yes, that’s the same as used for our currency – we’ll be using this simple prefab for all items.
Price Settings
- Value Type (Buy Price)
Select Value. - Value (Buy Price)
Set to 10.
The price is always defined in the base currency – i.e. the first currency in the list (Gold in our case). - Sellable
Enable this setting. - Value Type (Sell Price)
Select Value. - Value (Sell Price)
Set to 50. - Sell In
Select Percent.
Use Settings
- Useable In
Select Both.
Target Settings
- Target Type
Select Ally. - Target Range
Select Single.
Use Cost
- Consume
Enable this setting.
The item will be removed from the inventory when used.
Target Changes
Add a status value change by clicking on Add Value Change.
- Status Value
Select HP. - Operator
Select Add. - Value Origin
Select Value. - Value
Set to 150. - Use Attribute Changes
Disable this setting.
We don’t want attributes interfering with healing.
That’s it for this item.
Item 1: Magic Potion
This item is similar to the Potion, so let’s simply copy it and change some settings.
The magic potion should heal 50 MP and cost 20 Gold, the rest stay’s as it is.
- Name
Change to Magic Potion.
Price Settings
- Value (Buy Price)
Set to 20.
Target Changes
Change the HP status value change to MP.
- Status Value
Select MP. - Value
Set to 50.
Item 2: Revive Potion
This item is also similar to the Potion, let’s copy it again and change some settings.
The revive potion will revive a dead target, fully restores HP/MP and cost 100 Gold.
- Name
Change to Revive Potion.
Price Settings
- Value (Buy Price)
Set to 100.
Use Settings
- Revive Target
Enable this setting.
Target Settings
- Is Dead
Select Yes.
Only dead combatants can be used as target for this item.
Target Changes
We’ll fully restore the target’s HP – i.e. we’ll set it to use the MaxHP status value.
- Operator
Select Set. - Value Origin
Select Status. - Status Value (below Operator/Value Origin)
Select MaxHP.
Now, add another status value change by clicking on Add Value Change.
- Status Value
Select MP. - Operator
Select Set. - Value Origin
Select Status. - Status Value (below Operator/Value Origin)
Select MaxMP. - Use Attribute Changes
Disable this setting.
That’s it for this status value.
Item 3: Cure Potion
This time, let’s start from scratch again. The cure potion should remove all negative status effects and be useable on a single ally – in battles and in the field.
The item should cost 25 Gold.
- Name
Change to Cure Potion.
Item Settings
- Item Type
Select Potions. - Dropable
Enable this setting. - Stealable
Enable this setting.
Prefab Settings
- Item Prefab
Select ItemPrefab.
Price Settings
- Value Type (Buy Price)
Select Value. - Value (Buy Price)
Set to 25. - Sellable
Enable this setting. - Value Type (Sell Price)
Select Value. - Value (Sell Price)
Set to 50. - Sell In
Select Percent.
Use Settings
- Useable In
Select Both.
Target Settings
- Target Type
Select Ally. - Target Range
Select Single.
Use Cost
- Consume
Enable this setting.
The item will be removed from the inventory when used.
Target Changes
Add a status effect cast by clicking on Add Status Effect.
- Effect
Select Poison. - Change
Select Remove.
Add another status effect.
- Effect
Select Blind. - Change
Select Remove.
And another status effect.
- Effect
Select Block. - Change
Select Remove.
Another status effect …
- Effect
Select Weaken. - Change
Select Remove.
Add the last status effect.
- Effect
Select Speed Down. - Change
Select Remove.
That’s it for this item.
Item 4: Fire Scroll
This item will add the Enchant Fire status effect to a combatant. Useable only in battle, on a single ally.
Price: 100
- Name
Change to Fire Scroll.
Item Settings
- Item Type
Select Scrolls and Books. - Dropable
Enable this setting. - Stealable
Enable this setting.
Prefab Settings
- Item Prefab
Select ItemPrefab.
Price Settings
- Value Type (Buy Price)
Select Value. - Value (Buy Price)
Set to 100. - Sellable
Enable this setting. - Value Type (Sell Price)
Select Value. - Value (Sell Price)
Set to 50. - Sell In
Select Percent.
Use Settings
- Useable In
Select Battle.
Target Settings
- Target Type
Select Ally. - Target Range
Select Single.
Use Cost
- Consume
Enable this setting.
The item will be removed from the inventory when used.
Target Changes
Add a status effect cast by clicking on Add Status Effect.
- Effect
Select Enchant Fire. - Change
Select Add.
That’s it for this item.
Item 5: Paralyse Scroll
This item is similar to the Fire Scroll, so let’s copy it and change the some settings.
- Name
Change to Paralyse Scroll.
Target Settings
- Target Type
Select Enemy.
Target Changes
Change the Enchant Fire status effect to Blind and use a 50 % hit chance.
- Effect
Select Blind. - Change
Select Add. - Override Hit Chance
Enable this setting.
The item should have a different hit chance than the original status effect. - Calculate Hit Chance
Enable this setting. - Value Type (Hit Chance)
Select Value. - Value (Hit Chance)
Set to 50.
Now, add another status effect.
- Effect
Select Block. - Change
Select Add. - Override Hit Chance
Enable this setting. - Calculate Hit Chance
Enable this setting. - Value Type (Hit Chance)
Select Value. - Value (Hit Chance)
Set to 25.
That’s it for this item.
Item 6: Book of Health
This item teaches the passive ability Health Bonus. Useable only in the field on a single ally.
Price: 1000
- Name
Change to Book of Health.
Item Settings
- Item Type
Select Scrolls and Books. - Dropable
Enable this setting. - Stealable
Enable this setting.
Prefab Settings
- Item Prefab
Select ItemPrefab.
Price Settings
- Value Type (Buy Price)
Select Value. - Value (Buy Price)
Set to 1000. - Sellable
Enable this setting. - Value Type (Sell Price)
Select Value. - Value (Sell Price)
Set to 50. - Sell In
Select Percent.
Use Settings
- Useable In
Select Field. - Item Ability
Select Learn. - Ability
Select Health Bonus. - Ability Level
Set to 1.
Target Settings
- Target Type
Select Ally. - Target Range
Select Single.
Use Cost
- Consume
Enable this setting.
The item will be removed from the inventory when used.
That’s it for this item.
Item 7: Book of Immunity
This item is nearly the same as the Book of Health, it just teaches a different ability – so let’s copy it.
And since this is such a useful ability … Price: 5000.
- Name
Change to Book of Immunity.
Price Settings
- Value (Buy Price)
Set to 5000.
Use Settings
- Ability (Ability Settings – Learn)
Select Immune.
That’s it for the abilities – click on Save Settings.
And that’s it for now – the next lesson will cover Equipment.