Small error with Galv bust menu and Mog cursor border

Discussion in 'Javascript/Plugin Support' started by Sharm, Nov 17, 2017.

  1. Sharm

    Sharm Pixel Tile Artist Global Mod

    Messages:
    11,996
    Likes Received:
    8,507
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Okay, so I'm using Galv's bust menu and Mog's cursor border. Mog's plugin works with every menu I've tried except the bust menu, and only when selecting the character. The default border is correct, circling the character only, but Mog's extra border goes around the entire character section, or off screen when selecting the second character. I believe that this means that something in Galv's menu is defined incorrectly and is only visible because of the border, but I have no coding skill whatsoever, so I wouldn't know where to look. I'm not attached to Galv's menu so suggestions for an alternative plugin that does work well with other visual plugins would be an acceptable solution. I chose this one because it looks good with only one character but adding a second looks good too. My game has 1-2 characters depending on where you're at in the story and no more, so most menus look odd.

    broken.png broken2.png

    galv.png

    mog.png

    Galv's menu plugin can be found here and Mog's cursor border plugin can be found here.

    I would appreciate any help that could be given, but please keep in mind that I have absolutely no programming knowledge, so please don't get technical if you can help it. You'll lose me. ^_^; Thank you for taking the time to look into this!
     
    #1
  2. Joy Diamond

    Joy Diamond Talkative Veteran

    Messages:
    135
    Likes Received:
    172
    First Language:
    English
    Primarily Uses:
    RMMV
    Greetings Sharm,

    The second SPOILER tag in your posting does not (currently) work. The first & last SPOILER tags show a picture, but the second one instead just says: galv.png & nothing else.

    Here is a picture of the three spoiler tags open:​

    upload_2017-11-16_16-11-6.png

    Maybe you can edit your message & fix it?
    Best wishes,

    Joy Diamond

    UPDATE: Just need to hit reload, as sura_tc says below.
     
    Last edited: Nov 17, 2017
    #2
  3. sura_tc

    sura_tc Veteran Veteran

    Messages:
    267
    Likes Received:
    189
    First Language:
    Korean
    Primarily Uses:
    RMMV
    Hit reload and it will eventually work. It tends to happen when there are more than 5 large attachments. It's a forum software issue, I think, because it doesn't happen when linking images via links.
     
    #3
    Joy Diamond likes this.
  4. Joy Diamond

    Joy Diamond Talkative Veteran

    Messages:
    135
    Likes Received:
    172
    First Language:
    English
    Primarily Uses:
    RMMV
    Greetings sura_tc,

    Yes, that was the issue.
    • I hit reload & it now loads properly.
    Thanks,

    Joy Diamond.

     
    #4
  5. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,389
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Strangely, I'm not having this issue when I test. I placed GALV_BustMenu above MOG_CursorBorder. Is that the order you placed them in?
     
    #5
  6. Joy Diamond

    Joy Diamond Talkative Veteran

    Messages:
    135
    Likes Received:
    172
    First Language:
    English
    Primarily Uses:
    RMMV
    Greetings,

    I have been able to reproduce the issue with GALV_BustMenu above MOG_CursorBorder:


    upload_2017-11-16_17-33-53.png


    How I reproduced it:
    • Download Galv's menu plugin (Same link that Sharm gave)
    • Download Mog's cursor border plugin (Same link that Sharm gave)
    • Copy the following files from Mog's project into Galv's project:
      • js/plugins/MOG_CursorBorder.js
      • img/system/CursorBorderA.png
      • img/system/CursorBorderB.png
    • Enable MOG_CursorBorder (as second plugin)
    Joy Diamond

    P.S.: Sharm's instructions were very easy to follow. And good bug reporting by making this on a very simple project that easy to reproduce.
     
    #6
  7. Sharm

    Sharm Pixel Tile Artist Global Mod

    Messages:
    11,996
    Likes Received:
    8,507
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    @Llareian Yeah, I know how important order is so I tried a few ways. Doesn't make a difference. If you're not having a problem that's a little worrying. Those are the worst bugs

    @Joy Diamond Thank you! I did try to make this as easy for people to help me as I could. I know how annoying bad requests can be from the art side of things.
     
    #7
  8. Joy Diamond

    Joy Diamond Talkative Veteran

    Messages:
    135
    Likes Received:
    172
    First Language:
    English
    Primarily Uses:
    RMMV
    Greetings Sharm,

    Yep & success :) -- Here is your bug:

    upload_2017-11-16_18-25-21.png

    The widthF function is calling the heightR function :mad:

    This is clearly wrong so change (what is in the red circle) from heightR to widthR & your bug will be stomped:
    • I.E.: Open js/plugins/MOG_CursorBorder.js in an editor & go to line 315 & change it.
    Let me know if this works for you please,

    Joy Diamond
     

    Attached Files:

    #8
    Sharm likes this.
  9. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,389
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah, interesting, Galv's demo project is several years old, so it uses a previous version of MV.

    @Sharm , are you using MV 1.5.1?

    EDIT: I hope the above by Joy works for you. :)

    EDIT2: I failed to turn off my Community Basic plugin in my "blank" project, in which the width was set wider to test a different bug. That's the cause of our discrepancy.
     
    Last edited: Nov 17, 2017
    #9
  10. Sharm

    Sharm Pixel Tile Artist Global Mod

    Messages:
    11,996
    Likes Received:
    8,507
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    @Joy Diamond Mog's plugin is the problem, huh? Wow. It worked great! Thank's so much, you're totally my hero!
     
    #10
  11. Joy Diamond

    Joy Diamond Talkative Veteran

    Messages:
    135
    Likes Received:
    172
    First Language:
    English
    Primarily Uses:
    RMMV
    Sharm,

    Glad it worked for you.

    Yep, basically a typical programming error from cut/paste & then not modifying everything properly:
    • I.E.: The programmer probably copied the heightF function to a widthF & then didn't (by hand) properly change all the 'height' to 'width' (i.e.: They missed one, which is the one you had to fix.).
    However:
    • The real cause of this is lack of unit testing, common coding standards & code reviews
    With Visual Novel Maker coming today, my hope is to use this to achieve to the following:
    • Help the RMMV community continue to grow by
    • Start an open source project for a single plugin that many of us work together, using modern coding practices (i.e.: avoid the proliferation of so many plugin's people have to manage)
    • Open source licensing, etc.
    • Really simplify how plugins are distributed, so we don't need all these zip files (and other formats) on 30+ websites....
    One of the major advantage of an open source project, is when one of the developers moves on (or goes on vacation for a month or), the other developers can fix bugs, etc.

    Anyway, now that you have confirmed the bug fix worked, I'll try to send to the developer of the MOG, so it is fixed in the next version.
    Joyfully,

    Joy Diamond.

    P.S.: Explanation of bug & why it triggered so rarely:
    • The bug only triggers when a "window" has multiple "children" in it (and the "children" are smaller than the window); AND
    • What needs to be highlighted (the "child"), the height > width.
    • (So for *MOST* of what is highlighted in RMMV where width > height, it won't trigger; which is how the party members looked when not using the Galv Bust Plugin. So the Galv Bust plugin was innocent, it just happened to trigger the bug by changing flat "child" windows to tall "child" windows that did trigger the bug).
    Both those conditions are actually pretty rare inside RMMV, which is why it didn't trigger until it was in viewing users (which has "4" children per window -- i.e.: the four characters, and height > window; then the bug triggers and uses the window width instead of the "child" width)

    EDIT: Added explanation of the bug & why it triggered so rarely.
     
    Last edited: Nov 17, 2017
    #11
    Sharm likes this.

Share This Page