Achievements

Description

Achievements in r4nkt are like goals that you can create and define. They provide ways to measure a player's activities, to incentivize certain behavior, or to provide goals. Your players, through the actions they take, can meet these goals and earn an achievement. When this is done, they will be awarded a badge to represent the earned achievement.

You must assign criteria to your achievements. These criteria must be met in order to earn the achievement and receive a related badge. You may assign points to achievements, which are then awarded to your players once they are earned. Finally, you may attach rewards to your achievements and then distribute them once they are earned.

Properties

Achievements have the following properties:

Name

Type

Default

custom_id

string

-

name

string

-

description

string

empty

custom_data

json

empty

is_secret

boolean

false

custom_criteria_group_id

string

empty

points

integer

1

rewards

collection

empty

Click here for information about common properties.

Is secret

An achievement's is_secret property determines whether or not it is returned to the calling application for normal requests. It is boolean and must therefore be equal to one of the following values:

  • true

  • false

By default, "secret" achievements will not be returned by "list" or "get" calls to the API.

An achievement with an is_secret value of true is intended to be kept hidden from the player. It is recommended to make an achievement "secret" if it contains a spoiler you don't want to reveal too early, eg. "Discover that you were a ghost all along!".

Finally, an achievement that is "known" (is_secret is false) is one where the player can know about the achievement prior to having earned it.

Criteria group

An achievement can have a single criteria group, which is identified by the criteria group's custom_id and asigned to its custom_criteria_group_id property. This is where you begin to define the different criteria that must be met in order for the player to earn the achievement and be awarded a badge.

Points

An achievement can be given points. Whenever a player earns an achievement, any associated points are automatically added to the points for any other achievements they have earned and your game's standard and session-based leaderboards will be updated automatically.

Rewards

An achievement can have multiple rewards. They are associated with achievements so that, when a player earns an achievement, any associated rewards can be distributed.