Display less equip slots

Hi!

By default, a equipment slot window is mapped 1:1 with the database slots -- but I need a window that contains only slots 3+.
Displaying a shorter list (say, slots 1-3) is easy, but I need it to skip a few slots and only display slots 3 to equipSlots().length

I couldn't find exactly where/how the slots are added as window items, except this:
Code:
Window_EquipSlot.prototype.item = function() {
    return this._actor ? this._actor.equips()[this.index()] : null;
};
But trying to add an offset to the index threw some error.

I'm sure this is fairly easy to accomplish and I'm missing something obvious. Any advice?
Thank you!
It's only natural it throws an error if you add an offset. An offset doesn't change the length of an array in any way, so instead of first to fifth equip it would look at third to seventh in case of offset of 2, so it would jump out of the array's scope.
What you need to do should be making a custom drawAllItems function. It is told to draw all items beginning from index 0, so instead you'll tell it to begin from index 2 or something.
Hi!

By default, a equipment slot window is mapped 1:1 with the database slots -- but I need a window that contains only slots 3+.
Displaying a shorter list (say, slots 1-3) is easy, but I need it to skip a few slots and only display slots 3 to equipSlots().length

I couldn't find exactly where/how the slots are added as window items, except this:
Code:
Window_EquipSlot.prototype.item = function() {
    return this._actor ? this._actor.equips()[this.index()] : null;
};
But trying to add an offset to the index threw some error.

I'm sure this is fairly easy to accomplish and I'm missing something obvious. Any advice?
Thank you!
Out of curiosity, why are you trying to get it to skip slots? There might be a way to avoid having to muck around with the database at all.
@Restart: the first slots are regular equips (weapon, armor, etc), the last ones are for skill-equips like spellbooks and such -- therefore they go into their own menu.

@Poryg: Thank you very much! Checking the array length did the trick; I knew I was something obvious. I didn't have too much luck with drawAllItems, tho.

In the end I had to modify:
Window_EquipSlot.prototype.maxItems (to reduce list size)
Window_EquipSlot.prototype.update (offset index, with array checks)
Window_EquipSlot.prototype.drawItem (offset index of slots drawn)
Scene_Skill.prototype.onItemOk (offset index of selected item)

I hope this helps future googlers.

Original thread: https://forums.rpgmakerweb.com/threads/display-less-equip-slots.112004/