Pastebin Link
#==============================================================================#
# â– â– â– â– Warrior of Light Menu â– â– â– â– Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â #
#==============================================================================#
# Author: Archer Banish
# Version: 1.1
# Last Update: 25/11/2014
#==============================================================================#Â
# ■Update History                               #
#==============================================================================#
# 25/11/2014 (V1.0.1) Small upgrade to the code, added note regarding the map
# Display Name
# 13/11/2014 (V1.0) Initial Launch
#==============================================================================#Â
# ■Introduction                                #
#==============================================================================#
# A simple main menu script to atempt to emulate the menu from the gameÂ
# Final Fantasy I.
# This menu adds a shared Gold/Time Window, a Location window and a new feature
# present in the Final Fantasy I menu which is the Cystal Window, these "Crystals
# can be turned on or off by a switch.
#==============================================================================#Â
# ■Instructions                                #
#==============================================================================#
# To Install this script just place it under "â–¼ Materials" and above "Main" inÂ
# your RPG Maker VX Ace Script Editor
# You are also required to have the images in your "Graphics/System" folder.
#==============================================================================#Â
# ■Compatibility                                #
#==============================================================================#
# This script is made for RPG Maker VX Ace and will most likely no work correctly
# in RPG Maker VX.
# Any script that changes the Main Menu, Actor Status Display and (slightly) with
# scripts that change the Gauge display.
#==============================================================================#
Â
module ARCHER
 module FFIM
  Â
  #==========================================================================
  # â– Script Settings â–
  #==========================================================================
  # Edit these variables to edit the script at your liking,
  #==========================================================================
  SHOWGAUGE = false   # This variable toggles if the HP/MP Gauges are shown
             # DEFAULT SETTING: false
  COMMANDSIZE = 160   # This variable defines the size of the non-statusÂ
            Â
#windows (Command, Gold/Time, Location, Crystal
             # Default: 160
             # Default(For Yanfly Engine Ace): 200
  #==========================================================================
  # â– Crystal Settings â–
  #==========================================================================
  # The variables are used to select the images that are displayed on theÂ
  # Crystal Window.
  # NOTE: These Images must be located in your "Graphics/System/" folder.
  # INPORTANT: Currently there is no check on the images size, any too largeÂ
  #  image might have problems with the presentation on the window. I recomend
  #  images not larger than 60x30 (height x width) for the best results
  #  currently there is also an issue regarding the amount of images that
  #  can be displayed correclty, with this size at 7+ there is already an
  #  overlay of images. I do not recomend more than 6 images however, if you
  #  don't mind some overlay I would recomend a max of 8.
  #==========================================================================
  EMPTYFILENAME = "Empty"
#The image name that will be shown if the switch for
             Â
#the "Crystal" is not set as ON.
  #--------------------#
  # CRYSTALFILES Array |
  #--------------------#
  # This array takes 2 values per line.
  # Switch: This is the switch that will toggle the Crystal On causing it to be
  #     drawn as such.
  # Filename: The name of the image that will be shown if the designated switch
  #      is on.
  #
  # Default:
  #  CRYSTALFILES = [
  #  Â
#Switch  Â
#Filename
  #   [1,     "Fire"],
  #   [2,     "Earth"],
  #   [3,     "Wind"],
  #   [4,     "Water"]
  #  ]
  Â
  CRYSTALFILES = [
   #Switch   #Filename
   [1,     "Fire"],
   [2,     "Earth"],
   [3,     "Wind"],
   [4,     "Water"]
  ]
  Â
  Â
  #--------------#
  # Mapname Note #
  #--------------#
  # To have the menu display the map name you will have to set theÂ
  # Display Name proprieties in the Map Proprieties of every map.
  # Any map without this propriety will apear as Unknown.
  Â
 #============================================================================#
 # ■■Customization Ends Here ■■                      #
 #============================================================================#
   Â
 end #FFIM
end #ARCHER
Â
Â
#==============================================================================#
# â– â– â– Menu Scenes â– â– â– Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â #
#==============================================================================#
class Scene_Menu < Scene_MenuBase
 def start
  super
  create_status_window
  create_command_window
  create_crystal_window
  create_location_window
  create_time_gold_window
 end
 Â
 #--------------------------------------------------------------------------
 # ■Create Command Window
 #--------------------------------------------------------------------------
 alias kab_sm_ccw create_command_window
 def create_command_window
  kab_sm_ccw
  @command_window.x = Graphics.width - @command_window.width - 5
  @command_window.y = 5
 end
 Â
 #--------------------------------------------------------------------------
 # ■Create TimeGold Window
 #--------------------------------------------------------------------------
 def create_time_gold_window
  @time_gold_window = Window_Time_Gold.new
  @time_gold_window.x = Graphics.width - @time_gold_window.window_width - 5Â
  @time_gold_window.y = Graphics.height - @time_gold_window.window_height - 5
 end
 Â
 #--------------------------------------------------------------------------
 # ■Create Lacation Window
 #--------------------------------------------------------------------------
 def create_location_window
  @location_window = Window_Location.new
  @location_window.x = Graphics.width - @location_window.window_width - 5Â
  @location_window.y = Graphics.height - line_height*3 - @location_window.window_height - 5
 end
 Â
 #--------------------------------------------------------------------------
 # ■Create Crystal Window
 #--------------------------------------------------------------------------
 def create_crystal_window
  @crystal_window = Window_Crystal.new
  @crystal_window.x = Graphics.width - @crystal_window.window_width - 5
  @crystal_window.y = Graphics.height - line_height*5 - @crystal_window.window_height - 5
 end
 Â
 #--------------------------------------------------------------------------
 # ■Create Status Window
 #--------------------------------------------------------------------------
 def create_status_window
  @status_window = Window_MenuStatus.new(5, 5)
 end
 Â
 #--------------------------------------------------------------------------
 # ■Get Line Height
 #--------------------------------------------------------------------------
 def line_height
  return 24
 end
end
Â
#==============================================================================#
# â– â– â– Menu Windows â– â– â– Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â #
#==============================================================================#
Â
class Window_MenuCommand < Window_Command
  def window_width
   return ARCHER::FFIM::COMMANDSIZE
  end
end
Â
#========================================
# â– Window_Base â–
#=======================================
class Window_Base  < Window
 #--------------------------------------------------------------------------
 # ■Draw Actor Simple Status - Override
 # > Edited the location where the data is displayed slightly
 #--------------------------------------------------------------------------
 def draw_actor_simple_status(actor, x, y)
  draw_actor_name(actor, x, y)
  draw_actor_level(actor, x, y + line_height * 1)
  draw_actor_icons(actor, x + 120, y)
  draw_actor_class(actor, x + 120, y + line_height * 1)
  draw_actor_hp(actor, x, y + line_height * 2)
  draw_actor_mp(actor, x + 120, y + line_height * 2)
 end
 Â
 #--------------------------------------------------------------------------
 # ■Draw Gauge Status - Override
 # > Added a little border to the gauges
 #--------------------------------------------------------------------------
  def draw_gauge(x, y, width, rate, color1, color2)
  width = width-10
  fill_w = (width * rate).to_i
  gauge_y = y + line_height - 8
  contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
  contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
  Â
  border = Bitmap.new(width, 6)
  border.fill_rect(border.rect, Color.new(255, 255, 255, 255))
  border.clear_rect(1, 1, width-2, 4)
  contents.blt(x, gauge_y, border, border.rect, 255)
  border.dispose
 end
 Â
 #--------------------------------------------------------------------------
 # ■Draw HP - Override
 # > added check to hide gauge or not
 #--------------------------------------------------------------------------
 def draw_actor_hp(actor, x, y, width = 124)
  if ARCHER::FFIM::SHOWGAUGE
   draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  end
  change_color(system_color)
  draw_text(x, y, 30, line_height, Vocab::hp_a)
  draw_current_and_max_values(x, y, width - 5, actor.hp, actor.mhp,
   hp_color(actor), normal_color)
  end
  Â
 #--------------------------------------------------------------------------
 # ■Draw MP
 # > added check to hide gauge or not
 #--------------------------------------------------------------------------
 def draw_actor_mp(actor, x, y, width = 124)
  if ARCHER::FFIM::SHOWGAUGE
   draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  end
  change_color(system_color)
  draw_text(x, y, 30, line_height, Vocab::mp_a)
  draw_current_and_max_values(x, y, width-5, actor.mp, actor.mmp,
   mp_color(actor), normal_color)
 end Â
end
Â
Â
Â
#========================================
# â– Window_Gold â–
#=======================================
class Window_Gold < Window_Base
 #--------------------------------------------------------------------------
 # ■Object Initialization
 #--------------------------------------------------------------------------
 def initialize
  super(Graphics.width-window_width, Graphics.height-fitting_height(1), window_width, fitting_height(1))
  refresh
 end
 Â
 #--------------------------------------------------------------------------
 # ■Get Window Width
 #--------------------------------------------------------------------------
 def window_width
  return ARCHER::FFIM::COMMANDSIZE
 end
end
Â
#========================================
# â– Window_MenuStatus â–
#=======================================
class Window_MenuStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # ■Get Window Width
 #--------------------------------------------------------------------------
 def window_width
  x = Graphics.width - 10
  x
 end
 #--------------------------------------------------------------------------
 # ■Get Window Height
 #--------------------------------------------------------------------------
 def window_height
  x = Graphics.height - 10
  x
 end
end
Â
#==============================================================================
# â– Window_Location â–
#------------------------------------------------------------------------------
# Â This window displays the party's location.
#==============================================================================
Â
class Window_Location < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, window_width, window_height)
  refresh
 end
 Â
 #--------------------------------------------------------------------------
 # ■Get Window Width
 #--------------------------------------------------------------------------
 def window_width
  return ARCHER::FFIM::COMMANDSIZE
 end
 Â
 #--------------------------------------------------------------------------
 # ■Get Window Height
 #--------------------------------------------------------------------------
 def window_height
  return line_height*2
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
  contents.clear
  draw_location(0, 0, contents.width)Â
 end
 Â
 #--------------------------------------------------------------------------
 # ■Draw Location
 #--------------------------------------------------------------------------
 def draw_location(x, y, width)
  change_color(normal_color)
  unless $game_map.display_name.empty?
   draw_text(x, y, width - 2, line_height, $game_map.display_name, 1)
  else
   draw_text(x, y, width - 2, line_height, "Unknown", 1)
  end
 end
 #--------------------------------------------------------------------------
 # * Open Window
 #--------------------------------------------------------------------------
 def open
  refresh
  super
 end
end
Â
#==============================================================================
# â– Window_Time_Gold â–
#------------------------------------------------------------------------------
# Â This window displays the total game time so far as well as the amount of gold.
#==============================================================================
Â
class Window_Time_Gold < Window_Base
 #--------------------------------------------------------------------------
 # ■Object Initialization
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, window_width, window_height)
  refresh
 end
 #--------------------------------------------------------------------------
 # ■Get Window Width
 #--------------------------------------------------------------------------
 def window_width
  return ARCHER::FFIM::COMMANDSIZE
 end
 Â
 #--------------------------------------------------------------------------
 # ■Get Window Height
 #--------------------------------------------------------------------------
 def window_height
  return line_height*3
 end
 Â
 #--------------------------------------------------------------------------
 # ■Refresh
 #--------------------------------------------------------------------------
 def refresh
  contents.clear
  draw_playtime(0, 0, contents.width)Â
  draw_currency_value(value, currency_unit, 4, line_height, contents.width)
 end
 Â
 #--------------------------------------------------------------------------
 # ■Open Window
 #--------------------------------------------------------------------------
 def open
  refresh
  super
 end
 Â
 #--------------------------------------------------------------------------
 # ■Draw Playtime
 #--------------------------------------------------------------------------
 def draw_playtime(x, y, width)
  change_color(normal_color)
  draw_text(x, y, width - 2, line_height, $game_system.playtime_s, 2)
  change_color(system_color)
  draw_text(x, y, width, line_height, "Time", 0)
 end
 Â
 #--------------------------------------------------------------------------
 # ■Draw Number (Gold Etc.) with Currency Unit
 #--------------------------------------------------------------------------
 def draw_currency_value(value, unit, x, y, width)
  change_color(normal_color)
  draw_text(x, y, width - 2, line_height, value, 2)
  change_color(system_color)
  draw_text(x, y, width, line_height, unit, 0)
 end
 #--------------------------------------------------------------------------
 # ■Get Party Gold
 #--------------------------------------------------------------------------
 def value
  $game_party.gold
 end
 #--------------------------------------------------------------------------
 # ■Get Currency Unit
 #--------------------------------------------------------------------------
 def currency_unit
  Vocab::currency_unit
 end
end
Â
Â
#==============================================================================
# â– Window_Crystal â–
#------------------------------------------------------------------------------
# Â This window displays the crystals
#==============================================================================
Â
class Window_Crystal < Window_Base
 #--------------------------------------------------------------------------
 # ■Object Initialization
 #--------------------------------------------------------------------------
 def initialize
  super(0, 0, window_width, window_height)
  refresh
 end
 #--------------------------------------------------------------------------
 # ■Get Window Width
 #--------------------------------------------------------------------------
 def window_width
  return ARCHER::FFIM::COMMANDSIZE
 end
 Â
 #--------------------------------------------------------------------------
 # ■Get Window Height
 #--------------------------------------------------------------------------
 def window_height
  return line_height*4
 end
 Â
 #--------------------------------------------------------------------------
 # ■Refresh
 #--------------------------------------------------------------------------
 def refresh
  contents.clear Â
  x = Graphics.width - self.window_width - 5
  y = Graphics.height - line_height*5 - self.window_height - 5
 Â
  draw_crystals(x, y, contents.width)Â
 end
 Â
 def draw_crystals(x, y, width)
  x_align = x
  y_align = y + self.window_height/ 2
  z_level = 100
  jump = self.window_width / (ARCHER::FFIM::CRYSTALFILES.length + 1)
  Â
  @spritegroup = []
  vector = []
  Â
  i = 0
  while (i < ARCHER::FFIM::CRYSTALFILES.length)
   vector
= jump*i + jump/2
   i = i + 1
  end Â
  i = 0
  while (i < ARCHER::FFIM::CRYSTALFILES.length)
   @spritegroup = Sprite.new
   if($game_switches[ARCHER::FFIM::CRYSTALFILES[0]])
    @spritegroup.bitmap = Cache.system(ARCHER::FFIM::CRYSTALFILES[1])
   else
    @spritegroup.bitmap = Cache.system(ARCHER::FFIM::EMPTYFILENAME)
   end
   @spritegroup.x = x_align + vector
   @spritegroup.y = y_align - @spritegroup.bitmap.height / 2
   @spritegroup.z = z_level
   i = i+1
  end
 end
 Â
 #--------------------------------------------------------------------------
 # ■Open Window
 #--------------------------------------------------------------------------
 def open
  refresh
  super
 end
 Â
 #--------------------------------------------------------------------------
 # ■Object Dispose
 #--------------------------------------------------------------------------
 def dispose
  i = 0
  while(i < @spritegroup.length)
   @spritegroup.dispose
   @spritegroup.bitmap.dispose
   i = i + 1
  end
  super
 end
end