super super super simple little menu (save, load quit)

Discussion in 'RGSS Script Requests' started by glithch, Nov 26, 2017.

  1. glithch

    glithch Villager Member

    Messages:
    22
    Likes Received:
    1
    First Language:
    polish
    Primarily Uses:
    RMXP
    so hi. ive been working on my game for a quite a long time now and im really happy with what i have so far but... the ui is very neglected. you can have a look at a little bit of an older version here https://glithch.itch.io/red-and-the-wolf the game is something im working on for school. (its an art school so im already putting way too much effort into technical stuff as everyone else is just making comics etc) so yeah, ui its just something im not able to work on. so im curious if someone would make for me something like this:
    [​IMG]
    as you can see its super duper simple. i dont even want an equipment script. and i want it to use the windowskin as everything else uses it too.
    the only problematic thing could be the fact that i have a few scripts :/ namely resolution script, ums, and blizz abs. heres my script data

    if someone could help out i would be sooooo thankful!
     
    #1
  2. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,393
    Likes Received:
    12,625
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    I've moved this thread to RGSS Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. glithch

    glithch Villager Member

    Messages:
    22
    Likes Received:
    1
    First Language:
    polish
    Primarily Uses:
    RMXP
    sorry! i was sure i posted in the right one :x
     
    #3
  4. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    My Menu Command Manager script (link: https://forums.rpgmakerweb.com/index.php?threads/menu-command-manager.45303/ ) should be compatible with all of your existing scripts. It won't quite achieve the same effect that you are looking for, but should get you close to it for right now. I've also included a pre-configured customization section below. Just copy / paste it and replace the default customization.
    Code:
    #==============================================================================
    # ** CUSTOMIZATION START
    #==============================================================================
    module Mobius
        module Menu_Commands
            # MENU LOOK OPTIONS #
            # These options let you change how the menu looks
       
            # MENU_OPACITY is used to make the menu somewhat transparent so that
            # the background can be seen behind it. You can set this to an interger
            # value between 0 (completely transparent) and 255 (completely opaque).
            MENU_OPACITY = 128
            # The BACKGROUND_BLENDING_COLOR is used to darken the background map
            # picture so that it is less intrusive. I recommend leaving this as is,
            # but if you want to change it, you can set the four numbers to any
            # integer values in the range 0-255. The numbers are RGBA.
            BACKGROUND_BLENDING_COLOR = Color.new(16, 16, 16, 128)
       
            ######################################################################
       
            # COMMAND OPTIONS #
            # These options allow you to configure all of the menu commands.
            # Big picture: Every command has a 'command key' associated it with.
            # This allows you to link several different settings to the same command.
            # The keys are all of the type ':key_name'. That is a colon followed
            # by the key's name. As a rule, the keys should be all lowercase.
            # Additionally every command will need a key placed in the COMMAND_ORDER,
            # COMMAND_NAMES, and COMMAND_CALLS options below. It's optional for
            # COMMAND_ACTOR_SELECT, and COMMAND_ACTOR_REQUIRED.
       
            # Order of Commands #
            # Place all of your command keys in between the two square brackets.
            # Each key should be separated from the others with a comma.
            # The order in which these keys are placed will determine their order
            # in game, i.e. the first (top) key will be the first (top) command.
            COMMAND_ORDER = [
                            :save,
                            :end_game,                    
                            ]
            # Command Display Names #
            # This links your command keys to their display text in game.
            # In general, these will be the same but they might vary a little.
            # Think of this like setting a 'word' in the database. In fact,
            # this overwrites the database setting, so be sure to define them here.
            # Each entry is a pair like this - :command_key => "Display Name"
            # Separate entries with commas. The order of these entries does NOT
            # affect the order in game.
            COMMAND_NAMES = {
                            :save         => "Save",
                            :end_game     => "End Game",                    
                            }
                       
            # Command Script Calls #
            # This links your command keys to their script call.
            # In general, these will be very similar to their key.
            # If a script says you can call it by doing this:
            # $scene = Scene_CustomScript.new
            # You will likely need the 'Scene_CustomScript' part.
            # You can also use numbers to indicate that you want to call
            # a common event. Simply put the ID (as seen in the database) of
            # the common event you want to call instead of a script call.
            # Each entry is a pair like this - :command_key => Script_Call
            # Separate entries with commas. The order of these entries does NOT
            # affect the order in game.
            COMMAND_CALLS = {
                            :save         => Scene_Save,
                            :end_game     => Scene_End,
                            }
                       
            # Does Command Need Actor Select? #
            # This sets which commands need to select an actor in the menu
            # before moving to the next scene. In the default scripts, the
            # skills, equip, and status commands need to know which actor
            # you want to set before they move to their scenes. It's possible
            # some custom commands may need this as well. Just place the
            # command keys that need it here. If it doesn't need it, just
            # leave it out. The order of these entries does NOT affect
            # the order in game.
            COMMAND_ACTOR_SELECT = [
                            ]
                       
            # Disable Command When Party Size Is Zero? #
            # This sets which commands should be disabled when the party size
            # is zero. In the default scripts, the item, skills, equip, and
            # status commands are disabled when this is the case.
            # It's possible some custom commands may need this as well.
            # Just place the command keys that need it here. If it doesn't
            # need it, just leave it out. The order of these entries
            # does NOT affect the order in game.
            COMMAND_ACTOR_REQUIRED = [
                            ]
    
            # Disable Actor Abilities when paralyzed ? #
            # This sets which commands should be disabled when an actor is 'paralyzed'
            # (or has a similar type of state). In the default scripts, the skills
            # command is disabled when this is the case.
            # It's possible some custom commands may need this as well.
            # Just place the command keys that need it here. If it doesn't
            # need it, just leave it out. The order of these entries
            # does NOT affect the order in game.
            COMMAND_ACTOR_ABILITIES = [
                            ]
            # Save Command Key Is? #
            # This sets which command key is the 'save' command key, so
            # that it can be disabled whenever you disable saving via events.
            # In general, you can leave the default save key alone in the
            # above options and therefore leave this one alone too.
            SAVE_COMMAND = :save
        end
    end
    #==============================================================================
    # ** CUSTOMIZATION END
    #------------------------------------------------------------------------------
    
     
    #4
  5. glithch

    glithch Villager Member

    Messages:
    22
    Likes Received:
    1
    First Language:
    polish
    Primarily Uses:
    RMXP
    @Mobius
    [​IMG]
    this looks really bad....
    is there at least a way to delete all that stuff that isnt save and quit?
    i dont need the level, the g, whatever the e is, or the sp.... none of those will be used in the game :(
     
    #5
  6. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    @glithch try pasting this fix below my script. If it doesn't work, then there is probably a compatibility issue between my script and your other scripts. If that is the case, the only way for me to fix it is to see your whole project.
    Code:
    #==============================================================================
    # ** Scene_Menu
    #==============================================================================
    class Scene_Menu < Scene_Base
      #--------------------------------------------------------------------------
        # * Frame Update
        #--------------------------------------------------------------------------
        def update
            # Update windows
            @command_window.update
            #@gold_window.update
            #@status_window.update
            # If command window is active: call update_command
            if @command_window.active
              update_command
              return
            end
            # If status window is active: call update_status
            #if @status_window.active
            #  update_status
            #  return
            #end
        end
      #--------------------------------------------------------------------------
        # * Create Windows
        #--------------------------------------------------------------------------
        def create_windows
            create_command_window
            #create_status_window
            #create_gold_window
            create_background_sprite
        end
      #--------------------------------------------------------------------------
        # * Dispose Windows
        #--------------------------------------------------------------------------
        def dispose_windows
            # Dispose of windows
            @command_window.dispose
            #@gold_window.dispose
            #@status_window.dispose       
            @background_sprite.dispose
        end
    end
     
    #6
  7. glithch

    glithch Villager Member

    Messages:
    22
    Likes Received:
    1
    First Language:
    polish
    Primarily Uses:
    RMXP
    ummm im putting it after all the other scripts since it seems counter intuitive do put it anywhere before them. and yea the fix doesnt help.
    and i already linked the demo and the script data so you should have everything you need :o
     
    #7
  8. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    sorry, you mentioned it was an 'older version' so I wasn't sure it was up-to-date enough to use for troubleshooting. I'll take a look at it.
     
    #8
  9. glithch

    glithch Villager Member

    Messages:
    22
    Likes Received:
    1
    First Language:
    polish
    Primarily Uses:
    RMXP
    the only thing i really changed was some graphics. sorry for wording it bad u-u'
     
    #9
  10. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    Ok, so I download the demo, added my scripts, and tested it out. This is what I got:
    RedTest1.png

    and here's how I had the scripts section configured:
    RedTest2.png

    It looks like it's working correctly to me at least. Can you describe more what's wrong on your end? Maybe post some additional screenshots?
     
    #10
  11. glithch

    glithch Villager Member

    Messages:
    22
    Likes Received:
    1
    First Language:
    polish
    Primarily Uses:
    RMXP
    @Mobius
    oooooh i think i copied the fix wrong or something :o!! thank you and sorry for bothering. i ended up also adding an equipment menu becauseit looked wong with only two things. i guess the next thing i should look into fixing is the position of this menu. i know i cnt expect you to do it for me but do you maybe know in what part of the script i should look for it?
     
    #11
  12. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    Yep. So add this as another fix below the first two. Adjust the value of the x and y values until the menu is where you want it.
    Code:
    #==============================================================================
    # ** Scene_Menu
    #==============================================================================
    class Scene_Menu < Scene_Base
        #--------------------------------------------------------------------------
        # * Create Command Window
        #--------------------------------------------------------------------------
        def create_command_window
            commands = COMMAND_ORDER.collect { |cmd| COMMAND_NAMES[cmd] }
            # Make command window
            @command_window = Window_Command.new(160, commands)
            @command_window.index = @menu_index
            @command_window.opacity = MENU_OPACITY
            ## RANGE OF VALUES: x=(0-640) ; y=(0-480) ##
            @command_window.x = 320 # ADJUST THIS VALUE TO MOVE IT LEFT/RIGHT
            @command_window.y = 240 # ADJUST THIS VALUE TO MOVE IT UP/DOWN
        end
    end
    
     
    #12

Share This Page