Unlockables #

Time-based unlockable reward chests in Squad Alpha by Say Games.
Time-based unlockable reward chests in Squad Alpha by Say Games.

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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "active_slots": 1, // Initial number of active slots.
    "max_active_slots": 3,
    "slots": 4,
    "slot_cost": {
        "currencies": {
            "gems": 50
        }
    },
    "unlockables": {
        "unlockable_id1": {
            "probability": 100,
            "category": "",
            "cost": {
                "currencies": {
                    "coins": 10
                }
            },
            "cost_unit_time_sec": 60,
            "description": "",
            "name": "Tiny Reward Chest!",
            "start_cost": {
                "currencies": {
                    "coins": 5
                }
            },
            "reward": {
                "guaranteed": {
                "currencies": {
                    "gold": {
                        "min": 100
                    }
                },
                "items": {
                    "hero_card": {
                        "min": 1,
                        "max": 5
                    }
                }
            },
            "wait_time_sec": 14400, // 4 hours.,
            "additional_properties": {
                "<propertyName>": "value"
            }
        }
    }
}

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.

PropertyTypeDescription
active_slotsintThe number of active slots, if any, that each user starts with.
max_active_slotsintThe maximum number of slots a user can have active at any time.
slotsintThe total number of slots, active and inactive, a player can have.
slot_costSlotCostThe cost to purchase additional active slots.
unlockablesstring:UnlockableA map of all unlockables.

Slot Cost #

PropertyTypeDescription
itemsstring:int64A map of item IDs and quantities to be spent when purchasing additional active slots.
currenciesstring:int64A map of currency IDs and quantities to be spent when purchasing additional active slots.

Each individual unlockable may define the following:

Unlockable #

PropertyTypeDescription
probabilityintIndicates the likelihood that this unlockable item is the one received by the user.
categorystringThe category, if any, of this unlockable.
costUnlockableCostThe cost to advance the wait time by one unit of time, defined in cost_unit_time_sec.
cost_unit_time_secintThe amount of time to be advanced on wait_time_sec for each cost purchase.
descriptionstringThe description of this unlockable.
namestringThe name of this unlockable.
start_costUnlockableStartCostThe cost to begin unlocking this unlockable.
rewardRewardThe rewards that the player should receive after unlocking this unlockable.
wait_time_secintThe total time (in seconds) a player must wait before this item in unlocked.
additional_propertiesstring:stringA map of key value pairs that can contain additional context.

Unlockable Cost #

PropertyTypeDescription
itemsstring:int64A map of item IDs and quantities to advance this unlockable’s wait time by one unit of time.
currenciesstring:int64A map of currency IDs and quantities to advance this unlockable’s wait time by one unit of time.

Unlockable Start Cost #

PropertyTypeDescription
itemsstring:int64A map of item IDs and quantities to begin unlocking this unlockable.
currenciesstring:int64A map of currency IDs and quantities to begin unlocking this unlockable.