- Joined
- Dec 20, 2016
- Messages
- 20
- Reaction score
- 7
- First Language
- Dutch
- Primarily Uses
- RMMZ
Hi all,
I've been experimenting with the following 2 scripts (PAC Main Menu Ace 1.2 and its Compact Add-on) and I have some issues with it.
I'm wondering if
-there's a way to resize the status window to the exact same height as the commands on the left instead of a little shorter,
-putting in custom commands (the Quests part now requires to select an actor in the status screen first for an unknown reason),
-as well as displaying the 2 main characters correctly?
Thanks in advance.

I've been experimenting with the following 2 scripts (PAC Main Menu Ace 1.2 and its Compact Add-on) and I have some issues with it.
I'm wondering if
-there's a way to resize the status window to the exact same height as the commands on the left instead of a little shorter,
-putting in custom commands (the Quests part now requires to select an actor in the status screen first for an unknown reason),
-as well as displaying the 2 main characters correctly?
Thanks in advance.
#===============================================================================
#
# PAC Main Menu Ace (1.2)
# 15/7/2012
# By Pacman
#
#===============================================================================
#
# This is the PAC Main Menu converted to VX Ace. On a basic level, this offers
# a configurable setup for your main menu, allowing the user to create, alter
# and move the position of menu commands at their pleasure. It can be used
# very simply to merely reorder the default commands, or to its' fullest
# potential, that is creating commands to put custom scenes into the menu. It
# also offers two graphical features: adding an EXP gauge into the menu status
# window, and adding icons into the command display. Both are optional and
# customizable.
#
#===============================================================================
#
# ~! INSTALLATION !~
# Paste above Main, below Materials. I suggest you paste this high up in your
# custom scripts list, for technical reasons considering overwriting methods.
# There are details for configuration below.
#
#===============================================================================
#
# ~! DO NOT HESITATE TO ASK FOR HELP !~
# This can get very confusing, and there is so much you can do with this, so if
# you would like to know anything, just ask.
#
#===============================================================================
#--------------------
module PAC; module MM # <- Do not touch.
#------------------
# How to set up your menu commands:
# Below is the COMMANDS array, which holds all the commands for the menu in
# it. Within the array is a set of more arrays. Each array represents one
# command. These command arrays can contain 5 elements, which each give a
# piece of information to the script that sets up the menu. Note that each
# element must be followed by a comma or an error will occur. Make sure that
# each array begins with an open square bracket ([) and a close square bracket
# (]).
#----------
# Element 1 - The Name
# The first element of each array is the name that is displayed for that
# command on the menu. It must be written in quotation marks ('' or "").
#----------
# Element 2 - The Method
# The second element of each array is the name of the method that is executed
# when the command is selected. The method must be located in the Scene_Menu
# class. If you are planning on using this in tandem with a custom script's
# scene, you should try and find the methods necessary to open that scene.
# If a scene requires actor selection (Skill, Equip, etc.), put
# "command_personal" as the method and set the scene in element 5.
#----------
# Element 3 - The Icon
# The third element of each array is a number: the index of the icon to be
# displayed in the menu window. The index is the number displayed at the
# bottom-left of the icon selection window.
#----------
# Element 4 - The Disable Method
# The fourth element of each array is a condition which, if met, disables
# the command associated with it. The method must be located in the Scene_Menu
# class, or accessible otherwise. To disable a command with a switch, use:
# "$game_switches[x]" which will disable the command when switch with ID x is
# on. To do the same with a variable, use:
# "$game_variables[x] <=> n" which will disable the command when variable with
# ID x is <=> to n.
# This element can be ommited, or simply written as nil if you don't want one.
# It must be there if you wish to include the fifth element though.
#----------
# Element 5 - The Scene Call
# The fifth element (teehee) of each array is only required if the second
# element is set to 'command_personal'. It is the command to be executed upon
# actor selection. This is required for scenes that are specific to actors,
# namely Skill, Equip, Status and any custom scenes that are similar.
#----------
# If you have any inquiries on how to use these elements in the most effective
# way possible, or at all, ask away.
#----------
COMMANDS = [ # <- Do not touch
#----------
['Inventory', # Command Name
'command_item', # Command Method
261, # Command Icon
'main_commands_enabled'], # Disable Method
#----------
['Abilities',
'command_personal',
115,
'main_commands_enabled',
'SceneManager.call(Scene_Skill)'], # Scene Call.
#----------
['Gear',
'command_personal',
432,
'main_commands_enabled',
'SceneManager.call(Scene_Equip)'],
#----------
['Status',
'command_personal',
233,
'main_commands_enabled',
'SceneManager.call(Scene_Status)'],
#----------
['Sign',
'command_personal',
12,
'main_commands_enabled',
'SceneManager.call(Scene_Class)'],
#----------
['Quests',
'command_personal',
238,
'main_commands_enabled',
'SceneManager.call(Scene_Journal)'],
#----------
['Journal',
'command_save',
117,
'save_enabled'],
#----------
['Options',
'command_game_end',
6]
#----------
] # <- Do not touch.
#------------------
Exp_Gauge = false # Use the EXP Gauge?
Exp_Color1 = "text_color(30)" # Color 1 for EXP gauge.
Exp_Color2 = "text_color(31)" # Color 2 for EXP gauge.
Exp_a = "EXP" # Text displayed on the EXP Gauge.
Icons = true # Use icons in the menu display?
ALIGNMENT = 0 # Alignment of menu command text. 0 for left, 1 for center, 2
# for right.
Map_Window = false # Use the map window in the menu display?
Time_Window = true # Use the time window in the menu display?
Time_Height = 1 # Height of the time window.
Gold_Window = true # Use the gold window in the menu display
Gold_Correction = true # Correct the gold window's y value to fit in?
Windows_Pos = :left # Command, gold, map and time window orientation. :left
# or :right. Anything else will go to :left.
Heal_Button = :F5 # Button to fully heal the party in the menu. Set to nil if
# you don't want that. It will also clear all statuses. Only in test play, of
# course.
#--------------------
end; end
#--------------------
#===============================================================================
#
# END OF CONFIGURATION
#
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :menu_index, :menu_actor_selection
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mm_gsys_ini initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(*args)
pac_mm_gsys_ini(*args)
@menu_index = 0
@menu_actor_selection = false
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a super class of all windows within the game.
#==============================================================================
if PAC::MM::Exp_Gauge
class Window_Base < Window
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias pac_mm_wnbs_simsta draw_actor_simple_status if PAC::MM::Exp_Gauge
#--------------------------------------------------------------------------
# * Get Text Colors (writing color without the u is killing me)
#--------------------------------------------------------------------------
def exp_gauge_color1; eval PAC::MM::Exp_Color1 rescue text_color(30); end
def exp_gauge_color2; eval PAC::MM::Exp_Color2 rescue text_color(31); end
#--------------------------------------------------------------------------
# * Draw EXP
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y, width = 60)
draw_gauge(x, y, width, actor.final_exp_rate, exp_gauge_color1,
exp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, PAC::MM::Exp_a)
draw_current_and_max_values(x, y, width, actor.exp, actor.next_level_exp,
normal_color, normal_color)
end
#--------------------------------------------------------------------------
# * Draw Simple Status
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y, *args)
pac_mm_wnbs_simsta(actor, x, y, *args)
draw_actor_exp(actor, x + 58, y + line_height)
end
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays the map name on the menu screen.
#==============================================================================
class Window_MenuMap < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, fitting_height(1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
change_color(normal_color)
unless $game_map.display_name.empty?
draw_text(contents.rect, $game_map.display_name, 1)
end
end
end
#==============================================================================
# ** Window_Time
#------------------------------------------------------------------------------
# This window displays play time on the menu screen.
#==============================================================================
class Window_Time < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, fitting_height(PAC::MM::Time_Height || 1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
@time = Graphics.frame_count / Graphics.frame_rate
hour = @time / 3600
min = @time / 60 % 60
sec = @time % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
change_color(normal_color)
draw_text(contents.rect, text, 1)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
refresh if Graphics.frame_count / Graphics.frame_rate != @time
end
end
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# This command window appears on the menu screen.
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# * Initialize Command Selection Position (Class Method)
#--------------------------------------------------------------------------
def self.init_command_position(*args)
@@last_command_symbol ||= nil
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list(*args)
PAC::MM::COMMANDS.each {|c| add_command(c[0], c[0].to_sym, pac_disable(c))}
end
#--------------------------------------------------------------------------
# * Disable PAC Command
#--------------------------------------------------------------------------
def pac_disable(command)
command[3] || ''
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index, *args)
rect = item_rect_for_text(index)
if PAC::MM::Icons && PAC::MM::COMMANDS[index][2] != nil
irect = item_rect(index)
draw_icon(PAC::MM::COMMANDS[index][2], irect.x, irect.y)
rect.x += 24
end
change_color(normal_color, command_enabled?(index))
draw_text(rect, command_name(index), PAC::MM::ALIGNMENT)
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mm_start start
alias pac_mm_update update
alias pac_mm_cgw create_gold_window if PAC::MM::Gold_Correction
alias pac_mm_opc on_personal_cancel
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start(*args)
pac_mm_start
@@start_personal ||= false
if @@start_personal; @command_window.deactivate; command_personal; end
if PAC::MM::Windows_Pos == :right
@gold_window.x = Graphics.width-@gold_window.width if @gold_window != nil
@status_window.x = 0
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update(*args)
pac_mm_update(*args)
update_heal
end
#--------------------------------------------------------------------------
# * Update Heal Butten
#--------------------------------------------------------------------------
def update_heal # BUTTEN
if $TEST && PAC::MM::Heal_Button != nil &&
Input.trigger?(PAC::MM::Heal_Button)
Sound.play_recovery
$game_party.members do |actor| actor.recover_all end
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window(*args)
@command_window = Window_MenuCommand.new
PAC::MM::COMMANDS.each {|c|
@command_window.set_handler(c[0].to_sym, pac_method(c))
}
@command_window.set_handler
cancel, method
return_scene))
if PAC::MM::Windows_Pos == :right
@command_window.x = Graphics.width - @command_window.width
end
create_map_window
create_time_window
end
#--------------------------------------------------------------------------
# * Create Gold Window
#--------------------------------------------------------------------------
if PAC::MM::Gold_Correction; def create_gold_window(*args)
pac_mm_cgw(*args)
@gold_window.visible = false if !PAC::MM::Gold_Window
y = @command_window.height
y += @map_window.height if @map_window
y += @time_window.height if @time_window
@gold_window.y = y
end; end
#--------------------------------------------------------------------------
# * Create Map Window
#--------------------------------------------------------------------------
def create_map_window
x = PAC::MM::Windows_Pos ==:right ? Graphics.width-@command_window.width : 0
@map_window = Window_MenuMap.new(x, @command_window.height)
@map_window.visible = false if !PAC::MM::Map_Window
end
#--------------------------------------------------------------------------
# * Create Time Window
#--------------------------------------------------------------------------
def create_time_window
x = PAC::MM::Windows_Pos ==:right ? Graphics.width-@command_window.width : 0
y = @map_window.nil? ? @command_window.height : @map_window.height +
@map_window.y
@time_window = Window_Time.new(x, y)
@time_window.visible = fasle if !PAC::MM::Time_Window
end
#--------------------------------------------------------------------------
# * Get Method for Command
#--------------------------------------------------------------------------
def pac_method(command)
method(command[1] || '')
end
#--------------------------------------------------------------------------
# * [OK] Personal Command
#--------------------------------------------------------------------------
def on_personal_ok(*args)
@@start_personal = true
eval(PAC::MM::COMMANDS[@command_window.index][4]) rescue nil
end
#--------------------------------------------------------------------------
# * [Cancel] Personal Command
#--------------------------------------------------------------------------
def on_personal_cancel(*args)
pac_mm_opc(*args)
@command_window.activate
@@start_personal = false
end
end
($pac ||= {})[:main_menu] = 1.2
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
#
# PAC Main Menu Ace (1.2)
# 15/7/2012
# By Pacman
#
#===============================================================================
#
# This is the PAC Main Menu converted to VX Ace. On a basic level, this offers
# a configurable setup for your main menu, allowing the user to create, alter
# and move the position of menu commands at their pleasure. It can be used
# very simply to merely reorder the default commands, or to its' fullest
# potential, that is creating commands to put custom scenes into the menu. It
# also offers two graphical features: adding an EXP gauge into the menu status
# window, and adding icons into the command display. Both are optional and
# customizable.
#
#===============================================================================
#
# ~! INSTALLATION !~
# Paste above Main, below Materials. I suggest you paste this high up in your
# custom scripts list, for technical reasons considering overwriting methods.
# There are details for configuration below.
#
#===============================================================================
#
# ~! DO NOT HESITATE TO ASK FOR HELP !~
# This can get very confusing, and there is so much you can do with this, so if
# you would like to know anything, just ask.
#
#===============================================================================
#--------------------
module PAC; module MM # <- Do not touch.
#------------------
# How to set up your menu commands:
# Below is the COMMANDS array, which holds all the commands for the menu in
# it. Within the array is a set of more arrays. Each array represents one
# command. These command arrays can contain 5 elements, which each give a
# piece of information to the script that sets up the menu. Note that each
# element must be followed by a comma or an error will occur. Make sure that
# each array begins with an open square bracket ([) and a close square bracket
# (]).
#----------
# Element 1 - The Name
# The first element of each array is the name that is displayed for that
# command on the menu. It must be written in quotation marks ('' or "").
#----------
# Element 2 - The Method
# The second element of each array is the name of the method that is executed
# when the command is selected. The method must be located in the Scene_Menu
# class. If you are planning on using this in tandem with a custom script's
# scene, you should try and find the methods necessary to open that scene.
# If a scene requires actor selection (Skill, Equip, etc.), put
# "command_personal" as the method and set the scene in element 5.
#----------
# Element 3 - The Icon
# The third element of each array is a number: the index of the icon to be
# displayed in the menu window. The index is the number displayed at the
# bottom-left of the icon selection window.
#----------
# Element 4 - The Disable Method
# The fourth element of each array is a condition which, if met, disables
# the command associated with it. The method must be located in the Scene_Menu
# class, or accessible otherwise. To disable a command with a switch, use:
# "$game_switches[x]" which will disable the command when switch with ID x is
# on. To do the same with a variable, use:
# "$game_variables[x] <=> n" which will disable the command when variable with
# ID x is <=> to n.
# This element can be ommited, or simply written as nil if you don't want one.
# It must be there if you wish to include the fifth element though.
#----------
# Element 5 - The Scene Call
# The fifth element (teehee) of each array is only required if the second
# element is set to 'command_personal'. It is the command to be executed upon
# actor selection. This is required for scenes that are specific to actors,
# namely Skill, Equip, Status and any custom scenes that are similar.
#----------
# If you have any inquiries on how to use these elements in the most effective
# way possible, or at all, ask away.
#----------
COMMANDS = [ # <- Do not touch
#----------
['Inventory', # Command Name
'command_item', # Command Method
261, # Command Icon
'main_commands_enabled'], # Disable Method
#----------
['Abilities',
'command_personal',
115,
'main_commands_enabled',
'SceneManager.call(Scene_Skill)'], # Scene Call.
#----------
['Gear',
'command_personal',
432,
'main_commands_enabled',
'SceneManager.call(Scene_Equip)'],
#----------
['Status',
'command_personal',
233,
'main_commands_enabled',
'SceneManager.call(Scene_Status)'],
#----------
['Sign',
'command_personal',
12,
'main_commands_enabled',
'SceneManager.call(Scene_Class)'],
#----------
['Quests',
'command_personal',
238,
'main_commands_enabled',
'SceneManager.call(Scene_Journal)'],
#----------
['Journal',
'command_save',
117,
'save_enabled'],
#----------
['Options',
'command_game_end',
6]
#----------
] # <- Do not touch.
#------------------
Exp_Gauge = false # Use the EXP Gauge?
Exp_Color1 = "text_color(30)" # Color 1 for EXP gauge.
Exp_Color2 = "text_color(31)" # Color 2 for EXP gauge.
Exp_a = "EXP" # Text displayed on the EXP Gauge.
Icons = true # Use icons in the menu display?
ALIGNMENT = 0 # Alignment of menu command text. 0 for left, 1 for center, 2
# for right.
Map_Window = false # Use the map window in the menu display?
Time_Window = true # Use the time window in the menu display?
Time_Height = 1 # Height of the time window.
Gold_Window = true # Use the gold window in the menu display
Gold_Correction = true # Correct the gold window's y value to fit in?
Windows_Pos = :left # Command, gold, map and time window orientation. :left
# or :right. Anything else will go to :left.
Heal_Button = :F5 # Button to fully heal the party in the menu. Set to nil if
# you don't want that. It will also clear all statuses. Only in test play, of
# course.
#--------------------
end; end
#--------------------
#===============================================================================
#
# END OF CONFIGURATION
#
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :menu_index, :menu_actor_selection
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mm_gsys_ini initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(*args)
pac_mm_gsys_ini(*args)
@menu_index = 0
@menu_actor_selection = false
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a super class of all windows within the game.
#==============================================================================
if PAC::MM::Exp_Gauge
class Window_Base < Window
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias pac_mm_wnbs_simsta draw_actor_simple_status if PAC::MM::Exp_Gauge
#--------------------------------------------------------------------------
# * Get Text Colors (writing color without the u is killing me)
#--------------------------------------------------------------------------
def exp_gauge_color1; eval PAC::MM::Exp_Color1 rescue text_color(30); end
def exp_gauge_color2; eval PAC::MM::Exp_Color2 rescue text_color(31); end
#--------------------------------------------------------------------------
# * Draw EXP
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y, width = 60)
draw_gauge(x, y, width, actor.final_exp_rate, exp_gauge_color1,
exp_gauge_color2)
change_color(system_color)
draw_text(x, y, 30, line_height, PAC::MM::Exp_a)
draw_current_and_max_values(x, y, width, actor.exp, actor.next_level_exp,
normal_color, normal_color)
end
#--------------------------------------------------------------------------
# * Draw Simple Status
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y, *args)
pac_mm_wnbs_simsta(actor, x, y, *args)
draw_actor_exp(actor, x + 58, y + line_height)
end
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays the map name on the menu screen.
#==============================================================================
class Window_MenuMap < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, fitting_height(1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
change_color(normal_color)
unless $game_map.display_name.empty?
draw_text(contents.rect, $game_map.display_name, 1)
end
end
end
#==============================================================================
# ** Window_Time
#------------------------------------------------------------------------------
# This window displays play time on the menu screen.
#==============================================================================
class Window_Time < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, fitting_height(PAC::MM::Time_Height || 1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
@time = Graphics.frame_count / Graphics.frame_rate
hour = @time / 3600
min = @time / 60 % 60
sec = @time % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
change_color(normal_color)
draw_text(contents.rect, text, 1)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
refresh if Graphics.frame_count / Graphics.frame_rate != @time
end
end
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# This command window appears on the menu screen.
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# * Initialize Command Selection Position (Class Method)
#--------------------------------------------------------------------------
def self.init_command_position(*args)
@@last_command_symbol ||= nil
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list(*args)
PAC::MM::COMMANDS.each {|c| add_command(c[0], c[0].to_sym, pac_disable(c))}
end
#--------------------------------------------------------------------------
# * Disable PAC Command
#--------------------------------------------------------------------------
def pac_disable(command)
command[3] || ''
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index, *args)
rect = item_rect_for_text(index)
if PAC::MM::Icons && PAC::MM::COMMANDS[index][2] != nil
irect = item_rect(index)
draw_icon(PAC::MM::COMMANDS[index][2], irect.x, irect.y)
rect.x += 24
end
change_color(normal_color, command_enabled?(index))
draw_text(rect, command_name(index), PAC::MM::ALIGNMENT)
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mm_start start
alias pac_mm_update update
alias pac_mm_cgw create_gold_window if PAC::MM::Gold_Correction
alias pac_mm_opc on_personal_cancel
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start(*args)
pac_mm_start
@@start_personal ||= false
if @@start_personal; @command_window.deactivate; command_personal; end
if PAC::MM::Windows_Pos == :right
@gold_window.x = Graphics.width-@gold_window.width if @gold_window != nil
@status_window.x = 0
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update(*args)
pac_mm_update(*args)
update_heal
end
#--------------------------------------------------------------------------
# * Update Heal Butten
#--------------------------------------------------------------------------
def update_heal # BUTTEN
if $TEST && PAC::MM::Heal_Button != nil &&
Input.trigger?(PAC::MM::Heal_Button)
Sound.play_recovery
$game_party.members do |actor| actor.recover_all end
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window(*args)
@command_window = Window_MenuCommand.new
PAC::MM::COMMANDS.each {|c|
@command_window.set_handler(c[0].to_sym, pac_method(c))
}
@command_window.set_handler
if PAC::MM::Windows_Pos == :right
@command_window.x = Graphics.width - @command_window.width
end
create_map_window
create_time_window
end
#--------------------------------------------------------------------------
# * Create Gold Window
#--------------------------------------------------------------------------
if PAC::MM::Gold_Correction; def create_gold_window(*args)
pac_mm_cgw(*args)
@gold_window.visible = false if !PAC::MM::Gold_Window
y = @command_window.height
y += @map_window.height if @map_window
y += @time_window.height if @time_window
@gold_window.y = y
end; end
#--------------------------------------------------------------------------
# * Create Map Window
#--------------------------------------------------------------------------
def create_map_window
x = PAC::MM::Windows_Pos ==:right ? Graphics.width-@command_window.width : 0
@map_window = Window_MenuMap.new(x, @command_window.height)
@map_window.visible = false if !PAC::MM::Map_Window
end
#--------------------------------------------------------------------------
# * Create Time Window
#--------------------------------------------------------------------------
def create_time_window
x = PAC::MM::Windows_Pos ==:right ? Graphics.width-@command_window.width : 0
y = @map_window.nil? ? @command_window.height : @map_window.height +
@map_window.y
@time_window = Window_Time.new(x, y)
@time_window.visible = fasle if !PAC::MM::Time_Window
end
#--------------------------------------------------------------------------
# * Get Method for Command
#--------------------------------------------------------------------------
def pac_method(command)
method(command[1] || '')
end
#--------------------------------------------------------------------------
# * [OK] Personal Command
#--------------------------------------------------------------------------
def on_personal_ok(*args)
@@start_personal = true
eval(PAC::MM::COMMANDS[@command_window.index][4]) rescue nil
end
#--------------------------------------------------------------------------
# * [Cancel] Personal Command
#--------------------------------------------------------------------------
def on_personal_cancel(*args)
pac_mm_opc(*args)
@command_window.activate
@@start_personal = false
end
end
($pac ||= {})[:main_menu] = 1.2
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
#===============================================================================
#
# PAC Main Menu Ace - Compact Display Addon (1.0)
# 16/7/2012
# By Pacman
#
#===============================================================================
#
# This is the Compact Display Addon for the PAC Main Menu Ace. This script
# requires PAC Main Menu Ace to work. This is a graphical change to the menu,
# "compacting" the menu screen to only display the status window when required.
# The extra windows (the gold, map and playtime windows) can now by closed by
# pressing a designated button.
#
#===============================================================================
#------------------------------------
module PAC; module MM; module Compact # <- Do not touch.
#----------------------------------
Use_Compact = true # Use the compact menu?
Show_Extras = true # Show the extra display windows when the menu opens?
Show_Button = :X # Button used to open and close the extra windows.
Move_Speed = 10 # Number of pixels per second the windows move when
# sliding.
#------------------------------------
end; end; end
#------------------------------------
#===============================================================================
#
# END OF CONFIGURATION
#
#===============================================================================
if PAC::MM::Compact::Use_Compact
if !($pac ||= {})[:main_menu] || $pac[:main_menu] < 1.2
msgbox "You require the PAC MM 1.2 base script to use the Compact Addon."
exit
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :menu_window_vis
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mmc_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(*args)
pac_mmc_initialize(*args)
@menu_window_vis = PAC::MM::Compact::Show_Extras
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mmc_start start
alias pac_mmc_comper command_personal
alias pac_mmc_comfor command_formation
alias pac_mmc_opc on_personal_cancel
alias pac_mmc_ofc on_formation_cancel
alias pac_mmc_update update
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start(*args)
#----------- Original Method
pac_mmc_start(*args)
#----------- Setup window visibility
if $game_system.menu_window_vis == false
@gold_window.openness = @time_window.openness = @map_window.openness = 0
end
#----------- Setup window coordinates (y)
@command_window.y = (Graphics.height - @command_window.height) / 2
@map_window.y = @command_window.height + @command_window.y
@gold_window.y = @map_window.y
@gold_window.y += @map_window.height if PAC::MM::Map_Window
@time_window.y = @command_window.y - @time_window.height
@status_window.y = @command_window.y - @time_window.height
#----------- Setup window coordinates (x)
@windows = [@command_window, @gold_window, @time_window, @map_window]
unless @@start_personal
@status_window.hide
@status_window.openness = 0
@windows.each do |window| window.x = (Graphics.width -
@command_window.width) / 2 end
else
@windows.each do |window| window.x = PAC::MM::Windows_Pos == :right ?
Graphics.width - @command_window.width : 0 end
end
end
#--------------------------------------------------------------------------
# * [Skill], [Equipment] and [Status] Commands
#--------------------------------------------------------------------------
def command_personal(*args)
pac_mmc_open_status
pac_mmc_comper(*args)
end
#--------------------------------------------------------------------------
# * [Cancel] Personal Command
#--------------------------------------------------------------------------
def on_personal_cancel(*args)
pac_mmc_close_status
pac_mmc_opc(*args)
end
#--------------------------------------------------------------------------
# * [Formation] Command
#--------------------------------------------------------------------------
def command_formation(*args)
pac_mmc_open_status
pac_mmc_comfor(*args)
end
#--------------------------------------------------------------------------
# * Formation [Cancel]
#--------------------------------------------------------------------------
def on_formation_cancel(*args)
pac_mmc_close_status
pac_mmc_ofc(*args)
end
#--------------------------------------------------------------------------
# * Open Status Window
#--------------------------------------------------------------------------
def pac_mmc_open_status
c = 0
c = Graphics.width - @command_window.width if PAC::MM::Windows_Pos == :right
unless @command_window.x == c
s = PAC::MM::Compact::Move_Speed
s *= -1 if PAC::MM::Windows_Pos != :right
c = 0
c = Graphics.width - @command_window.width if PAC::MM::Windows_Pos == :right
begin
@windows.each do |window| window.x += s end
Graphics.update
end until PAC::MM::Windows_Pos == :right ? @command_window.x >= c :
@command_window.x <= c
@windows.each do |window| window.x = c end
end
@status_window.show if @status_window.visible == false
@status_window.open if @status_window.openness == 0
end
#--------------------------------------------------------------------------
# * Close Status Window
#--------------------------------------------------------------------------
def pac_mmc_close_status
@status_window.close
begin; @status_window.update; Graphics.update
end until @status_window.openness == 0
s = PAC::MM::Compact::Move_Speed
s *= -1 if PAC::MM::Windows_Pos == :right
c = (Graphics.width - @command_window.width) / 2
begin
@windows.each do |window| window.x += s end
Graphics.update
end until PAC::MM::Windows_Pos == :right ? @command_window.x <= c :
@command_window.x >= c
@windows.each do |window| window.x = c end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update(*args)
pac_mmc_update(*args)
update_window_vis
end
#--------------------------------------------------------------------------
# * Update Window Visibility
#--------------------------------------------------------------------------
def update_window_vis
if PAC::MM::Compact::Show_Button != nil &&
Input.trigger?(PAC::MM::Compact::Show_Button)
Sound.play_cursor
win = [@gold_window, @map_window, @time_window]
if @gold_window.open?
win.each do |window| window.close end
$game_system.menu_window_vis = false
else
win.each do |window| window.open end
$game_system.menu_window_vis = true
end
end
end
end
$pac[:compact] = 1.0
end
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
#
# PAC Main Menu Ace - Compact Display Addon (1.0)
# 16/7/2012
# By Pacman
#
#===============================================================================
#
# This is the Compact Display Addon for the PAC Main Menu Ace. This script
# requires PAC Main Menu Ace to work. This is a graphical change to the menu,
# "compacting" the menu screen to only display the status window when required.
# The extra windows (the gold, map and playtime windows) can now by closed by
# pressing a designated button.
#
#===============================================================================
#------------------------------------
module PAC; module MM; module Compact # <- Do not touch.
#----------------------------------
Use_Compact = true # Use the compact menu?
Show_Extras = true # Show the extra display windows when the menu opens?
Show_Button = :X # Button used to open and close the extra windows.
Move_Speed = 10 # Number of pixels per second the windows move when
# sliding.
#------------------------------------
end; end; end
#------------------------------------
#===============================================================================
#
# END OF CONFIGURATION
#
#===============================================================================
if PAC::MM::Compact::Use_Compact
if !($pac ||= {})[:main_menu] || $pac[:main_menu] < 1.2
msgbox "You require the PAC MM 1.2 base script to use the Compact Addon."
exit
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :menu_window_vis
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mmc_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(*args)
pac_mmc_initialize(*args)
@menu_window_vis = PAC::MM::Compact::Show_Extras
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# Alias listing
#--------------------------------------------------------------------------
alias pac_mmc_start start
alias pac_mmc_comper command_personal
alias pac_mmc_comfor command_formation
alias pac_mmc_opc on_personal_cancel
alias pac_mmc_ofc on_formation_cancel
alias pac_mmc_update update
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start(*args)
#----------- Original Method
pac_mmc_start(*args)
#----------- Setup window visibility
if $game_system.menu_window_vis == false
@gold_window.openness = @time_window.openness = @map_window.openness = 0
end
#----------- Setup window coordinates (y)
@command_window.y = (Graphics.height - @command_window.height) / 2
@map_window.y = @command_window.height + @command_window.y
@gold_window.y = @map_window.y
@gold_window.y += @map_window.height if PAC::MM::Map_Window
@time_window.y = @command_window.y - @time_window.height
@status_window.y = @command_window.y - @time_window.height
#----------- Setup window coordinates (x)
@windows = [@command_window, @gold_window, @time_window, @map_window]
unless @@start_personal
@status_window.hide
@status_window.openness = 0
@windows.each do |window| window.x = (Graphics.width -
@command_window.width) / 2 end
else
@windows.each do |window| window.x = PAC::MM::Windows_Pos == :right ?
Graphics.width - @command_window.width : 0 end
end
end
#--------------------------------------------------------------------------
# * [Skill], [Equipment] and [Status] Commands
#--------------------------------------------------------------------------
def command_personal(*args)
pac_mmc_open_status
pac_mmc_comper(*args)
end
#--------------------------------------------------------------------------
# * [Cancel] Personal Command
#--------------------------------------------------------------------------
def on_personal_cancel(*args)
pac_mmc_close_status
pac_mmc_opc(*args)
end
#--------------------------------------------------------------------------
# * [Formation] Command
#--------------------------------------------------------------------------
def command_formation(*args)
pac_mmc_open_status
pac_mmc_comfor(*args)
end
#--------------------------------------------------------------------------
# * Formation [Cancel]
#--------------------------------------------------------------------------
def on_formation_cancel(*args)
pac_mmc_close_status
pac_mmc_ofc(*args)
end
#--------------------------------------------------------------------------
# * Open Status Window
#--------------------------------------------------------------------------
def pac_mmc_open_status
c = 0
c = Graphics.width - @command_window.width if PAC::MM::Windows_Pos == :right
unless @command_window.x == c
s = PAC::MM::Compact::Move_Speed
s *= -1 if PAC::MM::Windows_Pos != :right
c = 0
c = Graphics.width - @command_window.width if PAC::MM::Windows_Pos == :right
begin
@windows.each do |window| window.x += s end
Graphics.update
end until PAC::MM::Windows_Pos == :right ? @command_window.x >= c :
@command_window.x <= c
@windows.each do |window| window.x = c end
end
@status_window.show if @status_window.visible == false
@status_window.open if @status_window.openness == 0
end
#--------------------------------------------------------------------------
# * Close Status Window
#--------------------------------------------------------------------------
def pac_mmc_close_status
@status_window.close
begin; @status_window.update; Graphics.update
end until @status_window.openness == 0
s = PAC::MM::Compact::Move_Speed
s *= -1 if PAC::MM::Windows_Pos == :right
c = (Graphics.width - @command_window.width) / 2
begin
@windows.each do |window| window.x += s end
Graphics.update
end until PAC::MM::Windows_Pos == :right ? @command_window.x <= c :
@command_window.x >= c
@windows.each do |window| window.x = c end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update(*args)
pac_mmc_update(*args)
update_window_vis
end
#--------------------------------------------------------------------------
# * Update Window Visibility
#--------------------------------------------------------------------------
def update_window_vis
if PAC::MM::Compact::Show_Button != nil &&
Input.trigger?(PAC::MM::Compact::Show_Button)
Sound.play_cursor
win = [@gold_window, @map_window, @time_window]
if @gold_window.open?
win.each do |window| window.close end
$game_system.menu_window_vis = false
else
win.each do |window| window.open end
$game_system.menu_window_vis = true
end
end
end
end
$pac[:compact] = 1.0
end
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================

Last edited by a moderator: