CGMV Achievements

Discussion in 'JS Plugin Releases (RMMV)' started by casper667, Feb 21, 2018.

  1. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    CGMV Achievements
    By: Casper Gaming (Casper667)
    Last Update: 11/4/2018
    Latest Version: 1.7

    Introduction
    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.

    Features
    • 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

    Screenshots
    [​IMG]

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

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

    Credit & Terms
    http://caspergaming.com/dev/terms_of_use/

    Version History

    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: Nov 5, 2018
    #1
    JiM83, Val, thekenbaum and 5 others like this.
  2. Fernyfer775

    Fernyfer775 Veteran Veteran

    Messages:
    1,297
    Likes Received:
    800
    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.
     
    #2
  3. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #3
    Fernyfer775 likes this.
  4. Fernyfer775

    Fernyfer775 Veteran Veteran

    Messages:
    1,297
    Likes Received:
    800
    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.
     
    #4
  5. Tuomo L

    Tuomo L Oldbie Veteran

    Messages:
    2,288
    Likes Received:
    1,258
    Location:
    Finland!
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Is it possible to make this compatible with Steam's achievements?
     
    #5
  6. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    @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).
     
    #6
  7. Fernyfer775

    Fernyfer775 Veteran Veteran

    Messages:
    1,297
    Likes Received:
    800
    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. :)
     
    #7
  8. TheCosmicSlug

    TheCosmicSlug Veteran Veteran

    Messages:
    46
    Likes Received:
    15
    Location:
    United Kingdom
    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.
     
    #8
  9. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #9
  10. TheCosmicSlug

    TheCosmicSlug Veteran Veteran

    Messages:
    46
    Likes Received:
    15
    Location:
    United Kingdom
    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?
     
    #10
  11. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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: Mar 26, 2018
    #11
    TheCosmicSlug likes this.
  12. TheCosmicSlug

    TheCosmicSlug Veteran Veteran

    Messages:
    46
    Likes Received:
    15
    Location:
    United Kingdom
    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
     
    #12
  13. Jrrkein

    Jrrkein Veteran Veteran

    Messages:
    116
    Likes Received:
    7
    First Language:
    Indonesia
    Is there a way to earn a secret achievement?
     
    #13
  14. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #14
  15. Jrrkein

    Jrrkein Veteran Veteran

    Messages:
    116
    Likes Received:
    7
    First Language:
    Indonesia
    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?
     
    #15
  16. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #16
  17. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #17
  18. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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
     
    #18
  19. ArtikDart

    ArtikDart Dream Developer Member

    Messages:
    24
    Likes Received:
    8
    Location:
    Italia
    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.

    [​IMG]
    [​IMG]

    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: Apr 24, 2018
    #19
  20. casper667

    casper667 Veteran Veteran

    Messages:
    60
    Likes Received:
    73
    First Language:
    English
    Primarily Uses:
    RMMV
    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
     
    #20

Share This Page