Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Juan

1
Welcome! / I'm back
May 04, 2016, 09:18:19 am
Hey all I'm back. It's been a while since I was here. Anyways nice to see everyone here again.   :D
2
News / Suggestions / Feedback / Happy Hoildays
December 24, 2012, 01:04:52 am
Happy Christmas Eve everyone.
3
Welcome! / Hey all I'm back.
May 24, 2012, 10:08:07 pm
Hey all this my officially I'm back thread. I had some computer problems that needed to be fixed and I keep moving around never got a chance to get Internet over again. Anyway I hope I can contribute to this community again.  :)
4
Chat / Happy Halloween.
October 31, 2008, 06:48:02 pm
Its Halloween so Happy Halloween everyone.
5
Resources / Juan's Resources
October 04, 2008, 09:37:15 am
These are resource I made. Atm only made windowskins
Windowskins
Black: ShowHide




Blue: ShowHide



Green: ShowHide


6
RMXP Script Database / [XP] Final Fantasy 4 CMS
September 23, 2008, 11:41:26 pm
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
7
RMXP Script Database / [XP] Juan's Custom Gameover
September 02, 2008, 12:03:40 am
Juan's Custom Gameover
Authors: Juan
Version: 1.3
Type: GameOver Add-on
Key Term: Title / Save / Load / GameOver Add-on



Introduction

This script allows you have a custom gameover edit with the folllowing menu items return ot title, load game, or end game.


Features


  • Gameover Menu



Screenshots

Spoiler: ShowHide


Demo
N/A


Script

Spoiler: ShowHide
#==============================================================================
# ** Juan's Custom Gameover
#------------------------------------------------------------------------------
# Juan
# Version 1.3
# Date 9/1/08
#==============================================================================
#
#
# Compatibility:
# This script should be 100% compatibly with everything except other custom
# gameover scripts. Doesn't automatic setup variables if used from earlyer save
# but can be changed using variables in-game.
#
#
# Features:
#
# -> menu commands "Revive", "Return to title", "Load Game", "End Game"
# -> The load menu is disabled if theres no save files.
# -> Uses variables for respawn setup, gold lost and death toll
# meaning you can change respawn and gold lost using variables in-game
# -> Auto setups the respawn positon, and gold lost after player starts
# a new game.
#
# Version History
#
# Version 1.0
# -> This script was first made
# Version 1.3
# -> Added revive point with 1 hp, and sp or fully heal player.
# -> Added ability for player to lose gold
# -> Added ability to keep track of how many times a player died.
#
#
# Instructions
# Configure these parts
#   Whether or not to fully heal the party before spawning
#   or just with hp 1 and 1 sp
#  Full_Heal = false
#   Variable for map to transfer to
#  Respawn_Map_ID =  1
#   Default map number to transfer if gameover
#  Respawn__Current_Location = 1
#   Variable for map's x
#  Respawn_Map_X = 2
#   Default map's x postion to transfer if gameover
#  Respawn_Current_X = 9
#   Variable for map's y postion
#  Respawn_Map_Y = 3
#   Default map's y to transfer if gameover
#  Respawn_Current_Y = 11
#   Variable for which direction for player to face after respawning
#  Respawn_Position = 4
#   Current respawn postion 2 for down 4 for left 6 for right and 8 for up
#  Current_Respawn_Position = 2
#   Whether or not the player should lose gold after reving
#  Respawn_Gold = false
#   Respawn how much gold is lost
#  Respawn_Gold_Lost = 5
#   How much should the player lose if respawn gold is true
#  Respawn_Current_Gold_Lost = 1000
#   Whether or not death toll is enabled
#  Respawn_Death_Toll_Enabled = false
#   Variable for total times player revived or loaded.
#  Respawn_Death_Toll = 6
#   The number of save files starts from 0 not 1 keep that in mine.
#  Save_Files_Number = 3
#  The name of your savefiles (usually "Save")
#  Save_Name = 'Save'
#  The extension of your savefiles (usually "rxdata")
#  Save_Ext = 'rxdata'
#
#
#
# FAQ (Frequently Asked Questions):
# None so far
#
#
# Credits
# Juan I made this script.
# Starrodkirby86 for help with positioning.
# Blizzard death toll similar to the one in tons of add ons
#
#
# Author's Notes
# Any bugs
# Report them here:
# http://forum.chaos-project.com/index.php?topic=11.0
# or
# Email me
# Juanito119@yahoo.com
# Thats it
# enjoy

module Juan_Cfg
  # Whether or not to fully heal the party before spawning
  # or just with hp 1 and 1 sp
  Full_Heal = false
  # Variable for map to transfer to
  Respawn_Map_ID =  1
  # Default map number to transfer if gameover
  Respawn__Current_Location = 1
  # Variable for map's x
  Respawn_Map_X = 2
  # Default map's x postion to transfer if gameover
  Respawn_Current_X = 9
  # Variable for map's y postion
  Respawn_Map_Y = 3
  # Default map's y to transfer if gameover
  Respawn_Current_Y = 11
  # Variable for which direction for player to face after respawning
  Respawn_Position = 4
  # Current respawn postion 2 for down 4 for left 6 for right and 8 for up
  Current_Respawn_Position = 2
  # Whether or not the player should lose gold after reving
  Respawn_Gold = false
  # Respawn how much gold is lost
  Respawn_Gold_Lost = 5
  # How much should the player lose if respawn gold is true
  Respawn_Current_Gold_Lost = 1000
  # Whether or not death toll is enabled
  Respawn_Death_Toll_Enabled = false
  # Variable for total times player revived or loaded.
  Respawn_Death_Toll = 6
  # The number of save files starts from 0 not 1 keep that in mine.
  Save_Files_Number = 3
  #The name of your savefiles (usually "Save")
  Save_Name = 'Save'
  #The extension of your savefiles (usually "rxdata")
  Save_Ext = 'rxdata'
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
class Scene_Title
  alias command_new_game_juan_gameover_later command_new_game
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    command_new_game_juan_gameover_later
    # Initial map id, map x, map y, and map position to face, gold if
    # respawn gold is true.
    $game_variables[Juan_Cfg::Respawn_Map_ID] = Juan_Cfg::Respawn__Current_Location
    $game_variables[Juan_Cfg::Respawn_Map_X] = Juan_Cfg::Respawn_Current_X
    $game_variables[Juan_Cfg::Respawn_Map_Y] = Juan_Cfg::Respawn_Current_Y
    $game_variables[Juan_Cfg::Respawn_Position] = Juan_Cfg::Current_Respawn_Position
    if Juan_Cfg::Respawn_Gold
    $game_variables[Juan_Cfg::Respawn_Gold_Lost] = Juan_Cfg::Current_Respawn_Position
    end
  end
end


#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#  This class performs game over screen processing.
#==============================================================================

class Scene_Gameover
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Creates command window
    create_command_window   
    # Make game over graphic
    create_gameover_graphic
    # plays gameover music
    play_gameover_music
    # 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 processes
    terminate
    # Execute transition
    Graphics.transition
    # Prepare for transition
    Graphics.freeze
    # If battle test
    if $BTEST
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = 'Revive'
    s2 = 'Return to title'
    s3 = 'Load Game'
    s4 = 'End Game'
    # Make command window
    @command_window = Window_Command.new(192, [s1, s2, s3, s4])
    @command_window.index = @menu_index   
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288   
    @continue = (0..Juan_Cfg::Save_Files_Number).any? {|i|
    FileTest.exist?("#{Juan_Cfg::Save_Name}#{i + 1}.#{Juan_Cfg::Save_Ext}")}
    # If there are no save files disable load.
    @command_window.disable_item(2) unless @continue
  end 
  #--------------------------------------------------------------------------
  # * Create Game Over Graphic
  #--------------------------------------------------------------------------
  def create_gameover_graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
  end 
  #--------------------------------------------------------------------------
  # * Play Music on Game Over Screen
  #-------------------------------------------------------------------------
  def play_gameover_music
    # Stop BGM and BGS
    $game_system.bgm_play(nil)
    $game_system.bgs_play(nil)
    # Play game over ME
    $game_system.me_play($data_system.gameover_me)
  end 
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    @command_window.dispose
    @sprite.bitmap.dispose
    @sprite.dispose
  end 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_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 title screen
      $scene = Scene_Title.new
    # If C button was pressed
    elsif Input.trigger?(Input::C)
      # if Death toll is enabled
        if Juan_Cfg::Respawn_Death_Toll_Enabled
        # increase death count by 1
        $game_variables[Respawn_Death_Toll] += 1
        end
      # Branch by command window cursor position
      case @command_window.index
      when 0 # Revive     
        # Clear gameover flag
        $game_temp.gameover = false
        # Clear player place move call flag
        $game_temp.player_transferring = false
        # Clear battle calling flag
        $game_temp.battle_calling = false
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Set up a new map
        $game_map.setup($game_variables[Juan_Cfg::Respawn_Map_ID])
        # Set up player position
        $game_player.moveto($game_variables[Juan_Cfg::Respawn_Map_X], $game_variables[Juan_Cfg::Respawn_Map_Y])
        case $game_variables[Juan_Cfg::Respawn_Position]
         when 2
          $game_player.turn_down
         when 4
           $game_player.turn_left
         when 6
           $game_player.turn_right
         when 8
           $game_player.turn_up
         end       
        # Straighten player position
        $game_player.straighten
        # Heal party
        if Juan_Cfg::Full_Heal
          $game_party.actors.each {|actor| actor.recover_all}
         else
          $game_party.actors.each {|actor|
          actor.remove_state(1)
          actor.hp += 1
          actor.sp += 1}
        end
        # checks if respawn gold is true
        if Juan_Cfg::Respawn_Gold
        # makes the player loses game from respawn gold lost variable
        $game_party.lose_gold($game_variables[Respawn_Gold_Lost])
        end
        # refreshes map
        $game_map.refresh
        # Run automatic change for BGM and BGS set on the map
        $game_map.autoplay
        # update game map
        $game_map.update
        # Switch to map screen
        $scene = Scene_Map.new
        # Frame reset
        Graphics.frame_reset
        # Update input information
        Input.update
      when 1  # Return to title
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Title.new
      when 2  # Load Game
        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_Gameover_Load.new       
      when 3  # End Game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)           
        # Switch to title screen
      $scene = nil
      end
    end
  end
end


#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Gameover_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_Gameover.new(2)
  end
end


Instructions

Configure these parts
Spoiler: ShowHide
  # The number of save files starts from 0 not 1 keep that in mine.
#   Whether or not to fully heal the party before spawning
#   or just with hp 1 and 1 sp
#  Full_Heal = false
#   Variable for map to transfer to
#  Respawn_Map_ID =  1
#   Default map number to transfer if gameover
#  Respawn__Current_Location = 1
#   Variable for map's x
#  Respawn_Map_X = 2
#   Default map's x postion to transfer if gameover
#  Respawn_Current_X = 9
#   Variable for map's y postion
#  Respawn_Map_Y = 3
#   Default map's y to transfer if gameover
#  Respawn_Current_Y = 11
#   Variable for which direction for player to face after respawning
#  Respawn_Position = 4
#   Current respawn postion 2 for down 4 for left 6 for right and 8 for up
#  Current_Respawn_Position = 2
#   Whether or not the player should lose gold after reving
#  Respawn_Gold = false
#   Respawn how much gold is lost
#  Respawn_Gold_Lost = 5
#   How much should the player lose if respawn gold is true
#  Respawn_Current_Gold_Lost = 1000
#   Whether or not death toll is enabled
#  Respawn_Death_Toll_Enabled = false
#   Variable for total times player revived or loaded.
#  Respawn_Death_Toll = 6
#   The number of save files starts from 0 not 1 keep that in mine.
#  Save_Files_Number = 3
#  The name of your savefiles (usually "Save")
#  Save_Name = 'Save'
#  The extension of your savefiles (usually "rxdata")
#  Save_Ext = 'rxdata'



Compatibility

This script should be 100% compatibly with everything except other custom gameover scripts. Doesn't automatic setup variables if used from earlyer save but can be changed using variables in-game.


Credits and Thanks


  • Juan I made this script.
  • Starrodkirby86 for help with positioning.
  • Blizzard death toll similar to the one in tons of add ons



Author's Notes

Any bugs report them here or email me at Juanito119@yahoo.com
8
RMXP Script Database / [XP] Battle Icons
August 22, 2008, 08:11:03 am
Battle Icons
Authors: Juan
Version: 3.0
Type: Battle system add on
Key Term: Battle Add-on



Introduction

This script allows you have battle icons in the battle menu with a simple edit. And  icons on the pre fight menu ie Fight Escape


Features


  • Displays Icon

  • Easy Edit




Screenshots

Spoiler: ShowHide

Spoiler: ShowHide


Dont mind the screenshots didnt have time to find or make proper icons for pre fight menu just showing that it does work.


Demo

None atm can be added if requested.


Script

Spoiler: ShowHide

#===========================================================================
# ** Battle Icons
#------------------------------------------------------------------------------
# Juan
# Version 3.0
# Date 8/21/08
# Date Last Updated 5/2/16
# Custom Battle Icon
#===========================================================================
#
#
# Compatibility:
# This script is 100% compatibly with Tons of add-ons and sdk 2.3 with editing.
# This script is compatible with Blizzard's easy party switcher using battle
# command switch on. This script will need to go below easy party switcher
# and another icon for battle switching will be needed. Anything that
# overides Window_PartyCommands  def draw_item(index, color) will mean icons.
# and likely to need to be scripted to get the right position if new item is
# added to the pre fight commands. Not compatible with skill categories doesn't draw any icons at all...
#
#
#Features:
#
# ->  This script lets you use battle icons for prefight commands
# and commands when fighting.
# -> Easy edit
#
#Version History
#
#Version 1.0
#-> This script was first made
# Version 2.0
# -> Improved Coding
# -> This scipt is now compatible with tons of add-ons by Blizzard
# Version 3.0
# -> Now icons are available for the menu and now show on fight and escape
# commands.
# -> now compatible with Skill Categories by Game Guy
# -> now compatible with Easy party Switcher by Blizzard
# particularly when using battle switch options.
#
#
# Instructions
# Change this line in scene battle 1 line 30
# @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
# to @actor_command_window = Window_Battle_Command.new(160, [s1, s2, s3, s4])
# Then make icons called battle menu0 untill battle menu3 in the icons folder.
# Configure everything else below
#
#
#FAQ (Frequently Asked Questions):
#None so far
#
#
#Credits
# Juan
# Fantasist for suggesting I edit the pre fight command window to display icons too
#
#
#Author's Notes
#Any bugs
#Report them here:
#http://forum.chaos-project.com/index.php?topic=11.0
#or
#Email me
# Juanito119@yahoo.com
#Thats it
#enjoy

module Juan_Cfg
# How many commands you want icons for by default its 3
Battle_Icons_Amount = 3
# Name of the icon for the battle menu with number at the end starting from 0.
Battle_Icons_Name = "battle_menu"
# Do you want to enable support for the prebattle command?
Party_Window = true
# name of the party icons if party window is enabled with index from 0
Party_Icons_Name = "party_menu"
end

#===========================================================================
# Window_Battle_Command
#===========================================================================

class Window_Battle_Command < Window_Command

  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.font.color = color
    # if command is greater than the amount specfiied in battle icons
    # amount dont draw icon.
    # this line is for compatabilty with Skill Categories by Game Guy from
    # Chaos Project
    if index > Juan_Cfg::Battle_Icons_Amount   
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
    else   
    self.contents.blt(4, 4 + index*32, RPG::Cache.icon("#{Juan_Cfg::Battle_Icons_Name}#{index}"),
    Rect.new(0, 0, 24, 24))
    self.contents.draw_text(32, index*32, 148, 32, @commands[index])
    end
  end

end

if Juan_Cfg::Party_Window
#==============================================================================
# ** Window_PartyCommand
#------------------------------------------------------------------------------
#  This window is used to select whether to fight or escape on the battle
#  screen.
#==============================================================================
#$easy_party_switcher
class Window_PartyCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #     color : text character color
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    if $easy_party_switcher && $game_system.battle_switch
    self.contents.blt(84 + index * 160, 6,
    RPG::Cache.icon("#{Juan_Cfg::Party_Icons_Name}#{index}"),
    Rect.new(0, 0, 24, 24))
    self.contents.draw_text(80 + index * 160 + 4, 0, 128 - 10, 32, @commands[index], 1)
    else     
    self.contents.blt(163 + index * 160, 6,
    RPG::Cache.icon("#{Juan_Cfg::Party_Icons_Name}#{index}"),
    Rect.new(0, 0, 24, 24))
    self.contents.draw_text(160 + index * 160, 0, 128, 32, @commands[index], 1)
      end
    end
  end
end





Instructions
Change this line in scene battle 1 line 30
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
to @actor_command_window = Window_Battle_Command.new(160, [s1, s2, s3, s4])
Then make icons called battle menu0 untill battle menu3 in the icons folder. If using party window
just make icons named party_menu starting from 0 to 1 assuming you only have default scripts. If using easy party switcher by Blizzard this script goes below that one if using party switch option and party window enabled.
Configure everything else in the script.


Compatibility

This script is 100% compatibly with Tons of add-ons and sdk 2.3 with editing.
This script is compatable with Blizzard's easy party switcher using battle
command switch on. This script will need to go below easy party switcher
and another icon for battle switching will be needed. Anything that
overides Window_PartyCommands  def draw_item(index, color) will mean icons.
and likely to need to be scripted to get the right position if new item is
added to the pre fight commands. Not compatible with skill categories doesn't draw any icons at all...


Credits and Thanks


  • Juan

  • Fantasist for suggesting I edit the pre fight command window to display icons too




Author's Notes

Any bug post in this topic or send me an email at Juanito119@yahoo.com
9
Auto Welcome
Version: 1.2
Type: Mirc Addon



Introduction

This script allows you to automatically message someone when someone enters a channel.


Features


  • Edit the welcome message
  • Enable[on] / Disable [off]
  • Saves the enable/disable settings



Screenshots

If anyone wants a screen shot i'll post one.


Demo

N/A


Script

Script Link


Instructions

On the top screen there should be a  paper rolled up with a green arrow pointing  right click it. Then go to remote scripts then click on file then load this script.
then load.


Compatibility

This script should work with any mirc script


Credits and Thanks


  • Juan



Author's Notes

Any bug report them in this topic or email me at Juanito119@yahoo.com
10
RPG Maker Scripts / This forum's script listing
June 01, 2008, 10:47:52 am
Here are the current scripting listing is this forum.
There is a new script database index! Please view it here:

http://chaos-project.com/index.php?option=com_scriptdatabase&view=scriptdatabase





Below is the old script listing. It is still kept here as an archive and a proud achievement of our forum's power in the scripting department. Thank you, Juan, and the rest of the CP users (particularly the staff) for creating and maintaining this list. The new script listing is located at the hyperlink above.


The scripts are listed by each scripter's name.

Date Last Updated: October 19, 2008


These scripts are for Rpg Maker XP.
Rpg Maker XP Scripts Listing



Aqua's Scripts

Beran's Scripts

Blizzard's Scripts

Eradicator's Script

Falcon's Scripts

Fantasist's Scripts

Juan's Scripts

legacyblade's Scripts

legacyblade's Script

Leon_Westbrooke's Scripts

MGCaladtogel's Scripts

NAMKCOR's Script

Nortos's Scripts

Nathmatt's Scripts

RPG Advocate's Script

Ryex's Script

Rune's Scripts

shdwlink1993's Script

Sthrattoff's Script

Wcw's Scripts

Zeriab's Scripts



These scripts are for Rpg Maker VX
Rpg Maker VX Script Listing



Dark Dragon's Script

Modern algebra's Scripts

Namkcor's Script

TywinLannister's Scripts

Wcw Script

Zeriab's Script
11
Advertising / The Sixth Blade
May 28, 2008, 08:11:01 am
A website created by me. Its my first real website. Its an rpg maker website. Right now its still in developing stages so bear with me. The website link is The Sixth Blade. Anyone is welcome to join this website. This website I made will soon have some content.
12
Interpreter Script Call Fix
Authors: Juan, Blizzard
Version: 1.0
Type: Bug Fix
Key Term: Misc Add-on



Introduction

This script fixes the interpreter script call when you use $game_system.anything = false it would normal frezze this script fixes that.


Features


  • Fixes the call script
  • Plug in and play



Screenshots

N/A for this type of script.


Demo

N/A


Script
Spoiler: ShowHide

class Interpreter
  SCRIPT_WAIT_RESULTS = [:wait, FalseClass]
  #-------------------------------------------------------------------
  # * Script
  #-------------------------------------------------------------------
  def command_355
    # Set first line to script
    script = @list[@index].parameters[0] + "\n"
    # Store index in case we need to wait.
    current_index = @index
    # Loop
    loop do
      # If next event command is second line of script or after
      if @list[@index+1].code == 655
        # Add second line or after to script
        script += @list[@index+1].parameters[0] + "\n"
      # If event command is not second line or after
      else
        # Abort loop
        break
      end
      # Advance index
      @index += 1
    end
    # Evaluation
    result = eval(script)
    # If return value is false
    if SCRIPT_WAIT_RESULTS.include?(result)
      # Set index back (If multi-line script call)
      @index = current_index
      # End and wait
      return false
    end
    # Continue
    return true
  end
end




Instructions

Just make a new script and post it above main


Compatibility

Compatable with sdk.


Credits and Thanks


  • Juan
  • Boris "Blizzard" Mikić
  • Zeriab



Author's Notes

If there are any bugs please post it or email me at juanpena1111@yahoo.com
and credit me.
13
RMXP Script Database / [XP] Juan's Option Menu
March 16, 2008, 07:29:53 pm
Juan's Option Menu
Authors: Juan
Version: 2.2
Type: Custom Component System
Key Term: Menu Add-On



Introduction

This is an option menu made by me.  This option menu can change the windowskin, font, font size, bgm volume, sfx volume,  battle bgm, and change bar style and opacity if your using blizzards tons of add script bar script.


Features


  • Change Windowskin
  • Change Font
  • Change Font Size
  • Change Bgm Volume
  • Change Sfx Volume
  • Change Battle Bgm
  • Change Bar Style if your using blizzards tons of add script with the bar style add on on.
  • Change Bar Opacity if your using blizzards tons of add script with the bar style add on on.
  • Change the Screensize to full screen.



Screenshots

Spoiler: ShowHide



Demo
https://www.dropbox.com/sh/o00xrrjbqm49ajl/m83OKufU0d


Script

Spoiler: ShowHide
#==============================================================================
# ** Juan's Option Menu
#------------------------------------------------------------------------------
# Juan
# Version 2.2
# Type: Custom Component System
# Date 9/21/08
# Date Last Updated 9/30/2013
#==============================================================================
#
#  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.
# # 
# #----------------------------------------------------------------------------
#
# Compatibility:
# This script is independent so it doesn't modify anything.
# Compatable with the Sdk
# Compatable with Dream for music files
# Compatable and Supports Tons of add-ons by Blizzard
#
#
#Features:
#
# -> Change Font
# -> Change Font Size
# -> Change Windowskin
# -> Change Bgm volume
# -> Change Sfx volume
# -> Change Battle Bgm Music able to disable
# -> Change Bar Style if your using blizzards tons of add script.
# -> Change Bar Opacity if your using blizzards tons of add script.
# -> A preview window for most options.
#
# Version History
#
# Version 1.0
# -> This script was first made
# Version 2.0
# -> Completely Rewritten
# -> Less Code
# -> Added Full scene option
# -> The option help window now works.
# Version 2.1
# -> Added option to remove battle bgm.
# Version 2.2
# -> Added a preview window for most options.
#
#
#Instructions
# Configurate everything in Juan_Configuration module. 
# To call the option menu use $scene =  Scene_Option.new
#
#
#
#FAQ (Frequently Asked Questions):
#None so far
#
#
#Credits
#Blizzard
#Wcw
#Susy
#
#
#Author's Notes
#Credit me and enjoy
#Any bugs or need help
#Report them here:
#http://forum.chaos-project.com/index.php?topic=782.0
#or
#Email me
#Juanito119@yahoo.com
#Thats it
#enjoy


#==============================================================================
# module Juan_Configuration
#==============================================================================
module Juan_Configuration
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # Fonts
  Fonts = ['Arial', 'Bookman Old Style', 'Comic Sans MS', 'Mistral', 'Papyrus',
  'Tahoma', 'Times New Roman']
# Option Menu Opacity
Option_Menu_Opacity = 200
#True or false if you want to see the mapground
Map_Background = true
#Windowskins names
Windowskins = ['Red', 'Blue', 'Green', 'Silver', 'Black']
# Battle Bgm Options
Battle_Bgm_Enabled = true
  #Battle bgm name
  Battle_Bgms = [
  #             ['BGM_NAME', VOLUME, PITCH, 'DISPLAY_NAME']
                ['001-Battle01', 100, 100, 'BGM 1'],
                ['002-Battle02', 100, 100, 'BGM 2'],
                ['003-Battle03', 100, 100, 'BGM 3'],
                ['004-Battle04', 100, 100, 'BGM 4']]
#battle bgm variable
Bgm_Variable = 49
# 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_Options
#------------------------------------------------------------------------------
#  This window displays options on the menu screen.
#==============================================================================

class Window_Options < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     width    : window width
  #     commands : command text string array
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 430, 380)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    @commands = ['Font', 'Font Size', 'Windowskin', 'Bgm Volume', 'Sfx Volume']   
    @commands.push 'Battle Bgm' if Juan_Configuration::Battle_Bgm_Enabled
    @commands.push 'Bar Style', 'Bar Opacity' if $tons_version && $game_system.BARS
    @commands.push 'Change Screen Size'
    @item_max = @commands.size   
    refresh
    self.index = 0
  end 
  #--------------------------------------------------------------------------
  # * Get Command
  #--------------------------------------------------------------------------
    def get_command
    return @commands[index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    (0...@item_max).each {|i| draw_item(i, normal_color)}
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(0, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])   
    self.contents.draw_text(0, index / 1 * 32   , self.width - 32, 32, @commands[index], 96)
  end
  #--------------------------------------------------------------------------
  # * Disable Item
  #     index : item number
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end

end

#==============================================================================
# ** Window_Option_Help
#------------------------------------------------------------------------------
#  This window displays menu function on the menu screen.
#==============================================================================

class Window_Option_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(option_update)
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -8, 440, 32, option_update, 2)
  end

end


#==============================================================================
# ** Window_Option_Help2
#------------------------------------------------------------------------------
#  This window displays configure option on the menu screen.
#==============================================================================

class Window_Option_Help2 < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 640, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -8, 440, 32, 'Configure Options', 0)
  end

end

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

class Window_Font < Window_Base
  attr_accessor :current_font
  attr_reader   :font_name
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    @font_name = Font.default_name
    @current_font = Juan_Configuration::Fonts.index(@font_name)   
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    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
    @font_name = Juan_Configuration::Fonts[@current_font]
    self.contents.font.name = @font_name
    self.contents.draw_text(4, 32, 120, 32, @font_name, 2)
    self.contents.font.name = Font.default_name
  end

end


#==============================================================================
# ** Window_Font_Size
#------------------------------------------------------------------------------
#  This window displays font size on the menu screen.
#==============================================================================

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

end


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

class Window_Windowskin < Window_Base
  attr_reader   :current_skin
  attr_reader   :skin_name   
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    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
    @skin_name = Juan_Configuration::Windowskins[self.current_skin]
    self.contents.draw_text(4, 32, 120, 32, @skin_name)
  end

  def current_skin
    return (@current_skin == nil ? 0 : @current_skin)
  end

  def current_skin=(val)
    @current_skin = (val.is_a?(Numeric) ? val : 0)
  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)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    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)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    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


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

class Window_Battle_Bgm < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    bgm = Juan_Configuration::Battle_Bgms[$game_variables[Juan_Configuration::Bgm_Variable]][3]
    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, bgm, 2)
  end

end


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

class Window_Bar_Style < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Bar Style' + $game_system.bar_style.to_s)
    self.contents.font.color = normal_color
    color1 = Color.new(80, 0, 0, 192)
    color2 = Color.new(240, 0, 0, 192)
    color3 = Color.new(80, 0, 0, 192)
    self.contents.gradient_bar(4, 32, width - 64, color1, color2, color3, 1)
  end

end


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

class Window_Bar_Opacity < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = Juan_Configuration::Option_Menu_Opacity
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Bar Opacity' + $game_system.bar_opacity.to_s)
    self.contents.font.color = normal_color
    color1 = Color.new(80, 0, 0, 192)
    color2 = Color.new(240, 0, 0, 192)
    color3 = Color.new(80, 0, 0, 192)
    self.contents.gradient_bar(4, 32, width - 64, color1, color2, color3, 1)   
  end

end


#==============================================================================
# ** Scene_Option
#------------------------------------------------------------------------------
#  This class performs option menu screen processing.
#==============================================================================
class Scene_Option   
  #--------------------------------------------------------------------------
  # * 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_Options.new
    @command_window.x = 0
    @command_window.y = 50
    # If battle bgm is forbidden.
    if $game_switches[Juan_Configuration::Bgm_Lock] || Juan_Configuration::Battle_Bgms.size <= 1
    @command_window.disable_item(5)
    end
    # Make font command window
    @font_command_window = Window_Font.new
    @font_command_window.x = 430
    @font_command_window.y = 50
    @font_command_window.active = false
    @font_command_window.visible = false
    # Make font size command window
    @font_size_command_window = Window_Font_Size.new
    @font_size_command_window.x = 430
    @font_size_command_window.y = 50
    @font_size_command_window.active = false
    @font_size_command_window.visible = false   
    # Make windowskin command window
    @windowskin_command_window = Window_Windowskin.new
    @windowskin_command_window.x = 430
    @windowskin_command_window.y = 50
    @windowskin_command_window.active = false
    @windowskin_command_window.visible = false
    # Make bgm volume command window
    @bgm_command_window = Window_Bgm_Volume.new
    @bgm_command_window.x = 430
    @bgm_command_window.y = 50
    @bgm_command_window.active = false
    @bgm_command_window.visible = false
    # Make sfx volume command window
    @sfx_command_window = Window_Sfx_Volume.new
    @sfx_command_window.x = 430
    @sfx_command_window.y = 50
    @sfx_command_window.active = false
    @sfx_command_window.visible = false
    # Make battle bgm command window
    @battle_bgm_command_window = Window_Battle_Bgm.new
    @battle_bgm_command_window.x = 430
    @battle_bgm_command_window.y = 50
    @battle_bgm_command_window.active = false
    @battle_bgm_command_window.visible = false
    if $tons_version && $game_system.BARS
    # Make bar style command window
    @bar_style_command_window = Window_Bar_Style.new
    @bar_style_command_window.x = 430
    @bar_style_command_window.y = 50
    @bar_style_command_window.active = false
    @bar_style_command_window.visible = false 
    # Make bar opacity
    @bar_opacity_command_window = Window_Bar_Opacity.new
    @bar_opacity_command_window.x = 430
    @bar_opacity_command_window.y = 50
    @bar_opacity_command_window.active = false
    @bar_opacity_command_window.visible = false
    end
    # Make option help window
    @option_help_window = Window_Option_Help.new
    @option_help_window.x = 0
    @option_help_window.y = 430
    # Make option help2 window
    @option_help_window2 = Window_Option_Help2.new
    @option_help_window2.x = 0
    @option_help_window2.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
      if $scene != self
        break
      end
    }
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @font_command_window.dispose
    @font_size_command_window.dispose
    @bgm_command_window.dispose
    @sfx_command_window.dispose
    @windowskin_command_window.dispose
    @battle_bgm_command_window.dispose
    @bar_style_command_window.dispose if $tons_version && $game_system.BARS
    @bar_opacity_command_window.dispose if $tons_version && $game_system.BARS
    @option_help_window.dispose
    @option_help_window2.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @font_command_window.update   
    @font_size_command_window.update
    @windowskin_command_window.update
    @bgm_command_window.update
    @sfx_command_window.update   
    @battle_bgm_command_window.update
    @bar_style_command_window.update if $tons_version && $game_system.BARS
    @bar_opacity_command_window.update if $tons_version && $game_system.BARS
    @option_help_window2.update
    @spriteset.update   
    command_window_check
    option_update
  end
  #--------------------------------------------------------------------------
  # * Command Window Check
  #     checks which command window is active
  #--------------------------------------------------------------------------
  def command_window_check
    # If command window is active: call update_command
    if @command_window.active
      update_command
    # If font command window is active: call update_font_command
    elsif @font_command_window.active
      update_font_command
    # If font size command is active: call update_font_size
    elsif @font_size_command_window.active
      update_font_size_command     
    # If windowskin command window is active: call update_windowskin_command
    elsif @windowskin_command_window.active
      update_windowskin_command
    # If bgm command window is active: call update_bgm_command
    elsif @bgm_command_window.active
      update_bgm_command
    # If sfx command window is active: call update_sfx_command
    elsif @sfx_command_window.active
      update_sfx_command
    # If battle bgm is active: call update_battle_bgm_command     
    elsif @battle_bgm_command_window.active
      update_battle_bgm_command   
    # If bar style command window is active: call update_bar_style_command   
    elsif @bar_style_command_window.active
      update_bar_style_command
    # If bar opacity command window is active: call update_bar_opacity_command
    elsif @bar_opacity_command_window.active
      update_bar_opacity_command
    end
  end
  #--------------------------------------------------------------------------
  # * Option Window Frame Update
  #--------------------------------------------------------------------------
  def option_update
    # Branch by command window name
    case @command_window.get_command
      when 'Font'
        @option_help_window.update('Change the font.')
      when 'Windowskin'
        @option_help_window.update('Change the game\'s menu apperence.')   
      when 'Bgm Volume'
        @option_help_window.update('Change the bgm volume')     
      when 'Sfx Volume'
        @option_help_window.update('Change the sfx volume') 
      when 'Battle Bgm'
        @option_help_window.update('Change the battle music.')
      when 'Bar Style'
        @option_help_window.update('Change the bars visual apperence')
      when 'Bar Opacity'
        @option_help_window.update('Change the bar visibility.')
      when 'Change Screen Size'
        @option_help_window.update('Change the window size.')
      else
        @option_help_window.update('Unknown 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 menu 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.get_command
      when 'Font'
        # Make font command window active
        @font_command_window.active = true
        @font_command_window.visible = true
        @command_window.active = false
        @command_window.index = -1
      when 'Font Size'
        # Make font size window active
        @font_size_command_window.active = true
        @font_size_command_window.visible = true
        @command_window.active = false
        @command_window.index = -1       
      when 'Windowskin'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make windowskin command window active
        @command_window.active = false
        @command_window.index = -1         
        @windowskin_command_window.active = true
        @windowskin_command_window.visible = true
        #@windowskin_command_window.index = 0
      when 'Bgm Volume'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        # Make bgm command window active
        @command_window.active = false
        @command_window.index = -1         
        @bgm_command_window.active = true
        @bgm_command_window.visible = true
      when 'Sfx Volume'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        # Make sfx command window active
        @command_window.active = false
        @command_window.index = -1         
        @sfx_command_window.active = true
        @sfx_command_window.visible = true
      when 'Battle Bgm'
        # If battle bgm is forbidden
        if $game_switches[Juan_Configuration::Bgm_Lock] || Juan_Configuration::Battle_Bgms.size <= 1
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end       
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        # Make battle bgm command window active
        @command_window.active = false
        @command_window.index = -1         
        @battle_bgm_command_window.active = true
        @battle_bgm_command_window.visible = true
      when 'Bar Style'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        # Make bar style command window active
        @command_window.active = false
        @command_window.index = -1         
        @bar_style_command_window.active = true
        @bar_style_command_window.visible = true
      when 'Bar Opacity'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        # Make bar opacity command window active
        @command_window.active = false
        @command_window.index = -1         
        @bar_opacity_command_window.active = true
        @bar_opacity_command_window.visible = true   
      when 'Change Screen Size'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
        keybd.call(0xA4, 0, 0, 0)
        keybd.call(13, 0, 0, 0)
        keybd.call(13, 0, 2, 0)
        keybd.call(0xA4, 0, 2, 0)         
      end     
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when font command window is active)
  #--------------------------------------------------------------------------
  def update_font_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
      @command_window.active = true
      @command_window.index = 0
      @font_command_window.active = false
      @font_command_window.visible = false
      elsif Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.decision_se)
        @font_command_window.current_font += 1
        @font_command_window.current_font %= Juan_Configuration::Fonts.size
        @font_command_window.refresh
      elsif Input.repeat?(Input::LEFT)
        $game_system.se_play($data_system.decision_se)
        @font_command_window.current_font += Juan_Configuration::Fonts.size - 1
        @font_command_window.current_font %= Juan_Configuration::Fonts.size
        @font_command_window.refresh
      elsif Input.repeat?(Input::C)
        $game_system.se_play($data_system.decision_se)
        Font.default_name = @font_command_window.font_name
        $scene = Scene_New_Options.new
    end   
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when font size command window is active)
  #--------------------------------------------------------------------------
  def update_font_size_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
      @command_window.active = true
      @command_window.index = 0
      @font_size_command_window.active = false
      @font_size_command_window.visible = false
      elsif Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.decision_se)
       Font.default_size += 1
       if Font.default_size > 35
         Font.default_size = 35
       end       
        @font_size_command_window.refresh
      elsif Input.repeat?(Input::LEFT)
       Font.default_size -= 1
       if Font.default_size < 15
         Font.default_size = 15
       end
        @font_size_command_window.refresh
    end   
  end   
  #--------------------------------------------------------------------------
  # * Frame Update (when font command window is active)
  #--------------------------------------------------------------------------
  def update_windowskin_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
      @command_window.active = true
      @command_window.index = 0
      @windowskin_command_window.active = false
      @windowskin_command_window.visible = false
    elsif Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.decision_se)
        @windowskin_command_window.current_skin += 1
        @windowskin_command_window.current_skin %= Juan_Configuration::Windowskins.size       
        @windowskin_command_window.refresh
        $game_system.windowskin_name = @windowskin_command_window.skin_name
    elsif Input.repeat?(Input::LEFT)
        $game_system.se_play($data_system.decision_se)
        @windowskin_command_window.current_skin += Juan_Configuration::Windowskins.size - 1
        @windowskin_command_window.current_skin %= Juan_Configuration::Windowskins.size       
        @windowskin_command_window.refresh
        $game_system.windowskin_name = @windowskin_command_window.skin_name
    elsif Input.repeat?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_system.windowskin_name = @windowskin_command_window.skin_name
    end   
  end   
  #--------------------------------------------------------------------------
  # * Frame Update (when font command window is active)
  #--------------------------------------------------------------------------
  def update_bgm_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
      @command_window.active = true
      @command_window.index = 0
      @bgm_command_window.active = false
      @bgm_command_window.visible = false
    elsif Input.repeat?(Input::LEFT)
      $game_system.bgm_volume -= 1
      if $game_system.bgm_volume < 0
        $game_system.bgm_volume = 0
      end
      $game_system.bgm_play($game_system.playing_bgm)
      @bgm_command_window.refresh
    elsif Input.repeat?(Input::RIGHT)
      $game_system.bgm_volume += 1
      if $game_system.bgm_volume > 100
        $game_system.bgm_volume = 100
      end
      $game_system.bgm_play($game_system.playing_bgm)
      @bgm_command_window.refresh     
     end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when font command window is active)
  #--------------------------------------------------------------------------
  def update_sfx_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
      @command_window.active = true
      @command_window.index = 0
      @sfx_command_window.active = false
      @sfx_command_window.visible = false
    elsif Input.repeat?(Input::LEFT)
      $game_system.sfx_volume -= 1
      if $game_system.sfx_volume < 0
        $game_system.sfx_volume = 0
      end
      $game_system.se_play($data_system.cursor_se)
      @sfx_command_window.refresh
    elsif Input.repeat?(Input::RIGHT)
      $game_system.sfx_volume += 1
      if $game_system.sfx_volume > 100
        $game_system.sfx_volume = 100
      end
      $game_system.se_play($data_system.cursor_se)
      @sfx_command_window.refresh     
     end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when battle bgm command window is active)
  #--------------------------------------------------------------------------
  def update_battle_bgm_command 
    ind = $game_variables[Juan_Configuration::Bgm_Variable]
    # 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
      @command_window.active = true
      @command_window.index = 0
      @battle_bgm_command_window.active = false
      @battle_bgm_command_window.visible = false
    elsif Input.repeat?(Input::LEFT)
        # Play decision SE
        $game_system.se_play($data_system.decision_se)       
        ind = (ind+Juan_Configuration::Battle_Bgms.size-1) % Juan_Configuration::Battle_Bgms.size
        @battle_bgm_command_window.refresh
    elsif Input.repeat?(Input::RIGHT) || Input.repeat?(Input::C)
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        ind = (ind+1) % Juan_Configuration::Battle_Bgms.size
      end
       $game_variables[Juan_Configuration::Bgm_Variable] = ind
       $game_system.reset_battle_bgm
       @battle_bgm_command_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when bar style command window is active)
  #--------------------------------------------------------------------------
  def update_bar_style_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
      @command_window.active = true
      @command_window.index = 0
      @bar_style_command_window.active = false
      @bar_style_command_window.visible = false
    elsif Input.repeat?(Input::LEFT)
      $game_system.bar_style = ($game_system.bar_style + 6) % 7
      @bar_style_command_window.refresh
    elsif Input.repeat?(Input::RIGHT)
       $game_system.bar_style = ($game_system.bar_style + 1) % 7
       $game_system.se_play($data_system.decision_se)     
      @bar_style_command_window.refresh     
     end
  end   
  #--------------------------------------------------------------------------
  # * Frame Update (when bar style command window is active)
  #--------------------------------------------------------------------------
  def update_bar_opacity_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
      @command_window.active = true
      @command_window.index = 0
      @bar_opacity_command_window.active = false
      @bar_opacity_command_window.visible = false
    elsif Input.repeat?(Input::LEFT)
      $game_system.bar_opacity -= 1
      @bar_opacity_command_window.refresh
    elsif Input.repeat?(Input::RIGHT)
      $game_system.bar_opacity += 1
       $game_system.se_play($data_system.decision_se)     
      @bar_opacity_command_window.refresh     
    end
  end
 
end



Instructions

Configure everything in Juan_Configuration module To call the option menu use $scene = Scene_Option.new


Compatibility

This script creates windows in other words it doesn't modify anything.


Credits and Thanks


  • Juan
  • Wcw
  • Susys
  • Blizzard



Author's Notes

Credit me and enjoy.

Any bugs report them here or email me at Juanito119@yahoo.com
14
I can't see damage in battle in any project in rpg maker xp at all. The characters attack but it doesn't show the damage. Anyone know how to fix it?
15
RMXP Script Database / [XP] Location Window
January 07, 2008, 08:08:27 pm
Location Window
Authors: Juan
Version: 1.4
Type: Scene Menu Add on
Key Term: Menu Add-on



Introduction

This script allows you to display the maps name.


Features


  • Display maps name
  • Removed the * in map name
  • Removes the step window
  • Less code than other location scripts



Screenshots

Spoiler: ShowHide


Demo

Just post this script above main and go to test play.


Script

Spoiler: ShowHide

#==============================================================================
# ** Location Window
#------------------------------------------------------------------------------
# Juan  
# Version 1.4
# made 10/13/07
# Date last time updated 12/30/07
#==============================================================================
# This script changes the step window to a location window(displays map name.)
# by changing the steps wiindow to display a location window.
# Any bugs email me juanpena1111@yahoo.com
# Version History
#
# Version 1.0
# -> This script was first made.
# Version 1.1
# -> Fixed font bug
# Version 1.2
# -> Removed * in map name.
# Version 1.3
# -> You can now change the location name.
# Version 1.4
# -> Improed coding
#
# Compatibility:
# This script changes the windows steps window to display the map name. What  that means
# is this script will not work on some cms(custom menu systems) if they
# don't use the step window
#
# Features
# Displays the map name.
# Removed the * in map name.
# Less code than other location scripts
#
# Instructions
# Make a new script above main and paste this script there. You should
# also configure the location name. Just change the Location Name = 'Location'
# FAQ (Frequently Asked Questions):
# None yet

# Author's Notes
# Any bugs email me juanpena1111@yahoo.com
# Credit me and enjoy.
#
#
#==============================================================================
# module Juan_Configuration
#==============================================================================

module Juan_Configuration
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::  
# Begin Configuration
Location_Name = 'Location'
# End Configuration.
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Scene_Title
#==============================================================================

class Scene_Title

 alias main_juans_custom_menu_later main
 def main
   $map_infos = load_data('Data/MapInfos.rxdata')
   $map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
   main_juans_custom_menu_later
 end  
end
#===================================================
# * Class Scene_Title Ends
#===================================================


#===================================================
# * Class Game_Map Begins
#===================================================
class Game_Map
def name
return $map_infos[@map_id]
end
end
#===================================================
# * Class Game_Map Ends
#===================================================



#===================================================
# * Class Window_Steps Begins
#===================================================
class Window_Steps < Window_Base
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   if $fontface != nil
   self.contents.font.name = $fontface
   elsif $defaultfonttype != nil
   self.contents.font.name = $defaultfonttype
   end
   self.contents.font.size = 24    
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 80, 32, Juan_Configuration::Location_Name)
   self.contents.font.color = normal_color
   if $game_map.name.include?('*')
   self.contents.draw_text(4, 32, 120, 32, $game_map.name.delete!('*'), 2)
   else
   self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
   end
 end
end
#===================================================
# * Class Window_Steps Ends
#===================================================



Instructions
Make a new script and post it above main.


Compatibility

This script rewrites the windows step class. So all that means is if a cms doesn't use the steps window at all it will not work.


Credits and Thanks


  • Juan



Author's Notes

Credit me and enjoy.
16
RMXP Script Database / [XP] Animated Cms
January 07, 2008, 08:00:03 pm
Animated Cms
Authors: Juan, Blizzard, Nortos, WcW, Dingo, Legacyblade, Tsuko
Version: 5.3
Type: Custom Menu System
Key Term: Custom Menu System



Introduction

This a custom menu system, with many functions. e.g. Equip submenu shows complete information about Status resistance/attack, Element resistance/attack,  complete character stat changing, animated, and has an options menu.


Features


  • Animated
  • Soul Rage System Support
  • Supports Unlimited Party Size
  • Option Menu
  • Equipment
  • Faceset Support
  • Icon Support



Screenshots
The screenshots were applied with tons of add gradient bars to make it look better.
Screenshot1: ShowHide


Screenshot2: ShowHide


Screenshot3: ShowHide


Screenshot4: ShowHide




Demo
Script Demo


Script
Just make a new script above main and paste this code into it
Script Link


Instructions
Configure the settings in the menu is my module. To use icons make a folder called CMS in the icon folder. And name each image menu0-menu7


Compatibility

Compatable with SDK 2.3.
Compatable with dream for music files and tons of add ons.
This script will corrupt old savegames.


Credits and Thanks


  • Juan
  • Blizzard
  • Nortos
  • Wcw
  • Dingo
  • Legacyblade
  • Tsuko



Author's Notes
This cms will not with save files before this cms was there.
Any bugs email me at Juanito119@yahoo.com
or report them in this topic.
Credit me and enjoy.