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,
            "name": "",
            "category": "",
            "description": "",
            "reset_cronexpr": "* * * * *",
            "duration_sec": 86400,
            "count": 0,
            "max_count": 10,
            "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,
            "name": "",
            "category": "",
            "description": "",
            "reset_cronexpr": "* * * * *",
            "duration_sec": 86400,
            "count": 0,
            "max_count": 10,
            "precondition_ids": [
                "<achievementId1>"
            ],
            "reward": {
                "guaranteed": {
                "currencies": {
                    "gold": {
                        "min": 100
                    }
                },
                "items": {
                    "hero_card": {
                        "min": 1,
                        "max": 5
                    }
                }
            },
            "sub_achievements": {
                "<subAchievementId1>": {
                    // Same as a standard achievement schema
                }
            },
            "total_reward": {
                "guaranteed": {
                "currencies": {
                    "gold": {
                        "min": 100
                    }
                },
                "items": {
                    "hero_card": {
                        "min": 1,
                        "max": 5
                    }
                }
            },
            "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.

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

PropertySubpropertyDescription
auto_claimWhether the achievement reward should be given automatically upon completion.
auto_claim_totalWhether the achievement total reward should be given automatically upon completing this and all sub-achievements.
auto_resetWhether the achievement should reset after completion.
nameThe display friendly name of this achievement.
categoryThe category name for this achievement.
descriptionThe description for this achievement.
countThe initial count towards progress for this achievement.
max_countThe number of times this achievement can be progressed before it can be claimed.
duration_secHow long (in seconds) this achievement is available for progression after creation. Used for limited time achievements.
reset_cronexprThe reset interval in CRON format.
precondition_idsAn array of achievement ids the user must have completed to qualify for starting this achievement.
rewardAn object that defines what rewards a player should receive once they complete this achievement.
sub_achievementsAn object with the same Schema as the root achievements object, used to define nested achievements.
total_rewardAn object that defines what rewards a player should receive once they have completed this achievement and all sub achievements.
additional_propertiesA string:string dictionary of key value pairs that can contain additional context.