CGMV Achievements

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
CGMV Achievements
By: Casper Gaming (Casper667)
Last Update: 11/4/2018
Latest Version: 1.7

This plugin creates an achievement system in your game. You can set points, difficulty, and lots of other information for achievements. It also will automatically track some requirements, such as win count or even switches and variables! Achievements can have rewards which will automatically be given to the party upon earning the achievement. This plugin will show a pop-up on the map scene when an achievement is earned if using the Toast Manager plugin.

  • Achievement scene with unlimited achievements
  • All setup is done through the plugin manager
  • Achievements can be automatically tracked and earned or manually tracked and earned
  • Pop-ups when achievement earned if using CGMV Toast Manager


Import into plugin manager and enable the plugin. Some customization options available.

Plugin (along with all my other plugins) can be found here: https://www.caspergaming.com/plugins/cgmv/achievements/
For pop-up window functionality, requires CGMV Toast Manager: https://www.caspergaming.com/plugins/cgmv/toastmanager/
Requires CGMV Core, which can be found here: https://www.caspergaming.com/plugins/cgmv/core/

http://caspergaming.com/terms-of-use/

Version 1.0 - Initial Release

Version 1.1
- Added customization options for the text in most areas of the achievement scene.

Version 1.2
- Achievements are now 1-indexed (id same as shown in plugin manager).
- Fixed bug with earning achievements by their name.
- Added achievements for CGMV Encyclopedia w/ Bestiary Plugin.
- Secret achievements should now display less information about themselves before earn.

Version 1.3:
- Can now scroll with Arrow Keys and Mouse Wheel
- No longer relies on deprecated CGMV Core commands

Version 1.4:
- Added support for CGMV Professions

Version 1.5:
- Updated for newest version of CGMV Core
- Fixed a bug with achievement requirements not having correct Profession JSON in default value.

Version 1.6:
- Fixed bug with secret achievements not showing the correct name.

Version 1.7:
- Changed how the description displays, it now automatically makes new lines based on text width.
 
Last edited:

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
This is great stuff! Thank you for sharing! I personally love playing with new plugins, and find yours to be very easy to use.

Not sure if this is intentional, but I find a small "error" (but I could be doing something wrong as well):
trophies.png

I tried messing with some of the parameters, like adding a space after the "100" in the rewards portion of the plugin, but nothing I did created a space between the number and the word gold.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
Hi, thanks for the feedback.

It is because when I tested it I only tested with "G" as the currency unit and had not considered it would look weird when the currency unit was changed to an actual word. I have updated the plugin to version 1.1 to allow you to add a space there, as well as change a lot of the text that shows up by default.
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
Hey there, me again! :aswt: Loving the achievements/toast plugins thus far. I was just hoping to make a suggestion, if I may, to give us the option to make the toast/popup upon receiving an achievement to appear at the top of the screen, rather than the bottom.
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,326
Reaction score
1,286
First Language
Finnish
Primarily Uses
RMMV
Is it possible to make this compatible with Steam's achievements?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
@Fernyfer775 Do you mean all of the toasts at the top of the screen all the time? Or just the ones for achievements. It's easy to do them all but if you just want specific toasts to be there it's a little more challenging.


@Tuomo L I would have to look into how steam achievements work. I've never dealt with steam before so it's new territory for me. I will try to get it working, no ETA on when though (I am also a little busy working on converting some of my other VX Ace scripts to MV plugins).
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
You are correct. Using the toasts and achievements plugins together, whenever an achievement is earned, the popup window is down at the bottom, where you usually have the dialogue box, so sometimes it gets in the way if you get an achievement and then a dialogue box opens up.

I went in and just tweaked the Toast plugin a little and moved the popup box to the top of the screen, but figured it would be a nice addition to have for others who don't know how to do it themselves. :)
 

TheCosmicSlug

Veteran
Veteran
Joined
Apr 7, 2017
Messages
48
Reaction score
20
First Language
English
Primarily Uses
RMMV
first off can I just say I really like this plugin, Thankyou Casper667!

Now is there anyway this could be modified to show unlocked achievements from the title screen?

Ive added achievements to the menu, but nothing shows up until after a game has been loaded and returned to title screen, then it displays achievements just fine.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
Achievements are saved with game data, which isn't loaded until a game is loaded since before then the game doesn't know which save file to load. Are you wanting achievements to be global, or do you only have one save file so this isn't a problem? If you want them to load at title scene and only have one save file that shouldn't be too hard to just load the achievements from the latest save file, but it could behave weirdly if you had multiple save files. If you wanted them to be global across all save files, that would need a pretty big update.
 

TheCosmicSlug

Veteran
Veteran
Joined
Apr 7, 2017
Messages
48
Reaction score
20
First Language
English
Primarily Uses
RMMV
I was hoping for global achievements but did think it might be too big a change... but loading achievements from the latest save sounds like a good compromise.

I'm still learning JS/RMMV myself so I don’t know if this is possible, but if on starting a new game, the achievements from the latest save could be transferred to the new game it could give the appearance of global achievements... does that make sense?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
The issue with global achievements is for cumulative things and progress tracking. I use the built in methods for tracking steps and other things like that. If a player takes 100 steps in one game, and then starts a new game, their step counter will be at 0 again for that file. Same with playtime, etc. For global achievement's I'd need to either track everything globally, or you'd seemingly lose progress on achievements depending on what save file you were using (had 100/200 steps for an achievement, loaded a new game suddenly at 0/200 steps). This could also cause some issues if you earned an achievement in one file but the new file would not have earned it, which could cause it to display some confusing information. Giving out rewards for earning achievements is something else to consider. Another issue is with % based achievements, such as my upcoming encyclopedia plugin where achievements will be available for discovering x% of the encyclopedia. If there is an achievement for discovering 100% of the encyclopedia, should progress transfer over via save files where you could have 2 files at 50% and together they make 100%? Of course it is possible to make achievements global, but it is a lot more work than a simple edit. Right now I am focusing on porting my CSCA scripts for VXA to the CGMV plugin collection for RMMV, so don't really have the time to make any major adjustments to plugins that have already been released. I will keep it in mind for the future.

If you wanted to just load the latest save file's achievements for the title screen, DataManager provides methods already for getting the last accessed save file (DataManager.latestSavefileId), and loading its data (DataManager.loadGame) which is where achievements are stored. You could call these in the initialization in the title scene and it should work. I tested the following code briefly and it seemed to work.

Code:
var alias_CGMV_Achievements_SceneTitle_initialize = Scene_Title.prototype.initialize;
Scene_Title.prototype.initialize = function() {
    alias_CGMV_Achievements_SceneTitle_initialize.call(this);
    DataManager.loadGame(DataManager.latestSavefileId());
};
 
Last edited:

TheCosmicSlug

Veteran
Veteran
Joined
Apr 7, 2017
Messages
48
Reaction score
20
First Language
English
Primarily Uses
RMMV
aah its much more complicated than I imagined, of course! I'll give this code a go later sounds like it should do the trick. Thanks again for releasing such a nice achievements plugin
 

Jrrkein

Insert Witty Title Here
Veteran
Joined
Apr 20, 2014
Messages
164
Reaction score
38
First Language
Indonesia
Primarily Uses
RMMV
Is there a way to earn a secret achievement?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
Secret achievements should work just like normal achievements, except they will either be hidden from the list until earned or they will have their name obscured until earned depending on what options you select when setting up the plugin. Let me know if you've run into a situation where this is not the case.
 

Jrrkein

Insert Witty Title Here
Veteran
Joined
Apr 20, 2014
Messages
164
Reaction score
38
First Language
Indonesia
Primarily Uses
RMMV
Here's my problem.
Achievement 1 is a normal achievement
Achievement 2 is a secret achievement
So I use the plugin command "CGMVAchievements EarnID 2" it would just earn the Achievement ID 1 instead of 2 while achievement 2 somehow can't be earned thru plugin command. Is there a problem?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
I have no idea why that would be happening to you. However, something is that achievement ID's are 0-indexed so achievement EarnID 2 will actually earn the 3rd achievement in your achievement list. So to earn achievement 2 you would want "CGMVAchievements EarnID 1"

I will change this in the next update to my achievement script, probably coming this weekend, so that it is 1-indexed like the maker shows in the plugin manager to avoid this confusion in the future.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
Updated to version 1.2. This should be more user-friendly to use now, some bug fixes, and added support for my encyclopedia plugin.

Version 1.2:
- Achievements are now 1-indexed (id same as shown in plugin manager).
- Fixed bug with earning achievements by their name.
- Added achievements for CGMV Encyclopedia w/ Bestiary Plugin.
- Secret achievements should now display less information about themselves before earn.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
Update to version 1.3. This update adds a much requested feature of allowing the user to manually scroll up/down for the display window.

Version 1.3:
- Can now scroll with Arrow Keys and Mouse Wheel
- No longer relies on deprecated CGMV Core commands

This update requires CGMV Core 1.3+ (also updated today) so you will also need to update that addon as well: http://caspergaming.com/dev/cgmv/#core
 

ArtikDart

Dream Developer
Veteran
Joined
Jun 4, 2016
Messages
31
Reaction score
24
First Language
Italiano
Primarily Uses
RMMV
EDIT:
I wrote the message in the right topic.
I ask the moderators if you can delete this message. I apologize again.


Hello casper, thanks for this great plugin :)
I wanted to ask you how I could solve this problem.




The plugin conflicts with SuperToolsEngine of SumRndmDde if I move the "CGMV_Window_EncyclopediaDisplay" window.
The error, however, does not create problems in the game, but it is annoying to see it there in the console.
 
Last edited:

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
224
Reaction score
309
First Language
English
Primarily Uses
RMMZ
Small update today. If you plan to make profession achievements, please also update my professions plugin as well.

1.4:
- Added support for CGMV Professions
 

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

Latest Threads

Latest Profile Posts

Do you have an audio you want me to animate? If so send me the youtube link and I’ll animate it.
Okay, so I'm working on Draft 2 of my game's script.
Will try to keep you guys posted, if you're interested!

This is vid of my new game, Crystalgazers. A demo is available on my Gamejolt

I just thought of the best achievement for my game: "'I Didn't Know You Were a Developer!' Find and enter one or more dev room(s)."
I made this animation to apply to a job, what do you think?

Forum statistics

Threads
105,589
Messages
1,014,826
Members
137,253
Latest member
Koshibari
Top