Adding a Menu Command

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
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, :)
 

Levi

Veteran
Veteran
Joined
Jun 7, 2012
Messages
798
Reaction score
143
First Language
English
Primarily Uses
I use the Ace Menu script. It's really easy to use.
 

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
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...
 

C-C-C-Cashmere

Veteran
Veteran
Joined
May 18, 2012
Messages
584
Reaction score
274
First Language
English
Primarily Uses
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...
 

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
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.... :( ....
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 
Last edited by a moderator:

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
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 :) )))
 

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,070
First Language
English
Primarily Uses
Other
Ok....its not going as well as i hoped it would. Would you mind exsplaining to me exactly how you use that template?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
forcebreaker, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top