Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Prevent "Never"-use items from showing up in menu during battles?

Hi, does anyone know of a script that will prevent any items that are to be "Never Used" from showing up in the "Items" menu during battles? I'd like to make the battle-ready items easy to locate without players having to scroll down during battle (Active Count Battle System).

I've looked through the script archive and didn't find what I was looking for (I don't want to item-group, etc.).

Any help would be appreciated, thanks.
 
Replace the 'refresh' method in Window_Item with:

Code:
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # Also add weapons and items if outside of battle
    unless $game_temp.in_battle
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    else
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0
          if $data_items[i].occasion < 2
            @data.push($data_items[i])
          end
        end
      end
    end
    # If item count is not 0, make a bit map and draw all items
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end

This will show only the 'Always' & 'Battle Only' items when you are in battle.
If you want to show the 'Menu Only' as well, look for this line:

if $data_items.occasion < 2

and change the '2' to '3'


Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top