Any game needs items – it would be quite boring without something to find, collect and use …
Item Types
Items are separated into different item types. You can define as many item types as you need. They are created in the ORK Framework editor in Inventory > Item Types.
The item types are used in menus to optionally separate the items in a combatant’s inventory.
Item types are also used to separate weapons and armors (equipment) into different types – while they’re equipped on different equipment parts, they’re still separated in item types in inventory menus.
Items
Items are created in Inventory > Item Types.
They can be set up to do different things. The simplest item is one that can’t be used – like a valuable gemstone or a special quest item. A useable item is used against a target combatant. The target of can be the user itself, an ally or enemy – or just any combatant. It can target a single combatant, the whole group or be used as a AoE (area of effect) item. Also combatants that are nearby the target can be affected.
You can select if the item can be used in the field, in battles, or in both. When used on a target, it can change it’s status values, status effects and class. The changes to status values can be influenced by attack and defence attributes (learn more about attributes in this how-to). Additionally, items can teach or use abilities, teach crafting recipes, add other items to the inventory and change game variables (learn more about game variables in this how-to).
Items use battle events to animate them in battles or in the field. You can also use battle events to extend the things an item does – like capture a monster by adding it to the player group, or damage multiple times.
Dropping items
Items can be dropped back into the game world.
The position of the dropped item can optionally be stored for later pickup (i.e. they’ll be still there when you leave the scene and come back later). This can even be stored in a saved game.
Money
Money is a special kind of item – the money settings are made in Inventory > Inventory Settings.
Item Collectors
To get items into your game world, you can either use the Event System to add them to the player’s inventory – or by using the Item Collector component.
Use the ORK Scene Wizard to add an item collector to a scene: Create Object > Item Collector. You can also use the scene wizard to add an item collector to a selected game object: Add Component > Item Collector.
Item collectors are a simple type of event interaction – they can be used to collect a single item or as an item box.
The general settings (texts, look, etc.) of item collections is made in Inventory > Inventory Settings.
Single item collection
The player collects a single item (either a defined item, or a random item out of a list of defined items). An item collection dialogue/choice is displayed when the player interacts with the item collector.
The collection state of the item is automatically handled by ORK Framework – the item receives a Scene ID when added to your Unity® scene, when the player collects the item, the scene ID is stored and saved with a save game. As long as the item isn’t bound to any special occurrence (like the player has to accept a quest first) there is no need for you to use game variables to remember collected items.
Item box
An item box to contain multiple items, the player can also store items from the inventory in the box.
The content of an item boxes is stored using a Box ID – the box ID is used game-wide, an item box can be shared across multiple scenes, and it can be filled using the event system.