Unlockables #
Unlockables are a Hiro meta system which allows the player to unlock rewards in the game. The rewards can be anything from a new character, a new weapon, or anything relevant for your game. Unlockables can be unlocked by the player by waiting for a period of time or by watching a rewarded video.
You can configure unlockables so that players only have a limited number of slots for active unlockables at any time, and also provide players the ability to purchase extra slots to store more unlockables, up to a maximum limit.
Customization parameters #
All unlockables and their configuration is done through a JSON definition.
The following JSON represents the customization parameters you can use to configure the default user experience for the Unlockables system.
|
|
The JSON schema defines an unlockables
object which _must contain an individual object for each unlockable you wish to define in the system. You can configure as few or as many unlockables as needed for your desired gameplay.
Property | Type | Description |
---|---|---|
active_slots | int | The number of active slots, if any, that each user starts with when their account is created. |
max_active_slots | int | The maximum number of slots that a user can have. |
slots | int | The total number of slots, active and inactive, that a player can have. |
slot_cost | SlotCost | The cost to purchase an additional active slot. |
unlockables | string:Unlockable | A map of all unlockables. |
Slot Cost #
Property | Type | Description |
---|---|---|
items | string:int64 | A map of item IDs and quantities that will be spent to purchase an additional active slot. |
currencies | string:int64 | A map of currency IDs and quantities that will be spent to purchase an additional active slot. |
Each individual unlockable may define the following:
Unlockable #
Property | Type | Description |
---|---|---|
probability | int | Indicates the likelihood that this unlockable item is the one received by the user. |
category | string | The category that this unlockable belongs to. |
cost | UnlockableCost | The cost to advance the wait time by one unit of time, defined in cost_unit_time_sec . |
cost_unit_time_sec | int | The amount of time to be advanced on wait_time_sec for each cost purchase. |
description | string | The description text for this unlockable. |
name | string | The display-friendly name for this unlockable. |
start_cost | UnlockableStartCost | The cost to begin unlocking this unlockable. |
reward | Reward | The rewards that the player will receive after unlocking this unlockable. |
wait_time_sec | int | The total time (in seconds) a player must wait before this item in unlocked. |
additional_properties | string:string | A map of key value pairs that can contain additional context. |
Unlockable Cost #
Property | Type | Description |
---|---|---|
items | string:int64 | A map of item IDs and quantities to advance this unlockable’s wait time by one unit of time. |
currencies | string:int64 | A map of currency IDs and quantities to advance this unlockable’s wait time by one unit of time. |
Unlockable Start Cost #
Property | Type | Description |
---|---|---|
items | string:int64 | A map of item IDs and quantities to begin unlocking this unlockable. |
currencies | string:int64 | A map of currency IDs and quantities to begin unlocking this unlockable. |