Wiki

Achievements System


Achievements are far from being a groundbreaking concept, and the system itself is rather straightforward. There exist two dictionaries: an external one and an internal one. A class is in place to manage both these dictionaries. The external dictionary serves the purpose of incorporating or modifying achievements through mods, while the internal dictionary takes care of maintaining the updated persistent data and fixing potential errors.

How-To

Add a new achievement

Adding a new achievement is simple; All you need to do is modify the pseudo-constant dictionary during initialization:

init python:
    achievements_dict["yourkey"] = [
        "Category",
        "Title",
        "Description",
        False, # Unlock control flag
        "mods/MyMod/icon.webp", # Path to the icon file
        False, # Secret achievement control flag
    ]

You can unlock the achievement for the player using the following method:

achievements.unlock("yourkey")