Pause menu edit?

Hi,


I was wondering how can I remove things like Formation and Skills from pause menu? Can I do it vie program or do I need to use any scripts? If so what could be good one?



Thanks in advance!
To remove the commands entirely from the menu you will need a script but it's a really easy one, so just plug this in a new slot below Materials and above Main in the script editor. If you need any other commands besides Skills and Formation removed, just let me know and I can fix it for you //rmwforums.s3.amazonaws.com/emoticons/default_biggrin.gif

Code:
class Window_MenuCommand
  #--------------------------------------------------------------------------
  # * Add Main Commands to List
  #--------------------------------------------------------------------------
  def add_main_commands
    add_command(Vocab::item,   :item,   main_commands_enabled)
    #add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end

  #--------------------------------------------------------------------------
  # * Add Main Commands
  #--------------------------------------------------------------------------

  def make_command_list    
    add_main_commands    
    ##add_formation_command    
    add_original_commands    
    add_save_command    
    add_game_end_command  
  end    
  
  #--------------------------------------------------------------------------
  # * Define and add formation command
  #--------------------------------------------------------------------------

  def add_formation_command    
    ##add_command(Vocab::formation, :formation, formation_enabled)  end   def formation_enabled    ##$game_party.members.size >= 2 && !$game_system.formation_disabled  end  end
  end
end
To remove the commands entirely from the menu you will need a script but it's a really easy one, so just plug this in a new slot below Materials and above Main in the script editor. If you need any other commands besides Skills and Formation removed, just let me know and I can fix it for you [IMG]//rmwforums.s3.amazonaws.com/emoticons/default_biggrin.gif[/IMG]

Code:
class Window_MenuCommand
  #--------------------------------------------------------------------------
  # * Add Main Commands to List
  #--------------------------------------------------------------------------
  def add_main_commands
    add_command(Vocab::item,   :item,   main_commands_enabled)
    #add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end

  #--------------------------------------------------------------------------
  # * Add Main Commands
  #--------------------------------------------------------------------------

  def make_command_list    
    add_main_commands    
    ##add_formation_command    
    add_original_commands    
    add_save_command    
    add_game_end_command  
  end    
  
  #--------------------------------------------------------------------------
  # * Define and add formation command
  #--------------------------------------------------------------------------

  def add_formation_command    
    ##add_command(Vocab::formation, :formation, formation_enabled)  end   def formation_enabled    ##$game_party.members.size >= 2 && !$game_system.formation_disabled  end  end
  end
end



Thanks, works!



Would you mind explaining what is doing what here? [IMG]//rmwforums.s3.amazonaws.com/emoticons/default_smile.gif[/IMG] I would also like to learn a bit so I can make scripts my self in future too! [IMG]//rmwforums.s3.amazonaws.com/emoticons/default_smile.gif[/IMG]
@44K I'm no expert, but I'll try to explain as best I can //rmwforums.s3.amazonaws.com/emoticons/default_biggrin.gif (this is how I learned too, by messing with menus)


First off I'll note that this could've just been done by finding the lines above and commenting them out in the default scripts, but it is easier and more manageable to make it its own little scriptlet. If anything goes wrong, you don't have to go looking for all the things you changed, potentially across multiple default scripts.


The first thing I did was go into the script editor and look at the default script that controls the menu commands. It is Window_MenuCommand, and it starts out like this -

Code:
class Window_MenuCommand < Window_Command

which basically just defines that the class Window_MenuCommand is a child of Window_Command and will inherit some properties from Window_Command. Since we're just editing some properties of Window_MenuCommand, we only put

Code:
class Window_MenuCommand

into our script.


Looking in Window_MenuCommand, around line 36 there should be a command list (there is a comment saying "Create Command List" just above it). This calls the commands you see on the menu screen. The script here looks like this -


def make_command_list
add_main_commands
add_formation_command
add_original_commands
add_save_command
add_game_end_command
end


So I copy and paste that into my separate script under materials. Now, you'd think that you'd just be able to comment that out by putting a hashtag sign before the appropriate lines. But there's no place here to comment out the skills command. So where is it? Well, the first thing this command list does is call add_main_commands. If you scroll down a bit you will see that just below the command list, there is this code -

Code:
 def add_main_commands
    add_command(Vocab::item,   :item,   main_commands_enabled)
    add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end

This is where the add_main_commands called in the command list is defined. Here, we have each main command defined and added to the menu. Now, like I said, I'm no expert and I'm not exactly sure how these are set up, but here's what I think this does - add_command does just that, adds a command to the command list. Then Vocab::item or Vocab::skill or any of the others calls the appropriate terminology from the Vocab module up at the very top of the script editor. Because item, equip, skill, and status can all be called different things depending on user choice in the editor, they aren't set strings of text as if you were adding a command yourself to the list. Next I believe it's calling the handler of the item command, which is defined in Scene_Menu, around line 48. It sets the handler for items and I believe that is what :item refers to. main_commands_enabled refers to a piece of code a bit down in Window_MenuCommands, around line 78, which makes sure the game party exists and determines whether or not the main commands should be shown.


So just copy-paste this over to the script and comment out the line for skills. Now, it should work but just to be sure formation cannot come back, copy-paste

Code:
  def add_formation_command
    add_command(Vocab::formation, :formation, formation_enabled)
  end

from Window_MenuCommand around line 55 over to your script and comment out the add_command line, while leaving the other two lines intact.


If you have any more questions I can try to answer, but I hope this has helped you learn! //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif
That's really useful and helpful actually! 🙂
@44K I'm no expert, but I'll try to explain as best I can [IMG]//rmwforums.s3.amazonaws.com/emoticons/default_biggrin.gif[/IMG] (this is how I learned too, by messing with menus)


First off I'll note that this could've just been done by finding the lines above and commenting them out in the default scripts, but it is easier and more manageable to make it its own little scriptlet. If anything goes wrong, you don't have to go looking for all the things you changed, potentially across multiple default scripts.


The first thing I did was go into the script editor and look at the default script that controls the menu commands. It is Window_MenuCommand, and it starts out like this -

Code:
class Window_MenuCommand < Window_Command

which basically just defines that the class Window_MenuCommand is a child of Window_Command and will inherit some properties from Window_Command. Since we're just editing some properties of Window_MenuCommand, we only put

Code:
class Window_MenuCommand

into our script.


Looking in Window_MenuCommand, around line 36 there should be a command list (there is a comment saying "Create Command List" just above it). This calls the commands you see on the menu screen. The script here looks like this -



def make_command_list
add_main_commands
add_formation_command
add_original_commands
add_save_command
add_game_end_command
end


So I copy and paste that into my separate script under materials. Now, you'd think that you'd just be able to comment that out by putting a hashtag sign before the appropriate lines. But there's no place here to comment out the skills command. So where is it? Well, the first thing this command list does is call add_main_commands. If you scroll down a bit you will see that just below the command list, there is this code -

Code:
 def add_main_commands
    add_command(Vocab::item,   :item,   main_commands_enabled)
    add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end

This is where the add_main_commands called in the command list is defined. Here, we have each main command defined and added to the menu. Now, like I said, I'm no expert and I'm not exactly sure how these are set up, but here's what I think this does - add_command does just that, adds a command to the command list. Then Vocab::item or Vocab::skill or any of the others calls the appropriate terminology from the Vocab module up at the very top of the script editor. Because item, equip, skill, and status can all be called different things depending on user choice in the editor, they aren't set strings of text as if you were adding a command yourself to the list. Next I believe it's calling the handler of the item command, which is defined in Scene_Menu, around line 48. It sets the handler for items and I believe that is what :item refers to. main_commands_enabled refers to a piece of code a bit down in Window_MenuCommands, around line 78, which makes sure the game party exists and determines whether or not the main commands should be shown.


So just copy-paste this over to the script and comment out the line for skills. Now, it should work but just to be sure formation cannot come back, copy-paste

Code:
  def add_formation_command
    add_command(Vocab::formation, :formation, formation_enabled)
  end

from Window_MenuCommand around line 55 over to your script and comment out the add_command line, while leaving the other two lines intact.


If you have any more questions I can try to answer, but I hope this has helped you learn! [IMG]//rmwforums.s3.amazonaws.com/emoticons/default_smile.gif[/IMG]


Thanks again man!

Original thread: https://forums.rpgmakerweb.com/threads/pause-menu-edit.58204/