Choosing which state icons are allowed to draw in Battle Status

So I've decided to just show the player the status ailments and leave the positive states to popups. But I can't for the life of me figure out how to limit the range that the window draws from state one to five.

If anyone could help me it would be a blessing.
Well, draw_actor_icons in Window_Base would be obvious, but the icons are determined in the Game_BattlerBase; there are state_icons and buff_icons. Both are written just a bit differently, but essentially, the icon indexes (numbers to identify which icon is used) are recorded and then 0 (no icon) is removed from that array.

Assuming you are only using states, here's my guessing snippet: Change the numbers in the showstate array so that the state icon only gets added if that state is in the array.

Code:
class Game_BattlerBase
  def state_icons
    showstate = [1,2,3,4,5] #State Id for states to show
    icons = states.collect {|state| state.icon_index if showstate.include? state.id}
    icons.delete(0)
    icons
  end
end
Well, draw_actor_icons in Window_Base would be obvious, but the icons are determined in the Game_BattlerBase; there are state_icons and buff_icons. Both are written just a bit differently, but essentially, the icon indexes (numbers to identify which icon is used) are recorded and then 0 (no icon) is removed from that array.

Assuming you are only using states, here's my guessing snippet: Change the numbers in the showstate array so that the state icon only gets added if that state is in the array.

Code:
class Game_BattlerBase
  def state_icons
    showstate = [1,2,3,4,5] #State Id for states to show
    icons = states.collect {|state| state.icon_index if showstate.include? state.id}
    icons.delete(0)
    icons
  end
end

Sorry for not seeing your reply this long. I tried the snippet and I got an error message saying that the method "%" was undefined at this line in Window_Base: rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
Try with this edit of Hirosata's snippet:

Code:
class Game_BattlerBase
  def state_icons
    showstate = [1,2,3,4,5] #State Id for states to show
    icons = states.collect { |state|
    showstate.include?(state.id) ? state.icon_index : 0}
    icons.delete(0)
    icons
  end
end
class Game_BattlerBase def state_icons showstate = [1,2,3,4,5] #State Id for states to show icons = states.collect { |state| showstate.include?(state.id) ? state.icon_index : 0} icons.delete(0) icons end end
Marvelous! Thank you once again! My project only has four negative statuses (excluding death) so I wanted to be able to display them all at once.

Thank you both! @Harosata and @GGZiron

Original thread: https://forums.rpgmakerweb.com/threads/choosing-which-state-icons-are-allowed-to-draw-in-battle-status.94776/