SMO_Valadorn

Villager
Member
Joined
Aug 31, 2019
Messages
26
Reaction score
44
First Language
Portuguese
Primarily Uses
RMMV
Hi, @ravenhood. I have this two problems exactly too.
The progress bar don't unlocked and only displaying 99% I resolved it turn "Global" in "Local".
EDIT: I Resolved it already! The error was in Global because I don't have a Achievements.json empty file in the data folder. I read the plugin help and I found my error. You only need if turn it in global, create an empty file "Achievements.json" in the data folder and solved!

I want to ask too how resolve the second trouble about plugins of Yanfly (Message Core and the other ones, not only Mess.Pack1, also EvalText and Macros). Don't look to be compatible... Hope that SMO_Valadorn can help us. This is a very amazing plugin! :D MerryXMas! And sorry for the bad english, is not my first language.
I'm working on a way to create the json file automatically in case it doesn't exist.
I added compatybility with YEP_MessageCore, it'll surely be on the next version but I'll need to take a look at EvalText and Macros.

Happy holidays everyone!:kaoluv:
 

Marianna

Queen of wolves
Member
Joined
Sep 2, 2018
Messages
18
Reaction score
10
First Language
Spanish
Primarily Uses
RMMV
I'm working on a way to create the json file automatically in case it doesn't exist.
I added compatybility with YEP_MessageCore, it'll surely be on the next version but I'll need to take a look at EvalText and Macros.

Happy holidays everyone!:kaoluv:

Oh, really? That's wonderful! I will waiting for this! I really love this plugin. I think is the most complete plugin about achievements, with a lot of cool functions. So... I will waiting for the next update! Because I need YEP_MessageCore and others, but I don't want to say good bye to this one either. Thank you very much for your fast reply @SMO_Valadorn, and thanks too for @ShadowDragon. :D
 

Banjo

Veteran
Veteran
Joined
Jan 4, 2013
Messages
104
Reaction score
22
First Language
English
Primarily Uses
RMVXA
For some reason I can't fathom, I can't get achievements to be "remembered", even though I have 'Global' enabled.

Here's what I've done:

1) I created a blank text file named Achievements.json in my data folder (0kb).

2) Played my game and unlocked a couple of achievements. Checked and they showed up in the achievements screen as unlocked correctly.

3) Exited the game. Restarted it and checked the achievements screen... no achievements had been unlocked!

4) I checked the Achievements.json file and it was now 1kb with a string of letters and numbers as the contents when opened in a text editor (encrypted achievements, presumably).

I have fiddled with this for hours and still can't figure out what is causing achievements to reset when the game is exited.

Any help from anyone at all is GREATLY appreciated!

Strangely, it seems to work when I use "test play" but NOT when I run game.exe normally (that is, it "remembers" any achievements earned during test play but never those from normal run or created deployment). I checked and Achievements.json gets written to during test play but not when the game is run via game.exe (tested with a fresh file each time, and only with test play did the file get text written to it and its size increase).
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,502
Reaction score
1,728
First Language
Dutch
Primarily Uses
RMMV
@Banjo if you deploy the game and test it, and work, do you exacly "save"
the game and continue? or save and new game (not continue).

if you do continue from save file and not unlocked, it is strange indeed.
I didn't test the deployment part yet, so I cannot tell though for sure.
 

Banjo

Veteran
Veteran
Joined
Jan 4, 2013
Messages
104
Reaction score
22
First Language
English
Primarily Uses
RMVXA
@ShadowDragon
Saving or loading doesn't make a difference. Whenever I run the game from a deployed version or from the source folder using Game.exe (i.e. with RPG Maker MV not first running), the achievements don't save to Achievements.json when I unlock one. If I play in "test mode", any achievements unlocked save, and will be visible no matter how I start the game.

SOLUTION!
One of my awesome beta playtesters found the bug!

It seems to be a path issue, and changing:
Code:
SMO.AM.saveGlobalAchievements = function() {
    var achievs = JSON.stringify(SMO.AM.GlobalAchievements);
    var fs, path;
    fs = require('fs');
    path = 'data/Achievements.json';
    if (fs.existsSync(path)) {
        achievs = btoa(achievs);
        achievs = 'S' + achievs;
        fs.writeFileSync(path, achievs);
    }
}
to:
Code:
SMO.AM.saveGlobalAchievements = function() {
    var achievs = JSON.stringify(SMO.AM.GlobalAchievements);
    var fs, path;
    fs = require('fs');
    path = 'www/data/Achievements.json';
    if (fs.existsSync(path)) {
        achievs = btoa(achievs);
        achievs = 'S' + achievs;
        fs.writeFileSync(path, achievs);
    }
}
... makes achievements save properly now when the game is run via Game.exe (deployed or source).

the "www/" was needed because deployed versions (and the source folder too) put the game in a subfolder "www" below Game.exe. Presumably test run within RPGMMV doesn't check and runs the game straight from the "www" folder, hence why it worked.

The downside of fixing this is that achievements now *don't* save when the game is run from test mode, but in some ways I prefer this as I don't have to keep resetting achievements every time I test the game. IMO, this is preferred functionality (i.e. achievements don't persist after you exit test mode but do when playing normally).

If the dev implements a "better" fix that makes it work in both situations, I don't mind, but I'm happy with the edit I made for now.

Attached is the edited version of the plugin; only the changelog and above line was altered from 1.03. I labled it as 1.03b to avoid conflicting with future official updates.

This really is an awesome plugin, incidentally! :)
 

Attachments

  • SMO_Achievements.js
    181.5 KB · Views: 3

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,502
Reaction score
1,728
First Language
Dutch
Primarily Uses
RMMV
when the update comes, the save is re-coded differently.
so it works better :) but nice catch though ^^
 

Banjo

Veteran
Veteran
Joined
Jan 4, 2013
Messages
104
Reaction score
22
First Language
English
Primarily Uses
RMVXA
Thanks! Glad to know it will be fixed.

I just needed to fix my own game ASAP as testers were freaking out about achievements not saving! I thought about making it so both test mode and deployed mode works (i.e. recode the whole save function), but decided to stick with "only deployed mode saves" for reasons explained in my post above.

Will swap out my edited version for the official 1.04 when it comes, though.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,502
Reaction score
1,728
First Language
Dutch
Primarily Uses
RMMV
I think it will be higher, but I would recommend BEFORE you swap, what things are
changed, while the GUI will be there as well, so check first, because some things
might be changed or differently, or backup the game before adding, to see
if everything still works the way you set it up :)
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
210
Reaction score
49
I like how it looks like genshin impact.. Is it possible the rewards are claimed in the scene and not auto added to inventory? Also, is it possible to have rewards that increase variable or EXP, i did not find example in the demo.. i dont know how to use the Custom(Advanced)
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,502
Reaction score
1,728
First Language
Dutch
Primarily Uses
RMMV
@xabileug it might be possible to claim the rewards if you combine it
with eventhing, like turning on the switch, and a npc somewhere, to
claim it when the switch is on.

you can add exp, not sure about increasing variables, but is possible
with a bit eventing on it.

while there is a tiny bug fixed on his side, but not updated, I know he
is busy and redo some parts to get the GUI working to make them.

I also know he is also busy on some other things, so I dont know how
high prioritize this plugin, where some things are fixed and added,
so maybe he take this feature in it as well, as well as the saving
problem that will be fixed there.

I hope he is doing well, it's been a while he is online.
 

SMO_Valadorn

Villager
Member
Joined
Aug 31, 2019
Messages
26
Reaction score
44
First Language
Portuguese
Primarily Uses
RMMV
Hi everyone!

@DarkSearinox92 Don't worry I'm still working on this plugin and recently got more time to work on it, I'm currently working on the editor of achievements to make the achievements' creation more user friendly, it also adds options to edit the menu.

@xabileug Claiming rewards is a mechanic that I've already considered and I'm gonna add it on the next update (it'll be an optional mechanic), I just need to finish the achievements' editor first but currently you can use the advanced option to increase a variable and add EXP to your actors, you just need to choose the "Custom(Advanced)" type and write the script on the "Advanced" field, I'll give you some examples of scripts:

var value = 1; var variableId = 10; var newValue = $gameVariables.value(variableId) + value; $gameVariables.setValue(variableId, newValue);
The code above will add 1 to the variable 10.

Adding 50 exp to the actor 2: $gameActors.actor(2).gainExp(50);

Adding 20 exp to the party leader: $gameParty.leader().gainExp(20);

I'll try and make it simpler to do with the editor, I'm just not sure yet when it'll come out :kaodes:

@ShadowDragon Yo, good to see you SD! I'm great, thanks, I hope your are doing well too! :biggrin:

Bye everyone! :kaoluv:
 

Latest Threads

Latest Posts

Latest Profile Posts

Been sick with a stomach virus for seven days now. Not going to work tomorrow because I'm still contagious according to my doctor.
Much as I love my job, I really hate playing "office politics". It would be nice if I didn't have to pretend to be someone else all day long.
I wanna get back into showing off Battlers and other assets I create again. But i'm always haunted by the "It's not good/realistic enough" voices that keep me from doing so.

Maybe I should get back to it, I did enjoy showing off whatever I came up with!
Big Google Warning Today for chrome users - apparently some kind of security threat has happened and everyone is being advised to update their Chrome browser ASAP by going to settings and/or "About Google Chrome", to update their browser version to a new one just released.

Forum statistics

Threads
115,956
Messages
1,094,367
Members
151,218
Latest member
snyrid
Top