waynee95's Achievements Plugin

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
WAY_Achievements
by waynee95​

Create Achievements for your game.

Webp.net-compress-image.jpg

Features
  • Uses the new MV1.5.0 Plugin Parameter
  • Create many different categories
  • Notification popup window
  • Compatible with YEP_MainMenuManager
  • Use any JavaScript code as the condition for your achievement
How to use
Put this plugin at the bottom of the list.

How to add an achievement to the game:
  1. Open the plugin in the Plugin Manager
  2. Click on the Achievement List parameter
  3. Click on an empty slot
  4. Now you can create an achivement
Check out the help file for more infos!

Download: https://raw.githubusercontent.com/waynee95/mv-plugins/master/dist/WAY_Achievements.js

!!! Make sure to also install WAY_Core !!!

You can get it here https://raw.githubusercontent.com/waynee95/mv-plugins/master/dist/WAY_Core.js

Terms of Use
This work is licensed under the MIT license.
More info here: https://github.com/waynee95/mv-plugins/blob/master/LICENSE
 
Last edited:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
647
Reaction score
382
First Language
English
Primarily Uses
N/A
Welcome back Waynee! Missed you bro!
Edit: No screenshots?
 

Jewelraffe

Villager
Member
Joined
Feb 19, 2017
Messages
26
Reaction score
5
First Language
English
Primarily Uses
RMMV
Awesome!

Small question, is it possible to put an achievement into multiple categories?
 

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
@Jewelraffe
That's a good idea. I implemented it just now. Just download it again.

WAY_Achievements v1.1.0
- Allow achievements to be part of multiple categories

Now you can specify multiple categories for the achievement. Just add all the category names to the Category parameter of the achievement and seperate them by a space, like "All Battle Items". Then the achievement would appear in all those 3 categories.
 

Jewelraffe

Villager
Member
Joined
Feb 19, 2017
Messages
26
Reaction score
5
First Language
English
Primarily Uses
RMMV
Oh nice! Thanks waynee95!

I even figured out two possibly useful conditions for people to use:

$gameParty.members().indexOf($gameActors.actor(putIDhere)) > -1 will grant the achievement if that actor is in your party and while probably common knowledge amongst programmers, but I managed to string together a bunch of conditions with && and !condition works for inverses too. I even strung 5 level checks to give an achievement for 5 specific heroes being at L50.

So $gameSwitches.value(1) && !$gameSwitches.value(2) would grant achievement if switch 1 is on while switch 2 is off. Figured I'd mention this so laymen can find even more ways to use this cool plugin. I didn't even know this worked until I tried it!
 

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
@Jewelraffe
Really cool to see what people come up with, I will add a small example for the "!" and "&&" to the plugin help file. :)
 

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
WAY_Achievements v1.2.0
I added an option and plugin commands for enabling/disabling the notification popups.
 

Raggon

Veteran
Veteran
Joined
Sep 29, 2018
Messages
38
Reaction score
23
First Language
english
Primarily Uses
RMMV
hi great plugin. i need help getting the id of the achievement getting the common event please . i want to make an if condition. like if $gameSwitches.value(1) what do i use for if $gameAchievements.value(1) ? would that return an achievement with the id of 1 ?

also to expand on this i`m trying to make a check to stop the achievement from coming back multiple times. once the achievement(1) comes the common event tells a switch(1) to come on and if the switch is on achievement doesnt pop up again.
 
Last edited:

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
@Raggon
To get the achievement for a corresponding id, you use
Code:
$gameAchievements.achievement(id)
What do you mean by

"stop the achievement from coming back".

It shouldn't come back, unless you revert the condition somehow?
 

Raggon

Veteran
Veteran
Joined
Sep 29, 2018
Messages
38
Reaction score
23
First Language
english
Primarily Uses
RMMV
i have an intro and if someone watches it i put
Code:
$gameSwitches.value(401)
before that i just switched the switch 401 on . for some reason . it keeps popping back up...

And thankyou for your code...

Now this is not working. im trying to tell the common event if someone watches the Achievement with id 7 run this .

which is going to be a check to stop any more coming up. i can do it with multiple common event calls but i was trying to do it with this one common event.

At the moment all of them are loading even if only id 7 has been achieved....

Hey can you tell me what the code is
to check if id 7 has been achieved? :)


p.s. i had 400 frames for notification popup put it down to 120... i guess on auto change map the achievement popup plays a sound and comes back..
 
Last edited:

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
@Raggon
To check if an achievement is completed, you do
Code:
$gameAchievements.achievement(id).check()
inside an if. If this will evaluate to true, then the achievement is completed.

EDIT: What is the condition specified in the plugin params for the achievement that "comes back"?
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
392
Reaction score
273
First Language
English
Primarily Uses
RMMV
Hi, I wanted to use your Achievements plugin, but no matter where I place it in the Plugin Manager, the attached error pops up. Not sure what I am doing wrong...
 

Attachments

waynee95

LunaTechsDev
Veteran
Joined
Jul 2, 2016
Messages
676
Reaction score
588
First Language
German
Primarily Uses
RMMV
@Jenova
Did you create an achievement already or do you just put the plugin into the manager and it does not even start?

What happens when you disable all other plugins?
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
392
Reaction score
273
First Language
English
Primarily Uses
RMMV
@Jenova
Did you create an achievement already or do you just put the plugin into the manager and it does not even start?

What happens when you disable all other plugins?
Sorry it took so long. I was working on my website.

I cant disable ALL plugins because then I get an error from Orange Time System that its not enabled. But once I turn it on (all others but your plugins and OTS are off) the error still comes back (Left Hand error)

I do have ONE achievement. Its just to take 100 steps. I set it up to react when a switch is turned on.

Funny thing is, I cant even start a New Game without this error happening.

EDIT: To fix this kind of issue, make sure you have TWO symbols in your Achievements Condition instead of the one I had.

Example:
Code:
$gameVariables.value(30) == 600
Do you see how I have "==" and not just "="? If you wanted to make something equal, you would make it "==" instead of "=". This was my mistake. I hope this helps others with their issues of this kind. :)
 
Last edited:

CorpseFather

Veteran
Veteran
Joined
Aug 5, 2018
Messages
31
Reaction score
5
First Language
English
Primarily Uses
RMMV
How big does the background need to be?
 

Raggon

Veteran
Veteran
Joined
Sep 29, 2018
Messages
38
Reaction score
23
First Language
english
Primarily Uses
RMMV
hiiii :) can you help me manually change the opacity in your code please. I have yanfly core and have set the games opacity to 0 but now im trying to get the Way notification to 255 opacity.


i narrowed it down to

Code:
 window.Scene_Achievements = Scene_Achievements; //===========================================================================
  // Window_AchievementNotification
  //===========================================================================

  var Window_AchievementNotification =
  /*#__PURE__*/
  function (_Window_Base) {
    _inherits(Window_AchievementNotification, _Window_Base);

    function Window_AchievementNotification(x, y, width, height) {
      var _this6;

      _classCallCheck(this, Window_AchievementNotification);

      _this6 = _possibleConstructorReturn(this, _getPrototypeOf(Window_AchievementNotification).call(this, x, y, width, height));
      _this6.opacity = 0;
      _this6.contentsOpacity = 0;
      _this6._showCount = 0;
      _this6._achievement = null;

      _this6.refresh();

      return _this6;
    }

    _createClass(Window_AchievementNotification, [{
      key: "loadWindowskin",
      value: function loadWindowskin() {
        this.windowskin = ImageManager.loadSystem(notifyWindowSkin);
      }
    }, {
      key: "updateFadeIn",
      value: function updateFadeIn() {
        this.opacity += 16;
        this.contentsOpacity += 16;
      }
    }, {
      key: "updateFadeOut",
      value: function updateFadeOut() {
        this.opacity -= 16;
        this.contentsOpacity -= 16;
      }
    }, {
      key: "text",
      value: function text() {
        if (this._achievement) {
          var name = "\x1BI[".concat(this._achievement.completeIcon, "]").concat(this._achievement.name);
          return notifyMessage.format(name, this._achievement.points);
        }

        return "";
      }
    }, {
      key: "update",
      value: function update() {
        Window_Base.prototype.update.call(this);
        if (_disablePopups) return;

        if ($gameAchievements._notifyQueue.length) {
          if (!this._achievement && this.contentsOpacity < 1) {
            this._achievement = $gameAchievements._notifyQueue[0];
            this.refresh();
            this._showCount = notifyShowFrames;
            if (notifySound && notifySound.name) AudioManager.playSe(notifySound);
          }

          if (this._achievement) {
            if (this._showCount > 0) {
              this.updateFadeIn();
              this._showCount--;
            } else if (this.contentsOpacity > 0) {
              this.updateFadeOut();
            } else {
              this._achievement = null;

              $gameAchievements._notifyQueue.shift();
            }
          }
        }
      }
    }, {
      key: "adjustWidthBasedOnText",
      value: function adjustWidthBasedOnText() {
        this.width = Math.ceil(this.textWidthEx(this.text()) + this.standardPadding() * 2);
        this.createContents();
      }
    }, {
      key: "refresh",
      value: function refresh() {
        if (this._achievement) {
          this.adjustWidthBasedOnText();
          this.drawTextEx(this.text(), 0, 0);
        }
      }
    }]);
Maybe? what line do i need to add where to make achievements popup window skin Opacity 255?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.
Finally finished my menu redesign after like a month of coding! I hate designing menus... Good news though - I thought of a complete redesign for it now, so yay...
Still no scam calls all day... also I got a quick gig designing a mascot drawing for a small business, so I might actually make some green of my own after all. That would be a perfect job for me, since I love art and digital design.
Job concerns. Love where I work, but I have severe anxiety while I'm outside at night.

Forum statistics

Threads
104,386
Messages
1,006,007
Members
135,911
Latest member
Lightstaroflightclan
Top