Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Add a Menu Option

I made a script for that, but since you are asking for support I won't pos it here :P

If you go in Scene_Menu, at line 53 you will find the create_command_window_method. In there, there's a couple of variable representing the menu commands. Then, there's this line:
Code:
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
It creates the command window with the 6 default menu commands.

The first thing you need to do is to create another variable, like
Code:
s7 = 'Job'
and change the line where the window is created for this:
Code:
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s7, s5, s6])

Now, you will have the Job command in the main menu. But you're not done yet. This command will bring you to the save screen because it kinda took the place of the save command.

Next step, go to the update_command_selection method and change this
Code:
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
for this
Code:
case @command_window.index
when 0      # Item
   $scene = Scene_Item.new
when 1,2,3  # Skill, equipment, status
    start_actor_selection
when 4      # Job
    # your code here
when 5      # Save
    $scene = Scene_File.new(true, false, false)
when 6      # End Game
    $scene = Scene_End.new
end
Notice "when 4", the original index of the save command was 4 and so, when the cursor is at index 4, it will open the save menu. Now, there's no code there. You'll have to put your own code to open your Job scene.

Hope it helps!
-Dargor
 

Giam

Member

Thank you so much. I see what I was doing wrong. I had it as s7 so under "case @command_window.index" I would put "when 7" obviously this was not the right thing to do haha. Thanks again man, I can't believe I missed that.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top