Vanishing two armour categories?

Looking for a way to vanish an armour category (not delete it from existing, just render it invisible), I came upon this suggested scriptlet in a different thread:

 

.....................

 

class Window_EquipSlot < Window_Selectable

  # CHANGE THIS ID TO THE SLOT TO HIDE

  BodyArmorIndex = 1

  ####################################

  

  def item_rect(index)

    index -= 1 if index > BodyArmorIndex

    super(index)

  end

  def index=(index)

    n = @index < index ? 1 : -1

    index += n if index == BodyArmorIndex

    super(index)

  end

  def draw_all_items

    item_max.times {|i| next if i == BodyArmorIndex; draw_item(i) }

  end

end

 

.............................

 

Which is lovely, for a single category  I would, however, like to vanish two categories - I only want to keep "Armor" and "Accessory" visible, making Head and Shield slots invisible.

 

Anyone got a way to do that?
Use the same logic to make a second "BodyArmorIndex2" category.  So... try this.  I haven't tried it myself, but using the same logic from the scriptlet you posted:

class Window_EquipSlot < Window_Selectable  # CHANGE THIS ID TO THE SLOT TO HIDE  BodyArmorIndex = 1 BodyArmorIndex2 = 2  ####################################    def item_rect(index)    index -= 1 if index > BodyArmorIndex index -= 1 if index > BodyArmorIndex2    super(index)  end  def index=(index)    n = @index < index ? 1 : -1    index += n if index == BodyArmorIndex n = @index < index ? 1 : -1    index += n if index == BodyArmorIndex2    super(index)  end  def draw_all_items    item_max.times {|i| next if i == BodyArmorIndex; next if i == BodyArmorIndex2; draw_item(i) }  endendI'm not super confident about the "def index" method (I don't quite understand why it's using either 1 or -1) so if it doesn't work that's probably the culprit.  The other parts should be solid.

Original thread: https://forums.rpgmakerweb.com/threads/vanishing-two-armour-categories.37080/