Platinum Achievements


After yesterday's update, I also got a request to make it simpler to have achievements which are automatically granted based on some subset of achievements being earned. Some use cases for this include granting an achievement for getting all achievements in the game (aka a Platinum achievement or 100% completion), or something like an achievement which is granted for each ending earned, and an additional achievement for getting all endings.

To facilitate this, there's now a callback, myconfig.ACHIEVEMENT_CALLBACK, which is passed the Achievement object whenever that achievement is granted. This should make it quite flexible, but since I anticipate most people will want it for something like a platinum achievement, I've also included a LinkedAchievement class which makes it easy to link a given achievement with the other achievements that need to be earned before it automatically unlocks. There's now an Example 5 and Example 6 to illustrate this behaviour, and sample LinkedAchievement callbacks. The README has been updated with more information on the callback and LinkedAchievement class.

Lastly, I also added a reset method and Reset button action for achievements in case you want to clear all the achievements at once (probably for testing, but maybe to let players reset their achievements too).

And since I anticipate this question may be asked:

"Do I need to update?"

Answer: nope, unless you want the new achievement callback or reset methods. There aren't any bug fixes in this one, just new features and a little bit of reorganization. You can see the GitHub history for the specific changes.


And in other news, the layered image mask tutorial is nearly complete aside from me saving a whole bunch of images. I've never made so many gifs for a tutorial in my life. I hope it helps explain things 😅 It'll be up on my website this weekend!

Files

achievements.zip 14 kB
Sep 19, 2023

Get Achievements for Ren'Py

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

(+1)

Thanks yet again!