Requesting a simplified menu script.

I'm making a game that's more story-based, so I've no need for those in-depth character menus. I don't even plan to include armor.

Since the character status screen is much too convoluted for my taste, I might just get rid of it altogether.

So, I need an item menu that only has categories for items, food(healing), and weapons.

Here's the tricky part. Let's say Character A can only use swords, and character B can only use axes. I'd like it so that, when you go to menu > items > weapons, and select a sword, a small menu will pop up that says "equip / cancel." When you press equip, it equips the sword to character A, and character A's previous weapon returns to the inventory.

Is this possible?
Hey ♫

I made this for you 

Spoiler
########################################## Kaimonkey's Modifed Item/Equip Merge, with Food# For Strangling################USAGE###################### For items to appear in the "Food" tab, put # <is_food># in their note box##############CONFIG########################### Confirm Message:$item_confirm_message = "Have %s equip %s?"#############################################class Window_ItemCategory < Window_HorzCommand def make_command_list add_command(Vocab::item, :item) add_command("Food", :food) add_command(Vocab::weapon, :weapon) end def col_max return 3 endendclass Window_ItemList < Window_Selectable #-------------------------------------------------------------------------- # * Include in Item List? #-------------------------------------------------------------------------- def include?(item) case @category when :item item.is_a?(RPG::Item) && !item.note.include?("<is_food>") when :weapon item.is_a?(RPG::Weapon) when :food item.is_a?(RPG::Item)&& item.note.include?("<is_food>") else false end end def enable?(item) if item.is_a?(RPG::Weapon) return can_equip?(item) else return $game_party.usable?(item) end end def can_equip?(weapon) $game_party.members.any?{|m| m.equippable?(weapon) } end def make_item_list @data = $game_party.all_items.select {|item| include?(item) } @data.push(nil) if include?(nil) @data.sort_by!{|d| enable?(d) ? 0 : 1} endendclass Scene_Item < Scene_ItemBase def start super create_help_window create_category_window create_item_window create_confirm_window end def create_confirm_window @window_confirm = Window_Item_Confirm.new(425,80) @window_confirm.z = 200 @window_confirm.refresh @window_confirm.visible = false @window_confirm.set_handler🙂ok, method🙂on_confirm)) @window_confirm.set_handler🙂cancel, method🙂cancel_confirm)) end def on_confirm if @window_confirm.index == 0 Sound.play_equip @window_confirm.actor.change_equip(0,@window_confirm.item) @window_confirm.deactivate @window_confirm.visible = false @item_window.activate @item_window.refresh else cancel_confirm end end def cancel_confirm Sound.play_buzzer @window_confirm.deactivate @item_window.activate end def on_item_ok if item.is_a?(RPG::Weapon) @window_confirm.visible = true actor = $game_party.members.find{|m| m.equippable?(item)} @window_confirm.set_args(actor,item) @window_confirm.activate @window_confirm.refresh else $game_party.last_item.object = item determine_item end end endclass Window_Item_Confirm < Window_Selectable attr_accessor :actor attr_accessor :item def initialize(width, height) super((Graphics.width-width)/2,(Graphics.height-height)/2,width,height) @index = 0 end def set_args(actor,item) @item = item @actor = actor end def col_max 2 end def item_max 2 end def item_rect(index) rect = Rect.new rect.width = contents_width/2 rect.height = line_height rect.x = ((contents_width)/2)*index rect.y = contents_height-rect.height rect end def draw_item(index) rect = item_rect(index) if index == 0 text = "Ok" else text = "Cancel" end draw_text(rect.x,rect.y,rect.width,line_height,text,1) end def refresh contents.clear if @actor && @item text = sprintf($item_confirm_message,@actor.name, "<>"[email hidden]) cx = text_size(text.split("<>")[0]).width text = sprintf($item_confirm_message,@actor.name, " "[email hidden]) draw_text(0,0,contents_width,line_height,text,0) draw_icon(@item.icon_index,cx+10,0) end draw_all_items end end 
Have a look, and see what you think! If you have any problems, or I have misunderstood your request in anyway, let me know!
First of all, I can't thank you enough! It's exactly what I needed, and it works really well aside from a few errors.

[IMG]http://i.gyazo.com/161314c9e625ff3cb6daaa24b4456e63.png[/IMG]

The icons are just a tad bit smooshed against the names of the items.

And, when the names of the items are too long, they tend to cut off. 

The last thing is that the cancel selection doesn't seem to do anything. It plays a noise, but doesn't actually get rid of the window.

I'm sorry if I seem really picky! I'm more of an artist/writer, so the scripting side of rpg maker is lost on me for now, haha.
Whoops, looks like I forgot to actually test or implement that feature and just thought "Well, I wrote the word Cancel so OF COURSE the computer will figure out what that means", haha!

Try this new version:

Spoiler
Code:
########################################## Kaimonkey's Modifed Item/Equip Merge, with Food# For Strangling################USAGE###################### For items to appear in the "Food" tab, put # <is_food># in their note box##############CONFIG########################### Confirm Message:$item_confirm_message = "Have %s equip %s?"# Horizontal Icon Offset #   (How many pixels, to the right, to move the icon. Use negitive to#    move left)$icon_offset = 10# Item Confirm Width$item_confirm_width = 425#############################################class Window_ItemCategory < Window_HorzCommand  def make_command_list    add_command(Vocab::item,     :item)    add_command("Food",    :food)    add_command(Vocab::weapon,   :weapon)  end  def col_max    return 3  endendclass Window_ItemList < Window_Selectable  #--------------------------------------------------------------------------  # * Include in Item List?  #--------------------------------------------------------------------------  def include?(item)    case @category    when :item      item.is_a?(RPG::Item) && !item.note.include?("<is_food>")    when :weapon      item.is_a?(RPG::Weapon)    when :food      item.is_a?(RPG::Item)&& item.note.include?("<is_food>")    else      false    end  end   def enable?(item)    if item.is_a?(RPG::Weapon)      return can_equip?(item)    else      return $game_party.usable?(item)    end  end   def can_equip?(weapon)    $game_party.members.any?{|m|      m.equippable?(weapon)    }  end    def make_item_list    @data = $game_party.all_items.select {|item| include?(item) }    @data.push(nil) if include?(nil)    @data.sort_by!{|d| enable?(d) ? 0 : 1}  endendclass Scene_Item < Scene_ItemBase def start    super    create_help_window    create_category_window    create_item_window    create_confirm_window  end    def create_confirm_window    @window_confirm = Window_Item_Confirm.new($item_confirm_width,80)    @window_confirm.z = 200    @window_confirm.back_opacity = 255    @window_confirm.refresh    @window_confirm.visible = false    @window_confirm.set_handler(:ok, method(:on_confirm))    @window_confirm.set_handler(:cancel, method(:cancel_confirm))  end    def on_confirm    if @window_confirm.index == 0      Sound.play_equip      @window_confirm.actor.change_equip(0,@window_confirm.item)      @window_confirm.deactivate      @window_confirm.visible = false      @item_window.activate      @item_window.refresh    else      cancel_confirm    end  end    def cancel_confirm    Sound.play_cancel    @window_confirm.visible = false    @window_confirm.deactivate    @item_window.activate  end    def on_item_ok    if item.is_a?(RPG::Weapon)      @window_confirm.visible = true      actor = $game_party.members.find{|m| m.equippable?(item)}      @window_confirm.set_args(actor,item)      @window_confirm.activate      @window_confirm.refresh    else      $game_party.last_item.object = item      determine_item    end  end  endclass Window_Item_Confirm < Window_Selectable  attr_accessor :actor   attr_accessor :item     def initialize(width, height)    super((Graphics.width-width)/2,(Graphics.height-height)/2,width,height)    @index = 0  end  def set_args(actor,item)    @item = item    @actor = actor  end    def col_max    2  end    def item_max    2  end    def item_rect(index)    rect = Rect.new    rect.width = contents_width/2    rect.height = line_height    rect.x = ((contents_width)/2)*index    rect.y =  contents_height-rect.height    rect  end    def draw_item(index)    rect = item_rect(index)    if index == 0      text = "Ok"    else      text = "Cancel"    end    draw_text(rect.x,rect.y,rect.width,line_height,text,1)  end    def refresh    contents.clear    if @actor && @item      text = sprintf($item_confirm_message,@actor.name, "<>"[email hidden])      cx = text_size(text.split("<>")[0]).width      text = sprintf($item_confirm_message,@actor.name, "    "[email hidden])      draw_text_ex(0,0,text)      draw_icon(@item.icon_index,cx+$icon_offset,0)    end    draw_all_items  end  end 
Alright, I tested it out with my different characters and it works great! The only part left is another error with long names.

[IMG]http://i.gyazo.com/07867fa703c7504066c1aef9b7ffc21c.png[/IMG]

But it's amazing! It's just what I wanted!
The only option you have is to make the pop-up window larger in the config

/Kai ♫
The only option you have is to make the pop-up window larger in the config

/Kai ♫
Gotcha! My bad there. 

I must be getting on your nerves, haha, but there's one more little error I found.

When giving "food" items to my party, it seems that I can only give it to the first member.
Hmm, I cannot reproduce that error in my copy- I have not altered that part of the code anyway, so that surprises me. Do you have any other scripts which effect how items work?

You are not getting on my nerves at all, I enjoying writing code for people, otherwise I wouldn't do it!

/Kai ♫
Whoops, haha, that one was on me. I had the item set to "user only" instead of "party member."

Thank you again for the script! It's exactly what I wanted!

Original thread: https://forums.rpgmakerweb.com/threads/requesting-a-simplified-menu-script.41812/