- Joined
- Feb 1, 2014
- Messages
- 39
- Reaction score
- 15
- First Language
- Portuguese
Warrior of Light Main Menu v1.0.1
ArcherBanish
ArcherBanish
Introduction
This script atempts to emulate the Main Menu of the game Final Fantasy I(At least the PSP version of it). It gives your main menu a new layout as well as the ability to turn on or off a group of "Crystals".
Features
- A menu layout inspired by the game Final Fantasy I
- The ability to turn on or off "Crystals" using in switches.
Updates
- v1.0.1 (25/11/2014): Added a note regarding the map Display Name, small changes to the code (not inportant eneugh to change your version mind you)
Screenshots
How to Use 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..
Demo
Download
Script
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
#==============================================================================#
# ■■ ■■ 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
FAQ
Q: Do I have to use images of crystals?
A: Nope, can be whatever you want.
Q: Can I turn on the Gauges back on?
A: Yes you can just change the SHOWGAUGE variable to true in the configuration.
Q: Can I use any image size?
A: Well you can but currently, I wouldn't recomend anything larger than 60px by 30px for it might not look very good. I plan of fixing this by limiting the image size in a future version.
Q: Can I put how many "Crystals" as I want.
A: Again yes but it will probably not look too well. I recommend you use 6 at most or, if you dont mind some overlay, 8 at max.
Q: I use Yanfly's engine and I have allot of free space betwen my characters and the menu, can I make it look better?
A: In the configuration you can change the COMMANDSIZE variable to the recomended amount (200) and in my opinion it looks good.
Credit and Thanks
ArcherBanish
Thanks to:
DiamondandPlatinum3 - for his great RGSS3 tutorials.
Square Enix/Soft/just Square, whatever they decide to call themselves nowadays - for making one of my favorite games of all time.
Author's Notes
So on an end note, I realize this script will probably have allot of problems what I will in future hope to fix.
Also I am unable to test its compatibility with everything, Some possible problems are named in the Script itself.
To end I ask you that if you find any problems with the script please tell me. Even though it is a simple script I made just to test some stuff out I would like to make it more robust.
Thank you for your time and I hope you enjoy the script.
Last edited by a moderator:
