How would I make certain items NOT show in the item menu even though I have them?
class Window_Item < Window_Selectable
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++
#LOOK HERE
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++
#insert item ID's you don't want to show into this array
#ie [1, 4, 8] would not show Potion, Perfume, and Full Elixir by default
@dont_show_items = []
#insert armor ID's you don't want to show into this array
@dont_show_armors = []
#insert Weapon ID's you don't want to show into this array
@dont_show_weapons = []
#++++++++++++++++++++++++++++++++++++++++++++
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i]) unless @dont_show_items.include?(i)
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i]) unless @dont_show_weapons.include?(i)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i]) unless @dont_show_armors.include?(i)
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
end
It doesnt work Ryex. I tried that exact way and it didnt work. I added the item id 1 in the not display items yet it still displays the item id 1.
I will test this out as well, thank you!
Yeah, I have the same results as game_guy. It still shows up in the menu.
*slaps head*
silly me. I edited the post try it now
Perfect! Works like a charm! Thank you so much for the quick responses guys!