HO Achievement System MZ

HO Achievement System MZ v1.1
Author: Horst Onager
Latest Update: 2024-11-22
------------------------------------------------------------------------------------------------

Hi everyone!

This plugin adds an achievement system into your game! I initially developed this plugin for RPG Maker MV, and now ported it for MZ with some new features and overhauled codebase for better performance and stability!


Key Features:
  • Rewards! Get gold, experience, items, weapons or armors as rewards for completing achievements!
  • Achievement Points! Earn points for completing achievements, and get rewards for reaching certain amounts of points!
  • An alert window to inform the players about their achievement progress!
  • Tiers! Split up achievements into smaller steps!
  • Progress bars! Visualize the progress the player has made so far!
  • Repeatable achievements! Set any achievement to be repeatable as many times as you like, or even infinitely often!
  • Global achievements! Save achievement progress across save files!
  • A lot of parameters for you to customize the achievement system to your liking!


Screenshots:
Spoiler: Screenshots
sc01.png
sc02.png
sc03.png
sc04.png
sc05.png


Downloads:


How To Use:

I've put detailed instructions and explanations in the plugin's help section, so hopefully that will be enough. But if you have any additional questions, feel free to ask here!


Terms Of Use:

This plugin is licensed under an MIT license, so it is free to use for commercial and non-commercial projects, as long as you mention "Horst Onager" somewhere in your game's credits.


Notes:

There is no automatic achievement completion or switch or variable tracking, so you will have to implement all achievement progress via plugin commands. However, you can additionally download a small extension plugin that provides functionality for some more common achievements like playtime, walked steps or earned gold (HO_AchievementExtMZ.js).

I've tested the plugin to the best of my abilities, but of course there could still be bugs in there, so let me know if you find any, or if you have any suggestions.


Happy RPG making!
Mmm maybe is a good idea to merge original plugin and ext in a same file? why 2 plugins?
I think its a little bit clearer this way, especially by making the plugin parameters less cluttered. I imagine they're already quite overwhelming ^^'
would you know if var parameters = PluginManager.parameters(pluginname); would be a sufficient way to keep the completed achievements when i do a new game plus for my game or would is there a better way to keep them as variable
That would just get you the plugin's settings, not the achievement progress.

All achievement progress in saved in the variable $gameAchievements, that exists per savefile. So depending on how your New Game+ system works, you would need to either just not reset that variable when the player finishes the game, or save it somewhere else so that it is synchronized between savefiles, I think there are some plugins for that out there.

But it's a good point, maybe I'll implement that directly into the plugin. I can't make promises though, I sadly don't have a lot of time right now ^^'
That would just get you the plugin's settings, not the achievement progress.

All achievement progress in saved in the variable $gameAchievements, that exists per savefile. So depending on how your New Game+ system works, you would need to either just not reset that variable when the player finishes the game, or save it somewhere else so that it is synchronized between savefiles, I think there are some plugins for that out there.

But it's a good point, maybe I'll implement that directly into the plugin. I can't make promises though, I sadly don't have a lot of time right now ^^'
its ok my man i just made all of them into variables that will carry on into new game plus! Great plugin overall though!
Thanks! 😀
its ok my man i just made all of them into variables that will carry on into new game plus! Great plugin overall though!
Any tips on how to go about doing this for every save? I'm fairly new to Javascript.
Just updated the plugin to v1.1! The plugin now supports saving achievements across savefiles. Also fixed some minor bugs.

@Afterthought_RG Does this solve your problem? Or did you mean something else?
Just updated the plugin to v1.1! The plugin now supports saving achievements across savefiles. Also fixed some minor bugs.

@Afterthought_RG Does this solve your problem? Or did you mean something else?
Perfect! Thanks a bunch!
I'm trying to use this plugin along side VisuStella plugins, but for some reason, I don't see any achievements in game even though I have 1 set in the plugin.

I set both it and its category to visible, and still nothing.
Is it just incompatible with VS or am I missing something?
I'm trying to use this plugin along side VisuStella plugins, but for some reason, I don't see any achievements in game even though I have 1 set in the plugin.

I set both it and its category to visible, and still nothing.
Is it just incompatible with VS or am I missing something?

It's kind of hard to tell what's going on there without more info. I've tested it with the base set of the VS plugin and it worked fine, but maybe there's an incompatibility with one I haven't tested.

Maybe do the following for a start:
1. What can't you actually see? Can you open the Achievement scene from the main menu but there are no achievements in there? Or can you not see the button in the menu at all? Can you see the category but not the achievement, or are both missing?
2. After starting the game, press F8 to open the console. Are there any error messages?
3. Disable the VS plugins one after another and test inbetween to see if it's a specific plugin that causes it. Also try disabling all of them and see if it works then.
4. Make extra sure the data is set up correctly. You said you set the achievement and category to visible, are you also sure that the achievement references its category correctly? If you're using the category name, try using the index instead.
5. If none of that helps, try setting up a minimal example project where you can reproduce that error and send it to me (best via DM, if you're using non-free plugins). Then I can look into it more.
It's kind of hard to tell what's going on there without more info. I've tested it with the base set of the VS plugin and it worked fine, but maybe there's an incompatibility with one I haven't tested.

Maybe do the following for a start:
1. What can't you actually see? Can you open the Achievement scene from the main menu but there are no achievements in there? Or can you not see the button in the menu at all? Can you see the category but not the achievement, or are both missing?
2. After starting the game, press F8 to open the console. Are there any error messages?
3. Disable the VS plugins one after another and test inbetween to see if it's a specific plugin that causes it. Also try disabling all of them and see if it works then.
4. Make extra sure the data is set up correctly. You said you set the achievement and category to visible, are you also sure that the achievement references its category correctly? If you're using the category name, try using the index instead.
5. If none of that helps, try setting up a minimal example project where you can reproduce that error and send it to me (best via DM, if you're using non-free plugins). Then I can look into it more.
Here's my response to all of those points.

1. I can open the Achievement menu, but there are no achievements displayed, but I still get the points for obtaining achievements.
2. There are no error messages.
3. I played-tested it with all VS and other plugins disabled, except yours, and it still didn't show anything.
4. Yes, all the data was set up correctly.
5. I did notice there was an "achievements" file in the saves folder. I deleted that, and they started appearing, but now it won't show any new achievements I add to the plugin list, and every time I start a new game or load a saved game, it gives me an Alert for getting an achievement I've already unlocked.
Hm, it might be an issue with the global achievements setting. Could you check if you have global achievements enabled, and if yes, disable the setting and test if it works then?

Edit: it is an issue with the global achievements. I'm working on a fix now and will upload it in the next few days.
Hey, I just uploaded a new version of the plugin to itch.io that should fix the bug.

@Mattaroni Let me know if this helps. And thanks for pointing it out!

Also, please keep in mind that while adding new achievements is no problem, deleting achievements from the list or re-ordering them can mess things up, in this case you should reset all the data:
  • if using global achievements, delete the file save/achievements.rmmzsave
  • if using local achievements, either start a new game, or open the console and type $gameAchievements.reset()
Got it, thanks for the help! 👍

Original thread: https://forums.rpgmakerweb.com/threads/ho-achievement-system-mz.167171/