Menu Customization Module v1.10

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Engr. Adiktuzmiko, Jan 16, 2014.

  1. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,538
    Likes Received:
    2,894
    Location:
    Philippines
    First Language:
    Tagalog
    Overview

    This script was made so that other users that don't know

    much about scripting can easily modify the basics of most

    of the default windows in the engine. This is done via

    the user just setting and playing around variable values

    in the module below.

    Take note though that it might take quite a few trial

    and errors to get things right.

    This Customization Module contains all necessary variables

    and general modifications to the default scripts that are

    needed. To fully utilize it though and ensure that it works,

    you still need to include also the specific scene customization

    scripts. Those scripts are just meant to be copy-pasted since

    the editables are all in this module

    Most of these are just aesthetic changes. Functional changes

    are limited to adding/removing of commands and choosing which

    data to show on the status windows.

    Screenshots [From Custom Style Set-up]

    Custom menu status layout + custom bars/gauges (2 pics)

    [​IMG]

    [​IMG]
    Status screen

    [​IMG]
    Item screen

    [​IMG]
    File screen

    [​IMG]
    Script Demo

    The Demo includes two versions of the script

    - The sample set-up that was used to make those screenshots

    - The set-up for the default look of the menu

    The default version used by the demo is the sample set-up

    To switch versions:

    - On the game folder, there is a folder named Module

    - Inside it are two .rvdata files named Scripts_Default_Menu

    and Scripts_Sample_Menu

    - Choose whichever script set-up you wanna try and copy it

    - Paste into the Data folder

    - Delete the Scripts.rvdata file and rename the copied file to Scripts

    Get the demo here

    or if the above download doesn't work: Download the file MenuModule1.10.zip

    Changelog

    Version 1.10 - 1/17/2014

    - Fixed possible leak points- Optimized to remove unnecessary repetitive actions
    FAQS/NOTES

    --READ THE HEADER FIRST AND THE DESCRIPTIONS ON EACH VARIABLE

    BEFORE ASKING ANYTHING RELATED TO HOW TO USE THE SCRIPT, COMPATIBILITY

    AND TERMS OF USAGE--

    The bars used in the project are made by me and you can use them if you want to.
     
    Last edited by a moderator: Jan 17, 2014
    #1
  2. Mithran

    Mithran Global Moderators Global Mod

    Messages:
    404
    Likes Received:
    212
    First Language:
    English
    I'll approve this since the demo works, but please consider reducing the amount of rescue blocks. It looks like you are using the rescue blocks primarily to prevent file not found error and other user input errors but you are wrapping entire methods with them. This makes it very difficult to determine if the code will even work at a glance or even if there are still errors that are never exposed. I'm also logging some leaked sprites through my crash debugger script linked in my sig, but I haven't traced them so they could be false positives.
     
    #2
    Engr. Adiktuzmiko likes this.
  3. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,538
    Likes Received:
    2,894
    Location:
    Philippines
    First Language:
    Tagalog
    I just find them easier to use than putting up several if blocks or even nested ifs just to prevent unwanted things, especially when more than 1 thing could go wrong...


    I'm quite worried about the sprites, I don't know which of them leaks or something... maybe some of the overlays or something since the background sprites are disposed as far as I know... I'll run it with the debugger and try to see where the leaks are when I get home...
     
    Last edited by a moderator: Jan 16, 2014
    #3
  4. Mithran

    Mithran Global Moderators Global Mod

    Messages:
    404
    Likes Received:
    212
    First Language:
    English
    Nothing was flagged critical in my short test. The variables flagged also have associated dispose calls, which either means the dispose is being skipped somehow (which is a flow issue), more than one object is being stored into that variable without disposing the previous one (also a flow issue or an issue with variable control), or the script is set up so the objects exist between scenes but they are actually being disposed (which is a false positive). I will run a trace when I have time.


    The rescue blocks can be minimized if you quarantine the 'dangerous' things into their own methods and wrap that method in the rescue block. In general, though, you shouldn't be using rescue unless the user is doing dangerous things. You are controlling all the data in the eval blocks (given the layout you chose, I understand why you used eval blocks to get your constants, but there are alternatives even given this layout) which means if it crashes you did something wrong and need to fix it. Loading a bitmap from a file, on the other hand, has info out of your control because the user can specify filenames and the file not be there. These types of errors should be rescued with an appropriate console message, rather than just nothing. Consider having a method with the purpose that is only to parse out the module tree and spit out the correct constant, and another with the purpose of wrapping any access your script makes to cache, so it will always be "safe" within your script.
     
    #4
    Engr. Adiktuzmiko likes this.
  5. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,538
    Likes Received:
    2,894
    Location:
    Philippines
    First Language:
    Tagalog
    I guess wrapping the Cache call is a good idea, I should have thought of that earlier, it would have saved me from writing lots of rescue...
     
    Last edited by a moderator: Jan 16, 2014
    #5
  6. Mithran

    Mithran Global Moderators Global Mod

    Messages:
    404
    Likes Received:
    212
    First Language:
    English
    Okay, I traced some of the errors. At least a couple of your @background_adik sprites actually don't have dispose calls associated in their respective windows (Window_EquipSlot and Window_SkillStatus are a couple). I missed it at first because they all have the same name across every class and most of them do have correct dispose calls, but these windows and possibly more are missing the dispose for their sprite. Again, the leaks weren't aren't flagged as critical but they are easy to fix once you track them down.
     
    #6
    Engr. Adiktuzmiko likes this.
  7. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,538
    Likes Received:
    2,894
    Location:
    Philippines
    First Language:
    Tagalog
    I see... thanks for the buzz, I'm gonna take a look at those later :)


    EDIT: Oh yeah, I forgot to add dispose for some of the sprites... XD... fixed now + some optimizations...
     
    Last edited by a moderator: Jan 17, 2014
    #7
  8. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,538
    Likes Received:
    2,894
    Location:
    Philippines
    First Language:
    Tagalog
    I think I'll start working with supporting changes to the battle HUD/UI in maybe weeks or so once I finish with the other things I'm working on right now
     
    #8

Share This Page