Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Advanced Options Menu

Advanced Options Menu
Version: 1.1

Introduction

In an effort to give back to the scripting community for having helped me with random scripts (as well as a self learning experience for myself), I'm releasing my edited version of The Adjustable Audio script (with permission). This script has multiple options to choose from, as long as you use the respective scripts that are utilizing the options. IE: the Options script alone will not do anything, but will cause errors if the supporting scripts aren't present.

Features
Included, but not limited to:
  • Adjustable Audio
  • Resolution Changer
  • Show Current Button Config
  • Windowskin Changer
  • More to come.. possibly. Suggest

Screenshots

Options.png

Demo

Demo ist here.

Scripts

Code:
####################################################

# Custom Options Menu                              #

####################################################

#                                                  #

#    Audio Options by:                             #

#     by Akin                                      #

#       credit to 'L' who's custom menu helped     #

#       me figure out what to do                   #

####################################################

 

####################################################

#    Psiclone:                                     #

#    All I did was add in the resolution and       #

#    windowskin options.                           #

####################################################

#----------------- Version 1.1 ---------------------

####################################################

#   This script calls an options menu.             #

#                                                  #

#  Call using "$scene = Scene_Options.new"         #

#                                                  #

####################################################

 

#------------------------------------------------------------------------------

# Set this to the number of windowskin options that you want.

# You will then need to add the windows to the array at code line 59

# -----------------------------------------------------------------------------

NO_WINDOWSKINS = 3

 

#------------------------------------------------------------------------------

# Set this to true if you are using Modern Algebra's Advanced Text System

#-----------------------------------------------------------------------------

MA_AMS = false

 

module OptionCommand

#Main Option Commands

    Audio               = 'Audio'

    Controls          = 'Controls'

  Resolution    = 'Screen'

  Windows       = 'Windowskins'

    Exit_Options    = 'Back'

#Audio Option commands

  Audiobgm      = 'Music Volume'

  Audiobgs      = 'Background Effects Volume'

  Audiome       = 'Musical Effects Volume'

  Audiose       = 'Sound Effects volume'

#BGM Options

  AudiobgmV = ["Down", "Up"]

#BGS Options

  AudiobgsV = ['Down', 'Up']

#SE Options

  AudioseV  = ['Down', 'Up']

#ME Options

  AudiomeV  = ['Down', 'Up']

#Resolution Options

  ResolutionS = ['Default', '800x600', '1024x768', '1280x1024', '1600x1200']

###############Windowskin Options -- Add more window choices here.##############

#######These can be named anything you want as long as they're in quotes.#######

  WindowsS = ['Window 1', 'Window 2', 'Window 3']

end

 

#==============================================================================

# ** Scene_Options

#------------------------------------------------------------------------------

#  This class performs the Options screen processing.

#==============================================================================

 

class Scene_Options < Scene_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     menu_index : command cursor's initial position

  #--------------------------------------------------------------------------

  def initialize(options_index = 0)

    @options_index = options_index

    options_init

  end

  #--------------------------------------------------------------------------

  # * Set Commands

  #--------------------------------------------------------------------------

  def options_init

    @options = []

    op1 = OptionCommand::Audio

    op2 = OptionCommand::Controls

    op3 = OptionCommand::Resolution

    op4 = OptionCommand::Windows

    op5 = OptionCommand::Exit_Options

    @options.push(op1, op2, op3, op4, op5).flatten!

    

    @audio_options = []

      aud1 = OptionCommand::Audiobgm

      aud2 = OptionCommand::Audiobgs

      aud3 = OptionCommand::Audiome

      aud4 = OptionCommand::Audiose

    @audio_options.push(aud1, aud2, aud3, aud4).flatten!

    

      @bgm_options = OptionCommand::AudiobgmV

      

      @bgs_options = OptionCommand::AudiobgsV

      

      @se_options = OptionCommand::AudioseV

      

      @me_options = OptionCommand::AudiomeV

      

    @resolution_options = OptionCommand::ResolutionS

 

    @windows_options = OptionCommand::WindowsS

  end

  #--------------------------------------------------------------------------

  # * Start processing

  #--------------------------------------------------------------------------

  def start

    super

    create_menu_background

    create_options_window

    create_audio_window

    create_bgm_window

    create_bgs_window

    create_se_window

    create_me_window

    create_resolution_window

    create_windows_window

    create_controls_window

    @help_window = Window_Help.new

    @help_window.viewport = @viewport

      @help_window.set_text("Options")

  end

  #--------------------------------------------------------------------------

  # * Termination Processing

  #--------------------------------------------------------------------------

  def terminate

    super

    dispose_menu_background

    @options_window.dispose

    @audio_options_window.dispose

      @bgm_options_window.dispose

      @bgs_options_window.dispose

      @se_options_window.dispose

      @me_options_window.dispose

    @resolution_options_window.dispose

    @windows_options_window.dispose

    @controls_window.dispose

      @help_window.dispose

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    super

    update_menu_background

    @options_window.update

    @audio_options_window.update

      @bgm_options_window.update

      @bgs_options_window.update

      @se_options_window.update

      @me_options_window.update

    @resolution_options_window.update

    @windows_options_window.update

    @controls_window.update

      @help_window.update

    if @options_window.active

      update_options_selection

    elsif @audio_options_window.active

      update_audio_options_selection

    elsif @bgm_options_window.active

      update_bgm_options_selection

    elsif @bgs_options_window.active

      update_bgs_options_selection

    elsif @se_options_window.active

      update_se_options_selection

    elsif @me_options_window.active

      update_me_options_selection

    elsif @resolution_options_window.active

      update_resolution_options_selection

    elsif @windows_options_window.active

      update_windows_options_selection

    elsif @controls_window.active

      update_controls_selection

    end

  end

  #--------------------------------------------------------------------------

  # * Create Main Option Selection

  #--------------------------------------------------------------------------

  def create_options_window

    @options_window = Window_Command.new(160, @options)

    @options_window.index = @options_index

      @options_window.y = 64

  end

  #--------------------------------------------------------------------------

  # * Create Audio Options Window

  #--------------------------------------------------------------------------

  def create_audio_window

    @audio_options_window = Window_Command.new(277, @audio_options)

    @audio_options_window.visible = false

    @audio_options_window.active = false

    @audio_options_window.x = 160

    @audio_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Audio-BGM Options Window

  #--------------------------------------------------------------------------

  def create_bgm_window

    @bgm_options_window = Window_Command.new(70, @bgm_options)

    @bgm_options_window.visible = false

    @bgm_options_window.active = false

    @bgm_options_window.x = 437

    @bgm_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Audio-BGS Options Window

  #--------------------------------------------------------------------------

  def create_bgs_window

    @bgs_options_window = Window_Command.new(70, @bgs_options)

    @bgs_options_window.visible = false

    @bgs_options_window.active = false

    @bgs_options_window.x = 437

    @bgs_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Audio-SE Options Window

  #--------------------------------------------------------------------------

  def create_se_window

    @se_options_window = Window_Command.new(70, @se_options)

    @se_options_window.visible = false

    @se_options_window.active = false

    @se_options_window.x = 437

    @se_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Audio-ME Options Window

  #--------------------------------------------------------------------------

  def create_me_window

    @me_options_window = Window_Command.new(70, @me_options)

    @me_options_window.visible = false

    @me_options_window.active = false

    @me_options_window.x = 437

    @me_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Resolution Options Window

  #--------------------------------------------------------------------------

  def create_resolution_window

    @resolution_options_window = Window_Command.new(120, @resolution_options)

    @resolution_options_window.visible = false

    @resolution_options_window.active = false

    @resolution_options_window.x = 160

    @resolution_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Windows Options Window

  #--------------------------------------------------------------------------

  def create_windows_window

    @windows_options_window = Window_Command.new(120, @windows_options)

    @windows_options_window.visible = false

    @windows_options_window.active = false

    @windows_options_window.x = 160

    @windows_options_window.y = 56

  end

  #--------------------------------------------------------------------------

  # * Create Controls Options Window

  #--------------------------------------------------------------------------

  def create_controls_window

    @controls_window = Window_Base.new(161, 57, 292, 300)

    @controls_window.contents.draw_text(0, -2, 100, 24, "Controls")

    @controls_window.contents.draw_text(0, 24, 300, 24, "To Access the system controls")

    @controls_window.contents.draw_text(0, 48, 300, 24, "Press F1 at any time")

    @controls_window.contents.draw_text(40, 96, 300, 24, "A")

    @controls_window.contents.draw_text(40, 120, 300, 24, "B")

    @controls_window.contents.draw_text(40, 144, 300, 24, "C")

    @controls_window.contents.draw_text(40, 168, 300, 24, "L")

    @controls_window.contents.draw_text(40, 192, 300, 24, "R")

    @controls_window.contents.draw_text(40, 216, 300, 24, "X")

    @controls_window.contents.draw_text(40, 240, 300, 24, "Y")

    @controls_window.contents.draw_text(60, 96, 300, 24, "::  Dash")

    @controls_window.contents.draw_text(60, 120, 300, 24, "::  Cancel/Menu")

    @controls_window.contents.draw_text(60, 144, 300, 24, "::  Confirm/Talk")

    @controls_window.contents.draw_text(60, 168, 300, 24, "::  Menu Previous")

    @controls_window.contents.draw_text(60, 192, 300, 24, "::  Menu Next")

    @controls_window.contents.draw_text(60, 216, 300, 24, "::  Not Used")

    @controls_window.contents.draw_text(60, 240, 300, 24, "::  Not Used")

    @controls_window.visible = false

    @controls_window.active = false

  end

  #--------------------------------------------------------------------------

  # * Return to Original Screen

  #--------------------------------------------------------------------------

  def return_scene

    $scene = Scene_End.new#(0) #-----------Change this number to the options spot -1 on main menu-----------------

  end

  #--------------------------------------------------------------------------

  # * Update Options Selection

  #--------------------------------------------------------------------------

  def update_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      $scene = Scene_End.new

      #return_scene

    elsif Input.trigger?(Input::C)

      main_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio Options Selection

  #--------------------------------------------------------------------------

  def update_audio_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @options_window.active = true

      @audio_options_window.active = false

      @audio_options_window.visible = false

      @audio_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      audio_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-BGM Options Selection

  #--------------------------------------------------------------------------

  def update_bgm_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @audio_options_window.active = true

      @bgm_options_window.active = false

      @bgm_options_window.visible = false

      @bgm_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      bgm_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-BGS Options Selection

  #--------------------------------------------------------------------------

  def update_bgs_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @audio_options_window.active = true

      @bgs_options_window.active = false

      @bgs_options_window.visible = false

      @bgs_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      bgs_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-SE Options Selection

  #--------------------------------------------------------------------------

  def update_se_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @audio_options_window.active = true

      @se_options_window.active = false

      @se_options_window.visible = false

      @se_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      se_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-ME Options Selection

  #--------------------------------------------------------------------------

  def update_me_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @audio_options_window.active = true

      @me_options_window.active = false

      @me_options_window.visible = false

      @me_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      me_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Resolution Options Selection

  #--------------------------------------------------------------------------

  def update_resolution_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @options_window.active = true

      @resolution_options_window.active = false

      @resolution_options_window.visible = false

      @resolution_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      resolution_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Windows Options Selection

  #--------------------------------------------------------------------------

  def update_windows_options_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @options_window.active = true

      @windows_options_window.active = false

      @windows_options_window.visible = false

      @windows_options_window.index = 0

      return

    elsif Input.trigger?(Input::C)

      windows_options_input

    end

  end

  #--------------------------------------------------------------------------

  # * Update Controls Selection

  #--------------------------------------------------------------------------

  def update_controls_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      @options_window.active = true

      @controls_window.active = false

      @controls_window.visible = false

    end

  end

  #--------------------------------------------------------------------------

  # * Update Main Options InputCheck

  #--------------------------------------------------------------------------

  def main_options_input

    option = @options[@options_window.index]

    Sound.play_decision

    # Checks Options Commands

    case option

    when OptionCommand::Audio  #calls Audio options subwindow

      @audio_options_window.active = true

      @audio_options_window.visible = true

      @options_window.active = false

    when OptionCommand::Controls #Controls

      @controls_window.active = true

      @controls_window.visible = true

      @options_window.active = false

    when OptionCommand::Resolution #Resolution

      @resolution_options_window.active = true

      @resolution_options_window.visible = true

      @options_window.active = false

    when OptionCommand::Windows #Windows

      @windows_options_window.active = true

      @windows_options_window.visible = true

      @options_window.active = false

      when OptionCommand::Exit_Options #Return to Main Menu

      return_scene

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio Options InputCheck

  #--------------------------------------------------------------------------

  def audio_options_input

    audio_option = @audio_options[@audio_options_window.index]

    Sound.play_decision

    # Checks Graphics Options Commands

    case audio_option

    when OptionCommand::Audiobgm  #Adjust BGM

      @bgm_options_window.index = 0

      @bgm_options_window.active = true

      @bgm_options_window.visible = true

      @audio_options_window.active = false

    when OptionCommand::Audiobgs  #Adjust BGS

      @bgs_options_window.index = 0

      @bgs_options_window.active = true

      @bgs_options_window.visible = true

      @audio_options_window.active = false

      when OptionCommand::Audiome  #Adjust ME

      @me_options_window.index = 0

      @me_options_window.active = true

      @me_options_window.visible = true

      @audio_options_window.active = false

      when OptionCommand::Audiose  #Adjust SE

      @se_options_window.index = 0

      @se_options_window.active = true

      @se_options_window.visible = true

      @audio_options_window.active = false

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-BGM Options InputCheck

  #--------------------------------------------------------------------------

  def bgm_options_input

    bgm_option = @bgm_options[@bgm_options_window.index]

    Sound.play_decision

    # Checks BGM Options Commands

    case bgm_option

    when OptionCommand::AudiobgmV[0]  #BGM Volume Down

      if $game_system.bgm_volume >= 10

        $game_system.bgm_volume = $game_system.bgm_volume - 10

        Audio.play_adjust(RPG::BGM.last, $game_system.bgm_volume)

      end

    when OptionCommand::AudiobgmV[1]  #BGM Volume Up

      if $game_system.bgm_volume <= 90

        $game_system.bgm_volume = $game_system.bgm_volume + 10

        Audio.play_adjust(RPG::BGM.last, $game_system.bgm_volume)

      end

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-BGS Options InputCheck

  #--------------------------------------------------------------------------

  def bgs_options_input

    bgs_option = @bgs_options[@bgs_options_window.index]

    Sound.play_decision

    # Checks BGM Options Commands

    case bgs_option

    when OptionCommand::AudiobgsV[0]  #BGS Volume Down

      if $game_system.bgs_volume >= 10

        $game_system.bgs_volume = $game_system.bgs_volume - 10

        Audio.play_adjust(RPG::BGS.last, $game_system.bgs_volume)

      end

    when OptionCommand::AudiobgsV[1]  #BGS Volume Up

      if $game_system.bgs_volume <= 90

        $game_system.bgs_volume = $game_system.bgs_volume + 10

        Audio.play_adjust(RPG::BGS.last, $game_system.bgs_volume)

      end

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-SE Options InputCheck

  #--------------------------------------------------------------------------

  def se_options_input

    se_option = @se_options[@se_options_window.index]

    Sound.play_decision

    # Checks BGM Options Commands

    case se_option

    when OptionCommand::AudioseV[0]  #SE Volume Down

      if $game_system.se_volume >= 10

        $game_system.se_volume = $game_system.se_volume - 10

      end

    when OptionCommand::AudioseV[1]  #SE Volume Up

      if $game_system.se_volume <= 90

        $game_system.se_volume = $game_system.se_volume + 10

      end

    end

  end

  #--------------------------------------------------------------------------

  # * Update Audio-ME Options InputCheck

  #--------------------------------------------------------------------------

  def me_options_input

    me_option = @me_options[@me_options_window.index]

    Sound.play_decision

    # Checks BGM Options Commands

    case me_option

    when OptionCommand::AudiomeV[0]  #ME Volume Down

      if $game_system.me_volume >= 10

        $game_system.me_volume = $game_system.me_volume - 10

      end

    when OptionCommand::AudiomeV[1]  #ME Volume Up

      if $game_system.me_volume <= 90

        $game_system.me_volume = $game_system.me_volume + 10

      end

    end

  end

  #--------------------------------------------------------------------------

  # * Update Resolution Options InputCheck

  #--------------------------------------------------------------------------  

  def resolution_options_input

    resolution_option = @resolution_options[@resolution_options_window.index]

    Sound.play_decision

    # Checks Resolution Options Commands

    case resolution_option

    when OptionCommand::ResolutionS[0]

      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')

      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')

      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')

      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)

      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)

      moveWindow.call(win, (sw - 544) / 2, (sh - 416) / 2, 544, 416, 1)

    when OptionCommand::ResolutionS[1]

      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')

      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')

      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')

      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)

      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)

      moveWindow.call(win, (sw - 800) / 2, (sh - 600) / 2, 800, 600, 1)

    when OptionCommand::ResolutionS[2]

      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')

      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')

      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')

      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)

      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)

      moveWindow.call(win, (sw - 1024) / 2, (sh - 768) / 2, 1024, 768, 1)

    when OptionCommand::ResolutionS[3]

      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')

      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')

      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')

      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)

      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)

      moveWindow.call(win, (sw - 1280) / 2, (sh - 1024) / 2, 1280, 1024, 1)

    when OptionCommand::ResolutionS[4]

      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')

      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')

      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')

      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)

      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)

      moveWindow.call(win, (sw - 1600) / 2, (sh - 1200) / 2, 1600, 1200, 1)

    end

  end

  #--------------------------------------------------------------------------

  # * Update Windows Options InputCheck

  #--------------------------------------------------------------------------  

  def windows_options_input

    windows_option = @windows_options[@windows_options_window.index]

    Sound.play_decision

    # Changes Windowskin Options

    case windows_option

    when OptionCommand::WindowsS[0] # Default Windowskin

      $game_system.skin = 'Window'

      unless MA_AMS == false

        $game_message.windowskin = "Window"

        $game_message.namebox_windowskin = "Window"

        $game_message.choicebox_windowskin = "Window"

        $game_dlgoptions.windowskin = "Window"

        $game_dlgoptions.choicebox_windowskin = "Window"

        $game_dlgoptions.namebox_windowskin = "Window"

      end

    when OptionCommand::WindowsS[1] # Custom Windowskin 1

      $game_system.skin = 'Window1'

      unless MA_AMS == false

        $game_message.windowskin = "Window1"

        $game_message.namebox_windowskin = "Window1"

        $game_message.choicebox_windowskin = "Window1"

        $game_dlgoptions.windowskin = "Window1"

        $game_dlgoptions.choicebox_windowskin = "Window1"

        $game_dlgoptions.namebox_windowskin = "Window1"

      end

    when OptionCommand::WindowsS[2] # Custom Windowskin 2

      $game_system.skin = 'Window2'

      unless MA_AMS == false

        $game_message.windowskin = "Window2"

        $game_message.namebox_windowskin = "Window2"

        $game_message.choicebox_windowskin = "Window2"

        $game_dlgoptions.windowskin = "Window2"

        $game_dlgoptions.choicebox_windowskin = "Window2"

        $game_dlgoptions.namebox_windowskin = "Window2"

      end

  #--------------------------------------------------------------------------

  # * Add any other windowskin options here if you want more windowskin choices

  # * Be sure to add the options at the top of the script in order for these

  # * to additions here to get used. For starters, I added a fourth option,

  # * (which starts at 3) all you need to do for this one is remove the comment

  # * tag "#" from the front of the lines

  #--------------------------------------------------------------------------

    #when OptionCommand::WindowsS[3] # Custom Windowskin 3

      #$game_system.skin = 'Window3'

      #unless MA_AMS == false

        #$game_message.windowskin = "Window3"

        #$game_message.namebox_windowskin = "Window3"

        #$game_message.choicebox_windowskin = "Window3"

        #$game_dlgoptions.windowskin = "Window3"

        #$game_dlgoptions.choicebox_windowskin = "Window3"

        #$game_dlgoptions.namebox_windowskin = "Window3"

      #end

    end

  end

  #--------------------------------------------------------------------------

  # * Update Help Text

  #--------------------------------------------------------------------------

  def update_help

        @help_window.set_text("Options")

    end

end

REQUIRED:
Adjustable Audio
Windowskin Changer

OPTIONAL:
AMS by Modern Algebra
Paragraph Formatter (required by AMS)

Erm, there's a text limit, so the rest of the post will be in subsequent posts..
 
Instructions

Place the Adjustable Audio, Windowskin Changer, AMS+Paragraph Formatter(OPTIONAL) and Options scripts above main in the script window (F11 in the game editor).

Instrucions to add more windowskin options are in the Options Script itself, commented at each location where there needs to be changes.

Anything I might be forgetting, or if you don't understand, please ask and I'll try to explain.

To call the options window, use the code:
Code:
$scene = Scene_Options.new

If you want this to be part of your menu system, like in the screenshots, you'll have to make edits to the Scene_End and Scene_Menu scripts as follows.

In Scene_Menu, find:

Code:
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])

And change it to:

Code:
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])

Then, scroll down to the next section "UPDATE COMMAND SELECTION", and find:

Code:
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new

And change it to:

Code:
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # End Game
        $scene = Scene_End.new

Next, in Scene_End, find the section very similar to Scene_Menu:

Code:
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = "Quit to Title"
    s2 = "Quit Game"
    s3 = Vocab::cancel
    @command_window = Window_Command.new(172, [s1, s2, s3])

And change it to:

Code:
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = "Options"
    s2 = "Save"
    s3 = "Quit to Title"
    s4 = "Quit Game"
    s5 = Vocab::cancel
    @command_window = Window_Command.new(172, [s1, s2, s3, s4, s5])

Next, find:

Code:
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
      end

And change it to:

Code:
      case @command_window.index
      when 0  # Options Adjust
        $scene = Scene_Options.new
      when 1  # Save
        $scene = Scene_File.new(true, false, false)
      when 2  # to title
        command_to_title
      when 3  # shutdown
        command_shutdown
      when 4  # quit
        command_cancel
      end

WINDOWSKINS:
Link to many windowskins. Be sure to rename these to "Window#" (starting with "Window" without the quotes)

FAQ

None, yet.

Compatibility

Unknown. Works in my project with 394329052 other scripts..

EDIT: Sorry, I forgot that there is a compatibility issue if you use the AMS by Modern Algebra; the AMS will not work with any other message systems.

Credits and Thanks

Credit goes to all of the people who made the respective scripts, all I did was make it possible to adjust them all from one simple menu.

Windowskin Changer + Game Window Resolution Change: Woratana
Adjustable Audio + the code for the whole options menu: Akin
AMS + Paragraph Formatter: Modern Algebra (MA)

Author's Notes

If there are any other scripts that have options that you want added to the script, suggest them and I'll try to make it so.

Terms and Conditions

The terms and conditions of each script are the same of all respectable owners.
 
My man, this is a great script. Exactly what i was looking for. Theres one problem i can see with this but it's only a personal preference. Is there a way to make it full screen, i've done it before with a One man CMS on RMXP but my memory is shot and i can't remember how i was told to do it. So, with this is there a way you can add a fullscreen option? If you can't, it is still quite a good script! nice going !
 
Updated the script to version 1.1. All this did was clean up the code and make it a bit more user friendly.

Again, if anyone has any other options they want added to this, post it and I will do my best.

-Psiclone
 

ikos

Member

Only issue I see is that the system menu pops up for a second in the default command area, kind of annoying.
Otherwise, wicked right.
 
ikos said:
Only issue I see is that the system menu pops up for a second in the default command area, kind of annoying.
Otherwise, wicked right.
Uh.. I don't know what you're talking about. I haven't seen that at all.

MistTribe":264xvz45 said:
Can add a 1280x800 resolution to it?

Yes, do you want it to add the extra resolution 1280x800, or do you want to replace that one with another one?

EDIT::

Code:
####################################################
# Custom Options Menu                              #
####################################################
#                                                  #
#    Audio Options by:                             #
#     by Akin                                      #
#       credit to 'L' who's custom menu helped     #
#       me figure out what to do                   #
####################################################

####################################################
#    Psiclone:                                     #
#    All I did was add in the resolution and       #
#    windowskin options.                           #
####################################################
#----------------- Version 1.1 ---------------------
####################################################
#   This script calls an options menu.             #
#                                                  #
#  Call using "$scene = Scene_Options.new"         #
#                                                  #
####################################################

#------------------------------------------------------------------------------
# Set this to the number of windowskin options that you want.
# You will then need to add the windows to the array at code line 59
# -----------------------------------------------------------------------------
NO_WINDOWSKINS = 11

#------------------------------------------------------------------------------
# Set this to true if you are using Modern Algebra's Advanced Text System
#-----------------------------------------------------------------------------
MA_AMS = true

module OptionCommand
#Main Option Commands
	Audio			    = 'Audio'
	Controls		  = 'Controls'
  Resolution    = 'Screen'
  Windows       = 'Windowskins'
	Exit_Options	= 'Back'
#Audio Option commands
  Audiobgm      = 'Music Volume'
  Audiobgs      = 'Background Effects Volume'
  Audiome       = 'Musical Effects Volume'
  Audiose       = 'Sound Effects volume'
#BGM Options
  AudiobgmV = ["Down", "Up"]
#BGS Options
  AudiobgsV = ['Down', 'Up']
#SE Options
  AudioseV  = ['Down', 'Up']
#ME Options
  AudiomeV  = ['Down', 'Up']
#Resolution Options
  ResolutionS = ['Default', '800x600', '1024x768', '1280x800', '1280x1024', '1600x1200']
###############Windowskin Options -- Add more window choices here.##############
#######These can be named anything you want as long as they're in quotes.#######
  WindowsS = ['Window 1', 'Window 2', 'Window 3', 'Window 4', 'Window 5', 'Window 6', 'Window 7', 'Window 8', 'Window 9', 'Window 10', 'Window 11', 'Window 12']
end

#==============================================================================
# ** Scene_Options
#------------------------------------------------------------------------------
#  This class performs the Options screen processing.
#==============================================================================

class Scene_Options < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(options_index = 0)
    @options_index = options_index
    options_init
  end
  #--------------------------------------------------------------------------
  # * Set Commands
  #--------------------------------------------------------------------------
  def options_init
    @options = []
    op1 = OptionCommand::Audio
    op2 = OptionCommand::Controls
    op3 = OptionCommand::Resolution
    op4 = OptionCommand::Windows
    op5 = OptionCommand::Exit_Options
    @options.push(op1, op2, op3, op4, op5).flatten!
    
    @audio_options = []
	  aud1 = OptionCommand::Audiobgm
	  aud2 = OptionCommand::Audiobgs
	  aud3 = OptionCommand::Audiome
	  aud4 = OptionCommand::Audiose
    @audio_options.push(aud1, aud2, aud3, aud4).flatten!
    
      @bgm_options = OptionCommand::AudiobgmV
      
      @bgs_options = OptionCommand::AudiobgsV
      
      @se_options = OptionCommand::AudioseV
      
      @me_options = OptionCommand::AudiomeV
      
    @resolution_options = OptionCommand::ResolutionS

    @windows_options = OptionCommand::WindowsS
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_options_window
    create_audio_window
    create_bgm_window
    create_bgs_window
    create_se_window
    create_me_window
    create_resolution_window
    create_windows_window
    create_controls_window
    @help_window = Window_Help.new
    @help_window.viewport = @viewport
	  @help_window.set_text("Options")
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @options_window.dispose
    @audio_options_window.dispose
      @bgm_options_window.dispose
      @bgs_options_window.dispose
      @se_options_window.dispose
      @me_options_window.dispose
    @resolution_options_window.dispose
    @windows_options_window.dispose
    @controls_window.dispose
	  @help_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @options_window.update
    @audio_options_window.update
      @bgm_options_window.update
      @bgs_options_window.update
      @se_options_window.update
      @me_options_window.update
    @resolution_options_window.update
    @windows_options_window.update
    @controls_window.update
	  @help_window.update
    if @options_window.active
      update_options_selection
    elsif @audio_options_window.active
      update_audio_options_selection
    elsif @bgm_options_window.active
      update_bgm_options_selection
    elsif @bgs_options_window.active
      update_bgs_options_selection
    elsif @se_options_window.active
      update_se_options_selection
    elsif @me_options_window.active
      update_me_options_selection
    elsif @resolution_options_window.active
      update_resolution_options_selection
    elsif @windows_options_window.active
      update_windows_options_selection
    elsif @controls_window.active
      update_controls_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Main Option Selection
  #--------------------------------------------------------------------------
  def create_options_window
    @options_window = Window_Command.new(160, @options)
    @options_window.index = @options_index
	  @options_window.y = 64
  end
  #--------------------------------------------------------------------------
  # * Create Audio Options Window
  #--------------------------------------------------------------------------
  def create_audio_window
    @audio_options_window = Window_Command.new(277, @audio_options)
    @audio_options_window.visible = false
    @audio_options_window.active = false
    @audio_options_window.x = 160
    @audio_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Audio-BGM Options Window
  #--------------------------------------------------------------------------
  def create_bgm_window
    @bgm_options_window = Window_Command.new(70, @bgm_options)
    @bgm_options_window.visible = false
    @bgm_options_window.active = false
    @bgm_options_window.x = 437
    @bgm_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Audio-BGS Options Window
  #--------------------------------------------------------------------------
  def create_bgs_window
    @bgs_options_window = Window_Command.new(70, @bgs_options)
    @bgs_options_window.visible = false
    @bgs_options_window.active = false
    @bgs_options_window.x = 437
    @bgs_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Audio-SE Options Window
  #--------------------------------------------------------------------------
  def create_se_window
    @se_options_window = Window_Command.new(70, @se_options)
    @se_options_window.visible = false
    @se_options_window.active = false
    @se_options_window.x = 437
    @se_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Audio-ME Options Window
  #--------------------------------------------------------------------------
  def create_me_window
    @me_options_window = Window_Command.new(70, @me_options)
    @me_options_window.visible = false
    @me_options_window.active = false
    @me_options_window.x = 437
    @me_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Resolution Options Window
  #--------------------------------------------------------------------------
  def create_resolution_window
    @resolution_options_window = Window_Command.new(120, @resolution_options)
    @resolution_options_window.visible = false
    @resolution_options_window.active = false
    @resolution_options_window.x = 160
    @resolution_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Windows Options Window
  #--------------------------------------------------------------------------
  def create_windows_window
    @windows_options_window = Window_Command.new(120, @windows_options)
    @windows_options_window.visible = false
    @windows_options_window.active = false
    @windows_options_window.x = 160
    @windows_options_window.y = 56
  end
  #--------------------------------------------------------------------------
  # * Create Controls Options Window
  #--------------------------------------------------------------------------
  def create_controls_window
    @controls_window = Window_Base.new(161, 57, 292, 300)
    @controls_window.contents.draw_text(0, -2, 100, 24, "Controls")
    @controls_window.contents.draw_text(0, 24, 300, 24, "To Access the system controls")
    @controls_window.contents.draw_text(0, 48, 300, 24, "Press F1 at any time")
    @controls_window.contents.draw_text(40, 96, 300, 24, "A")
    @controls_window.contents.draw_text(40, 120, 300, 24, "B")
    @controls_window.contents.draw_text(40, 144, 300, 24, "C")
    @controls_window.contents.draw_text(40, 168, 300, 24, "L")
    @controls_window.contents.draw_text(40, 192, 300, 24, "R")
    @controls_window.contents.draw_text(40, 216, 300, 24, "X")
    @controls_window.contents.draw_text(40, 240, 300, 24, "Y")
    @controls_window.contents.draw_text(60, 96, 300, 24, "::  Dash")
    @controls_window.contents.draw_text(60, 120, 300, 24, "::  Cancel/Menu")
    @controls_window.contents.draw_text(60, 144, 300, 24, "::  Confirm/Talk")
    @controls_window.contents.draw_text(60, 168, 300, 24, "::  Menu Previous")
    @controls_window.contents.draw_text(60, 192, 300, 24, "::  Menu Next")
    @controls_window.contents.draw_text(60, 216, 300, 24, "::  Not Used")
    @controls_window.contents.draw_text(60, 240, 300, 24, "::  Not Used")
    @controls_window.visible = false
    @controls_window.active = false
  end
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_End.new#(0) #-----------Change this number to the options spot -1 on main menu-----------------
  end
  #--------------------------------------------------------------------------
  # * Update Options Selection
  #--------------------------------------------------------------------------
  def update_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_End.new
      #return_scene
    elsif Input.trigger?(Input::C)
      main_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio Options Selection
  #--------------------------------------------------------------------------
  def update_audio_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @options_window.active = true
      @audio_options_window.active = false
      @audio_options_window.visible = false
      @audio_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      audio_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-BGM Options Selection
  #--------------------------------------------------------------------------
  def update_bgm_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @audio_options_window.active = true
      @bgm_options_window.active = false
      @bgm_options_window.visible = false
      @bgm_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      bgm_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-BGS Options Selection
  #--------------------------------------------------------------------------
  def update_bgs_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @audio_options_window.active = true
      @bgs_options_window.active = false
      @bgs_options_window.visible = false
      @bgs_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      bgs_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-SE Options Selection
  #--------------------------------------------------------------------------
  def update_se_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @audio_options_window.active = true
      @se_options_window.active = false
      @se_options_window.visible = false
      @se_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      se_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-ME Options Selection
  #--------------------------------------------------------------------------
  def update_me_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @audio_options_window.active = true
      @me_options_window.active = false
      @me_options_window.visible = false
      @me_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      me_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Resolution Options Selection
  #--------------------------------------------------------------------------
  def update_resolution_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @options_window.active = true
      @resolution_options_window.active = false
      @resolution_options_window.visible = false
      @resolution_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      resolution_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Windows Options Selection
  #--------------------------------------------------------------------------
  def update_windows_options_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @options_window.active = true
      @windows_options_window.active = false
      @windows_options_window.visible = false
      @windows_options_window.index = 0
      return
    elsif Input.trigger?(Input::C)
      windows_options_input
    end
  end
  #--------------------------------------------------------------------------
  # * Update Controls Selection
  #--------------------------------------------------------------------------
  def update_controls_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @options_window.active = true
      @controls_window.active = false
      @controls_window.visible = false
    end
  end
  #--------------------------------------------------------------------------
  # * Update Main Options InputCheck
  #--------------------------------------------------------------------------
  def main_options_input
    option = @options[@options_window.index]
    Sound.play_decision
    # Checks Options Commands
    case option
    when OptionCommand::Audio  #calls Audio options subwindow
      @audio_options_window.active = true
      @audio_options_window.visible = true
      @options_window.active = false
    when OptionCommand::Controls #Controls
      @controls_window.active = true
      @controls_window.visible = true
      @options_window.active = false
    when OptionCommand::Resolution #Resolution
      @resolution_options_window.active = true
      @resolution_options_window.visible = true
      @options_window.active = false
    when OptionCommand::Windows #Windows
      @windows_options_window.active = true
      @windows_options_window.visible = true
      @options_window.active = false
	  when OptionCommand::Exit_Options #Return to Main Menu
      return_scene
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio Options InputCheck
  #--------------------------------------------------------------------------
  def audio_options_input
    audio_option = @audio_options[@audio_options_window.index]
    Sound.play_decision
    # Checks Graphics Options Commands
    case audio_option
    when OptionCommand::Audiobgm  #Adjust BGM
      @bgm_options_window.index = 0
      @bgm_options_window.active = true
      @bgm_options_window.visible = true
      @audio_options_window.active = false
    when OptionCommand::Audiobgs  #Adjust BGS
      @bgs_options_window.index = 0
      @bgs_options_window.active = true
      @bgs_options_window.visible = true
      @audio_options_window.active = false
	  when OptionCommand::Audiome  #Adjust ME
      @me_options_window.index = 0
      @me_options_window.active = true
      @me_options_window.visible = true
      @audio_options_window.active = false
	  when OptionCommand::Audiose  #Adjust SE
      @se_options_window.index = 0
      @se_options_window.active = true
      @se_options_window.visible = true
      @audio_options_window.active = false
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-BGM Options InputCheck
  #--------------------------------------------------------------------------
  def bgm_options_input
    bgm_option = @bgm_options[@bgm_options_window.index]
    Sound.play_decision
    # Checks BGM Options Commands
    case bgm_option
    when OptionCommand::AudiobgmV[0]  #BGM Volume Down
      if $game_system.bgm_volume >= 10
        $game_system.bgm_volume = $game_system.bgm_volume - 10
        Audio.play_adjust(RPG::BGM.last, $game_system.bgm_volume)
      end
    when OptionCommand::AudiobgmV[1]  #BGM Volume Up
      if $game_system.bgm_volume <= 90
        $game_system.bgm_volume = $game_system.bgm_volume + 10
        Audio.play_adjust(RPG::BGM.last, $game_system.bgm_volume)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-BGS Options InputCheck
  #--------------------------------------------------------------------------
  def bgs_options_input
    bgs_option = @bgs_options[@bgs_options_window.index]
    Sound.play_decision
    # Checks BGM Options Commands
    case bgs_option
    when OptionCommand::AudiobgsV[0]  #BGS Volume Down
      if $game_system.bgs_volume >= 10
        $game_system.bgs_volume = $game_system.bgs_volume - 10
        Audio.play_adjust(RPG::BGS.last, $game_system.bgs_volume)
      end
    when OptionCommand::AudiobgsV[1]  #BGS Volume Up
      if $game_system.bgs_volume <= 90
        $game_system.bgs_volume = $game_system.bgs_volume + 10
        Audio.play_adjust(RPG::BGS.last, $game_system.bgs_volume)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-SE Options InputCheck
  #--------------------------------------------------------------------------
  def se_options_input
    se_option = @se_options[@se_options_window.index]
    Sound.play_decision
    # Checks BGM Options Commands
    case se_option
    when OptionCommand::AudioseV[0]  #SE Volume Down
      if $game_system.se_volume >= 10
        $game_system.se_volume = $game_system.se_volume - 10
      end
    when OptionCommand::AudioseV[1]  #SE Volume Up
      if $game_system.se_volume <= 90
        $game_system.se_volume = $game_system.se_volume + 10
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Audio-ME Options InputCheck
  #--------------------------------------------------------------------------
  def me_options_input
    me_option = @me_options[@me_options_window.index]
    Sound.play_decision
    # Checks BGM Options Commands
    case me_option
    when OptionCommand::AudiomeV[0]  #ME Volume Down
      if $game_system.me_volume >= 10
        $game_system.me_volume = $game_system.me_volume - 10
      end
    when OptionCommand::AudiomeV[1]  #ME Volume Up
      if $game_system.me_volume <= 90
        $game_system.me_volume = $game_system.me_volume + 10
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Resolution Options InputCheck
  #--------------------------------------------------------------------------  
  def resolution_options_input
    resolution_option = @resolution_options[@resolution_options_window.index]
    Sound.play_decision
    # Checks Resolution Options Commands
    case resolution_option
    when OptionCommand::ResolutionS[0]
      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
      moveWindow.call(win, (sw - 544) / 2, (sh - 416) / 2, 544, 416, 1)
    when OptionCommand::ResolutionS[1]
      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
      moveWindow.call(win, (sw - 800) / 2, (sh - 600) / 2, 800, 600, 1)
    when OptionCommand::ResolutionS[2]
      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
      moveWindow.call(win, (sw - 1024) / 2, (sh - 768) / 2, 1024, 768, 1)
    when OptionCommand::ResolutionS[3]
      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
      moveWindow.call(win, (sw - 1280) / 2, (sh - 800) / 2, 1280, 800, 1)
    when OptionCommand::ResolutionS[4]
      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
      moveWindow.call(win, (sw - 1280) / 2, (sh - 1024) / 2, 1280, 1024, 1)
    when OptionCommand::ResolutionS[5]
      getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
      moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
      findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
      win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
      sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
      moveWindow.call(win, (sw - 1600) / 2, (sh - 1200) / 2, 1600, 1200, 1)
    end
  end
  #--------------------------------------------------------------------------
  # * Update Windows Options InputCheck
  #--------------------------------------------------------------------------  
  def windows_options_input
    windows_option = @windows_options[@windows_options_window.index]
    Sound.play_decision
    # Changes Windowskin Options
    case windows_option
    when OptionCommand::WindowsS[0] # Default Windowskin
      $game_system.skin = 'Window'
      unless MA_AMS == false
        $game_message.windowskin = "Window"
        $game_message.namebox_windowskin = "Window"
        $game_message.choicebox_windowskin = "Window"
        $game_dlgoptions.windowskin = "Window"
        $game_dlgoptions.choicebox_windowskin = "Window"
        $game_dlgoptions.namebox_windowskin = "Window"
      end
    when OptionCommand::WindowsS[1] # Custom Windowskin 1
      $game_system.skin = 'Window1'
      unless MA_AMS == false
        $game_message.windowskin = "Window1"
        $game_message.namebox_windowskin = "Window1"
        $game_message.choicebox_windowskin = "Window1"
        $game_dlgoptions.windowskin = "Window1"
        $game_dlgoptions.choicebox_windowskin = "Window1"
        $game_dlgoptions.namebox_windowskin = "Window1"
      end
    when OptionCommand::WindowsS[2] # Custom Windowskin 2
      $game_system.skin = 'Window2'
      unless MA_AMS == false
        $game_message.windowskin = "Window2"
        $game_message.namebox_windowskin = "Window2"
        $game_message.choicebox_windowskin = "Window2"
        $game_dlgoptions.windowskin = "Window2"
        $game_dlgoptions.choicebox_windowskin = "Window2"
        $game_dlgoptions.namebox_windowskin = "Window2"
      end
  #--------------------------------------------------------------------------
  # * Add any other windowskin options here if you want more windowskin choices
  # * Be sure to add the options at the top of the script in order for these
  # * to additions here to get used. For starters, I added a fourth option,
  # * (which starts at 3) all you need to do for this one is remove the comment
  # * tag "#" from the front of the lines
  #--------------------------------------------------------------------------
    when OptionCommand::WindowsS[3] # Custom Windowskin 3
      $game_system.skin = 'Window3'
      unless MA_AMS == false
        $game_message.windowskin = "Window3"
        $game_message.namebox_windowskin = "Window3"
        $game_message.choicebox_windowskin = "Window3"
        $game_dlgoptions.windowskin = "Window3"
        $game_dlgoptions.choicebox_windowskin = "Window3"
        $game_dlgoptions.namebox_windowskin = "Window3"
      end
    when OptionCommand::WindowsS[4] # Custom Windowskin 4
      $game_system.skin = 'Window4'
      unless MA_AMS == false
        $game_message.windowskin = "Window4"
        $game_message.namebox_windowskin = "Window4"
        $game_message.choicebox_windowskin = "Window4"
        $game_dlgoptions.windowskin = "Window4"
        $game_dlgoptions.choicebox_windowskin = "Window4"
        $game_dlgoptions.namebox_windowskin = "Window4"
      end
    when OptionCommand::WindowsS[5] # Custom Windowskin 5
      $game_system.skin = 'Window5'
      unless MA_AMS == false
        $game_message.windowskin = "Window5"
        $game_message.namebox_windowskin = "Window5"
        $game_message.choicebox_windowskin = "Window5"
        $game_dlgoptions.windowskin = "Window5"
        $game_dlgoptions.choicebox_windowskin = "Window5"
        $game_dlgoptions.namebox_windowskin = "Window5"
      end
    when OptionCommand::WindowsS[6] # Custom Windowskin 6
      $game_system.skin = 'Window6'
      unless MA_AMS == false
        $game_message.windowskin = "Window6"
        $game_message.namebox_windowskin = "Window6"
        $game_message.choicebox_windowskin = "Window6"
        $game_dlgoptions.windowskin = "Window6"
        $game_dlgoptions.choicebox_windowskin = "Window6"
        $game_dlgoptions.namebox_windowskin = "Window6"
      end
    when OptionCommand::WindowsS[7] # Custom Windowskin 7
      $game_system.skin = 'Window7'
      unless MA_AMS == false
        $game_message.windowskin = "Window7"
        $game_message.namebox_windowskin = "Window7"
        $game_message.choicebox_windowskin = "Window7"
        $game_dlgoptions.windowskin = "Window7"
        $game_dlgoptions.choicebox_windowskin = "Window7"
        $game_dlgoptions.namebox_windowskin = "Window7"
      end
    when OptionCommand::WindowsS[8] # Custom Windowskin 8
      $game_system.skin = 'Window8'
      unless MA_AMS == false
        $game_message.windowskin = "Window8"
        $game_message.namebox_windowskin = "Window8"
        $game_message.choicebox_windowskin = "Window8"
        $game_dlgoptions.windowskin = "Window8"
        $game_dlgoptions.choicebox_windowskin = "Window8"
        $game_dlgoptions.namebox_windowskin = "Window8"
      end
    when OptionCommand::WindowsS[9] # Custom Windowskin 9
      $game_system.skin = 'Window9'
      unless MA_AMS == false
        $game_message.windowskin = "Window9"
        $game_message.namebox_windowskin = "Window9"
        $game_message.choicebox_windowskin = "Window9"
        $game_dlgoptions.windowskin = "Window9"
        $game_dlgoptions.choicebox_windowskin = "Window9"
        $game_dlgoptions.namebox_windowskin = "Window9"
      end
    when OptionCommand::WindowsS[10] # Custom Windowskin 10
      $game_system.skin = 'Window10'
      unless MA_AMS == false
        $game_message.windowskin = "Window10"
        $game_message.namebox_windowskin = "Window10"
        $game_message.choicebox_windowskin = "Window10"
        $game_dlgoptions.windowskin = "Window10"
        $game_dlgoptions.choicebox_windowskin = "Window10"
        $game_dlgoptions.namebox_windowskin = "Window10"
      end
    when OptionCommand::WindowsS[11] # Custom Windowskin 11
      $game_system.skin = 'Window11'
      unless MA_AMS == false
        $game_message.windowskin = "Window11"
        $game_message.namebox_windowskin = "Window11"
        $game_message.choicebox_windowskin = "Window11"
        $game_dlgoptions.windowskin = "Window11"
        $game_dlgoptions.choicebox_windowskin = "Window11"
        $game_dlgoptions.namebox_windowskin = "Window11"
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Help Text
  #--------------------------------------------------------------------------
  def update_help
		@help_window.set_text("Options")
	end
end
 
I noticed a problem, when you open the menu in-game and then close it out the selector is one slot below the "end game" option in the normal menu. Also, is there a way to allow players to access this menu all the time? (So you don't have to select "Quit Game" for it to show up (also it would be cool if it could show up in the normal title screen menu as well under "Options."
 
Did you put the options menu in the menu like the screenshots? If you did, then I forgot to give an extra line of code to change. In the Scene_End script, just change the line that looks like
Code:
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new(5)
  end
And change that (5) to a (4), and that should do it. As for calling the menu in game, use the script button in an event, and put in
Code:
$scene = Scene_Options.new
And to make it show up in the title, follow the same steps I supplied for putting in Scene_End, except change those lines in Scene_Title. Basically, you'll see a line like this
Code:
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::new_game
    s2 = Vocab::continue
    s3 = Vocab::shutdown
    @command_window = Window_Command.new(172, [s1, s2, s3])
This is where you can even customize how your title menu looks. Whatever number you put for the options menu, (we'll just use s2 for my example), you'd put:
Code:
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::new_game
    s2 = "Options Menu"
    s3 = Vocab::continue
    s4 = Vocab::shutdown
    @command_window = Window_Command.new(172, [s1, s2, s3, s4])
You can change those around AS LONG AS you keep the numbers in the correct order. Where it says @command_window = blah blah, add s4 to the end of the array, where the other s#'s are, and that's that. Next..
Code:
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0    #New game
        command_new_game
      when 1    # Continue
        command_continue
      when 2    # Shutdown
        command_shutdown
      end
    end
  end
Depending on the order you put the s#'s part in, you'll need to change these accordingly. As you can see, these numbers start at 0, so the next number you'd need (the one for the options menu) would be 3 and so on for anything else you want to put. So, to add the options menu, you'd put:
Code:
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0    #New game
        command_new_game
      when 1    # Options Menu
        $scene = Scene_Options.new
      when 2    # Continue
        command_continue
      when 3    # Shutdown
        command_shutdown
      end
    end
  end
And that should do it.. if you need further clarification, just ask.

-Psiclone
 
Problem i tried everything you said and it says: (quote) script 'cache' line 75: TypeError ocured. cannot convert nil into string.(unquote) help please!
edit: whenever i remove the window skin changer script everthing works. exept in your picture it says the system thing in the window nothing's there for mine in the menu thing. Also i didnt get the optional scripts cause i dont know what they do.
 
@ theroseliesdead:
To make that "System" thing in the main menu, you change the vocab in the database. That can be called anything you want, it doesn't have to be "System." As for the cache thing... not 100% sure. What order do you have your scripts in? In my project, I put them in this order:

Paragraph Formatter (Optional)
Audio Adjustment
Windowskin Changer
Options Script
AMS (Optional)

Let me know if that fixes anything for you..

Also, the optional AMS script is a message system; it provides tons of options which allow you to alter how your messages appear in game when characters talk to each other (or when the 'narrator' is speaking, or just any time text is displayed in game). The paragraph formatter allows it so you can completely ignore those black arrows when you're typing the messages in an event, because it automatically word wraps text in the window, even if there's a character portrait. Very very handy.


@Von Twirlenkiller:
Where would you want that?
 
ok i will try and see if it helps thx a bunch =)
edit: for the system thing what word do i edit or change to make it what ever word i want?
Ok well i tryed everything you said and nothing helped. It only happens when i start playing, in the main menu(the first menu when you first start the game) nothing happens but as soon as you start playing it happens with the error. I think it would be best if gave me a demo please and thank you.
 
MistTribe: Is the options menu in the Game End menu? If so, then that means that in your Scene_End needs editing. Find this line

Code:
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new(5)
  end

and in your code (ignore my number 5, yours might be different), make the number one smaller. If that doesn't work (but it should, if you're coming from Game End), then do a search for "$scene = Scene_Menu.new" and see what else is there.



jonny chleevas: I thought I had posted a demo, wtf. I'll put one up. Gimme a few.



EDIT:: Demo uploaded
 
Thanks, sorry if i'm a hassle (lol).
i like the script, it should work well in my game.

i have an idea for it, but it may be difficult,
like in the first few final fatasies, when you go into the options menu you could change the color if the widown with a RGB editor, i think you may be able to do it with a blank windowskin, but i dunno...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top