Go into Scene_Menu and look at the method that creates the 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
See that list, s1 - s6? Let's look at the first one.
That defines the first command in your list. Since its name could be different, depending on how the user has changed the vocabulary, it looks to the string saved in the Vocab module under the method Item. However, we don't really need to do that. If you want to append your new World Map command to the bottom of the list, then go ahead and add another s at the end of your list. Something like this would work.
If you're not trying to call a variable or method, it's important to use those quotes. That's the first change you'll need to make. You then need to look at this line:
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
Now, what that's actually doing is building a window from a template. The part you need to look at right now is the array in that call.
Since you're wanting a seventh command, you'll need to add a seventh item to the array.
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s4, s6, s7])
Congratulations, at this point, your command window now shows you a seventh option, "World Map."
Unfortunately, it doesn't do anything yet.
In order to fix that, we need to go farther down. Let's look at the very next method.
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_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end
The important part here is after "case @command_window.index". It's a simple series of statements based on where the cursor is in the window. The first command will return the index 0, and it counts up from there. Thus, when the index is 5, it's on s6, or End Game. You'll need to tack in a "when 6", followed by whatever you actually want it to do.
Say, for instance, you have a Scene_Show_WorldMap already built that you want to use. Your new version of the method could look something like this:
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_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
when 6 # World Map
$scene = Scene_Show_WorldMap.new
end
end
end
For ease of editing and problem-solving, you should do it not in the default script, but under Materials in a new script. It should look something like this:
class Scene_Menu
#--------------------------------------------------------------------------
# * 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
s7 = "World Map"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@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_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
when 6 # World Map
$scene = Scene_Show_WorldMap.new
end
end
end
end
This overwrites those two methods for Scene_Menu, and your menu now shows the new item and does something with it when it's selected.
Of course, this is assuming that you already have a Scene_Show_WorldMap to be called. That, however, is not what we're here for.
Please let me know if I've been unclear on how to go about adding an option to the menu.