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. |
max_active_slots | int | The maximum number of slots a user can have active at any time. |
slots | int | The total number of slots, active and inactive, a player can have. |
slot_cost | SlotCost | The cost to purchase additional active slots. |
unlockables | string:Unlockable | A map of all unlockables. |
Slot Cost #
Property | Type | Description |
---|---|---|
items | string:int64 | A map of item IDs and quantities to be spent when purchasing additional active slots. |
currencies | string:int64 | A map of currency IDs and quantities to be spent when purchasing additional active slots. |
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, if any, of this unlockable. |
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 of this unlockable. |
name | string | The name of this unlockable. |
start_cost | UnlockableStartCost | The cost to begin unlocking this unlockable. |
reward | Reward | The rewards that the player should 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. |