[SOLVED]Ace Item Menu - Multiple Categories

This is a continuation of previous post.

Yanfly Ace Item Menu

Spoiler: Addon by Roninator2
Code:
class Window_ItemCommand < Window_Command
  def make_command_list
    for command in YEA::ITEM::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item, :item) unless $game_party.items.empty?
      when :weapon
        add_command(Vocab::weapon, :weapon) unless $game_party.weapons.empty?
      when :armor
        add_command(Vocab::armor, :armor) unless $game_party.armors.empty?
      when :key_item
        add_command(Vocab::key_item, :key_item)
      #--- Imported ---
      when :gogototori
        next unless $imported["KRX-AlchemicSynthesis"]
        process_custom_command(command)
      #--- Custom Commands ---
      else
        process_custom_command(command)
      end
    end
  end
end
class Window_ItemType < Window_Command
  def make_command_list
    return if @type.nil?
    #---
    case @type
    when :item
      commands = YEA::ITEM::ITEM_TYPES
    when :weapon
      commands = YEA::ITEM::WEAPON_TYPES
    else
      commands = YEA::ITEM::ARMOUR_TYPES
    end
    #---
    for command in commands
      case command[0]
      #---
      when :types
        case @type
        when :weapon
          for i in 1...$data_system.weapon_types.size
            name = $data_system.weapon_types[i]
            add_command(name, :w_type, true, i)
          end
        else
          for i in 1...$data_system.armor_types.size
            name = $data_system.armor_types[i]
            add_command(name, :a_type, true, i)
          end
        end
      #---
      when :slots
        if $imported["YEA-AceEquipEngine"]
          maximum = 1
          for key in YEA::EQUIP::TYPES
            maximum = [maximum, key[0]].max
          end
        else
          maximum = 4
        end
        for i in 1..maximum
          name = Vocab::etype(i)
          add_command(name, :e_type, true, i) if name != ""
        end
      #---
      else
        case @type
        when :weapon
          for i in 0..$game_party.weapons.size - 1
            if $game_party.weapons[i].note.include?(command[1])
              add_command(command[1], command[0], true, @type)
            end
          end
        when :armor
          for i in 0..$game_party.armors.size - 1
            if $game_party.armors[i].note.include?(command[1])
              add_command(command[1], command[0], true, @type)
            end
          end
        when :item
          for i in 0..$game_party.items.size - 1
            if $game_party.items[i].note.include?(command[1])
              add_command(command[1], command[0], true, @type)
            end
          end
        end
        add_command(command[1], command[0], true, @type) if command[0] == :all
      end
    end
  end
end

Basically multiple items of the same category will create multiple replicate item categories. It does not cause any crashes, but it does make the menu pretty crowded for no reason.
I have dumped "Yanfly Ace Item Menu" script and the "addon by Roninator2" into a blank project and without making any change to either script, all works as intended.

As Roninator2 has mentioned in the previous thread, you have either modified the Ace Item Menu script or have another script that is conflicting with the addon (or even the Ace Item Menu script itself).

*You can use my game demo for reference to see what I am seeing (Working as intended)
How much have you changed since the last time I helped?
Would it be prudent to provide a new file? or should I go looking for previous thread for the old link?
It also would have been good to post in the old thread since the issue is not solved.
It doesn't matter that it is old. You are the original poster and if the issue is not solved then carry on posting.
I'm not sure if it's a new issue though. On the phone atm, I can only provide the link to the entire game: https://drive.google.com/drive/folders/1jBOnQuzJ2gUNOEKBE4X5tGxZ29yrMw2g
I learned two new things today. And realized that the fix I applied to my game was because I was using the item menu script incorrectly. oh well.
Try this.
Ruby:
class Window_ItemCommand < Window_Command
  def make_command_list
    for command in YEA::ITEM::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item, :item) unless $game_party.items.empty?
      when :weapon
        add_command(Vocab::weapon, :weapon) unless $game_party.weapons.empty?
      when :armor
        add_command(Vocab::armor, :armor) unless $game_party.armors.empty?
      when :key_item
        add_command(Vocab::key_item, :key_item)
      #--- Imported ---
      when :gogototori
        next unless $imported["KRX-AlchemicSynthesis"]
        process_custom_command(command)
      #--- Custom Commands ---
      else
        process_custom_command(command)
      end
    end
  end
end
class Window_ItemType < Window_Command
  def make_command_list
    return if @type.nil?
    #---
    case @type
    when :item
      commands = YEA::ITEM::ITEM_TYPES
    when :weapon
      commands = YEA::ITEM::WEAPON_TYPES
    else
      commands = YEA::ITEM::ARMOUR_TYPES
    end
    #---
    for command in commands
      case @type
      when :weapon
        for i in 0..$game_party.weapons.size - 1
          if $game_party.weapons[i].note.include?(command[1])
            add_command(command[1], command[0], true, @type) unless @list.find {|x| x[:name] == command[1]}
          end
        end
      when :armor
        for i in 0..$game_party.armors.size - 1
          if $game_party.armors[i].note.include?(command[1])
            add_command(command[1], command[0], true, @type) unless @list.find {|x| x[:name] == command[1]}
          end
        end
      when :item
        for i in 0..$game_party.items.size - 1
          if $game_party.items[i].note.include?(command[1])
            add_command(command[1], command[0], true, @type) unless @list.find {|x| x[:name] == command[1]}
          end
        end
      end
      add_command(command[1], command[0], true, @type) if command[0] == :all
    end
  end
end

This will show the type if the item has a note tag for that type. So field and battle no longer show for this patch.
Good job, I'll just add another tag for the battle items.

Original thread: https://forums.rpgmakerweb.com/threads/solved-ace-item-menu-multiple-categories.144475/