Okay, thing is, I'm trying to change the main menu to show Data and Change Party instead of Save and Game End. Data opens the Scene_End menu where I have changed the options to Save, Load and To Title. Change Party opens the Scene_Party window, this belongs to a script I'm using, Party Selector from Prexus.
I already got far with it, the only problem I ended up with was that Save and Load both had the name Data under the Data menu, I know why this is, it's because they're both using the same vocal or whatever. I don't know how to make a new vocal and such.
But now I think I've ruined everything, since whenever I open the Data menu now, a message telling me a variable in line 14, create command window is not recognized, I have no idea how that happened. If I copy the default Scene_Menu script into my new one, everything runs fine. I think it's best to understand if I show you the scripts I'm using. I'm using KGC Categorize Items and ForceStop Victory Theme scripts, which shouldn't be a problem but under materials, I have Change Main Menu (my new script where I just copied the original Scene_Menu script and changed the options (see below) and I'm also using a script to show Progress, Steps and Gameplay time (which I've edited) from Companion Wulf, which supposedly overwrites Scene_Menu. Lastly I have the Party Change script.
I hope somebody understands by checking the scripts.
This is how my menu should look like:
Items
Skills
Equip
Status
Data
Change Party
So a rundown on the problems:
1. When I open Data in the Main menu it says that a variable create command window is lost or something. It's in line 14. This doesn't happen if I copy the default Scene_Menu script into my Change Menu script, I just don't understand what causes this.
2. When Save is disabled, the Data command in the main menu get's disabled. But I want to have that available and rather disable the Save option under the Scene_End menu. I know this is due to this:
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
I tried cutting this into the Scene_End script but to no avail. I think this is actually where problem 1 came up
3. This is as far as I got. I managed to get the Data option to open the Scene_End window. I want it to show three options...Save, Load and To Title. I got everything to work but both Save and Load are called Data. Again, I know what is causing this, just don't know how to change this. So now, the options in the window are : Data, Data, To Title.
Lastly here are the scripts I guess are relevant:
(I'm supposed to put this in a codebox right? Gee, I hope so)
Scene_End:
CODE
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# This class performs game end screen processing.
#==============================================================================
class Scene_End < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
end
#--------------------------------------------------------------------------
# * Post-Start Processing
#--------------------------------------------------------------------------
def post_start
super
open_command_window
end
#--------------------------------------------------------------------------
# * Pre-termination Processing
#--------------------------------------------------------------------------
def pre_terminate
super
close_command_window
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_command_window
dispose_menu_background
end
#--------------------------------------------------------------------------
# * Return to Original Screen
#--------------------------------------------------------------------------
def return_scene
$scene = Scene_Menu.new(5)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::C)
case @command_window.index
when 0 # save
$scene = Scene_File.new(true, false, false)
when 1 # load
$scene = Scene_File.new(false, true, true)
when 2 # to title
command_to_title
when 3 # quit
command_cancel
end
end
#--------------------------------------------------------------------------
# * Update Background for Menu Screen
#--------------------------------------------------------------------------
def update_menu_background
super
@menuback_sprite.tone.set(0, 0, 0, 128)
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::save
s2 = Vocab::save
s3 = Vocab::to_title
s4 = Vocab::cancel
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = (416 - @command_window.height) / 2
@command_window.openness = 0
end
#--------------------------------------------------------------------------
# * Dispose of Command Window
#--------------------------------------------------------------------------
def dispose_command_window
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Open Command Window
#--------------------------------------------------------------------------
def open_command_window
@command_window.open
begin
@command_window.update
Graphics.update
end until @command_window.openness == 255
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
#--------------------------------------------------------------------------
# * Process When Choosing [To Title] Command
#--------------------------------------------------------------------------
def command_to_title
Sound.play_decision
RPG::BGM.fade(800)
RPG::BGS.fade(800)
RPG::ME.fade(800)
$scene = Scene_Title.new
close_command_window
Graphics.fadeout(60)
end
#--------------------------------------------------------------------------
# * Process When Choosing [Shutdown] Command
#--------------------------------------------------------------------------
def command_shutdown
Sound.play_decision
RPG::BGM.fade(800)
RPG::BGS.fade(800)
RPG::ME.fade(800)
$scene = nil
end
#--------------------------------------------------------------------------
# * Process When Choosing [Cancel] Command
#--------------------------------------------------------------------------
def command_cancel
Sound.play_decision
return_scene
end
end
end
Change Menu (under Materials):
CODE
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
start_actor_selection
when 4 # Save
$scene = Scene_End.new
when 5 # End Game
$scene = Scene_Party.new
end
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_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)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # skill
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
Progress/Steps etc window (should be pretty much the same as the Change Main menu script):
CODE
#===============================================================================
# Window_GameProgress RMVX
#-------------------------------------------------------------------------------
# Logs the progress of game completion and displays it as a percentage.
#-------------------------------------------------------------------------------
# Author: Companion Wulf
# Update: 21 December 2009
#
# Scene_Menu has been overwritten.
#
# Window_PlayTime and Window_Steps have been added and modified so that the
# Window_GameProgress window will fit into the Status screen.
#
#-------------------------------------------------------------------------------
# ** Instructions of Use
#-------------------------------------------------------------------------------
# To add to the progress, use:
#
# $game_variables[1] += 1
#
# This will then update the progress completion percentage on the Status
# screen.
#===============================================================================
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@progress_window = Window_GameProgress.new(0, 175)
@steps_window = Window_Steps.new(0, 240)
@arions_window = Window_Arions.new(0, 300)
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@progress_window.dispose
@steps_window.dispose
@arions_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@progress_window.update
@steps_window.update
@arions_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
start_actor_selection
when 4 # Save
$scene = Scene_End.new
when 5 # Change Party
$scene = Scene_Party.new
end
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_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)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # skill
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
$scene = Scene_Status.new(@status_window.index)
end
end
end
#==============================================================================
# ** Window_GameProgress
#------------------------------------------------------------------------------
# This produces the window for displaying the game process.
#==============================================================================
class Window_GameProgress < Window_Base
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, 58)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 18
refresh
end
#--------------------------------------------------------------------------
# Draws percentage
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Progress")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, $game_variables[1].to_s + "%", 2)
end
end
#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
# This window displays play time on the menu screen.
#==============================================================================
class Window_Arions < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 18
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Arions: /50 ")
self.contents.draw_text(4, 0, 120, 32, $game_variables[2].to_s, 1)
self.contents.font.color = normal_color
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ** Window_Steps
#------------------------------------------------------------------------------
# This window displays step count on the menu screen.
#==============================================================================
class Window_Steps < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, 58)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 18
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Steps")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, $game_party.steps.to_s, 2)
end
end
end
Thanks in advance for any help you can give me. Go ahead and ask me to explain better. This is my first topic and I'm a beginner, but doing pretty darn good for such. I hope I'm posting this correctly.
is it just me or are the code windows way too small?
Oh yeah and there's more.
4: When I exit the Load screen without loading a file, my game jumps to the Title screen. Again I know why, but the problem....how can I make it go to the title when loading from the title screen and jump back to Data when I cancel from there???
This post has been edited by Siggi Trust: Dec 7 2011, 05:41 PM