[XP] Final Fantasy 4 CMS

Started by Juan, September 23, 2008, 11:41:26 pm

Previous topic - Next topic

Juan

September 23, 2008, 11:41:26 pm Last Edit: February 21, 2009, 06:00:13 am by Blizzard
Final Fantasy 4 Cms
Authors: Juan
Version: 1.2
Type: CMS
Key Term: Custom Menu System



Introduction

This script allows you have a final fantasy 4 menu. This script also supports a party of 5 but you need need an additional script for a party of 5.


Features


  • Faceset support
  • Icons support
  • Soul Rage support
  • Unlimited Party Size support
  • Option menu




Screenshots

Spoiler: ShowHide



Demo

Demo


Script

Spoiler: ShowHide


#==============================================================================
# ** Final Fantasy 4 CMS
#------------------------------------------------------------------------------
# Juan
# Version 1.0.2
# Date 12/24/08
#==============================================================================
#
#
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#
# Explanation:
#
#   This script will allow you to have a cms that looks like a final fantasy 4
#   menu.
#
#
# Compatibility:
# This script should be 100% compatibly with everything except other custom
# gameover scripts.
#
#
# Features:
#
# -> Faceset support
# -> Icons support
# -> Option menu
# -> Unlimited Party Size supports
# -> Soul Rage Support
#
# Version History
#
# Version 1.0.0
# -> This script was first made
# Version 1.0.2
# -> Added Unlimited Party Size Support
# -> Added Soul Rage Support
#
#
# Instructions
#
# Configuration
#  Face_Sets = true
#  # True/false if you want to use icons in the menu
#  Icons = true
#  # Save file options
#  # The number of saves you have. Remember numbers start from 0 not 1 in rmxp
#  Save_Files_Number = 3
#  Save_Name = 'Save'
#  Save_Data = 'rxdata'#extension of your savefiles (usually "rxdata")
#  # Extra options
#  # True/false if you want to use a different options system.
#  Custom_Options_Scene = false
#  # The name of your windowskins note there is a limit of 5. Any more needs editing.
#  Windowskins = ['Red', 'Blue', 'Green', 'Silver', 'Black']
#  # Battle bgm name Note there is a limit of 4. Any more needs editing.
#  Battle_Bgms = [
#              ['001-Battle01'],
#              ['002-Battle02'],
#              ['003-Battle03'],
#              ['004-Battle04']] 
#  # The Battle bgm variable
#  Bgm_Variable = 49
#  # The Battle bgm lock variable
#  Bgm_Lock = 49
# To use this scripts faceset support make facesets that are 64*64. And put them
# in the character folder. Name them the samename as their spritesets but with
# a _face at the end.  To use the icon feature make a folder called CMS in the
# the icons folder. Make a new folder called CMS and put whatever
# icon you want in there. Also name the icons menu0 - menu 8.
# To restore your battle bgm settings after a boss fight or something simlair
# use $game_system.reset_battle_bgm
#
#
#
# FAQ (Frequently Asked Questions):
# None so far
#
#
# Credits
# GuardianAngelX72 for the menu design.
#
#
# Author's Notes
# Any bugs
# Report them here:
# http://forum.chaos-project.com/index.php?topic=11.0
# or
# Email me
# juanpena119@yahoo.com
# Thats it
# enjoy


#==============================================================================
# module Juan_Configuration
#==============================================================================

module Juan_Configuration
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# True/false if you want to use facesets
Face_Sets = false
# True/false if you want to use icons in the menu
Icons = true
# Save file options
# The number of saves you have. Remember numbers start from 0 not 1 in rmxp
Save_Files_Number = 3
Save_Name = 'Save'
Save_Data = 'rxdata'#extension of your savefiles (usually "rxdata")
# Extra options
# True/false if you want to use a different options system.
Custom_Options_Scene = false
# The name of your windowskins note there is a limit of 5. Any more needs editing.
Windowskins = ['Red', 'Blue', 'Green', 'Silver', 'Black']
# Battle bgm name Note there is a limit of 4. Any more needs editing.
Battle_Bgms = [
              ['001-Battle01'],
              ['002-Battle02'],
              ['003-Battle03'],
              ['004-Battle04']] 
# The Battle bgm variable
Bgm_Variable = 49
# The Battle bgm lock variable
Bgm_Lock = 49
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
  attr_accessor :bgm_volume
  attr_accessor :sfx_volume
 
  alias init_juan_cms_later initialize
  def initialize
    init_juan_cms_later
    @bgm_volume = 100
    @sfx_volume = 100
  end

 
  def reset_battle_bgm
    bgm = Juan_Configuration::Battle_Bgms[$game_variables[Juan_Configuration::Bgm_Variable]]
    $game_system.battle_bgm = RPG::AudioFile.new(bgm[0])
    return # if an event calls this method the "return" is HIGHLY neccesary!
  end
 
  if $dream_music
  def bgm_play(bgm)
    @playing_bgm = bgm
    if bgm != nil && bgm.name != ''
      vol = correction(@bgm_volume)
      dream_ed = bgm.clone
      dream_ed.volume = dream_ed.volume * vol / 100
      DREAM.play_encrypted_audio('Audio/BGM/', dream_ed, 0)
    else
      Audio.bgm_stop
    end
    Graphics.frame_reset
  end
 
  def bgs_play(bgs)
    @playing_bgs = bgs
    if bgs != nil && bgs.name != ''
      vol = correction(@sfx_volume)
      dream_ed = bgs.clone
      dream_ed.volume = dream_ed.volume * vol / 100
      DREAM.play_encrypted_audio('Audio/BGS/', dream_ed, 1)
    else
      Audio.bgs_stop
    end
    Graphics.frame_reset
  end
 
  def me_play(me)
    if me != nil && me.name != ''
      vol = correction(@bgm_volume)
      dream_ed = me.clone
      dream_ed.volume = dream_ed.volume * vol / 100
      DREAM.play_encrypted_audio('Audio/ME/', dream_ed, 2)
    else
      Audio.me_stop
    end
    Graphics.frame_reset
  end
 
  def se_play(se)
    if se != nil && se.name != ''
      vol = correction(@sfx_volume)
      dream_ed = se.clone
      dream_ed.volume = dream_ed.volume * vol / 100
      DREAM.play_encrypted_audio('Audio/SE/', dream_ed, 3)
    end
  end
  else
  def bgm_play(bgm)
    @playing_bgm = bgm
    if bgm != nil && bgm.name != ''
      vol = correction(@bgm_volume)
      Audio.bgm_play('Audio/BGM/' + bgm.name , bgm.volume * vol / 100, bgm.pitch)
    else
      Audio.bgm_stop
    end
    Graphics.frame_reset
  end
 
  def bgs_play(bgs)
    @playing_bgs = bgs
    if bgs != nil && bgs.name != ''
      vol = correction(@sfx_volume)
      Audio.bgs_play('Audio/BGS/' + bgs.name, bgs.volume * vol / 100, bgs.pitch)
    else
      Audio.bgs_stop
    end
    Graphics.frame_reset
  end
 
  def me_play(me)
    if me != nil && me.name != ''
      vol = correction(@bgm_volume)
      Audio.me_play('Audio/ME/' + me.name, me.volume * vol / 100, me.pitch)
    else
      Audio.me_stop
    end
    Graphics.frame_reset
  end

  def se_play(se)
    if se != nil && se.name != ''
      vol = correction(@sfx_volume)
      Audio.se_play('Audio/SE/' + se.name, se.volume * vol / 100, se.pitch)
    end
  end
  end
 
  def correction(volume)
    case volume
    when 100 then return 100
    when 95 then return 97
    when 90 then return 95
    when 85 then return 92
    when 80 then return 90
    when 75 then return 87
    when 70 then return 85
    when 65 then return 82
    when 60 then return 80
    when 55 then return 77
    when 50 then return 75
    when 45 then return 72
    when 40 then return 70
    when 35 then return 65
    when 30 then return 60
    when 25 then return 55
    when 20 then return 50
    when 15 then return 40
    when 10 then return 35
    when 5 then return 25
    end
    return 0
  end
 
end


#==============================================================================
# Window_Base
#==============================================================================   
class Window_Base < Window
 
  alias draw_actor_parameter_juan_cms_later draw_actor_parameter
  def draw_actor_parameter(actor, x, y, type)
    if type == 7
      self.contents.font.color = system_color
      self.contents.draw_text(x, y, 120, 32, 'Evasion')
      self.contents.font.color = normal_color
      self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
    else
      draw_actor_parameter_juan_cms_later(actor, x, y, type)
    end
  end 
 
  alias draw_actor_graphic_juan_cms_later draw_actor_graphic
  def draw_actor_graphic(actor, x, y)
    if actor != nil && actor.character_name != ''
      if self.is_a?(Window_New_MenuStatus) && Juan_Configuration::Face_Sets
        bitmap = RPG::Cache.character("#{actor.character_name}_face", actor.character_hue)
        x -= bitmap.width / 3
        y -= bitmap.height
        draw_actor_face_juan_cms(actor, x, y)
      else
        draw_actor_graphic_juan_cms_later(actor, x, y)
      end
    end
  end


  def draw_actor_face_juan_cms(actor, x, y)
    if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
      hue = 0
    else
      hue = (FACE_HUE ? actor.character_hue : 0)
    end
    bitmap = RPG::Cache.character("#{actor.character_name}_face", hue)
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(x, y, bitmap, src_rect)
  end   
#--------------------------------------------------------------------------
# * Get Up Text Color
#--------------------------------------------------------------------------
  def up_color
    return Color.new(0, 255, 0 )
  end
#--------------------------------------------------------------------------
# * Get Down Text Color
#--------------------------------------------------------------------------
  def down_color
    return Color.new(255, 0, 0)
  end   

end


#==============================================================================
# ** Window_New_Command
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_New_Command < Window_Command
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #     color : text color
  #--------------------------------------------------------------------------
  if Juan_Configuration::Icons
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(32, 32 * index, 148, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.blt(4, 4 + index*32, RPG::Cache.icon("CMS/menu#{index}"), Rect.new(0, 0, 24, 24))
    self.contents.draw_text(rect, @commands[index])
    end
  end

end


#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
#  This window displays play time on the menu screen.
#==============================================================================

class Window_Info < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 75)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 140-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 0, cx, 64, $data_system.words.gold, 2)
  end
end


#==============================================================================
# ** Window_New_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_New_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 480)
    if $game_party.actors.size > 5
    height = $game_party.actors.size * 118
  else
    height = 480
    end   
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    $game_party.actors.each_index {|i|
      x = 64
      y = i * 90
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 80)
      draw_actor_name(actor, x + 5, y)
      draw_actor_level(actor, x + 256, y + 22)
      draw_actor_class(actor, x + 256, y)
      draw_actor_hp(actor, x + 5, y + 22)
      draw_actor_sp(actor, x + 5, y + 54)
      if $crls
      if BlizzCFG::SRS_ACTIVE && BlizzCFG::DRAW_BAR       
      draw_actor_sr_with_bar(actor, x + 5, y + 54) 
      else
      draw_actor_sr(actor, x + 256, y + 54)
    end
    end
    }
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
    self.top_row = row
    elsif row > top_row + (page_row_max - 1)
    self.top_row = row - (page_row_max - 1)
    end
    y = (@index / @column_max) * 90 - self.oy
    self.cursor_rect.set(0, y, self.width - 32, 96)
  end 
  #--------------------------------------------------------------------------
  # * Top Row
  #--------------------------------------------------------------------------
  def top_row
    return self.oy / 90
  end
  #--------------------------------------------------------------------------
  # * Set Top Row
  #     row : new row
  #--------------------------------------------------------------------------
  def top_row=(row)
    self.oy = (row % row_max) * 90
  end 
  #--------------------------------------------------------------------------
  # * Page Row Max
  #--------------------------------------------------------------------------
  def page_row_max
    return (self.height / 90)
  end

end 

#==============================================================================
# ** Window_Option
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================
class Window_Option < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(option_text)
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -9, 600, 32, option_text, 0)
    self.contents.font.color = normal_color
    end

end 
 


#==============================================================================
# ** Window_Font
#------------------------------------------------------------------------------
#  This window displays font name on the option screen.
#==============================================================================

class Window_Font < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Font')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, Font.default_name.to_s, 2)
  end

end


#==============================================================================
# ** Window_Windowskin
#------------------------------------------------------------------------------
#  This window displays windowskin name on the option screen.
#==============================================================================

class Window_Windowskin < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Windowskin')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.windowskin_name.to_s, 2)
  end

end



#==============================================================================
# ** Window_Bar_Style
#------------------------------------------------------------------------------
#  This window displays bar style on the option screen.
#==============================================================================

class Window_Bar_Style < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Bar Style')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.bar_style.to_s, 2)
  end

end


#==============================================================================
# ** Window_Bar_Opacity
#------------------------------------------------------------------------------
#  This window displays bar opacity on the option screen.
#==============================================================================

class Window_Bar_Opacity < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Bar Opacity')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.bar_opacity.to_s, 2)
   end

end


#==============================================================================
# ** Window_Battle_Bgm
#------------------------------------------------------------------------------
#  This window displays battle bgm on the option screen.
#==============================================================================

class Window_Battle_Bgm < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Battle Bgm')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.battle_bgm.name.to_s, 2)
  end

end


#==============================================================================
# ** Window_Bgm_Volume
#------------------------------------------------------------------------------
#  This window displays bgm volume on the option screen.
#==============================================================================

class Window_Bgm_Volume < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Bgm Volume')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.bgm_volume.to_s, 2)
  end

end


#==============================================================================
# ** Window_Sfx_Volume
#------------------------------------------------------------------------------
#  This window displays sfx volume on the option screen.
#==============================================================================

class Window_Sfx_Volume < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Sfx Volume')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_system.sfx_volume.to_s, 2)
  end

end



#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = 'Status'
    s5 = 'Option'
    s6 = 'Save'
    s7 = 'Load'
    s8 = 'End Game'
    @command_window = Window_New_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
    @command_window.index = @menu_index
    @command_window.x = 480
    @command_window.y = 0
    @continue = (0..Juan_Configuration::Save_Files_Number).any? {|i|
    FileTest.exist?("#{Juan_Configuration::Save_Name}#{i + 1}.#{Juan_Configuration::Save_Data}")}           
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      (0..3).each {|i| @command_window.disable_item(i)}
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(5)
    end
    @command_window.disable_item(6) unless @continue
    # Make info window
    @info_window = Window_Info.new
    @info_window.x = 480
    @info_window.y = 405
    # Make status window
    @status_window = Window_New_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @info_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @info_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    # If status window is active: call update_status
    elsif @status_window.active
      update_status
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 && @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # option
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to option screen
        if Juan_Configuration::Custom_Options_Scene
        $scene = Scene_Option.new 
        else
        $scene = Scene_New_Option.new 
      end     
      when 5  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_New_Save.new
      when 6  # load
        unless @continue
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end       
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to load game screen
        $scene = Scene_New_Load.new           
      when 7  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_New_End.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end

end


#==============================================================================
# Scene_New_Save
#==============================================================================

class Scene_New_Save < Scene_Save
  #--------------------------------------------------------------------------
  # * Decision Processing
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # Play save SE
    $game_system.se_play($data_system.save_se)
    # Write save data
    file = File.open(filename, 'wb')
    write_save_data(file)
    file.close
    # If called from event
    if $game_temp.save_calling
      # Clear save call flag
      $game_temp.save_calling = false
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # Switch to menu screen
    $scene = Scene_Menu.new(5)
  end
  #--------------------------------------------------------------------------
  # * Cancel Processing
  #-------------------------------------------------------------------------- 
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # If called from event
    if $game_temp.save_calling
      # Clear save call flag
      $game_temp.save_calling = false
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # Switch to menu screen
    $scene = Scene_Menu.new(5)
  end

end


#==============================================================================
# Scene_New_Load
#==============================================================================

class Scene_New_Load < Scene_Load
  #--------------------------------------------------------------------------
  # * Cancel Processing
  #--------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to title screen
    $scene = Scene_Menu.new(6)
  end

end


#==============================================================================
# ** Scene_New_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================

class Scene_New_End
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'To Title'
    s2 = 'Quit Game'
    s3 = 'Cancel'
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame Update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of window
    @command_window.dispose
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update command window
    @command_window.update
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(7)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Process When Choosing [To Title] Command
  #--------------------------------------------------------------------------
  def command_to_title
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Fade out BGM, BGS, and ME
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # Switch to title screen
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # * Process When Choosing [Shutdown] Command
  #--------------------------------------------------------------------------
  def command_shutdown
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Fade out BGM, BGS, and ME
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # Shutdown
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # *  Process When Choosing [Cancel] Command
  #--------------------------------------------------------------------------
  def command_cancel
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to menu screen
    $scene = Scene_Menu.new(7)
  end

end


#==============================================================================
# ** Scene_New_Option
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_New_Option
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     option_menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(option_menu_index = 0)
    @option_menu_index = option_menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'Visual'
    s2 = 'Audio'
    @command_window = Window_Command.new(160, [s1, s2])
    @command_window.index = @option_menu_index
    @command_window.x = 0
    @command_window.y = 50
    # Make option info window
    @option_window = Window_Option.new   
    # Make spriteset
    @spriteset = Spriteset_Map.new   
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @option_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @spriteset.update
    option_update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Option Window Frame Update
  #--------------------------------------------------------------------------
  def option_update
    # Branch by command window cursor position
      case @command_window.index
      when 0  # visual
        @option_window.update('Manage the games visual settings.')
      when 1  # audio
        @option_window.update('Manage the games audio settings.')   
      when 2  # game
        @option_window.update('Manage other game related settings.') 
      else
        @option_window.update('Select an option.')
      end   
    end   
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Menu.new(4)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # visual
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to visual screen
        $scene = Scene_Visual.new
      when 1  # audio
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to audio screen
        $scene = Scene_Audio.new
      end
    end
  end
 
end


#==============================================================================
# ** Scene_Visual
#------------------------------------------------------------------------------
#  This class performs option menu visual screen processing.
#==============================================================================

class Scene_Visual
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     option_menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(option_menu_index = 0)
    @option_menu_index = option_menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'Font'
    s2 = 'Windowskin'
    s3 = 'Bar Style'
    s4 = 'Bar Opacity'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @command_window.index = @option_menu_index
    if !$Blizz_Art
    (2..3).each {|i| @command_window.disable_item(i)}
  else
    if !$game_system.BARS
    (2..3).each {|i| @command_window.disable_item(i)}
    end
  end     
    # Make spriteset
    @spriteset = Spriteset_Map.new   
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @spriteset.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_New_Option.new
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # font
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to font screen
        $scene = Scene_Font.new
      when 1  # windowskin
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to windowskin game screen
        $scene = Scene_Windowskin.new
      when 2  # bar style
      if !$Blizz_Art
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end             
        # If tons of addons bar are off
        if !$game_system.BARS
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end       
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style game screen
        $scene = Scene_Bar_Style.new
      when 3  # bar opacity
      if !$Blizz_Art
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end             
        # If tons of addons bar are off
        if !$game_system.BARS
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end         
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity game screen
        $scene = Scene_Bar_Opacity.new       
      end
    end
  end
 
end


#==============================================================================
# ** Scene_Audio
#------------------------------------------------------------------------------
#  This class performs option menu audio screen processing.
#==============================================================================

class Scene_Audio
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     option_menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(option_menu_index = 0)
    @option_menu_index = option_menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'Battle Bgm'
    s2 = 'Bgm Volume'
    s3 = 'Sfx Volume'
    @command_window = Window_Command.new(160, [s1, s2, s3])
    @command_window.index = @option_menu_index
    # Make spriteset
    @spriteset = Spriteset_Map.new     
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @spriteset.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to options screen
      $scene = Scene_New_Option.new(1)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # battle bgm
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to font screen
        $scene = Scene_Battle_Bgm.new
      when 1  # bgm volume
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to windowskin game screen
        $scene = Scene_Bgm_Volume.new
      when 2  # sfx volume
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style game screen
        $scene = Scene_Sfx_Volume.new
      end
    end
  end 
 
end


#==============================================================================
# ** Scene_Windowskin
#------------------------------------------------------------------------------
#  This class performs options windowskin changing processing.
#==============================================================================

class Scene_Windowskin
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    @command_window = Window_Command.new(160, Juan_Configuration::Windowskins)
    @command_window.index = @menu_index   
    @windowskin_window = Window_Windowskin.new
    @windowskin_window.x = 160
    @windowskin_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new     
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @windowskin_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @windowskin_window.update
    @spriteset.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Visual.new(1)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # red
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to red windowskin
        $game_system.windowskin_name = Juan_Configuration::Windowskins[0]
        # Switch to windowskin scene
        $scene = Scene_Windowskin.new
      when 1  # blue
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to red windowskin
        $game_system.windowskin_name = Juan_Configuration::Windowskins[1]
        # Switch to windowskin scene
        $scene = Scene_Windowskin.new(1)     
      when 2  # green
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to red windowskin
        $game_system.windowskin_name = Juan_Configuration::Windowskins[2]
        # Switch to windowskin scene
        $scene = Scene_Windowskin.new(2)       
      when 3  # yellow
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to red windowskin
        $game_system.windowskin_name = Juan_Configuration::Windowskins[3]
        # Switch to windowskin scene
        $scene = Scene_Windowskin.new(3)       
      when 4  # black
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to red windowskin
        $game_system.windowskin_name = Juan_Configuration::Windowskins[4]
        # Switch to windowskin scene
        $scene = Scene_Windowskin.new(4)
      end
    end
  end
end



#==============================================================================
# ** Scene_Font
#------------------------------------------------------------------------------
#  This class performs options font changing processing.
#==============================================================================

class Scene_Font
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'Arial'
    s2 = 'Bookman Old Style'
    s3 = 'Comic Sans MS'
    s4 = 'Mistral'
    s5 = 'Papyrus'
    s6 = 'Tahoma'
    s7 = 'Times New Roman'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index   
    @font_window = Window_Font.new
    @font_window.x = 160
    @font_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @font_window.dispose
    @spriteset.dispose
   
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @spriteset.update
    @font_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to option screen
      $scene = Scene_Visual.new
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # Arial
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to arial font
        Font.default_name = 'Arial'
        $scene = Scene_Font.new(0)
      when 1  # Bookman Old Style
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bookman old style font
        Font.default_name = 'Bookman Old Style'
        $scene = Scene_Font.new(1)
      when 2  # Comic Sans MS
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to comic sans ms font
        Font.default_name = 'Comic Sans MS'
        $scene = Scene_Font.new(2)
      when 3  # Mistral
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to mistral font
        Font.default_name = 'Mistral'
        $scene = Scene_Font.new(3)
      when 4  # Papyrus
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to papyrus font
        Font.default_name = 'Papyrus'
        $scene = Scene_Font.new(4)
      when 5  # Tahoma
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to tahoma font
        Font.default_name = 'Tahoma'
        $scene = Scene_Font.new(5)
      when 6  # Times New Roman
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to times new roman
        Font.default_name = 'Times New Roman'
        $scene = Scene_Font.new(6)
      end
    end
  end
end



#==============================================================================
# ** Scene_Bar_Sytle
#------------------------------------------------------------------------------
#  This class performs options bar style changing processing.
#==============================================================================

class Scene_Bar_Style
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'Bar Style 0'
    s2 = 'Bar Style 1'
    s3 = 'Bar Style 2'
    s4 = 'Bar Style 3'
    s5 = 'Bar Style 4'
    s6 = 'Bar Style 5'
    s7 = 'Bar Style 6'   
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index   
    @bar_style_window = Window_Bar_Style.new
    @bar_style_window.x = 160
    @bar_style_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @bar_style_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @bar_style_window.update
    @spriteset.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Visual.new(2)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # bar style 0
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 0
        $game_system.bar_style = 0
        # Switch to bar style
        $scene = Scene_Bar_Style.new       
      when 1  # bar style 1
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 1
        $game_system.bar_style = 1
        # Switch to bar style
        $scene = Scene_Bar_Style.new(1)       
      when 2  # bar style 2
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 2
        $game_system.bar_style = 2
        # Switch to bar style
        $scene = Scene_Bar_Style.new(2)       
      when 3  # bar style 3
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 3
        $game_system.bar_style = 3
        # Switch to bar style
        $scene = Scene_Bar_Style.new(3)       
      when 4  # bar style 4
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 4
        $game_system.bar_style = 4
        # Switch to bar style
        $scene = Scene_Bar_Style.new(4)       
      when 5  # bar style 5
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 5
        $game_system.bar_style = 5
        # Switch to bar style
        $scene = Scene_Bar_Style.new(5)       
      when 6  # bar style 6
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar style 6
        $game_system.bar_style = 6 
        # Switch to bar style
        $scene = Scene_Bar_Style.new(6)       
      end
    end
  end
end


#==============================================================================
# ** Scene_Bar_Opacity
#------------------------------------------------------------------------------
#  This class performs options bar opacity changing processing.
#==============================================================================

class Scene_Bar_Opacity
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = '0%'
    s2 = '25%'
    s3 = '50%'
    s4 = '75%'
    s5 = '100%'
    s6 = '125%'
    s7 = '150%'
    s8 = '175%'
    s9 = '200%'
    s10 = '225%'
    s11 = '255%'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11])
    @command_window.index = @menu_index       
    @bar_opacity_window = Window_Bar_Opacity.new
    @bar_opacity_window.x = 160
    @bar_opacity_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @bar_opacity_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @bar_opacity_window.update
    @spriteset.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Visual.new(3)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # 0%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 0
        $game_system.bar_opacity = 0
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new
      when 1  # 25%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 85
        $game_system.bar_opacity = 25
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(1)       
      when 2  # 50%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 50
        $game_system.bar_opacity = 50
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(2)       
      when 3  # 75%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 75
        $game_system.bar_opacity = 75
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(3)       
      when 4  # 100%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 100
        $game_system.bar_opacity = 100
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(4) 
      when 5  # 125%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 125
        $game_system.bar_opacity = 125
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(5)
      when 6  # 150%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 150
        $game_system.bar_opacity = 150
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(6)       
      when 7  # 175%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 175
        $game_system.bar_opacity = 175
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(7)       
      when 8  # 200%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 200
        $game_system.bar_opacity = 200
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(8)       
      when 9  # 225%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 225
        $game_system.bar_opacity = 225
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(9)     
      when 10  # 255%
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bar opacity 255
        $game_system.bar_opacity = 255
        # Switch bar opacity scene
        $scene = Scene_Bar_Opacity.new(10)         
      end
    end
  end
end


#==============================================================================
# ** Scene_Battle_Bgm
#------------------------------------------------------------------------------
#  This class performs options battle bgm changing processing.
#==============================================================================

class Scene_Battle_Bgm
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = 'Bgm 1'
    s2 = 'Bgm 2'
    s3 = 'Bgm 3'
    s4 = 'Bgm 4'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @command_window.index = @menu_index   
    @battle_bgm_window = Window_Battle_Bgm.new
    @battle_bgm_window.x = 160
    @battle_bgm_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @spriteset.dispose
    @battle_bgm_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @spriteset.update
    @battle_bgm_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Audio.new
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # battle bgm 1
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to battle bgm 1
        $game_system.battle_bgm.name = Juan_Configuration::Battle_Bgms[0][0]
        #Switch to battle bgm screen
        $scene = Scene_Battle_Bgm.new
      when 1  # battle bgm 2
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to battle bgm 2
        $game_system.battle_bgm.name = Juan_Configuration::Battle_Bgms[1][0]
        #Switch to battle bgm screen
        $scene = Scene_Battle_Bgm.new(1)       
      when 2  # battle bgm 3
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to battle bgm 3
        $game_system.battle_bgm.name = Juan_Configuration::Battle_Bgms[2][0]
        #Switch to battle bgm screen
        $scene = Scene_Battle_Bgm.new(2)       
      when 3  # battle bgm 4
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to battle bgm 4
        $game_system.battle_bgm.name = Juan_Configuration::Battle_Bgms[3][0]
        #Switch to battle bgm screen
        $scene = Scene_Battle_Bgm.new(3)       
      end
    end
  end
end



#==============================================================================
# ** Scene_Bgm_Volume
#------------------------------------------------------------------------------
#  This class performs options bgm changing processing.
#==============================================================================

class Scene_Bgm_Volume
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = '0%'
    s2 = '25%'
    s3 = '50%'
    s4 = '75%'
    s5 = '100%'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @command_window.index = @menu_index
    @bgm_volume_window = Window_Bgm_Volume.new
    @bgm_volume_window.x = 160
    @bgm_volume_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new   
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @spriteset.dispose
    @bgm_volume_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @spriteset.update
    @bgm_volume_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Audio.new(1)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # bgm volume 100
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bgm volume to 0
        $game_system.bgm_volume = 0
        # Switch to bgm volume scene
        $scene = Scene_Bgm_Volume.new
      when 1  # bgm volume 100
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bgm volume to 25
        $game_system.bgm_volume = 25
        # Switch to bgm volume scene
        $scene = Scene_Bgm_Volume.new(1)       
      when 2  # bgm volume 100
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bgm volume to 50
        $game_system.bgm_volume = 50
        # Switch to bgm volume scene
        $scene = Scene_Bgm_Volume.new(2)       
      when 3  # bgm volume 100
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bgm volume to 75
        $game_system.bgm_volume = 75
        # Switch to bgm volume scene
        $scene = Scene_Bgm_Volume.new(3)       
      when 4  # bgm volume 100
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to bgm volume to 100
        $game_system.bgm_volume = 100
        # Switch to bgm volume scene
        $scene = Scene_Bgm_Volume.new(4)       
      end
    end
  end
end



#==============================================================================
# ** Scene_Sfx_Volume
#------------------------------------------------------------------------------
#  This class performs options sfx changing processing.
#==============================================================================

class Scene_Sfx_Volume
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = '0%'
    s2 = '25%'
    s3 = '50%'
    s4 = '75%'
    s5 = '100%'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @command_window.index = @menu_index   
    @sfx_volume_window = Window_Sfx_Volume.new
    @sfx_volume_window.x = 160
    @sfx_volume_window.y = 0
    # Make spriteset
    @spriteset = Spriteset_Map.new
    # Execute transition
    Graphics.transition
    # Main loop
    loop {
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      break if $scene != self
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @sfx_volume_window.dispose
    @spriteset.dispose     
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @sfx_volume_window.update
    @spriteset.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Audio.new(2)
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # sfx volume 0
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to sfx volume to 0
        $game_system.sfx_volume = 0
        # Switch to sfx scene
        $scene = Scene_Sfx_Volume.new
      when 1  # sfx volume 25
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to sfx volume to 25
        $game_system.sfx_volume = 25
        # Switch to sfx scene
        $scene = Scene_Sfx_Volume.new(1)       
      when 2  # sfx voulme 50
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to sfx volume to 50
        $game_system.sfx_volume = 50
        # Switch to sfx scene
        $scene = Scene_Sfx_Volume.new(2)       
      when 3  # sfx volume 75
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to sfx volume to 75
        $game_system.sfx_volume = 75
        # Switch to sfx scene
        $scene = Scene_Sfx_Volume.new(3)       
      when 4  # sfx voulme 100
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to sfx volume to 100
        $game_system.sfx_volume = 100   
        # Switch to sfx scene
        $scene = Scene_Sfx_Volume.new(4)       
      end
    end
  end
 
end




Instructions

Configurate everything in the Juan_Configuration module.


Compatibility

Compatable with tons of add-ons by Blizzard. This script isnt compatable with other cms.


Credits and Thanks


  • Juan
  • GuardianAngelX72



Author's Notes

Any bugs post in this topic or email me at Juanito119@yahoo.com
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Starrodkirby86

Great custom menu script Juan. Now, I'm sure there's some bits that's STILL not traditional to the CMS of Final Fantasy Four, and I recommend you to have it something like FF4 Styled or something, I don't know. I don't have the game directly with me to compare and contrast unfortunately, but I know there's some things that are left out...I can't put my finger on it. Overall, great stuff. :)

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Blizzard

You should mention that a party of 5 is supported, but that you need an additional script for a party of 5.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Juan

Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617