Adding a Menu Command

● ARCHIVED · READ-ONLY
Started by Bastrophian 10 posts View original ↗
  1. Im not sure if this is the right place to put this, but can someone help me figgure out how to creat a working menu command.....?

    Im trying to make something like FF6 equip artifacts menu command. I was thinking I might be able to adjust the rtp menu-script so that when i opened the command in the menu window, it would open something like another equip window separate from the main equip window, and it would only have one or two slots you could equip special items that gave abbilities and state buffs. Ive tried Yanflys menu script, but i cant understand how to add a working command useing it, and want learn how to do it myself anyway.

    Is there a tut for this on this site, because i haveint found it yet. anyway, any help will be appreciated. Thanks, :)
  2. I use the Ace Menu script. It's really easy to use.
  3. Levi said:
    I use the Ace Menu script. It's really easy to use.
    I "think" thats the Yanfly script i mentiond. How do you add a command useing that? I cant understand it...
  4. Do you mean like two sets of equipment you can wear? Not sure if RPG Maker supports that, you might have to code it yourself...
  5. thatbennyguy said:
    Do you mean like two sets of equipment you can wear? Not sure if RPG Maker supports that, you might have to code it yourself...
    Sort of, are you familiar with FF6 and the artifacts you use to give your characters abbilities and stat boosts? Thats sorta what im wanting to do. im trying to figgure out how to make a command that calls a scene where the player can equip special items that do basically the same thing.....so far ive done alot of trial and error stuff...but i keep getting errors....the game will start up ok, but every time i access the menu, I get an error and the game crashes.... :( ....
  6. Don't know what you're trying to do but this is the template I use for adding menu commands



    Code:
    class Window_MenuCommand < Window_Command
      #--------------------------------------------------------------------------
      # * Add menu command to List
      #--------------------------------------------------------------------------
      alias tsuki_menu_commands add_main_commands
      def add_main_commands
        tsuki_menu_commands
        add_command("command name", :handler)
      end
    end
    
    class Scene_Menu < Scene_MenuBase
      #--------------------------------------------------------------------------
      # * Add menu handler
      #--------------------------------------------------------------------------
      alias tsuki_menu_command_window create_command_window
      def create_command_window
        tsuki_menu_command_window
        @command_window.set_handler(:handler, method(:command_test))
      end
    
      # if you need to select an actor
      alias tsuki_menu_personal_ok on_personal_ok
      def on_personal_ok
        case @command_window.current_symbol
        when :handler
          p "test"
        end
        tsuki_menu_personal_ok
      end
    
      def command_test
        p "test"
      end
    end
    I just have to fill it in whenever I want to add a new command.

    `on_personal_ok` is used if you need to select an actor first. Otherwise, I just delete it and call the other command.

    EDIT: ok you are not doing anything related to menu commands it looks like you want to draw a new window.
  7. Tsukihime said:
    Don't know what you're trying to do but this is the template I use for adding menu commands



    Code:
    class Window_MenuCommand < Window_Command
    #--------------------------------------------------------------------------
    # * Add menu command to List
    #--------------------------------------------------------------------------
    alias tsuki_menu_commands add_main_commands
    def add_main_commands
    tsuki_menu_commands
    add_command("command name", :handler)
    end
    end
    
    class Scene_Menu < Scene_MenuBase
    #--------------------------------------------------------------------------
    # * Add menu handler
    #--------------------------------------------------------------------------
    alias tsuki_menu_command_window create_command_window
    def create_command_window
    tsuki_menu_command_window
    @command_window.set_handler(:handler, method(:command_test))
    end
    
    # if you need to select an actor
    alias tsuki_menu_personal_ok on_personal_ok
    def on_personal_ok
    case @command_window.current_symbol
    when :handler
    p "test"
    end
    tsuki_menu_personal_ok
    end
    
    def command_test
    p "test"
    end
    end
    I just have to fill it in whenever I want to add a new command.

    `on_personal_ok` is used if you need to select an actor first. Otherwise, I just delete it and call the other command.

    EDIT: ok you are not doing anything related to menu commands it looks like you want to draw a new window.
    THANK YOU! Im going to give this a try right now. I post how it goes, in a while :) )))
  8. Ok....its not going as well as i hoped it would. Would you mind exsplaining to me exactly how you use that template?
  9. If you copy it into your project it should work.

    Then you just need to change the name of the command, the name of the handler, and what should happen when you select the particular command.
  10. forcebreaker, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.