Yanfly System Options & XS Menu Delux Help

[SIZE=medium]I am trying to get Yanfly’s System Options working with the Xail Menu Delux script. I am working on a demo project right now, trying to get it set up how I want it before putting it into my actual game. I had used Yanfly’s script in an older project and got it set up how I like it, so I simply copied and pasted it into the new project.[/SIZE]

[SIZE=medium]There are two main issues I’m having. One, I don’t want Save and Load on this menu. [/SIZE]

[SIZE=medium]However, when I simply delete them from the command list here:[/SIZE]

[SIZE=medium]I get this error message:[/SIZE]

[SIZE=medium]I've sorted out this part of the problem.[/SIZE]

[SIZE=medium]Also, when I keep those in and am able to get to the Options menu, the Save option shows up but does nothing when selected. [/SIZE]

[SIZE=medium]Here are the scripts as I have them in the project:[/SIZE]

[SIZE=medium]Menu Delux[/SIZE]

[SIZE=medium][/SIZE]

[SIZE=medium]#==============================================================================
#   XaiL System - Menu Delux
#   Author: Nicke
#   Created: 20/11/2012
#   Edited: 08/02/2013
#   Version: 1.1b
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#==============================================================================
# Requires: XS - Core Script.
#==============================================================================
#
# This script changes the way the menu scene works. Not compatible with
# XS - Menu or XS - Icon Menu.
#
# Instructions are in the settings module below. Make sure you read through
# everything so you understand each section.
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================
($imported ||= {})["XAIL-XS-MENU_DELUX"] = true[/SIZE]

[SIZE=medium]module XAIL
  module MENU_DELUX
    #--------------------------------------------------------------------------#
    # * Settings
    #--------------------------------------------------------------------------#
    # FONT:
    # FONT = [name, size, color, bold, shadow]
    FONT = [["Calibri", "Verdana"], 18, Color.new(255,255,255), true, true]
   
    # PLAYTIME_ICON:
    # Set playtime window icon.
    # PLAYTIME_ICON = icon_id
    PLAYTIME_ICON = 280
   
    # MENU_ALIGNMENT:
    # MENU_ALIGNMENT = 0 (left), 1 (center), 2 (right)
    MENU_ALIGNMENT = 0 # Default: 2.
   
    # MENU_SKIN:
    # The windowskin to use for the windows.
    # Set to nil to disable.
    # MENU_SKIN = string
    MENU_SKIN = nil
   
    # MENU_LIST:
    # name, icon_index and custom are optional.
    # If name is empty it will use the corresponding symbol as name instead.
    # To make a command a common event you need to set custom to the common event
    # id you want to run as seen below.
    # symbol => [name, description, icon_index, enabled, personal, custom]
    MENU_LIST = {
      :item      => ["", "Browse through your acquired items.", 4148, true, false],
      :equip     => ["Equipment", "Change your equipment.", 4145, true, true],
      :status    => ["Stats", "See the current status of the hero.", 4136, true, true],
      :formation => ["", "Change the formation of the party.", 4134, true, false],
      :save      => ["", "Record your progress.", 4139, true, false],
      :load      => ["", "Load your saved progress.", 4165, true, false, Scene_Load],
      :game_end  => ["Options", "View the options menu", 4162, true, false],[/SIZE]

[SIZE=medium]    } # Don't remove this line!
   
    # MENU_SAVE = true/false
    # Override enabled option for save (so you can change it ingame).
    MENU_SAVE = true
   
    # If MENU_CUSTOM is true you will have to add the commands yourself
    # ingame, which can be useful for certain quest related stuff or if you
    # want to enable/disable menu commands.
    # To add/remove a command ingame follow these instructions:
    #
    # In a script call do like this:
    # menu_scene(key, type)
    # menu_scene🙂item,:add) # To add item to menu list.
    # menu_scene🙂item,:del) # To remove item from menu list.
    #
    # In a conditional branch you can check if a menu command is
    # enabled/disabled:
    # menu_active?(key)
    # menu_active?🙂item) # Check if item is enabled.
    # !menu_active?🙂item) # Check if item is disabled.
    #
    # To set a id to be enabled do like this:
    # menu_active🙂skill, true) # Set menu skill to be enabled.
    #
    # To add/remove all available menu commands use one of the
    # following methods in a script call:
    # menu_add_all
    # menu_del_all
    #
    # MENU_CUSTOM = true/false
    MENU_CUSTOM = false
   
    # The text to be displayed if no menu items is available.
    # Only used if MENU_CUSTOM is true.
    # MENU_EMPTY = string
    EMPTY = "Menu is not available at this point..."
   
    # MENU_MUSIC:
    # Set the music to be played at the menu scene.
    # This is optional.
    # MUSIC = true/false
    MUSIC = true
    # MUSIC_BGM = [name, volume, pitch]
    MUSIC_BGM = ["Theme4", 70, 100]
    # MUSIC_BGS = [name, volume, pitch]
    MUSIC_BGS = ["Darkness", 50, 100]
   
    # ANIM_LIST:
    # A list of animation images.
    # name  =>  [z, zoom_x, zoom_y, blend_type, opacity]
    ANIM_LIST = {
    } # Don't remove this line!
   
    # BACKGROUND:
    # name => [x, y, z, opacity]
    BACKGROUND = {
      #"" => [0, 0, 200, 255]
    } # Don't remove this line!
   
    # Show vocab for HP, MP and TP.
    # BAR_VOCAB = true/false
    BAR_VOCAB = false
   
    # BAR_COLOR = rgba(255,255,255,255)
    # Set the color of the gauges.
    BAR_HP = [Color.new(255,25,25,32), Color.new(255,150,150)]
    BAR_MP = [Color.new(25,25,255,32), Color.new(150,150,255)]
    BAR_TP = [Color.new(25,255,25,32), Color.new(150,255,150)]
   
    # DETAILS:
    # Setup details here. (Recommended to use the default ones since you will
    # need a bit RGSS knowledge to add more.)
    def self.details
      ["#{Vocab::currency_unit}: #{$game_party.gold}",
      "Steps: #{$game_party.steps}",
      "Collected Items: #{$game_party.all_items.size}",
      "Map: #{$data_mapinfos[$game_map.map_id].name}",
      "Leader: #{$game_party.leader.name}",
      "Battle Count: #{$game_system.battle_count}",
      "Save Count: #{$game_system.save_count}",
      "Party Members: #{$game_party.all_members.size}",
      "Highest Level: #{$game_party.highest_level}",
      "Variable I: #{$game_variables[1]}",
      "Variable II: #{$game_variables[2]}"]
    end
   
    # DETAILS_ICONS:
    # DETAILS_ICONS[id] = icon_id
    # Set the details icon_id. (optional)
    # Should be in the same order as details.
    # Use nil to disable a icon.
    DETAILS_ICONS = []
    DETAILS_ICONS[0]  = 2114 # GOLD
    DETAILS_ICONS[1]  = 172  # STEPS
    DETAILS_ICONS[2]  = 270  # ITEMS
    DETAILS_ICONS[3]  = 232  # MAP
    DETAILS_ICONS[4]  = 4425 # LEADER
    DETAILS_ICONS[5]  = 115  # BATTLE COUNT
    DETAILS_ICONS[6]  = 224  # SAVE COUNT
    DETAILS_ICONS[7]  = 121  # PARTY MEMBERS
    DETAILS_ICONS[8]  = 14   # HIGHEST LEVEL
    DETAILS_ICONS[9]  = nil  # VARIABLE 1
    DETAILS_ICONS[10] = nil  # VARIABLE 2
   
    # Transition, nil to use default.
    # TRANSITION [speed, transition, opacity]
    TRANSITION = nil
   
  end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** Error Handler
#==============================================================================#
  unless $imported["XAIL-XS-CORE"]
    # // Error handler when XS - Core is not installed.
    msg = "The script %s requires the latest version of XS - Core in order to function properly."
    name = "XS - Menu Delux"
    msgbox(sprintf(msg, name))
    exit
  end
#==============================================================================#
# ** Game_System
#==============================================================================#
class Game_System
 
  attr_accessor :menu_list
 
  alias xail_menu_delux_gm_sys_initialize initialize
  def initialize(*args, &block)
    # // Method to initialize game system.
    xail_menu_delux_gm_sys_initialize(*args, &block)
    @menu_list = {}
  end
 
  def get_menu
    # // Method to get the menu list.
    XAIL::MENU_DELUX::MENU_CUSTOM ? @menu_list : XAIL::MENU_DELUX::MENU_LIST
  end
 
end
#==============================================================================#
# ** Game_Interpreter
#==============================================================================#
class Game_Interpreter
 
  def menu_scene(key, type = :add) 
    # // Method to add/remove a menu item to the list.
    case type
      when :add # // Add menu id.
       unless $game_system.menu_list.include?(XAIL::MENU_DELUX::MENU_LIST[key])
         $game_system.menu_list[key] = XAIL::MENU_DELUX::MENU_LIST[key]          
       end unless XAIL::MENU_DELUX::MENU_LIST[key].nil?
      when :del # // Remove menu id.
      unless XAIL::MENU_DELUX::MENU_LIST[key].nil?
        $game_system.menu_list.delete(key)
      end
    end
  end
 
  def menu_active?(key)
    # // Method to check if menu key is enabled.
    # This will return nil if menu item not added in the list.
    return $game_system.menu_list[key][3] rescue nil
  end
 
  def menu_active(key, enabled)
    # // Method to enable id.
    $game_system.menu_list[key][3] = enabled
  end
 
  def menu_add_all
    # // Method to add all available menu items.
    XAIL::MENU_DELUX::MENU_LIST.each_key {|key| menu_scene(key) }
  end
 
  def menu_del_all
    # // Method to remove all available menu items.
    XAIL::MENU_DELUX::MENU_LIST.each_key {|key| menu_scene(key, :del) }
  end[/SIZE]

[SIZE=medium]end
#==============================================================================
# ** Window_MenuCommand
#==============================================================================
class Window_MenuCommand < Window_Command
 
  def window_width
    # // Method to return the width of the window.
    return Graphics.width / 4
  end
 
  def window_height
    # // Method to return the height of the window.
    return Graphics.height
  end
 
  def alignment
    # // Method to return the alignment.
    return XAIL::MENU_DELUX::MENU_ALIGNMENT
  end
 
  def menu_color(color, enabled = true)
     # // Method to set the color and alpha if not enabled.
    contents.font.color.set(color)
    contents.font.color.alpha = Colors::AlphaMenu unless enabled
  end
 
  def item_rect_for_text(index)
    # // Method to draw item rect for text.
    rect = item_rect(index)
    rect.x += 25
    draw_line_ex(rect.x - 4, rect.y + 9, Color.new(255,255,255), Color.new(0,0,0,128))
    draw_icon(XAIL::MENU_DELUX::MENU_LIST.values[index][2], -2, rect.y) unless XAIL::MENU_DELUX::MENU_LIST.values[index][2].nil?
    rect
  end
 
  def draw_item(index)
    # // Method to draw the command item.
    contents.font.name = XAIL::MENU_DELUX::FONT[0]
    contents.font.size = XAIL::MENU_DELUX::FONT[1]
    # // Save enable option.
    XAIL::MENU_DELUX::MENU_LIST[:save][3] = save_enabled if XAIL::MENU_DELUX::MENU_SAVE
    # // Default enable option.
    menu_color(XAIL::MENU_DELUX::FONT[2], menu_enabled?(index))
    # // Font settings
    contents.font.bold = XAIL::MENU_DELUX::FONT[3]
    contents.font.shadow = XAIL::MENU_DELUX::FONT[4]
    draw_text(item_rect_for_text(index), command_name(index), alignment)
    reset_font_settings
  end
 
  def menu_enabled?(index)
    # // Method to check if menu item is enabled.
    return $game_system.get_menu.values[index][3]
  end
 
  def make_command_list
    # // Method to add the commands.
    $game_system.get_menu.each {|key, value|
      name = value[0] == "" ? key.id2name.capitalize : value[0]
      XAIL::MENU_DELUX::MENU_LIST[:save][3] = save_enabled if XAIL::MENU_DELUX::MENU_SAVE
      add_command(name, key, value[3], value[5].nil? ? nil : value[5])
    }
  end[/SIZE]

[SIZE=medium]end
#==============================================================================
# ** Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
 
  def initialize(x, y)
    # // Method to initialize the window.
    super(x, y, window_width, window_height)
    self.arrows_visible = false
    @pending_index = -1
    refresh
  end
 
  def window_width
    # // Method to determine window width.
    return Graphics.width / 2.4
  end
 
  def col_max
    # // Method to determine col max.
    return 2
  end[/SIZE]

[SIZE=medium]  def spacing
    # // Method to determine spacing.
    return 6 if Graphics.width == 544 # For standard resolution.
    return 44                         # For high resolution.
  end
 
  def item_width
    # // Method to determine item width.
    return 98
  end[/SIZE]

[SIZE=medium]  def item_height
    # // Method to determine item height.
    return 128
  end
 
  def refresh
    # // Method to refresh the window.
    super
    # // Only display cursor arrow if more or equal to 5 party members.
    if $game_party.all_members.size >= 5
      self.arrows_visible = true
    end
  end[/SIZE]

[SIZE=medium]  def draw_item(index)
    # // Method to draw item.
    actor = $game_party.members[index]
    rect = item_rect(index)
    # // Face
    draw_actor_face(actor, rect.x + 1, rect.y + 1, true)
    # // Name
    draw_font_text(actor.name, rect.x + 4, rect.y, rect.width, 0, XAIL::MENU_DELUX::FONT[0], 20, XAIL::MENU_DELUX::FONT[2])
    # // Level
    lvl = "#{Vocab::level_a}: #{actor.level}"
    draw_font_text(lvl, rect.x + 4, rect.y + 64, rect.width, 0, XAIL::MENU_DELUX::FONT[0], 18, XAIL::MENU_DELUX::FONT[2])
    # // Class
    # // Check if Yanfly Class System is installed.
    if $imported["YEA-ClassSystem"]
      actor_class = actor.subclass.nil? ? actor.class.name : "#{actor.class.name} [#{actor.subclass.name}]"
    else
      actor_class = actor.class.name
    end   
    draw_font_text(actor_class, rect.x - 4, rect.y + 76, rect.width, 2, XAIL::MENU_DELUX::FONT[0], 16, XAIL::MENU_DELUX::FONT[2])
    # // Stats
    draw_menu_stats(actor, :hp, rect.x, rect.y + 90, XAIL::MENU_DELUX::BAR_HP[0], XAIL::MENU_DELUX::BAR_HP[1], rect.width - 2)
    draw_menu_stats(actor, :mp, rect.x, rect.y + 100, XAIL::MENU_DELUX::BAR_MP[0], XAIL::MENU_DELUX::BAR_MP[1], rect.width - 2)
    draw_menu_stats(actor, :tp, rect.x, rect.y + 110, XAIL::MENU_DELUX::BAR_TP[0], XAIL::MENU_DELUX::BAR_TP[1], rect.width - 2)
  end
 
  def draw_menu_stats(actor, stat, x, y, color1, color2, width)
    # // Method to draw actor hp & mp.
    case stat
    when :hp
      rate = actor.hp_rate ; vocab = Vocab::hp_a ; values = [actor.hp, actor.mhp]
    when :mp
      rate = actor.mp_rate ; vocab = Vocab::mp_a ; values = [actor.mp, actor.mmp]
    when :tp
      rate = actor.tp_rate ; vocab = Vocab::tp_a ; values = [actor.tp, actor.max_tp]
    end
    contents.font.name = XAIL::MENU_DELUX::FONT[0]
    contents.font.size = 14 # // Override font size.
    contents.font.color = XAIL::MENU_DELUX::FONT[2]
    contents.font.bold = XAIL::MENU_DELUX::FONT[3]
    contents.font.shadow = XAIL::MENU_DELUX::FONT[4]
    # // Draw guage.
    draw_gauge_ex(x, y - 8, width, 8, rate, color1, color2)
    # // Draw stats.
    draw_text(x + 2, y, width, line_height, values[0], 0)
    draw_text(x + 1, y, width, line_height, values[1], 2)
    # // Draw vocab.
    draw_text(x, y, width, line_height, vocab, 1) if XAIL::MENU_DELUX::BAR_VOCAB
    reset_font_settings
  end[/SIZE]

[SIZE=medium]end
#==============================================================================
# ** Window_Menu_Details
#==============================================================================
class Window_Menu_Details < Window_Base
 
  def initialize(x, y)
    # // Method to initialize.
    super(x, y, window_width, window_height)
    @leader = $game_party.leader
    refresh
  end
 
  def window_width
    # // Method to determine window width.
    return Graphics.width / 3
  end
 
  def window_height
    # // Method to determine window height.
    return Graphics.height
  end
 
  def refresh
    # // Method to refresh the window.
    contents.clear
    # // Draw details.
    y = -10
    XAIL::MENU_DELUX.details.each_index {|i|
      draw_line_ex(0, y += 24, Color.new(255,255,255,32), Color.new(0,0,0,64))
      draw_font_text(XAIL::MENU_DELUX.details, -4, line_height * i + 4, contents_width, 2, XAIL::MENU_DELUX::FONT[0], 16, XAIL::MENU_DELUX::FONT[2])
    }
    # // Draw icons.
    draw_icons(XAIL::MENU_DELUX:😀ETAILS_ICONS, :vertical, 2, line_height * 0 + 2)
  end[/SIZE]

[SIZE=medium]  def update
    # // Method to update details window.
    super
    if @leader != $game_party.leader
      @leader = $game_party.leader
      refresh
    end
  end
 
end
#==============================================================================
# ** Window_Menu_Playtime
#==============================================================================
class Window_Menu_Playtime < Window_Base
 
  def initialize(x, y)
    # // Method to initialize.
    super(x, y, 120, fitting_height(1))
    @playtime = $game_system.playtime_s
    refresh
  end
 
  def refresh
    # // Method to refresh the window.
    contents.clear
    # // Draw icon.
    draw_icon(XAIL::MENU_DELUX:😛LAYTIME_ICON, 4, 0)
    # // Draw playtime.
    draw_font_text(@playtime, 0, 6, contents_width, 2, XAIL::MENU_DELUX::FONT[0], 22, XAIL::MENU_DELUX::FONT[2])
  end
 
  def update
    # // Method to update the window.
    super
    @playtime = $game_system.playtime_s
    refresh
  end
 
end
#==============================================================================#
# ** Window_Menu_Help
#==============================================================================#
class Window_Menu_Help < Window_Help
 
  attr_accessor :index
 
  alias xail_icon_menu_winhelp_init initialize
  def initialize(*args, &block)
    # // Method to initialize help window.
    xail_icon_menu_winhelp_init(*args, &block)
    @index = 0
  end[/SIZE]

[SIZE=medium]  def set_text(text, enabled)
    # // Method to set a new help text.
    if text != @text
      menu_color(XAIL::MENU_DELUX::FONT[2], enabled)
      @text = text
      refresh
    end
  end
 
  def refresh
    # // Refresh help contents.
    contents.clear
    draw_help_text
  end
 
  def draw_help_text
    # // Method to draw the help text.
    contents.font.name = XAIL::MENU_DELUX::FONT[0]
    contents.font.size = XAIL::MENU_DELUX::FONT[1]
    menu_color(XAIL::MENU_DELUX::FONT[2], menu_enabled?(@index))
    contents.font.bold = XAIL::MENU_DELUX::FONT[3]
    contents.font.shadow = XAIL::MENU_DELUX::FONT[4]
    # // Draw title and description for the menu.
    draw_line_ex(0, 14, Color.new(255,255,255), Color.new(0,0,0,128))
    draw_text_ex_no_reset(0, 0, @text)
    reset_font_settings
  end
 
  def menu_enabled?(index)
    # // Method to check if menu item is enabled.
    return $game_system.get_menu.values[index][3]
  end
 
  def menu_color(color, enabled = true)
     # // Method to set the color and alpha if not enabled.
    contents.font.color.set(color)
    contents.font.color.alpha = 150 unless enabled
  end
 
end
#==============================================================================#
# ** Scene_MenuBase
#==============================================================================#
class Scene_MenuBase < Scene_Base
 
  def start
    # // Method to start the scene.
    super
    @actor = $game_party.menu_actor
    if SceneManager.scene_is?(Scene_Menu)
      @backgrounds = []
      @animations = []
      create_menu_backgrounds
      create_menu_animations
    end
  end
 
  def create_menu_backgrounds
    # // Method to create custom background(s).
    XAIL::MENU_DELUX::BACKGROUND.each {|key, value| @backgrounds << [sprite.new, key] }
    @backgrounds.each {|i|
      i[0].bitmap = Cache.system(i[1])
      i[0].x = XAIL::MENU_DELUX::BACKGROUND[i[1]][0]
      i[0].y = XAIL::MENU_DELUX::BACKGROUND[i[1]][1]
      i[0].z = XAIL::MENU_DELUX::BACKGROUND[i[1]][2]
      i[0].opacity = XAIL::MENU_DELUX::BACKGROUND[i[1]][3]
    }
  end
 
  def create_menu_animations
    # // Method to create custom animation(s).
    # name  =>  [z, zoom_x, zoom_y, blend_type, opacity]
    XAIL::MENU_DELUX::ANIM_LIST.each {|key, value| @animations.push << [Plane.new, key] }
    @animations.each {|i|
      i[0].bitmap = Cache.system(i[1])
      i[0].z = XAIL::MENU_DELUX::ANIM_LIST[i[1]][0]
      i[0].zoom_x = XAIL::MENU_DELUX::ANIM_LIST[i[1]][1]
      i[0].zoom_y = XAIL::MENU_DELUX::ANIM_LIST[i[1]][2]
      i[0].blend_type = XAIL::MENU_DELUX::ANIM_LIST[i[1]][3]
      i[0].opacity = XAIL::MENU_DELUX::ANIM_LIST[i[1]][4]
    }
  end[/SIZE]

[SIZE=medium]  alias xail_upd_menubase_delux_upd update
  def update(*args, &block)
    # // Method for updating the scene.
    xail_upd_menubase_delux_upd(*args, &block)
    if SceneManager.scene_is?(Scene_Menu)
      for i in [email hidden]
        @animations[0].ox += 1.2 - i
        @animations[0].oy -= 0.6 + i
      end unless scene_changing?
      delay?(1)
    end
  end
 
  def delay?(amount)
    # // Method to delay.
    amount.times do
      update_basic
    end
  end
 
  alias xail_menubase_delux_transition perform_transition
  def perform_transition(*args, &block)
    # // Method to create the transition.
    return if $game_system.get_menu.empty?
    if XAIL::MENU_DELUX::TRANSITION.nil?
      xail_menubase_delux_transition(*args, &block)
    else
      Graphics.transition(XAIL::MENU_DELUX::TRANSITION[0],XAIL::MENU_DELUX::TRANSITION[1],XAIL::MENU_DELUX::TRANSITION[2])
    end
  end
 
  def dispose_sprites
    # // Method to dispose sprites.
    @backgrounds.each {|i| i[0].dispose unless i[0].nil? ; i[0] = nil } rescue nil
    @animations.each {|i| i[0].dispose unless i[0].nil? ; i[0] = nil } rescue nil
  end
 
  def terminate
    # // Method to terminate.
    super
    dispose_sprites unless SceneManager.scene_is?(Scene_Menu)
  end[/SIZE]

[SIZE=medium]end
#==============================================================================#
# ** Scene_Menu
#==============================================================================#
class Scene_Menu < Scene_MenuBase
 
  def start
    super
    # // Method to start the scene.
    # // Return if menu empty.
    return command_map if $game_system.get_menu.empty?
    # // Create windows.
    create_menu_command_window
    create_menu_status_window
    create_menu_details_window
    create_menu_playtime_window
    create_menu_help_window
    # // Set help text to first menu command.
    help_update(@command_window.index)
    # // Play music if enabled.
    play_menu_music if XAIL::MENU_DELUX::MUSIC
  end
 
  def create_menu_command_window
    # // Method to create the command window.
    @command_window = Window_MenuCommand.new
    @command_window.windowskin = Cache.system(XAIL::MENU_DELUX::MENU_SKIN) unless XAIL::MENU_DELUX::MENU_SKIN.nil?
    @command_window.back_opacity = 96
    $game_system.get_menu.each {|key, value|
      unless value[5].nil?
        @command_window.set_handler(key, method🙂command_custom))
      else
        if value[4]
          @command_window.set_handler(key, method🙂command_personal))
        else
          @command_window.set_handler(key, method("command_#{key}".to_sym))
        end
      end
    }   
    @command_window.set_handler🙂cancel, method🙂return_scene))
  end
 
  def create_menu_status_window
    # // Method to create the status window.
    @status_window = Window_MenuStatus.new(0, 0)
    @status_window.height = Graphics.height - 72
    @status_window.x = @command_window.width
    @status_window.back_opacity = 96
  end
 
  def create_menu_details_window
    # // Method to create the details window.
    @details_window = Window_Menu_Details.new(0, 0)
    @details_window.x = Graphics.width - @details_window.width
    @details_window.back_opacity = 96
  end
 
  def create_menu_playtime_window
    # // Method to create the playtime window.
    @playtime_window = Window_Menu_Playtime.new(0, 0)
    @playtime_window.x = Graphics.width - @playtime_window.width
    @playtime_window.y = Graphics.height - @playtime_window.height - 26
    @playtime_window.opacity = 0
    @playtime_window.z = 201
  end
 
  def create_menu_help_window
    # // Method to create the help window.
    @help_window = Window_Menu_Help.new(2)
    @help_window.viewport = @viewport
    @help_window.windowskin = Cache.system(XAIL::MENU_DELUX::MENU_SKIN) unless XAIL::MENU_DELUX::MENU_SKIN.nil?
    @help_window.index = @command_window.index
    @help_window.y = Graphics.height - @help_window.height
    @help_window.back_opacity = 255
    @help_window.z = 200
  end
 
  def play_menu_music
    # // Method to play menu music.
    @last_bgm = RPG::BGM.last
    @last_bgs = RPG::BGS.last
    bgm = XAIL::MENU_DELUX::MUSIC_BGM
    bgs = XAIL::MENU_DELUX::MUSIC_BGS
    Sound.play(bgm[0], bgm[1], bgm[2], :bgm)
    Sound.play(bgs[0], bgs[1], bgs[2], :bgs)
  end
 
  alias xail_upd_menu_delux_upd update
  def update(*args, &block)
    # // Method for updating the scene.
    xail_upd_menu_delux_upd(*args, &block)
    old_index = @help_window.index
    help_update(@command_window.index) if old_index != @command_window.index
  end
 
  def help_update(index)
    # // If index changes update help window text.
    list = XAIL::MENU_DELUX::MENU_LIST
    icon = list.values[index][2].nil? ? "" : list.values[index][2]
    name = list.values[index][0] == "" ? list.keys[index].id2name.capitalize : list.values[index][0]
    if icon == "" ; title = name ; else ; title = '\i[' + icon.to_s + ']' + name ; end
    desc = '\c[0]' + list.values[index][1]
    text = "#{title}\n#{desc}"
    enabled = list.values[index][3]
    @help_window.index = index
    @help_window.set_text(text, enabled)
  end
 
  def on_personal_ok
    # // Method override on personal ok.
    scene = "Scene_#{@command_window.current_symbol.to_s.capitalize}".to_class
    SceneManager.call(scene)
  end
 
  def command_custom
    # // Method to call a custom command. (Don't remove)
    if @command_window.current_ext.is_a?(Integer)
      $game_temp.reserve_common_event(@command_window.current_ext)
      return command_map
    end
    SceneManager.call(@command_window.current_ext)
  end
 
  def command_map
    # // command_map (Don't remove)
    if $game_system.get_menu.empty?
      Sound.play_buzzer
      $game_message.texts << XAIL::MENU_DELUX::EMPTY
    end
    SceneManager.call(Scene_Map)
  end
 
  def pre_terminate
    # // Method to pre terminate scene menu.
    # // Play last bgm and bgs if menu music is enabled.
    if XAIL::MENU_DELUX::MUSIC
      @last_bgm.replay rescue nil
      @last_bgs.replay rescue nil
    end
  end
 
end # END OF FILE[/SIZE]

[SIZE=medium]#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#[/SIZE]

[SIZE=medium][/SIZE]

MenuHelp1.png

MenuHelp2.png

MenuHelp3.png
[SIZE=medium](sorry for the double post, it was too long and I had to continue it.)[/SIZE]

[SIZE=medium]Yanfly System Options[/SIZE]

[SIZE=medium][/SIZE]

[SIZE=medium]#==============================================================================
#
# ▼ Yanfly Engine Ace - System Options v1.00
# -- Last Updated: 2012.01.01
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================[/SIZE]

[SIZE=medium]$imported = {} if $imported.nil?
$imported["YEA-SystemOptions"] = true[/SIZE]

[SIZE=medium]#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.01 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script replaces the "Game End" option in the Main Menu with a "System"
# menu where the player can adjust various settings in the game. Of them, the
# player can change the window colour, the volume for BGM, BGS, SFX, set
# automatic dashing, message text to display instantly, and speed up battles by
# hiding battle animations.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# $game_system.volume_change🙂bgm, x)
# $game_system.volume_change🙂bgs, x)
# $game_system.volume_change🙂sfx, x)
# Unlike the previous Yanfly Engines, this version does not bind volume to a
# variable. Use the script call to change the bgm, bgs, or sfx sound rate by
# x increment. Use a negative value to lower the volume.
#
# $game_system.set_autodash(true)
# $game_system.set_autodash(false)
# Turns autodash on (true) or off (false).
#
# $game_system.set_instantmsg(true)
# $game_system.set_instantmsg(false)
# Turns instant messages on (true) or off (false).
#
# $game_system.set_animations(true)
# $game_system.set_animations(false)
# Turns battle animations on (true) or off (false).
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================[/SIZE]

[SIZE=medium]module YEA
module SYSTEM

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - General Setting -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These are the general settings that govern the System settings. This will
# change the "Game End" vocab, and disable or enable autodash, instant
# messages, or animations by default.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMAND_NAME = "Options" # Command name used to replace Game End.
DEFAULT_AUTODASH = true # Enable automatic dashing by default?
DEFAULT_INSTANTMSG = false # Enable instant message text by default?
DEFAULT_ANIMATIONS = true # Enable battle animations by default?

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Command Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These settings adjust the commands shown in the command list. Add, remove
# or rearrange the commands as you see fit. Here's a list of which commands
# do what:
#
# -------------------------------------------------------------------------
# :command Description
# -------------------------------------------------------------------------
# :blank Inserts an empty blank space.
#
# :window_red Changes the red tone for all windows.
# :window_grn Changes the green tone for all windows.
# :window_blu Changes the blue tone for all windows.
#
# :volume_bgm Changes the BGM volume used.
# :volume_bgs Changes the BGS volume used.
# :volume_sfx Changes the SFX volume used.
#
# :autodash Sets the player to automatically dash.
# :instantmsg Sets message text to appear instantly.
# :animations Enables battle animations or disables them.
#
# :to_title Returns to the title screen.
# :shutdown Shuts down the game.
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMANDS =[
:save_optn, # Save game option.
:to_title, # Returns to the title screen.
:shutdown, # Shuts down the game.
:blank,
:volume_bgm, # Changes the BGM volume used.
:volume_bgs, # Changes the BGS volume used.
:volume_sfx, # Changes the SFX volume used.
:blank,
:autodash, # Sets the player to automatically dash.
# :switch_1, # Custom Switch 1. Adjust settings below.
# :switch_2, # Custom Switch 2. Adjust settings below.
# :variable_1, # Custom Variable 1. Adjust settings below.
# :variable_2, # Custom Variable 2. Adjust settings below.[/SIZE]

[SIZE=medium]] # Do not remove this.

#--------------------------------------------------------------------------
# - Custom Switches -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# If you want your game to have system options other than just the ones
# listed above, you can insert custom switches here to produce such an
# effect. Adjust the settings here as you see fit.
#--------------------------------------------------------------------------
CUSTOM_SWITCHES ={
# -------------------------------------------------------------------------
# :switch => [switch, Name, Off Text, On Text,
# Help Window Description
# ], # Do not remove this.
# -------------------------------------------------------------------------
:switch_1 => [ 1, "Hippy Hop Switch", "OFF", "ON",
"Set the Hippy Hoppy."
],
# -------------------------------------------------------------------------
:switch_2 => [ 2, "Custom Switch 2", "OFF", "ON",
"Help description used for custom switch 2."
],
# -------------------------------------------------------------------------
} # Do not remove this.

#--------------------------------------------------------------------------
# - Custom Variables -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# If you want your game to have system options other than just the ones
# listed above, you can insert custom variables here to produce such an
# effect. Adjust the settings here as you see fit.
#--------------------------------------------------------------------------
CUSTOM_VARIABLES ={
# -------------------------------------------------------------------------
# :variable => [switch, Name, Colour1, Colour2, Min, Max,
# Help Window Description
# ], # Do not remove this.
# -------------------------------------------------------------------------
:variable_1 => [ 1, "Custom Variable 1", 9, 1, -100, 100,
"Help description used for custom variable 1."
],
# -------------------------------------------------------------------------
:variable_2 => [ 2, "Custom Variable 2", 10, 2, -10, 10,
"Help description used for custom variable 2."
],
# -------------------------------------------------------------------------
} # Do not remove this.

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Vocab Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This hash adjusts the vocab used for both the commands and the help
# description that appears above the command window. Note that for the
# command help descriptions, you may use text codes. Use \n to linebreak.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMAND_VOCAB ={
# -------------------------------------------------------------------------
# :command => [Command Name, Option1, Option2
# Help Window Description,
# ], # Do not remove this.
# -------------------------------------------------------------------------
:blank => ["", "None", "None",
""
], # Do not remove this.
# -------------------------------------------------------------------------
:window_red => ["Window Red", "None", "None",
"Change the red colour tone for windows.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:window_grn => ["Window Green", "None", "None",
"Change the green colour tone for windows.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:window_blu => ["Window Blue", "None", "None",
"Change the blue colour tone for windows.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:volume_bgm => ["BGM Volume", 12, 4, # Options 1 & 2 are Gauge Colours.
"Change the volume used for background music.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:volume_bgs => ["BGS Volume", 13, 5, # Options 1 & 2 are Gauge Colours.
"Change the volume used for background sound.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:volume_sfx => ["SFX Volume", 14, 6, # Options 1 & 2 are Gauge Colours.
"Change the volume used for sound effects.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:autodash => ["Player Speed", "Walk", "Run",
"Sets player speed."
], # Do not remove this.
# -------------------------------------------------------------------------
:instantmsg => ["Instant Text", "Normal", "Instant",
"Set message text to appear one-by-one or instantly."
], # Do not remove this.
# -------------------------------------------------------------------------
:animations => ["Battle Animations", "Hide", "Show",
"Hide animations during battle to speed up battles?"
], # Do not remove this.
# -------------------------------------------------------------------------
:to_title => ["Main Menu", "None", "None",
"Go back to the Main Menu."
], # Do not remove this.
# -------------------------------------------------------------------------
:shutdown => ["Exit Game", "None", "None",
"Exits the game."
], # Do not remove this.
# -------------------------------------------------------------------------
:save_optn => ["Save", "None", "None",
"Save your game."
], # Do not remove this.
# -------------------------------------------------------------------------
:cont_optn => ["Continue", "None", "None",
"Continue playing."
], # Do not remove this.
# -------------------------------------------------------------------------
} # Do not remove this.

end # SYSTEM
end # YEA[/SIZE]

[SIZE=medium]#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Vocab
#==============================================================================[/SIZE]

[SIZE=medium]module Vocab

#--------------------------------------------------------------------------
# overwrite method: self.game_end
#--------------------------------------------------------------------------
def self.game_end
return YEA::SYSTEM::COMMAND_NAME
end

end # Vocab[/SIZE]

[SIZE=medium]#==============================================================================
# ■ RPG::BGM
#==============================================================================[/SIZE]

[SIZE=medium]class RPG::BGM < RPG::AudioFile

#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play(pos = 0)
if @name.empty?
Audio.bgm_stop
@@last = RPG::BGM.new
else
volume = @volume
volume *= $game_system.volume🙂bgm) * 0.01 unless $game_system.nil?
Audio.bgm_play('Audio/BGM/' + @name, volume, @pitch, pos)
@@last = self.clone
end
end

end # RPG::BGM[/SIZE]

[SIZE=medium]#==============================================================================
# ■ RPG::ME
#==============================================================================[/SIZE]

[SIZE=medium]class RPG::ME < RPG::AudioFile

#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play
if @name.empty?
Audio.me_stop
else
volume = @volume
volume *= $game_system.volume🙂bgm) * 0.01 unless $game_system.nil?
Audio.me_play('Audio/ME/' + @name, volume, @pitch)
end
end

end # RPG::ME[/SIZE]

[SIZE=medium]#==============================================================================
# ■ RPG::BGS
#==============================================================================[/SIZE]

[SIZE=medium]class RPG::BGS < RPG::AudioFile

#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play(pos = 0)
if @name.empty?
Audio.bgs_stop
@@last = RPG::BGS.new
else
volume = @volume
volume *= $game_system.volume🙂bgs) * 0.01 unless $game_system.nil?
Audio.bgs_play('Audio/BGS/' + @name, volume, @pitch, pos)
@@last = self.clone
end
end

end # RPG::BGS[/SIZE]

[SIZE=medium]#==============================================================================
# ■ RPG::SE
#==============================================================================[/SIZE]

[SIZE=medium]class RPG::SE < RPG::AudioFile

#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play
unless @name.empty?
volume = @volume
volume *= $game_system.volume🙂sfx) * 0.01 unless $game_system.nil?
Audio.se_play('Audio/SE/' + @name, volume, @pitch)
end
end

end # RPG::SE[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Game_System
#==============================================================================[/SIZE]

[SIZE=medium]class Game_System

#--------------------------------------------------------------------------
# alias method: initialize
#--------------------------------------------------------------------------
alias game_system_initialize_so initialize
def initialize
game_system_initialize_so
init_volume_control
init_autodash
init_instantmsg
init_animations
end

#--------------------------------------------------------------------------
# new method: init_volume_control
#--------------------------------------------------------------------------
def init_volume_control
@volume = {}
@volume[:bgm] = 100
@volume[:bgs] = 100
@volume[:sfx] = 100
end

#--------------------------------------------------------------------------
# new method: volume
#--------------------------------------------------------------------------
def volume(type)
init_volume_control if @volume.nil?
return [[@volume[type], 0].max, 100].min
end

#--------------------------------------------------------------------------
# new method: volume_change
#--------------------------------------------------------------------------
def volume_change(type, increment)
init_volume_control if @volume.nil?
@volume[type] += increment
@volume[type] = [[@volume[type], 0].max, 100].min
end

#--------------------------------------------------------------------------
# new method: init_autodash
#--------------------------------------------------------------------------
def init_autodash
@autodash = YEA::SYSTEM:😀EFAULT_AUTODASH
end

#--------------------------------------------------------------------------
# new method: autodash?
#--------------------------------------------------------------------------
def autodash?
init_autodash if @autodash.nil?
return @autodash
end

#--------------------------------------------------------------------------
# new method: set_autodash
#--------------------------------------------------------------------------
def set_autodash(value)
@autodash = value
end

#--------------------------------------------------------------------------
# new method: init_instantmsg
#--------------------------------------------------------------------------
def init_instantmsg
@instantmsg = YEA::SYSTEM:😀EFAULT_INSTANTMSG
end

#--------------------------------------------------------------------------
# new method: instantmsg?
#--------------------------------------------------------------------------
def instantmsg?
init_instantmsg if @instantmsg.nil?
return @instantmsg
end

#--------------------------------------------------------------------------
# new method: set_instantmsg
#--------------------------------------------------------------------------
def set_instantmsg(value)
@instantmsg = value
end

#--------------------------------------------------------------------------
# new method: init_animations
#--------------------------------------------------------------------------
def init_animations
@animations = YEA::SYSTEM:😀EFAULT_ANIMATIONS
end

#--------------------------------------------------------------------------
# new method: animations?
#--------------------------------------------------------------------------
def animations?
init_animations if @animations.nil?
return @animations
end

#--------------------------------------------------------------------------
# new method: set_animations
#--------------------------------------------------------------------------
def set_animations(value)
@animations = value
end

end # Game_System[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Game_Player
#==============================================================================[/SIZE]

[SIZE=medium]class Game_Player < Game_Character

#--------------------------------------------------------------------------
# alias method: dash?
#--------------------------------------------------------------------------
alias game_player_dash_so dash?
def dash?
if $game_system.autodash?
return false if @move_route_forcing
return false if $game_map.disable_dash?
return false if vehicle
return !Input.press?🙂A)
else
return game_player_dash_so
end
end

end # Game_Player[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Scene_Battle
#==============================================================================[/SIZE]

[SIZE=medium]class Scene_Battle < Scene_Base

#--------------------------------------------------------------------------
# alias method: show_fast?
#--------------------------------------------------------------------------
alias scene_battle_show_fast_so show_fast?
def show_fast?
return true unless $game_system.animations?
return scene_battle_show_fast_so
end

#--------------------------------------------------------------------------
# alias method: show_normal_animation
#--------------------------------------------------------------------------
alias scene_battle_show_normal_animation_so show_normal_animation
def show_normal_animation(targets, animation_id, mirror = false)
return unless $game_system.animations?
scene_battle_show_normal_animation_so(targets, animation_id, mirror)
end

end # Scene_Battle[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Window_Message
#==============================================================================[/SIZE]

[SIZE=medium]class Window_Message < Window_Base

#--------------------------------------------------------------------------
# alias method: clear_flags
#--------------------------------------------------------------------------
alias window_message_clear_flags_so clear_flags
def clear_flags
window_message_clear_flags_so
@show_fast = true if $game_system.instantmsg?
end

end # Window_Message[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Window_SystemOptions
#==============================================================================[/SIZE]

[SIZE=medium]class Window_SystemOptions < Window_Command

#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
def initialize(help_window)
@help_window = help_window
super(0, @help_window.height)
refresh
end

#--------------------------------------------------------------------------
# window_width
#--------------------------------------------------------------------------
def window_width; return Graphics.width; end

#--------------------------------------------------------------------------
# window_height
#--------------------------------------------------------------------------
def window_height; return Graphics.height - @help_window.height; end

#--------------------------------------------------------------------------
# update_help
#--------------------------------------------------------------------------
def update_help
if current_symbol == :custom_switch || current_symbol == :custom_variable
text = @help_descriptions[current_ext]
else
text = @help_descriptions[current_symbol]
end
text = "" if text.nil?
@help_window.set_text(text)
end

#--------------------------------------------------------------------------
# ok_enabled?
#--------------------------------------------------------------------------
def ok_enabled?
return true if [:to_title, :shutdown].include?(current_symbol)
return false
end

#--------------------------------------------------------------------------
# make_command_list
#--------------------------------------------------------------------------
def make_command_list
@help_descriptions = {}
for command in YEA::SYSTEM::COMMANDS
case command
when :blank
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :window_red, :window_grn, :window_blu
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :volume_bgm, :volume_bgs, :volume_sfx
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :autodash, :instantmsg, :animations
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :to_title, :shutdown, :cont_optn, :save_optn
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
else
process_custom_switch(command)
process_custom_variable(command)
end
end
end

#--------------------------------------------------------------------------
# process_custom_switch
#--------------------------------------------------------------------------
def process_custom_switch(command)
return unless YEA::SYSTEM::CUSTOM_SWITCHES.include?(command)
name = YEA::SYSTEM::CUSTOM_SWITCHES[command][1]
add_command(name, :custom_switch, true, command)
@help_descriptions[command] = YEA::SYSTEM::CUSTOM_SWITCHES[command][4]
end

#--------------------------------------------------------------------------
# process_custom_variable
#--------------------------------------------------------------------------
def process_custom_variable(command)
return unless YEA::SYSTEM::CUSTOM_VARIABLES.include?(command)
name = YEA::SYSTEM::CUSTOM_VARIABLES[command][1]
add_command(name, :custom_variable, true, command)
@help_descriptions[command] = YEA::SYSTEM::CUSTOM_VARIABLES[command][6]
end

#--------------------------------------------------------------------------
# draw_item
#--------------------------------------------------------------------------
def draw_item(index)
reset_font_settings
rect = item_rect(index)
contents.clear_rect(rect)
case @list[index][:symbol]
when :window_red, :window_grn, :window_blu
draw_window_tone(rect, index, @list[index][:symbol])
when :volume_bgm, :volume_bgs, :volume_sfx
draw_volume(rect, index, @list[index][:symbol])
when :autodash, :instantmsg, :animations
draw_toggle(rect, index, @list[index][:symbol])
when :to_title, :shutdown, :cont_optn, :save_optn
draw_text(item_rect_for_text(index), command_name(index), 1)
when :custom_switch
draw_custom_switch(rect, index, @list[index][:ext])
when :custom_variable
draw_custom_variable(rect, index, @list[index][:ext])
end
end

#--------------------------------------------------------------------------
# draw_window_tone
#--------------------------------------------------------------------------
def draw_window_tone(rect, index, symbol)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
tone = $game_system.window_tone
case symbol
when :window_red
rate = (tone.red + 255.0) / 510.0
colour1 = Color.new(128, 0, 0)
colour2 = Color.new(255, 0, 0)
value = tone.red.to_i
when :window_grn
rate = (tone.green + 255.0) / 510.0
colour1 = Color.new(0, 128, 0)
colour2 = Color.new(0, 255, 0)
value = tone.green.to_i
when :window_blu
rate = (tone.blue + 255.0) / 510.0
colour1 = Color.new(0, 0, 128)
colour2 = Color.new(0, 0, 255)
value = tone.blue.to_i
end
draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
end

#--------------------------------------------------------------------------
# draw_volume
#--------------------------------------------------------------------------
def draw_volume(rect, index, symbol)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
case symbol
when :volume_bgm
rate = $game_system.volume🙂bgm)
when :volume_bgs
rate = $game_system.volume🙂bgs)
when :volume_sfx
rate = $game_system.volume🙂sfx)
end
colour1 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][1])
colour2 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][2])
value = sprintf("%d%%", rate)
rate *= 0.01
draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
end

#--------------------------------------------------------------------------
# draw_toggle
#--------------------------------------------------------------------------
def draw_toggle(rect, index, symbol)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
case symbol
when :autodash
enabled = $game_system.autodash?
when :instantmsg
enabled = $game_system.instantmsg?
when :animations
enabled = $game_system.animations?
end
dx = contents.width/2
change_color(normal_color, !enabled)
option1 = YEA::SYSTEM::COMMAND_VOCAB[symbol][1]
draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
dx += contents.width/4
change_color(normal_color, enabled)
option2 = YEA::SYSTEM::COMMAND_VOCAB[symbol][2]
draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
end

#--------------------------------------------------------------------------
# cursor_right
#--------------------------------------------------------------------------
def draw_custom_switch(rect, index, ext)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
enabled = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
dx = contents.width/2
change_color(normal_color, !enabled)
option1 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][2]
draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
dx += contents.width/4
change_color(normal_color, enabled)
option2 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][3]
draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
end

#--------------------------------------------------------------------------
# draw_custom_variable
#--------------------------------------------------------------------------
def draw_custom_variable(rect, index, ext)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
value = $game_variables[YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]]
colour1 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][2])
colour2 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][3])
minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
rate = (value - minimum).to_f / [(maximum - minimum).to_f, 0.01].max
dx = contents.width/2
draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
end

#--------------------------------------------------------------------------
# cursor_right
#--------------------------------------------------------------------------
def cursor_right(wrap = false)
cursor_change🙂right)
super(wrap)
end

#--------------------------------------------------------------------------
# cursor_left
#--------------------------------------------------------------------------
def cursor_left(wrap = false)
cursor_change🙂left)
super(wrap)
end

#--------------------------------------------------------------------------
# cursor_change
#--------------------------------------------------------------------------
def cursor_change(direction)
case current_symbol
when :window_red, :window_blu, :window_grn
change_window_tone(direction)
when :volume_bgm, :volume_bgs, :volume_sfx
change_volume(direction)
when :autodash, :instantmsg, :animations
change_toggle(direction)
when :custom_switch
change_custom_switch(direction)
when :custom_variable
change_custom_variables(direction)
end
end

#--------------------------------------------------------------------------
# change_window_tone
#--------------------------------------------------------------------------
def change_window_tone(direction)
Sound.play_cursor
value = direction == :left ? -1 : 1
value *= 10 if Input.press?🙂A)
tone = $game_system.window_tone.clone
case current_symbol
when :window_red; tone.red += value
when :window_grn; tone.green += value
when :window_blu; tone.blue += value
end
$game_system.window_tone = tone
draw_item(index)
end

#--------------------------------------------------------------------------
# change_window_tone
#--------------------------------------------------------------------------
def change_volume(direction)
Sound.play_cursor
value = direction == :left ? -1 : 1
value *= 10 if Input.press?🙂A)
case current_symbol
when :volume_bgm
$game_system.volume_change🙂bgm, value)
RPG::BGM::last.play
when :volume_bgs
$game_system.volume_change🙂bgs, value)
RPG::BGS::last.play
when :volume_sfx
$game_system.volume_change🙂sfx, value)
end
draw_item(index)
end

#--------------------------------------------------------------------------
# change_toggle
#--------------------------------------------------------------------------
def change_toggle(direction)
value = direction == :left ? false : true
case current_symbol
when :autodash
current_case = $game_system.autodash?
$game_system.set_autodash(value)
when :instantmsg
current_case = $game_system.instantmsg?
$game_system.set_instantmsg(value)
when :animations
current_case = $game_system.animations?
$game_system.set_animations(value)
end
Sound.play_cursor if value != current_case
draw_item(index)
end

#--------------------------------------------------------------------------
# change_custom_switch
#--------------------------------------------------------------------------
def change_custom_switch(direction)
value = direction == :left ? false : true
ext = current_ext
current_case = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
$game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]] = value
Sound.play_cursor if value != current_case
draw_item(index)
end

#--------------------------------------------------------------------------
# change_custom_variables
#--------------------------------------------------------------------------
def change_custom_variables(direction)
Sound.play_cursor
value = direction == :left ? -1 : 1
value *= 10 if Input.press?🙂A)
ext = current_ext
var = YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]
minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
$game_variables[var] += value
$game_variables[var] = [[$game_variables[var], minimum].max, maximum].min
draw_item(index)
end

end # Window_SystemOptions[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Scene_Menu
#==============================================================================[/SIZE]

[SIZE=medium]class Scene_Menu < Scene_MenuBase

#--------------------------------------------------------------------------
# overwrite method: command_game_end
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_System)
end

end # Scene_Menu[/SIZE]

[SIZE=medium]#==============================================================================
# ■ Scene_System
#==============================================================================[/SIZE]

[SIZE=medium]class Scene_System < Scene_MenuBase

#--------------------------------------------------------------------------
# start
#--------------------------------------------------------------------------
def start
super
create_help_window
create_command_window
end

#--------------------------------------------------------------------------
# create_command_window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_SystemOptions.new(@help_window)
@command_window.set_handler🙂cancel, method🙂return_scene))
@command_window.set_handler🙂to_title, method🙂command_to_title))
@command_window.set_handler🙂shutdown, method🙂command_shutdown))
@command_window.set_handler🙂save_optn, method🙂command_save))
end

#--------------------------------------------------------------------------
# command_to_title
#--------------------------------------------------------------------------
def command_to_title
fadeout_all
SceneManager.goto(Scene_Title)
end

#--------------------------------------------------------------------------
# command_shutdown
#--------------------------------------------------------------------------
def command_shutdown
fadeout_all
SceneManager.exit
end

#--------------------------------------------------------------------------
# * [save] Command
#--------------------------------------------------------------------------
def command_save
fadeout_all
SceneManager.call(Scene_Save)
end[/SIZE]

[SIZE=medium]end # Scene_System[/SIZE]

[SIZE=medium]#==============================================================================
#
# ▼ End of File
#
#==============================================================================[/SIZE]

[SIZE=medium][/SIZE]

Oh and the only other scripts I have in there are the XS Core and Journal scripts.
Sorry for the now triple post (eek!) but I actually managed to figure this one out myself. (Insert appropriate level of shock here.) This thread can be closed.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-system-options-xs-menu-delux-help.29758/