Achievements #

Progressive achievements used in Mr. Autofire by Lightheart Entertainment
Progressive achievements used in Mr. Autofire by Lightheart Entertainment

Achievement systems are a great tool for game designers to use to create a sense of progression and reward for players. It can be used to unlock new content, provide a sense of accomplishment, and reward players for their progress.

An “achievement” represents a player task which can be completed and, on completion, can unlock a reward. The reward can be in-game currency, collectables, energy, energy modifiers, or consumables.

Achievements can be configured to repeat on a schedule, or to repeat automatically when the player completes the task. They can also be one-off achievements which are only completed once.

For increased player engagement and larger sense of progression, achievements can be configured to have a precondition. This means that the achievement cannot be completed until one or more other achievements have been completed.

Achievements can also be configured to have any number of sub achievements. Sub achievements are nested, hierarchical achievements that can be used for progressive rewards.

Customization Parameters #

The following JSON represents the customization parameters you can use to configure the default user experience for the achievements 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
    "achievements": {
        "<achievementId1>": {
            "auto_claim": false,
            "auto_reset": false,
            "category": "",
            "count": 0,
            "description": "",
            "reset_cronexpr": "* * * * *",
            "duration_sec": 86400,
            "max_count": 10,
            "name": "",        
            "reward": {
                "guaranteed": {
                "currencies": {
                    "gold": {
                        "min": 100
                    }
                },
                "items": {
                    "hero_card": {
                        "min": 1,
                        "max": 5
                    }
                }
            },
            "additional_properties": {
                "<propertyName>": "value"
            }
        },
        "<achievementId2>": {
            "auto_claim": false,
            "auto_claim_total": false,
            "auto_reset": false,
            "category": "",
            "count": 0,
            "description": "",
            "reset_cronexpr": "* * * * *",
            "duration_sec": 86400,
            "max_count": 10,
            "name": "",          
            "precondition_ids": [
                "<achievementId1>"
            ],
            "reward": {
                "guaranteed": {
                "currencies": {
                    "gold": {
                        "min": 100
                    }
                },
                "items": {
                    "hero_card": {
                        "min": 1,
                        "max": 5
                    }
                }
            },
            "total_reward": {
                "guaranteed": {
                "currencies": {
                    "gold": {
                        "min": 100
                    }
                },
                "items": {
                    "hero_card": {
                        "min": 1,
                        "max": 5
                    }
                }
            },
            "sub_achievements": {
                "<subAchievementId1>": {
                    // Similar to the standard achievement schema
                }
            },
            "additional_properties": {
                "<propertyName>": "value"
            }
        }
    }
}

The JSON schema defines an achievements object which must contain an individual object for each achievement you wish to define in the system. You can configure as few or as many achievements and sub-achievements as needed for your desired gameplay.

PropertyTypeDescription
achievementsstring:AchievementA map of all achievements.

Each individual achievement is keyed by id and may define the following:

Achievement #

PropertyTypeDescription
auto_claimboolWhether the achievement reward should be given automatically upon completion.
auto_claim_totalboolWhether the achievement total reward should be given automatically upon completing this and all sub-achievements.
auto_resetboolWhether the achievement should reset after completion.
categorystringThe category name for this achievement.
countint64The initial count towards progress for this achievement.
descriptionstringThe description for this achievement.
reset_cronexprstringThe reset interval in CRON format.
duration_secint64How long (in seconds) this achievement is available for progression after creation. Used for limited time achievements.
max_countint64The number of times this achievement can be progressed before it can be claimed.
namestringThe display friendly name of this achievement.
precondition_ids[]stringAchievement IDs the user must have completed to qualify for starting this achievement.
rewardRewardThe rewards a user should receive once they complete this achievement.
total_rewardRewardThe rewards a user should receive once they have completed this achievement and all sub achievements.
sub_achievementsstring:SubAchievementA map of nested achievements.
additional_propertiesstring:stringA map of key value pairs that can contain additional context.