Achievements Plugin

Hi im having a little trouble, when i use this on a 1280x720 project the tiny images look like this:
¿How can a fix it?
View attachment 307880
Wow, that looks pretty off!
I'll run some test and come up with an update

Hi im having a little trouble, when i use this on a 1280x720 project the tiny images look like this:
¿How can a fix it?
View attachment 307880

Resolution seem to not be the problem:

Test.png


Is Screen width and UI widh the same?
Are you using plugins that may interact with screen resolution?
Mmm maybe is because of this http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ try to use it and telll me if work
Resolution seem to not be the problem:

View attachment 307890

Is Screen width and UI widh the same?
Are you using plugins that may interact with screen resolution?
Mmm maybe is because of this http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ try to use it and telll me if work

Yes, it looks like VisuStella uses a different setting for Screen Resolution and UI Resolution. Already found a fix, I'll investigate a couple of more things and I'll patch all up
Here is a little update on the plugin after the report by Megum. First of all it was fixed the reported bug that would see a weird picture distribution if Screen Resolution and UI Resolution were different (such a the demo project of VisuStella).

Then I checked the leftover issues that were never investigated, such as changing map or scene while the Achievement Pop Up was showing or getting a reward while game was not intialized. Nothing major emerged, more details below!

Finally I added and external command to call the achievement completion (plus I left room to easily add more) in case you might want to call it from a scene or another plugin (the most classic scenario: Achievement Completed on first load of the game). It's most important to note that this external command need to be launched once the game database and plugins are completely loaded, but if you are using a JS script I'm confident you know what you are doing!

VERSION 1.3:

  • Fixed pictures misplacements if using a different Screen vs UI resolution
  • Investigated the possible issue of teleporting to another map while popping the achievement complete window, no issues have been recorded
  • Investigated the possible issue of changing scene (menu, save, game over, title screen) while achievement windows is popping. No fatal error, but it would be better to avoid such simultaneous events or the pop window might be lost
  • Investigated the possible issue about giving out rewards while not in the game. The game will IGNORE all the rewards, there is no way to recover them. That said, popping an achievement outside the game need the special external script call to be doable. So shame on you if you pop a rewarding achievement outside the game!
  • Added a script call to run the "Complete Achievement" command outside the plugin (see instructions in the description). Be sure to have the database and plugins ready before doing so.
Yes, it looks like VisuStella uses a different setting for Screen Resolution and UI Resolution. Already found a fix, I'll investigate a couple of more things and I'll patch all up
Thanks!!!
Here we are with a patch that covers two big problems, one is a known problem, the other was a surprise!

The unknown problem was that the plugin would try to load an existing database as encrypted or clear based on the "Encrypt data?" flag, but that happened even the dev changed idea mid development. Trying to load a clear code with encryption would throw a fatal error, while loading an encrypted database without decryption would load gibberish informations that would fatal crash the plugin once the player tried to open the Achievements! Worse, if the dev would only save new info, the plugin creates an half encrypted half decrypted database that is now rendered useless, wipe is the only solution.

Now the plugin will ignore the Encryption flag on database load and will check if the database is encrypted or not before processing the load.

Another long lasting problem are pictures being shown misaligned under certain circumstances (most notably, when UI resolution and Screen resolution don't match, like in the demo version of VisuStella used by many) that I thought to have solved in 1.3 but that seem to not be the case. Now I changed once again the pictures generation moving the process from the Scene to the Window, this way the pictures SHOULD be following perfectly the windows coordinates. I ran many test with many crazy resolutions and all worked just fine, if those problems persist then I would point to a plugin incompatibility with something modeling the graphics.

Final but important note!

It looks like the writer function is slower than the JS code so please give some times between commands. Writing many achievements at once is fine as they simply queque but if you are about to wipe the database then it needs a little time before writing on it again, doing things too fast may result in an incomplete wipe paired with an incomplete writing



VERSION 1.4:

  • Fixed a problem that would save achievements in both format (encrypted and clear) if the dev switched Encryption flag while adding them, this would result in a fatal crash once the plugin tries to load the JSON with both encrypted and clear data. The new load method now prevents another fatal crash that would happen when adding an achievement right after wiping the JSON. Thanks to F.O.X. Development for the report.
  • Changed the sprite generation function for the achievements pictures, now they anchor to the windows instead of the scene, this should solve once for all the misplacement bug when the UI resolution is different from screen resolution. Plus it should avoid conflict with other plugins that manipulate the windows behaviour (but this is something I can only guarantee to an extent)

Original thread: https://forums.rpgmakerweb.com/threads/achievements-plugin.164134/