MV Spacing between each equip slot

Hey guys!

I'm having a bit of an issue with getting my equip menu looking just right. Check the image below and you'll understand what I'm after. Basically, I want each equip slot to match my background image. As you can see the "sword" is positioned correctly but I want to space the other slots so that they too can look good. I'm using Moghunters equip menu plugin and I have looked through and changed values left and right but I just can't get it to add spacing vertically.

If you look to the left, you can see my parameters. I managed to add spacing to them without issue because Mog had included the line of code needed for this. I'm referring to "this.lineheight()", specifically. This line of code doesn't exist for the equip slots and I have no idea how to add spacing between each slot.

Will add that I have gone into the default rpg maker script files/plugins as well and made a lot of changes but none of if helped.

Unsure how to proceed so any help/hint/guidance/vague pointing at something or someone would be appreciated, thanks 😀

fek.png
Hmmm yeah I think you need to modify this in MOG's plugin (I changed the drawItemName line to push the y lower depending on the index). I'm not 100% sure if you should draw the whole itemRect or whatever lower though. But try and test with this:

Window_EquipSlot.prototype.drawItem = function(index) {
this.contents.fontSize = Moghunter.scEquip_FontSize;
if (this._actor) {
var rect = this.itemRectForText(index);
this.changeTextColor(this.systemColor());
this.changePaintOpacity(this.isEnabled(index));
this.drawItemName(this._actor.equips()[index], rect.x + 138, rect.y+index*5); // CHANGED THIS
this.changePaintOpacity(true);
}
};

EDIT: Change 5 to another number to fit your game.
Hmmm yeah I think you need to modify this in MOG's plugin (I changed the drawItemName line to push the y lower depending on the index). I'm not 100% sure if you should draw the whole itemRect or whatever lower though. But try and test with this:

Window_EquipSlot.prototype.drawItem = function(index) {
this.contents.fontSize = Moghunter.scEquip_FontSize;
if (this._actor) {
var rect = this.itemRectForText(index);
this.changeTextColor(this.systemColor());
this.changePaintOpacity(this.isEnabled(index));
this.drawItemName(this._actor.equips()[index], rect.x + 138, rect.y+index*5); // CHANGED THIS
this.changePaintOpacity(true);
}
};

EDIT: Change 5 to another number to fit your game.

Beautiful, this did exactly what it was supposed to, appreciate the help immensely. But we now have another problem which you mentioned at the end. While the words themselves now have spacing the "select" area does not. Check the image below.

You mentioned re-drawing the entire itemRect lower which might be needed here...I think, I'm gonna be honest with you, I have no idea what I'm talking about so take what I say with a bag of salt.

So the solution I'm after here is to give the exact same spacing to the "Selection rect" as we did with the item names. I tried changing the "this.itemrectfortext" line but this doesn't change the selection area, instead it shoots everything out of bounds. Does this mean that the line of code for this is located in another file? Like for example "rpg_windows.js" or maybe somewhere else?


fek.png
I think you can modify the item rectangle by making modifications to y values in the function below (where I currently put -= X), but looking at your pic it's unclear to me if you'd need to modify where the highlight appears directly with setCursorRect or something, and I've no motivation to try and find out at the moment. Maybe someone else can help you.

Window_EquipSlot.prototype.itemRectForText = function(index) {
var rect = this.itemRect(index);
rect.x += this.textPadding();
rect.y -= X;
rect.width -= this.textPadding() * 2;
return rect;
};
I think you can modify the item rectangle by making modifications to y values in the function below (where I currently put -= X), but looking at your pic it's unclear to me if you'd need to modify where the highlight appears directly with setCursorRect or something, and I've no motivation to try and find out at the moment. Maybe someone else can help you.

Window_EquipSlot.prototype.itemRectForText = function(index) {
var rect = this.itemRect(index);
rect.x += this.textPadding();
rect.y -= X;
rect.width -= this.textPadding() * 2;
return rect;
};
Thanks for all the help so far. In this case we really do need to change the CursorRect as your code only pushed the text up and down. But no matter. I've spent to long on just this part/feature and it's time to move forward. I've decided to take the easy way out and match my image to the default selection area instead.

Was hoping I could easily add spacing similar to how I did it with the parameters but since that is not the case I will move on. Again, thanks for all the help man. Appreciate it 🙂

Original thread: https://forums.rpgmakerweb.com/threads/spacing-between-each-equip-slot.178666/