`achievements` is a big table taking mod names as a key and a table as a value. This table can contain whatever entry you like (`name`, `img`, `idontknow`), because the only thing that matters to it is to check whether something exists at the given index. In fact, the following examples are all correct:
```
local achievements = {
[1] = "inhale",
[2] = "exhale"
}
local achievements = {
[1] = { name = "inhale", img = "mod_inhale.png" },
[2] = { name = "exhale", img = "mod_exhale.png" }
}
-- pretty useless but hey ¯\_(ツ)_/¯
local achievements = {
[1] = true,
[2] = true
}
```
The table is _not_ saved into the storage, only players progress is.
## 2. Registering and unlocking achievements
In order to register the achievements of a mod, do:
`achvmt_lib.get_achievement(mod, achvmt_ID)`: returns the value assigned to the achievement at the corresponding `achvmt_ID`, if any
`achvmt_lib.get_player_achievements(p_name, mod)`: returns a table containing all the achievements unlocked by `p_name`, where entries are in the format `ID = true`
I'm Zughy (Marco), a professional Italian pixel artist who fights for FOSS and digital ethics. If this library spared you a lot of time and you want to support me somehow, please consider donating on [LiberaPay](https://liberapay.com/Zughy/).