Oh, another bug.
View attachment 234336
It happened with global achievements and when launching a quick test (ctrl + R when editing an event). My proposed fix, althought I'm not sure about this one:
JavaScript:
Achievement_PopUp.prototype.updateShowing = function() {
if (!$gameSystem.achievPopUp) return; // Fix
this._queue = $gameSystem.achievPopUp.queue;
if (this.isQueueBusy() && !this.isAnimating() && !this.isTimerWait()) {
this.show();
}
};
Concerning the trophies, concerning the experience I got, being able to not show certain achievement categories in the category list (as I did) would be the best. Having a category associated to this trophy is actually useful as achievement can have multiple categories.
EDIT
@SMO_Valadorn
There is another something I found that was very weird:
JavaScript:
Requirement.convertAliasCodes = function(text) {
value1 = Number(this.value());
value2 = Number(this.tvalue());
if (this.isReached() || this._achievement.isUnlocked()) {
value1 = value2;
}
text = text.replace(/\\value1/g, value1);//old versions
text = text.replace(/\\value2/g, value2);//old versions
text = text.replace(/<ItemName>/gi, this.getItemName());
text = text.replace(/<CurrentValue>/gi, value1);
text = text.replace(/<RequiredValue>/gi, value2);
return text;
};
I don't exactly get why we have value1 = value2. It works well for >= or == operation, but for the other ones, like let's say <, it makes no sense. Should I understand the other operations aren't supported at all?
Again, another something:
JavaScript:
SMO.AM._GameSystem_onBeforeSave = Game_System.prototype.onBeforeSave;
Game_System.prototype.onBeforeSave = function() {
SMO.AM._GameSystem_onBeforeSave.call(this);
SMO.AM.refreshAchievements();
};
It seems weird to not have an option to not refresh achievements on saves, as there is for transfert.
I rarely use CTRL + R to test an event so sometimes I forget to test the compatibility with it, thanks man, I'll be sure to fix that on the next version!
About the value1 = value2, the plugin has the ">=" operator as default and that works fine with all the default alias, you can use all the other comparison operators but I couldn't think of a good way to express "value1/value2" if value1 > value2 for example, I could save the value1 once the achievement is unlocked but that would just use more data, so I left it to the developer to choose a new alias for other operators, lets say you want the player to have more than 2 party members, you could have an alias like "Have more than <RequiredValue> party members" instead of the default "Party Members <CurrentValue>/<RequiredValue>".
About the parameter to not refresh the achievements on save, I wanted to make sure the achievements are all updated at the moment the player saves, that's specially important for local range, you see, there's parameter called "Local Load Pop Up" (I think I forgot to add an explanation for it on the help section on v1.04, but I've already added it on v1.05), basically you can use it to decide what happens to the pop up's queue after you load the game, you can either Skip (pass the first achievement on the pop up's queue, if any), Clear (clear the pop up's queue) or Remember (that just leaves the queue as it is).
Let's say you have a quick-save/load feature in your project and the player unlocks an achievement right before saving the game, everytime the player loads the game he would see the achievement being unlocked. I refresh the achievements right before the save so that I can check if requirements with Save Count are reached and unlock its achievement, and after loaded you can skip or clear the queue.
On the other hand, refreshing after transfer is just to make sure you have your achievements updated on a new map... it also makes sure you unlock any achievement with a condition like "$gameMap.mapId() == 3" right away.
Sorry if I wrote too much haha, you may add me on Discord if you want to ask me more stuff or share another bug you found, I usually answer there faster (SMO_Valadorn#1279)