Items are any object or thing within your game world. Items:
- are often used for player customization
- can be equipped (activated), consumed (used up) or sold
- may affect a player's stats (user model)
- can be used as requirements for other elements
Related tutorial videos:
Seeds are one of the most commonly available items in social games and are often used to set up appointment mechanics (encouraging the player to return to the game in a specific time window - see the Creating a Harvest Mechanic tutorial video: http://youtu.be/KHPgvCQKEMc). Clothing or armor is also an extremely common item in games, being used both to customize the appearance of characters but also to affect players' stats.
Other examples include:
- Weapons in RPGs or Mafia games
- Buildings in city building games
- Animals in farming games
- Tokens or Permits
- NPCs (non-player characters)
Use in practice
Items can be set to equip, which activates the item, or consume, which uses the item up. When a player performs an action that equips or consumes an item, it causes changes to the data in their player model. For example, in a fighting game, one vest (when equipped) might increase a player's speed and another might increase their defense.
Restrictions can be placed on the way players equip and activate items by using types. For example, if you set up a type called vests and restrict the number of vests a player can equip to 1, it forces the player to make a choice between speed or defense.
Items can also affect regeneration. Regeneration is a 'bonus' that applies over time. There are 3 types:
- Unlimited: As soon as the item is equipped/activated (using the /items/equip API call) - this will start generating the bonus.
- Limited: Same as above, except the item will STOP regenerating after a set number of regenerations (so you could make it regenerate 10 coins every hour, but only do it for 24 hours, ie. 24 times)
- Collectable: This is a form of unlimited regeneration, except that a player must return to 'collect' their reward. So if our item generated 10 coins every hour, the player would need to 'collect' those in order for the item to continue generating another 10 coins. The "window" is the amount of time a player has to return and collect the bonus. So if our item generated 10 coins an hour, and had a window of 30 minutes, then a player would have to return within those 30 minutes in order to get the 10 coins - otherwise they disappear. Note that collection is called the same way as for consumable items - see the API reference for items/use.
Item regeneration is often used in conjunction with Resource regeneration to interesting effect. Also, regeneration can be negative (ie. go to zero, forcing players to buy more resource, or eat some energy bars, or clean their pet, etc).
Collectable regeneration can be used to set up appointment
mechanics. Common examples include:
- collecting rent in city building games - feeding in pet games
Feeding in pet games is a great example of an appointment mechanic with a negative reinforcer i.e. instead of a positive reinforcement for returning during a particular time window, there is a negative reinforcement for not completing the task. To take the pet game example, if the appointment is not kept and, therefore, the task not completed, the player's pet dies of hunger.
In addition to returning resources, an item can return currency or attributes. Returns are cumulative so they can be layered to create almost any affect on player stats imaginable.
Once items are created they are not explicitly available to a Player. Items can be made available in 3 ways:
- via a shop
- via gifting
- through the completion of tasks
Creating an Item
Label: this is a name to help identify the item.
Key: this is a unique ID/key string, used to access the item via the Roar API.
Type: this is used to set a maximum equip number for a group of items.
Description: meta data about the item.
Tags: meta data about the task.
Can be Sold: check to allow a player to sell the item.
Add Modifier +: set the return to the player when the item is sold.
Add Equip Effect +: set the effect the item has on player stats when it is equipped. This is cumulative and can be either positive or negative.
Add Regeneration Effect +: set the amount of a stat that the item generates (positive) or depletes (negative) over a period of time in seconds.
Limited charges: check to restrict the number of times the regeneration effect occurs.
Manual collect: check to set a time period in which the regeneration effect has to be collected by the player.
Can be Consumed: check the box to allow the player to consume the item.
Add Consume Effect +: set the effect the item has on player stats when it is consumed. This is cumulative and can be either positive or negative.
Add Item Variables +: add either archetype or instance variables to the item that are settable via Roar scripting. See the kb article about Roar Scripting for more information.