Custom achievements
You can define your own custom achievements in the mod's config. Achievements with specified requirements for obtaining, a description, and an achievement name are added to the achievements.json file.
Structure
{
"achievements": [
{
"id": "test_achievment",
"name": "First Night",
"tooltip": "You survived the first night!",
"conditions": {
"deathsMax": 999
}
}
]
}
info
The id determines whether an achievement has already been earned. Multiple achievements can share the same id, but they will be counted as one — if a player has earned any achievement with that id, all others sharing it will also be marked as earned.
Conditions
| Parameter | Description |
|---|---|
deathsEq / deathsMin / deathsMax | Number of deaths |
mobsKilledEq / mobsKilledMin / mobsKilledMax | Mobs killed |
blocksDestroyedEq / blocksDestroyedMin / blocksDestroyedMax | Blocks destroyed |
distanceWalkedEq / distanceWalkedMin / distanceWalkedMax | Distance walked |
jumpsEq / jumpsMin / jumpsMax | Number of jumps |
damageDealtEq / damageDealtMin / damageDealtMax | Damage dealt |
- Eq — exactly the value required
- Min — minimum value required
- Max — maximum value allowed
Example
- Single condition
- Multiple conditions
{
"achievements": [
{
"id": "test_achievment",
"name": "First Night",
"tooltip": "You survived the first night!",
"conditions": {
"deathsMax": 999
}
}
]
}
{
"achievements": [
{
"id": "test_achievment",
"name": "First Night",
"tooltip": "You survived the first night!",
"conditions": {
"deathsMax": 999,
"mobsKilledMin": 10,
"jumpsEq": 1
}
}
]
}