Modifying the cursor position in the equipment slot screen

Hi there, I'm making a game where the Shield slot is completely unnecessary, so I found out that you can remove it through line 153 of Game_Actor. I then also found out that you can change the position of the text and icons through lines 68 and 69 in Window_EquipSlot. Here's the result of what I did.

1751978490541.png


As you can see, the only issue I have left is that the cursor position remains where it is normally, and I haven't figured out a way to change it, which is why I'm posting this question.
Alternatively, is it possible to increase the gap between each equipment slot so that they still fill the whole window instead of being in the middle? This is just a secondary thing though, my main priority lies in the cursor position.
Thanks in advance!
Hey!

I wrote a script that will change the display the was you ask, to use it, discard your changes to Game_Actor and Window_EquipSlot and put my script above main.

If you want more insight you can check my script, instead of modifying the x,y positions in draw_item method, you should modify item_rect to change both the position of the drawn items as well as the rectangle displayed by the cursor.

Ruby:
#==============================================================================
# Centered equip slots
#------------------------------------------------------------------------------
# Author: Timtrack
# date: 08/07/2025
#==============================================================================
# Alter tthe window equip menu to be centered when actors have less than 5 equip
# slots
#
# Use: modify the equipments in equip_slots method below
# You can add a small gap between equipments if GAP_MOD is true
#==============================================================================

module CenterEquipSlots
  GAP_MOD = true #set to true to have an even gap between each remaining equipment
end #CenterEquipSlots

#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor
  #--------------------------------------------------------------------------
  # overwrite method: equip_slots -> removed shield
  #--------------------------------------------------------------------------
  def equip_slots
    return [0,0,2,3,4] if dual_wield?       # Dual wield
    return [0,2,3,4]                        # Normal
  end
end #Game_Actor

#==============================================================================
# ** Window_EquipSlot
#==============================================================================
class Window_EquipSlot < Window_Selectable
  #--------------------------------------------------------------------------
  # alias method: refresh
  #--------------------------------------------------------------------------
  alias centered_refresh refresh
  def refresh
    if @actor
      gap = [0, visible_line_number - @actor.equip_slots.size].max
      @gap_y = 0
      if CenterEquipSlots::GAP_MOD && gap > 0
        @gap_y = (item_height*gap) / (@actor.equip_slots.size+1)#item_height / (gap+1)
        @offset_y = @gap_y / 2
      else
        @offset_y = gap * item_height / 2
      end
    end
    centered_refresh
  end
  #--------------------------------------------------------------------------
  # override method: item_rect
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = super(index)
    rect.y += @offset_y + index * @gap_y if @offset_y
    rect
  end
end #Window_EquipSlot

You have two modes:
When GAP_MOD is false, the items will be centered on the window:
1751991451383.png


When GAP_MOD is true, it will put a small gap between items:
1751991278775.png
Perfect, worked exactly like I had hoped. Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/modifying-the-cursor-position-in-the-equipment-slot-screen.178803/