Basic Options Menu

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Vlue, Sep 27, 2013.

    Tags:
  1. mandalorianjedi

    mandalorianjedi Dark Lord of Potato Member

    Messages:
    20
    Likes Received:
    3
    Location:
    Winnipeg
    First Language:
    Engrish
    Just an optional request.
    Since I know how easy it is to change the textbox colours with \C(x), but I am rather scriptly impaired. Would you be able to make a textbox colour selection included?
     
    #41
  2. EternalShadow

    EternalShadow Veteran Veteran

    Messages:
    5,805
    Likes Received:
    1,049
    First Language:
    English
    Select those areas (highlight them) and comment them out (press control+Q)


    -------


    Hi,


    I seem to be running into a very strange issue: The script won't show up at all on the main menu.


    I set it to display 5 columns, just in case. No dice. Here is a WIP screenshot: http://i.imgur.com/049N8FS.png


    If anyone can help, that's be great.
     
    #42
  3. majorcyto

    majorcyto Warper Member

    Messages:
    2
    Likes Received:
    1
    First Language:
    English
    Hi, i was wondering if this could be modified just a little bit. I use a script that lets you set higher resolutions than normal.. so any normal resolutions will work. I have the game set to 1024x768 by default now, but was wondering if you could make the resolution menu options actually change the "Graphics.resize_screen(1024, 768)" on the fly instead of using window stretching? That way once i see how you do it, i could add a couple of resolution options in there for people.

    I tried to edit the resolution option myself, however i failed as i take there is probably more to it than what i tried. Either way thanks for your reply. :p
     
    #43
  4. sylvester87

    sylvester87 Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    Dutch
    Hi, I was wondering why it the music doesn't automically changes when I change the volume, but that I have to wait until the BGM fades in again. Is there a reason for and can this be fixed?
     
    #44
  5. YamiKitsune

    YamiKitsune Villager Member

    Messages:
    5
    Likes Received:
    0
    First Language:
    English
    Is there anyway we could get some compatibility with Xall menu themes? Cause nothing is happening for me.
     
    #45
  6. dioarcangel

    dioarcangel Villager Member

    Messages:
    16
    Likes Received:
    0
    First Language:
    Español
    Hello i have Xail System Menu this is compatible ?
     
    #46
  7. Awesomeguy2561

    Awesomeguy2561 Awesome Member

    Messages:
    32
    Likes Received:
    0
    First Language:
    English
    I am having a problem that it is not showing up on the title screen? I put the script in the right spot, I don't know why it isn't working.
     
    #47
  8. Millerberto2

    Millerberto2 Good Sire Veteran

    Messages:
    35
    Likes Received:
    12
    Location:
    Brazil, São Paulo
    First Language:
    Portuguese
    Primarily Uses:
    RMVXA
    [​IMG]

    Just add this to your XaiL Menu Deluxe options. I had a hard time getting it to work.

    I also placed this script above both XaiL core and menu scripts.

    @Awesomeguy2561 It is not really related to your question, but you may switch from the vanilla menu and start using XaiL's improved menu script.

    Thanks for the script, OP.
     
    Last edited by a moderator: Oct 11, 2015
    #48
  9. LucaBicono

    LucaBicono Villager Member

    Messages:
    11
    Likes Received:
    2
    First Language:
    English
    I'm a little bit confused about how the Header option works. The way I understand it (from looking at the script), switching it to 'on' will set a switch to on when you start the game, and the switch ID is determined by the SWITCH_ID value (in my case, I set the value to 200). However, when I try to playtest the game, set it to 'on', and begin a new game, it doesn't set the switch on. Am I misunderstanding the script or am I setting the value wrong?
     
    #49
  10. JarvisTube

    JarvisTube Villager Member

    Messages:
    18
    Likes Received:
    0
    First Language:
    English
    This is awesome! But the autosave and res wont pop up. -_- How 2 fix?
     
    #50
  11. Burgerland

    Burgerland Veteran Veteran

    Messages:
    262
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    N/A
    Thank you for this script and your autosave script, also for your help using this script. :)


    Can I change the autosave and message SE options into configure gamepad controls option and configure keyboard controls option?


    Is it possible to configure the keyboard and gamepad controls without pressing F1?
     
    #51
  12. jumadelux

    jumadelux Villager Member

    Messages:
    23
    Likes Received:
    1
    Location:
    Bermuda
    First Language:
    English
    Hey vlue, i'm new here and didn't have knowledge about coding.


    Is there any way to remove the "Large" in resolution options?


    I want to use only the "Normal" and "Fullscreen" ones, thankyou before :)
     
    Last edited by a moderator: Nov 11, 2016
    #52
  13. serp

    serp Villager Member

    Messages:
    13
    Likes Received:
    2
    First Language:
    English
    Found and fixed a couple bugs. For one, if you change the volume and then hit cancel instead of OK, the volume will not instantly revert to the original value, You will have to reopen the options dialog and tick the volume one more time to get the volume to adjust appropriately.

    Also, if you turn the volume all the way down and keep pressing, you will get one extra black bar that goes past the intended range (there's also a weird double-adding blue bar issue at the top of the range).

    The first bug can be fixed by scrolling to line 290 where this function is defined:
    def command_ok
    case @window_command.index
    when 0
    $game_options.save_options
    $game_options.clear_memorize
    return_scene
    when 1
    $game_options.copy_memorize
    $game_options.clear_memorize
    return_scene
    end
    end

    And adding one line like so:

    def command_ok
    case @window_command.index
    when 0
    $game_options.save_options
    $game_options.clear_memorize
    return_scene
    when 1
    $game_options.copy_memorize
    $game_options.clear_memorize
    $game_map.autoplay if $game_map && $game_map.map_id > 0
    return_scene
    end
    end


    The other issue can be fixed by going to line 420 where we see:

    def refresh(temp_value)
    contents.clear
    temp_value *= 100
    temp_value.to_i.times do |i|
    rect = Rect.new(4+i*4,6,2,8)
    contents.fill_rect(rect, Color.new(75,100,255))
    end
    (100-temp_value).to_i.times do |i|
    rect = Rect.new(396-i*4,6,2,8)
    contents.fill_rect(rect, Color.new(0,0,0))
    end
    draw_text(0,0,contents.width,24,temp_value.to_i.to_s + "%",2)
    end

    Simply change the 396 to 400 and both instances of ".to_i" with ".round" like so:

    def refresh(temp_value)
    contents.clear
    temp_value *= 100
    temp_value.round.times do |i|
    rect = Rect.new(4+i*4,6,2,8)
    contents.fill_rect(rect, Color.new(75,100,255))
    end
    (100-temp_value).round.times do |i|
    rect = Rect.new(400-i*4,6,2,8)
    contents.fill_rect(rect, Color.new(0,0,0))
    end
    draw_text(0,0,contents.width,24,temp_value.to_i.to_s + "%",2)
    end

    I was quite surprised myself to find that the .to_round was necessary, but due to some nuances of floating point arithmetic (which you can read about here: http://floating-point-gui.de/), we get new weird errors if we only change 396 to 400. .round turns 1.999999 into 2 where .to_i turns it into 1.

    Anyway, thanks so much for making this script! I've had a couple playtesters request volume controls, so i was thrilled to see this up for free and allowed in commercial games. Thanks!
     
    #53
  14. Mparagames

    Mparagames Amateur developer trying to be awesome Member

    Messages:
    16
    Likes Received:
    4
    Location:
    Brazil
    First Language:
    Portuguese(BRA)
    Primarily Uses:
    RMMV
    Vlue,
    1 - How could I add support to your mouse script so I could operate the options menu using the mouse cursor?
    2 - How could add an extra option into the menu? In my case, I would like to put an option to change the game window's color, and give the player five different possibilities: Blue (default), Pink (custom option 1), Green (custon option 2), Yellow (custom option 3), AND White (custom option 4).

    Thanks.
     
    Last edited: Jan 8, 2018
    #54
  15. Zion

    Zion Villager Member

    Messages:
    27
    Likes Received:
    3
    First Language:
    German
    Primarily Uses:
    RMMV
    Anyone here who supports this script? Its really cool and I'd like to use it, but I found a bug.
    I managed it to implement this script in the title screen, but it does not work there. You can change the volume, but nothing changes. And if you load a savegame and change volume there and go back to the title screen and change volume again, you hear the music from the last map where you have been xD
    Could anyone fix this?
    This script is much cooler than yanflys^^
     
    #55
  16. Fragarachu

    Fragarachu Veteran Veteran

    Messages:
    59
    Likes Received:
    1
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    What's the script call?
     
    #56
  17. Zion

    Zion Villager Member

    Messages:
    27
    Likes Received:
    3
    First Language:
    German
    Primarily Uses:
    RMMV
    Oh, I totally forgot, sorry.
    I found another person who kindly helped me out.
    This is the script if you want to combine full screen and options in the title menu:
    Code:
    #==============================================================================
    # Vollbild als Option im Startmenü
    #==============================================================================
    
    class Window_TitleCommand < Window_Command
      alias alt_make_command_list_vollbild_zion:make_command_list
      def make_command_list
        add_command(Vocab::new_game, :new_game)
        add_command(Vocab::continue, :continue, continue_enabled)
        add_command("Vollbild", :vollbild)
        add_command("Optionen", :optionen) #optionen
        add_command(Vocab::shutdown, :shutdown)
      end
    end
    class Scene_Title < Scene_Base
      alias alt_create_command_window_vollbild_zion:create_command_window
      def create_command_window
        alt_create_command_window_vollbild_zion
        @command_window.set_handler:)vollbild, method:)command_vollbild))
        @command_window.set_handler:)optionen, method:)command_options))   #optionen
      end
      def command_vollbild
        $keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
        $keybd.call 0xA4, 0, 0, 0
        $keybd.call 13, 0, 0, 0
        $keybd.call 13, 0, 2, 0
        $keybd.call 0xA4, 0, 2, 0
        @command_window.activate
      end
    #--------------------------------------------------------------------------
    # * [Options] Command   #optionen
    #--------------------------------------------------------------------------
    def command_options
      SceneManager.call(Scene_Options)
    end
    
    end
    

    Most of the script is from Nefertari.

    Vlue's script needs to be changed as follows:

    Code:
    line 62, 2 new lines:
    class Scene_Options < Scene_MenuBase
    attr_reader :last_scene # neue Variable
    def start
    super
    @last_scene = SceneManager.instance_variable_get:)@stack).pop.class # neu: merkt sich die aufrufende Scene
    $game_options.memorize_options
    ...
    line 252, 1 line out, 2 new lines in:
    def change_volume(index, value)
    return unless audio_index(index)
    $game_options.set_volume:)master, value) if @window_index[index] == :master
    $game_options.set_volume:)bgm, value) if @window_index[index] == :bgm
    $game_options.set_volume:)se, value) if @window_index[index] == :se
    @window_masterbar.refresh($game_options.master_volume)
    @window_bgmbar.refresh($game_options.bgm_volume)
    @window_sebar.refresh($game_options.se_volume)
    Sound.play_cursor
    # $game_map.autoplay if $game_map && $game_map.map_id > 0
    $data_system.title_bgm.play if last_scene == Scene_Title # neu: spielt Titelmusik, wenn vorherige Scene der Title war
    $game_map.autoplay if last_scene == Scene_Menu # neu: spielt Mapmusik, wenn vorherige Scene eine Map war
    end
    line 301, 2 lines out, 2 new lines in:
    def command_ok
    case @window_command.index
    when 0
    $game_options.save_options
    $game_options.clear_memorize
    # return_scene
    SceneManager.call(last_scene) # neu: ruft vorherige Scene auf
    when 1
    $game_options.copy_memorize
    $game_options.clear_memorize
    # return_scene
    SceneManager.call(last_scene) # neu: ruft vorherige Scene auf
    end
    end
    
     
    Last edited: Apr 21, 2018
    #57
  18. Fragarachu

    Fragarachu Veteran Veteran

    Messages:
    59
    Likes Received:
    1
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    I meant what's the script call for opening the options menu?
    I've scripted my game so the title screen is skipped and i've made a custom menu.
     
    #58
  19. Zion

    Zion Villager Member

    Messages:
    27
    Likes Received:
    3
    First Language:
    German
    Primarily Uses:
    RMMV
    It's in the first script I posted:

    SceneManager.call(Scene_Options)
     
    #59
  20. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,750
    Likes Received:
    384
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    can you fix the code entry. it has smiley's all over it. Use a proper code block
    Code:
    def create_resolution_window
        if Module.const_defined?(:Window_Resize)
          @window_resolution = Window_OR.new(48+24 * @current_index)
          @window_resolution.set_handler(:ok, method(:resolution_ok))
          @back_window.add_text(24 * (@current_index - 1),OPT_STR::RESOLUTION)
          @current_index += 2
          @size += 1
          @window_index.push(:resolution)
        end
      end
     
    #60

Share This Page