Sorry for double post but here you go.
Let me know if you receive any errors.
#==============================================================================
# Full Status Custom Menu System (One Actor Version)
# Version: 1.0d
# Author: modern algebra (rmrk.net) Modified by DoctorTodd
# Date: May 14, 2010
# Thanks to: Yanfly; some ideas for configuration come from Scene Menu REDUX
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Description:
#
# This script more or less eliminates the need for a Status scene (at least,
# the default one) by showing all of the status data in the menu itself. It
# has two modes of operating: either the default way, where you select a
# command and you then select an actor, or the new way, where both windows
# are active concurrently and when you select an option, it takes the
# currently selected actor. You can choose which way you want by changing the
# value of FSCMS_BOTH_WINDOWS_ACTIVE, at line 75
#
# You can also choose which scenes are accessible through the menu, and
# the instructions for this are in EDITABLE REGION B, at line 93.
#
# This script also allows you to choose optional windows to show up in the
# menu. The optional windows you can choose are:
# 0 => Gold Window :shows amount of party gold
# 1 => PlayTime Window :shows current playtime
# 2 => Steps Window :shows number of steps party has taken
# 3 => Location Window :shows name of the current map
# 4 => Variable Window :shows the value of a designated variable
# If you have any ideas for other optional windows, than feel free to contact
# me in this script's topic at rmrk.net and I will consider adding them.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Instructions:
#
# This script requires Bitmap Addons 1.5. You can find it at the below link:
# http://rmrk.net/index.php/topic,32286.0.html
#
# Place this script below any scripts you intend to add to the menu, but
# still above Main.
#
# Please see Editable Region A at line 62 for instructions on adding scenes
# (or common events) to the menu and other configuration options.
#
# Note that you can alter the composition of the menu or the optional
# windows in-game with the following script calls:
#
# add_custom_command (command_id)
# remove_custom_command (command_id)
# command_id : ID of the command being added/removed from the commands
# add_optional_window (window_id)
# remove_optional_window (window_id)
# window_id : ID of the window being added/removed from the menu
#==============================================================================
#==============================================================================
# *** ModernAlgebra
#==============================================================================
module ModernAlgebra
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# ** CONSTANTS
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# EDITABLE REGION A
#``````````````````````````````````````````````````````````````````````````
# Here is where all configuration data is setup. Please read the comments
# adjacent to each comment to discover what it does.
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# The y position of the Equip info in the Menu Status.
FSCMS_EQUIP_Y = 200
# The truth value of whether or not you should be able to select actor at the
# same time as you scroll through commands or not. false => standard
# sequential selection. true => concurrent selection
FSCMS_BOTH_WINDOWS_ACTIVE = true
# For common event commands that require actor selection, this is the ID of
# the variable that will hold the chosen actor's ID.
FSCMS_CE_ACTOR_VARIABLE_ID = 1
# If you decide to show a Variable optional window, this is the ID of the
# variable that will be shown in the menu.
FSCMS_VARWINDOW_VARIABLE_ID = 3
# Optional Window Icons. For all icons, # -1 => no icon. >0 => icon index
FSCMS_VARWINDOW_VARIABLE_ICON = 80 # Icon of variable window
FSCMS_GOLD_ICON = 147 # Icon of gold window
FSCMS_PLAYTIME_ICON = 188 # Icon of playtime window
FSCMS_STEPS_ICON = 48 # Icon of steps window
FSCMS_LOCATION_ICON = 153 # Icon of location window
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# END EDITABLE REGION A
#//////////////////////////////////////////////////////////////////////////
FSCMS_CUSTOM_COMMANDS = {
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# EDITABLE REGION B
#``````````````````````````````````````````````````````````````````````````
# This is where you can configure the initial composition of the menu;
# the order of optional windows, the order of the command list, and setting
# up commands that can be included in the command list - all of that is
# done here.
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Command Setup
# based off of Yanfly's Scene Menu Redux
#
# Each command can be set up in the following format:
#
# CommandID => ["Name", IconID, DisableCondition, ActorSelect?,
# SceneName, SceneArguments],
#
# CommandID : this is the ID that this command is represented by. It is
# used in denoting the order in which it appears in the command list
# at line 194. This MUST be unique for each command
# Name : This is how the command appears in the list. If it is represented
# by a method or value included in Vocab, then you can input its
# call. Otherwise, write it exactly as it should appear.
# IconID : The ID of the icon that will appear next to the name of the
# command in the command window.
# DisableCondition : if this is put as a string, it will evaluate the
# string as code and use it's an integer, then the command will be
# disabled if the switch with that ID is ON. If it is a string, it
# will evaluate the string as code. This is useful for scripts that
# have disable conditions updated through event-inaccessible booleans.
# If this is set to -1, it will never be disabled
# ActorSelect? : Truth value of whether or not actor should be selected.
# If true, the first argument sent to the scene will always be
# @target_window.index. If true when the command calls a common event,
# then the ID of the actor chosen will be saved to a variable as
# designated by FSCMS_CE_ACTOR_VARIABLE_ID at line 78
# SceneName : This is the class name of the scene being called once this
# command is selected. You MUST know this data from whatever script you
# are trying to add. If you want this command to call a common event,
# place the ID of the catalogue you wish to call instead. If there is
# more than one command that calls the same scene, then there will
# need to be some manual index setting when returning to the menu
# from that scene.
# SceneArguments : a String of the arguments to be passed to the scene
# when it is called. This too must be known from the script you are
# trying to add.
#
# Note that the comma after the last square bracket must be excluded if you
# are not adding any more commands after it. If you receive a syntax error
# after configuring this script, then it is likely a missing comma or bracket
# or, as noted, there is a comma after the last command.
# Be sure to check your commas before reporting the error.
#
# EXAMPLE 1:
#
# 7 => ["Quests", 178, "$game_system.quest_disabled || $game_party.quests.list.empty?",
# false, Scene_Quest, "1"],
#
# This will create a command called Quests that is represented by the
# icon with index 178. It does not require actor selection and calls:
# $scene = Scene_Quest.new (1)
# when selected. The option is disabled if:
# $game_system.quest_disabled || $game_party.quests.list.empty?
# returns true. It's ID is 7, so when setting up your command list, this
# command will show up wherever you set 7 in the list
#
# EXAMPLE 2:
#
# 15 => ["Vocab::escape", 134, 5, false, 4]
# }
#
# This will create a command that is called whatever you have labelled
# the escape option in the Terms section of the database. It is
# represented by the icon with index 134. It is disabled if the switch
# with ID 5 is ON; it does not require actor selection, and it calls
# the common event with ID 4
0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
"true, false, false"],
5 => ["Vocab::game_end", 179, -1, false, Scene_End]
}
# This is where you setup the order that commands appear in the command
# window of the menu. List them by their command ID, as it is explained
# above. The default commands are:
# 0 => Item
# 1 => Skill
# 2 => Equip
# 3 => Status
# 4 => Save
# 5 => End Game
# Those can be changed by you above, if you desire, and you can always add
# more commands with whatever IDs you want. Note, however, that those
# command IDs must appear in the array below or they will NOT appear in the
# initial menu. This array can be modified in-game by the following script
# calls:
#
# add_custom_command (command_id)
# remove_custom_command (command_id)
# command_id : ID of the command being added/removed from the commands
FSCMS_COMMANDLIST = [0, 1, 2, 4, 5]
# Which optional windows ought to be created, from bottom to top?
# 0 => Gold Window
# 1 => PlayTime Window
# 2 => Steps Window
# 3 => Location Window
# 4 => Variable Window
# This array can be modified in-game by the following script calls:
#
# add_optional_window (window_id)
# remove_optional_window (window_id)
# window_id : ID of the window being added/removed from the menu
FSCMS_OPTIONAL_WINDOWS = [0, 1, 3]
#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# END EDITABLE REGION B
#//////////////////////////////////////////////////////////////////////////
end
#==============================================================================
# ** Game System
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# new instance variables - fscms_custom_commands, fscms_optional_windows
# aliased method - initialize
#==============================================================================
class Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Public Instance Variables
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_reader :fscms_command_list # Holds current array of commands in menu
attr_reader :fscms_optional_windows # Holds current array of optional windows
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias ma_fscms_intz_cstmcmmns_6hj2 initialize
def initialize (*args)
# Initialize new variables
@fscms_command_list = ModernAlgebra::FSCMS_COMMANDLIST
@fscms_optional_windows = ModernAlgebra::FSCMS_OPTIONAL_WINDOWS
ma_fscms_intz_cstmcmmns_6hj2 (*args) # Run Original Method
end
end
#==============================================================================
# ** Game Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# new methods - add_custom_command; add_optional_window;
# remove_custom_command; remove_optional_window
#==============================================================================
class Game_Interpreter
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Custom Commands Add/Remove
# id : Command ID to add or remove
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def add_custom_command (id)
$game_system.fscms_command_list.push (id) unless $game_system.fscms_command_list.include? (id)
end
def remove_custom_command (id)
$game_system.fscms_command_list.delete (id)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Optional Windows Add/Remove
# id : window ID to add or remove
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def add_optional_window (id)
$game_system.fscms_optional_windows.push (id) unless $game_system.fscms_optional_windows.include? (id)
end
def remove_optional_window (id)
$game_system.fscms_optional_windows.delete (id)
end
end
#==============================================================================
# ** Window_Gold
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# overwritten super method - draw_currency_value
#==============================================================================
class Window_Gold
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Currency Value
# value : amount to draw
# x, y : coordinates to draw at
# width : amount of room to draw
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_currency_value (value, x, y, width, *args)
if ModernAlgebra::FSCMS_GOLD_ICON >= 0
draw_icon (ModernAlgebra::FSCMS_GOLD_ICON, x, y)
x += 24
width -= 24
end
# Run Original Method
super (value, x, y, width, *args)
end
end
#==============================================================================
# ** Window MenuStatus
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This window shows the status
#==============================================================================
class Window_FSCMS_MenuStatus < Window_Status
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize (x, y)
super (nil)
self.x, self.y = x, y
self.width, self.height = Graphics.width - x, Graphics.height - y
create_contents
refresh ($game_party.last_actor_index)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Refresh
# party_actor_id : the index of the actor in the party
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def refresh (party_actor_id = nil)
return if party_actor_id == nil
@actor = $game_party.members[party_actor_id]
return if @actor == nil
super ()
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Basic Information
# x, y :coordinates to draw at
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_basic_info (x, y)
x, y = 0, 96
draw_actor_hp(@actor, x, 140, 330)
draw_actor_mp(@actor, x, y + WLH * 3, 330)
draw_actor_state(@actor, x, 110, 166)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Parameters
# x, y :coordinates to draw at
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_parameters (x, y)
super (0, 104 + 5*WLH)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Experience Information
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_exp_info(x, y)
x = 128
x += [60, Graphics.width - 544].min if Graphics.width > 544
y = 2*WLH
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
width = contents.width - x
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
tw1 = contents.text_size (Vocab::ExpTotal).width
self.contents.draw_text(x, y, 180, WLH, Vocab::ExpTotal)
tw2 = contents.text_size (s_next).width
self.contents.draw_text(x, y + WLH, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x + tw1, y, width - tw1, WLH, s1, 2)
self.contents.draw_text(x + tw2, y + WLH, width - tw2, WLH, s2, 2)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Equipment
# x, y :coordinates to draw at
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_equipments (x, y)
x = [contents.width - 188, 188].max
super (x, ModernAlgebra::FSCMS_EQUIP_Y)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Actor Name
# actor : the Game_Actor object
# x, y :coordinates to draw at
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_actor_name (actor, x, y)
x = 128
x += [60, Graphics.width - 544].min if Graphics.width > 544
super (actor, x, 0)
draw_actor_level (actor, x, WLH)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Actor Class
# actor : the Game_Actor object
# x, y :coordinates to draw at
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text (contents.width - 108, 0, 108, WLH, actor.class.name, 2)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Actor Face
# actor : the Game_Actor object
# x, y :coordinates to draw at
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_actor_face (actor, x, y)
super (actor, x, 0)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Item Name
# item : Item (skill, weapon, armor are also possible)
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# enabled : Enabled flag. When false, draw semi-transparently.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_item_name(item, x, y, enabled = true)
x -= 32
room = contents.width - x - 24
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, room, WLH, item.name)
end
end
end
#==============================================================================
# ** Window_MenuCommand
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This window shows commands in the menu
# overwritten super methods - draw_item
#==============================================================================
class Window_FSCMS_MenuCommand < Window_Command
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize(*args)
super (*args)
max_height = Graphics.height - ($game_system.fscms_optional_windows.size*(WLH + 32))
if self.height > max_height
self.height = max_height
create_contents
refresh
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Item
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_item (i, enabled = true)
rect = item_rect(i)
self.contents.clear_rect(rect)
# Draw icon
icon = ModernAlgebra::FSCMS_CUSTOM_COMMANDS[$game_system.fscms_command_list[i]][1]
draw_icon (icon, rect.x + 2, rect.y, enabled)
rect.x += 28
rect.width -= 32
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[i])
end
end
#==============================================================================
# ** Window Location
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This window shows the current location
#==============================================================================
class Window_FSCMS_Location < Window_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize (x, y)
height = 32 + WLH
y -= height
super (x, y, 160, height)
x, tw = 0, contents.width
if ModernAlgebra::FSCMS_LOCATION_ICON >= 0
draw_icon (ModernAlgebra::FSCMS_LOCATION_ICON, x, 0)
x += 24
tw -= 24
end
map_name = load_data ("Data/MapInfos.rvdata")[$game_map.map_id].name
contents.font.color = normal_color
contents.draw_text (x, 0, tw, WLH, map_name, 2)
end
end
#==============================================================================
# ** Window PlayTime
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This window shows total playtime
#==============================================================================
class Window_FSCMS_PlayTime < Window_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize (x, y)
super (x, y, 160, 32 + WLH)
refresh
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Refresh
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def refresh
self.contents.clear
x, tw = 0, contents.width
if ModernAlgebra::FSCMS_PLAYTIME_ICON >= 0
draw_icon (ModernAlgebra::FSCMS_PLAYTIME_ICON, x, 0)
x += 24
tw -= 24
end
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(x, 0, tw, WLH, text, 2)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Frame Update
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ** Window StepCount
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This window shows total number of steps party has taken
#==============================================================================
class Window_FSCMS_StepCount < Window_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize (x, y)
super (x, y, 160, 32 + WLH)
x, tw = 0, contents.width
# Draw step count icon
if ModernAlgebra::FSCMS_STEPS_ICON >= 0
draw_icon (ModernAlgebra::FSCMS_STEPS_ICON, x, 0)
x += 24
tw -= 24
end
# Draw Step Count
contents.font.color = normal_color
contents.draw_text (x, 0, tw, WLH, $game_party.steps.to_s, 2)
end
end
#==============================================================================
# ** Window Variable
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# This window shows the value of a specified variable
#==============================================================================
class Window_FSCMS_Variable < Window_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize (x, y)
super (x, y, 160, 32 + WLH)
refresh
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Refresh
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def refresh
x, tw = 0, contents.width
# Draw varibale icon
if ModernAlgebra::FSCMS_VARWINDOW_VARIABLE_ICON >= 0
draw_icon (ModernAlgebra::FSCMS_VARWINDOW_VARIABLE_ICON, x, 0)
x += 24
tw -= 24
end
# Draw Variable
text = $game_variables[ModernAlgebra::FSCMS_VARWINDOW_VARIABLE_ID].to_s
contents.font.color = normal_color
contents.draw_text (x, 0, tw, WLH, text, 2)
end
end
#==============================================================================
# ** Scene_Menu
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# completely overwritten class
#==============================================================================
class Scene_Menu < Scene_Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
# menu_index : command cursor's initial position
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def initialize(menu_index = 0, manual = false)
if manual
@menu_index = menu_index
return
elsif $scene.is_a? (Scene_Map)
@menu_index = 0
return
end
# Check where it is coming from.
$game_system.fscms_command_list.each_index { |i|
j = $game_system.fscms_command_list[i]
# If coming from this designated scene
next if ModernAlgebra::FSCMS_CUSTOM_COMMANDS[j][4].is_a? (Fixnum)
if $scene.is_a? (ModernAlgebra::FSCMS_CUSTOM_COMMANDS[j][4])
# Set menu index to its position
@menu_index = i
return
end
}
@menu_index = 0
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Start processing
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def start
super
create_menu_background
create_command_window
@status_window = Window_FSCMS_MenuStatus.new (160, 0)
@windows = [@command_window, @target_window, @status_window]
create_optional_windows
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Termination Processing
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def terminate
super
dispose_menu_background
@command_window.dispose
@status_window.dispose
@optional_windows.each { |window| window.dispose }
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Frame Update
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update
super
update_menu_background
update_command_selection
# Update Playtime if it is shown
if $game_system.fscms_optional_windows.include? (1)
@optional_windows[$game_system.fscms_optional_windows.index (1)].update
end
# If not both windows active, than update Target Window
unless ModernAlgebra::FSCMS_BOTH_WINDOWS_ACTIVE
update_actor_selection
return
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Create Command Window
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_command_window
@commands, @disabled_commands, @actor_commands = [], [], []
@scene_calls, @scene_arguments = [], []
index = 0
$game_system.fscms_command_list.each { |i|
command = ModernAlgebra::FSCMS_CUSTOM_COMMANDS[i]
name = command[0][/Vocab/i] != nil ? eval (command[0]) : command[0]
@commands.push (name)
if command[2].is_a? (String)
boolean = eval (command[2])
@disabled_commands.push (index) if boolean
else
@disabled_commands.push (index) if command[2] > 0 && $game_switches[command[2]]
end
@actor_commands.push (index) if command[3]
@scene_calls.push (command[4])
@scene_arguments.push (command[5])
index += 1
}
@command_window = Window_FSCMS_MenuCommand.new(160, @commands)
@command_window.index = @menu_index
# Disable commands
@disabled_commands.each { |index| @command_window.draw_item (index, false) }
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Create Optional Windows
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def create_optional_windows
y = Graphics.height
@optional_windows = []
$game_system.fscms_optional_windows.each { |i|
window = optional_window (i)
y -= window.height
window.y = y
@optional_windows.push (window)
}
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Optional Window
# index : index of optional window
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def optional_window (index)
return case index
when 0 then Window_Gold.new (0, 0)
when 1 then Window_FSCMS_PlayTime.new (0, 0)
when 2 then Window_FSCMS_StepCount.new (0, 0)
when 3 then Window_FSCMS_Location.new (0, 0)
when 4 then Window_FSCMS_Variable.new (0, 0)
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Command Selection
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update_command_selection
@command_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
# Return if Disabled
if @disabled_commands.include? (@command_window.index)
Sound.play_buzzer
return
end
Sound.play_decision
# Start Actor Selection if command desires actor selection
if @actor_commands.include? (@command_window.index)
start_actor_selection
else
call_next_scene
end
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Start Actor Selection
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def start_actor_selection
if ModernAlgebra::FSCMS_BOTH_WINDOWS_ACTIVE
select_actor
else
@command_window.active = false
@target_window.active = true
if $game_party.last_actor_index < @target_window.item_max
@target_window.index = $game_party.last_actor_index
else
@target_window.index = 0
end
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * End Actor Selection
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def end_actor_selection
return if ModernAlgebra::FSCMS_BOTH_WINDOWS_ACTIVE
$game_party.last_actor_index = @target_window.index
@command_window.active = true
@target_window.active = false
@target_window.index = -1
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Update Actor Selection
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
select_actor
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Select Actor
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def select_actor
Sound.play_decision
call_next_scene
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Call Next Scene
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def call_next_scene
# Call next scene
if @scene_calls[@command_window.index].is_a? (Fixnum)
# If actor selected
if @actor_commands.include? (@command_window.index)
var_id = ModernAlgebra::FSCMS_CE_ACTOR_VARIABLE_ID
$game_variables[var_id] = $game_party.members[1].id
end
# Run Common Event if Scene call is an integer
$game_temp.common_event_id = @scene_calls[@command_window.index]
$scene = Scene_Map.new
else
# Call specified scene
args = []
if @scene_arguments[@command_window.index] != nil
args = eval ("[#{@scene_arguments[@command_window.index]}]")
end
$scene = @scene_calls[@command_window.index].new (*args)
end
end
end