Closed meleu closed 3 years ago
Another thought I had: use the awarded.mode
field as bit flags.
A feature I currently miss is a way to see if a user got an achievement via manual unlock.
Sometimes we (admins) manually award achievements for users and it can confuse the devs when trying to solve their tickets (see #120).
Also, we can make it possible to allow the user to earn the achievement again normally by playing if the achievement is flagged as "manually awarded. It would just remove (set to zero) the manual award flag, update the timestamp and not award points (also not return an error).
According to the database diagram @luchaos posted on #raweb the
Awarded
table has a field namedHardcoreMode
wich is a tinyint (then I guess 8 bits long).Currently it seems to be used only as a boolean:
0
is "not-hardcore" (aka softcore) and1
is hardcore.I would like to propose another value-meaning:
2
- Unofficial.(Question: possibly rename this field to simply
mode
in V2?)Usecase
Recently we changed the behavior of Unofficial achievements (PR #141) making them not be awardable on the site (therefore giving no points to the user). The main reason for this decision is to not give points when an achievement is not yet in the Core. But I recognize that having a timestamp of when a player earned the achievement can help at the development (and debugging) stage.
My intention is to use the "Unofficial mode" to register the timestamp of when an user got an achievement and DO NOT give the points.
Also, I want to make it be always "earnable", which means that when the user triggers the cheevo again the timestamp is updated (similar to what happens when users improve their score on a leaderboard). It would NOT return that error saying "User already has this achievement awarded."
EDIT Here's the diagram: