POR_SaveCore

Discussion in 'JS Plugin Releases (RMMV)' started by Poryg, Mar 28, 2018.

  1. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    POR_SaveCore, v.1.2
    Author: Poryg

    Introduction
    A save core that gives user huge power over both their save menu content and their save menu appearance.
    Useful in combination with HIME_PreTitle events or other custom title screens, since it can really pump up the custom spirit of your game.
    Commissioned by @ZServ with special request that I make it public and free for commercial use. I took his request, upgraded it for extra flexibility and this is the result.

    Features
    • Togglable ability to start new game from the save menu (all savefiles/Empty savefiles only/None). Note that starting a new game via this route triggers an autosave in that slot!
    • Customizable amount of max saves
    • Customizable amount of rows you can see at once. One day I may support columns instead of rows. But never both at once. Due to the nature of certain things are handled it would be painful to program.
    • Customizable values of how many save slots must be at all times visible above/under the cursor
    • Customizable X, Y, sizes and opacity of various things. Not just with numbers, but also with code!
    • Description/Preceding texts are independent on what they are assigned to. That means you can treat them as two completely different texts! (e.g. you have weapon icons and they have preceding text, by default Gear. If you don't need that text, you can either remove it or do what I did in picture 3). Description texts also accept escape tags!
    • Speaking of escape tags, there's a custom escape tag for new line: <n>
    • Togglable visibility of leader's name
    • Togglable visibility of party members - characters, faces or off. Faces are scalable.
    • Togglable amounts of party members shown. Don't want to show whole party? Fully possible!
    • Togglable visibility of equipments. You cannot toggle each piece of equipment separately, but if you wish, you can only show certain party members' equipments (counts from leader)
    • Support for up to 10 custom texts with these features:
      • You can put in any code you want. Be it game variables, inventory items, random text strings based on story, whatever it is.
      • Each text has its description/preceding text. And just like the case above these texts are completely independent! The only difference is, custom texts accept code. Description texts don't.
      • Both custom texts and their description texts support escape tags.
      • Both custom texts and their description texts have their own appearance conditions. Don't want something to appear in the savefile until certain condition is met? Now you can.
    • Support for foreground and background images. These images are handled via PIXI to avoid collision with MV's garbage collection processes and should avoid memory leaks you have with preloader cores even if you keep some files preloaded.
    • Need more custom texts/backgrounds/foregrounds? No problem, open the plugin, find the latest one (for custom texts it is ct10, for background it's bg5 and for foreground it is fg12), copy the entire "chapter", paste it underneath and rewrite the numbers to be one higher. No need to do anything else! Need less of them? Simply delete some of them.
    • Don't want background and foreground images? That's why there's also the minuscule version of the plugin - faster due to not handling these images, but just as powerful as the full one.
    • Support for Yanfly's New game+ plugin (not native one though: See help file for instructions!)
    • And I'm sure you can find something I have missed. Definitely be sure to read the help file!

    Screenshots
    Screenshot_514.png
    Screenshot_520.png
    Screenshot_516.png


    How to Use
    This plugin is NOT plug and play. Because you can make tons of different designs from it, I left it up to you to make one. However, using the plugin should be pretty intuitive. There's some extra info included in the help file as well.

    Get it here
    https://github.com/Poryg1/RPG_Maker_MV_Huge_FFC

    Compatibility patches (external files)
    DreamX's random prefix and suffix


    Special thanks
    @ZServ for commission and the idea

    Author's Notes
    Ignore the background. I'm too lazy to set Harold to transparent :D
    You need to do some work with this plugin. I set it to be as customizable as possible, which means I have no options of text align and things like that. But I think the result will be worth it.
    EDIT: Also, a tiny little hidden side note, special thanks to @ZServ for great testing. As it was 3 AM, I completely managed to forget to mention that.
     
    Last edited: May 2, 2019
    #1
  2. Nightblade50

    Nightblade50 Developer of "Delta Origins" Veteran

    Messages:
    2,050
    Likes Received:
    4,140
    Location:
    USA
    First Language:
    English, French
    Primarily Uses:
    RMVXA
    It looks cool, I'll check it out :D
     
    #2
    Jeremiah Eastman and Poryg like this.
  3. Alexander Hawksmoor

    Alexander Hawksmoor Veteran Veteran

    Messages:
    375
    Likes Received:
    1,955
    Location:
    England
    First Language:
    English
    Primarily Uses:
    RMMV
    I'll give it a whirl whilst Im re-designing my menu and see what I can accomplish with it.
     
    #3
    Jeremiah Eastman and Poryg like this.
  4. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    1.1 UPDATE:​
    • Added support for basic MV encrypted files. They were previously unsupported, making encrypted deployed projects unplayable!
    • Added a couple of tips at the bottom of the help section
    • Added support for Yanfly's New game+ plugin. This support is not native though, you need to delete Window_SaveAction from Yanfly's plugin, because I don't use such class.
    When I find some time, I'll also make a video about the plugin.
     
    #4
  5. Alexander Hawksmoor

    Alexander Hawksmoor Veteran Veteran

    Messages:
    375
    Likes Received:
    1,955
    Location:
    England
    First Language:
    English
    Primarily Uses:
    RMMV
    I have been doing sone work with it. Hope to have a screenshot soon.
     
    #5
    Poryg likes this.
  6. Ace of Spades

    Ace of Spades Veteran Veteran

    Messages:
    48
    Likes Received:
    67
    First Language:
    English
    Discovered a bug; TypeError: Cannot read property 'newGamePlus' of null.

    This occurs when you pull up the save menu in a brand new project with no other plugins. Hope to see this fixed so I can check this plugin out. It sounds very nice and I like the layers of customization. Thanks!
     
    #6
  7. Solis

    Solis Veteran Veteran

    Messages:
    366
    Likes Received:
    84
    First Language:
    English
    Does it have an AutoSave feature?
     
    #7
  8. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    @Ace of Spades That's not a bug, that's a feature :p
    Just kidding, I'll get on to fix it. I'd like to ask you though... Next time please also post a screenshot of your error in the console, it's easier to find the incriminated code this way (f8 opens a console).
    EDIT: Fixed. My last update completely forgot about cases when no savefiles were in place, so it is fixed now :)

    @Solis There are already autosave plugins, so I don't feel the need to have this feature in my plugin. Since I didn't change how saving itself is handled, there should be no compatibility issues.
     
    Last edited: Apr 4, 2018
    #8
    Jeremiah Eastman likes this.
  9. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    I seem to have hit a roadblock, so I figured I'd post!
    upload_2018-5-10_16-20-28.png

    In the above screenshot, originally, I was trying to plug a variable in here. But, it wasn't showing up, so I assumed I had the wrong thing plugged in, so I just put in a string. However, even using just a normal string..

    upload_2018-5-10_16-21-23.png

    I can't seem to get the text to appear. Is this a positioning error, something I'm otherwise doing wrong, or something more?

    In addition, how would I plug a variable in there? Just setting it to be $gameVariables.value(#);?
     
    #9
  10. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Yes, setting it to $gameVariables.value is enough. Or at least it is supposed to be. I will take a look at it.

    I wonder, did you save your file after adding the extra variable?
     
    #10
  11. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    Yep! I tried existing saves and new saves entirely. That's why I wonder if it's just me positioning it poorly.
     
    #11
  12. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Try this code:
    alert("random alert")

    This code should trigger a warning box upon loading. I'd do it myself, but currently am without a computer.
     
    #12
  13. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    Triggers on save, not on load. But, it should mean that text *should* show up, yeah? So it's probably positioning.
     
    #13
  14. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Positioning sounds quite unprobable to me to be honest. This is not what is supposed to be happening. But I at least know where not to search for the bug.
    if you push it a bit down the y axis though, does it show?
     
    #14
  15. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    I've tried multiple amounts between 0 and 250, to no avail. So, I don't believe so.
     
    #15
  16. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    OK.

    Please find this function
    Code:
    Window_SavefileList.prototype.drawCustomTexts = function (info, rect) {
        if (info.customSaveData) {
            var por = PORParams.saveCore.customSaveData[1];
            for (var i in info.customSaveData[0]) if (info.customSaveData[1][i]) this.drawTextEx(info.customSaveData[0][i], rect.x + eval(por[i][1]), rect.y + eval(por[i][2]));
        };
    };
    And replace it with
    Code:
    Window_SavefileList.prototype.drawCustomTexts = function (info, rect) {
        if (info.customSaveData) {
            var por = PORParams.saveCore.customSaveData[1];
            for (var i in info.customSaveData[0]) if (info.customSaveData[1][i]) {
    console.log(info.customSaveData[0][i]);
    console.log (rect.x);
    console.log(eval(por[i][1]));
    console.log(rect.y);
    console.log(eval(por[i][2]));
    this.drawTextEx(info.customSaveData[0][i], rect.x + eval(por[i][1]), rect.y + eval(por[i][2]));
    };
        };
    };
    You should get five console logs from there. If you don't, I know where the problem is. And if you get them, please post the console logs. If there is a mistake somewhere in the coordinates equation, at least one of the results should be weird.
     
    #16
  17. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    Sorry for the delay!

    Code:
    TESTESTESTSEST
    POR_SaveCore.js:2705 8
    POR_SaveCore.js:2706 undefined
    POR_SaveCore.js:2707 0
    POR_SaveCore.js:2708 undefined
    
     
    Last edited: May 14, 2018
    #17
    Poryg likes this.
  18. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I don't have any way to test it, because I don't have a working PC, but hopefully it's fixed now :)
     
    #18
  19. ZServ

    ZServ Veteran Veteran

    Messages:
    247
    Likes Received:
    64
    Alright, sorry. My brain was turned off yesterday, and I misread the post entirely. Yeah, there's something wrong with the equation. One of the "undefined" parameters disappeared once I put text into the second text option. Additionally, the preceding text option will show locations and true/false, but once any string is put in, it immediately throws a fit. Unfortunately, your PC is out of commission for the foreseeable future, so I'll have to figure this one out myself I guess :p
     
    #19
  20. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,934
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Yeah, the reason why there was a bug was a bug in code though, I referenced wrong arrays for some reason. It is fixed, just not sure if it works, because I can't test it. Although it should.
    Also, both this and the previous log were the same to me, since the first five lines were the only important ones anyway :)

    It is also a good debugging tip: If you don't know what is not working, console log all incriminated variables. If they show proper values, then the bug is elsewhere, if they don't, then the bug is within the equations that set it or read from it. In this case it was reading from wrong variables, because I mistyped the multidimensional arrays :)
     
    Last edited: May 14, 2018
    #20
    ZServ likes this.

Share This Page