MZ Help with Yanfly menucore portrait dark boxes and moving icons

Hello everyone! I'm brand new to RPG Maker MZ and I'm toying around with a lot of Yanfly's really great plugins. I'm doing some setup and am messing around and I can't seem to make modifications. I either break it completely or nothing happens.

I'm trying to remove the dark boxes around each character's portrait and I'd like the name and level to move closer down to the HP/MP/TP. The characters aren't going to have a class, which is why that's blank. Ideally I'd like to just remove that line completely, but I don't know how.

Thank you!


Menu.jpg
Hello everyone! I'm brand new to RPG Maker MZ and I'm toying around with a lot of Yanfly's really great plugins.
Please clarify. Yanfly does not have plugins for MZ.

Are you using Yanfly's MV plugins in your MZ project? If so, are you using them with Project FOSSIL for compatibility?

Or are you talking about the VisuStella plugins? That team was organized by Yanfly, but his name isn't on their plugins anywhere.

I'm trying to remove the dark boxes around each character's portrait and I'd like the name and level to move closer down to the HP/MP/TP.
If you're using a VisuStella plugin, your customization options are limited.

There should be one (some?) plugin parameters that show the JavaScript for how the menu items are displayed. If that's the case, you'd edit that code - if you need help doing so, paste the code here and people can assist.

But there may be parts of the window you can't edit with those parameters, and you're out of luck.

If you're using a Yanfly plugin, (which it doesn't look like) you can edit the actual code in the plugin.
Oh yes, it's the VisuStella ones. Sorry, I'm not strong on the nomenclature just yet.

When I'm in the plugin, I can modify this code under Main Menu List Style under portrait, since that's the option I'm using. I believe this is the correct area to make edits.

// Declare Constants

const actor = arguments[0];

const rect = arguments[1];



// Make Constants

const lineHeight = this.lineHeight();

const gaugeLineHeight = this.gaugeLineHeight();

const totalHeight = (lineHeight * 4.5) + (gaugeLineHeight * ($dataSystem.optDisplayTp ? 3 : 2));



// Draw Actor Graphic

const gw = rect.width;

const gh = rect.height;

const gx = rect.x;

const gy = rect.y;

this.drawItemActorMenuImage(actor, gx, gy, gw, gh);



// Draw Dark Rectangle

let sx = rect.x;

let sy = Math.max(rect.y, rect.y + (rect.height - totalHeight));

let sw = rect.width;

let sh = rect.y + rect.height - sy;

this.contents.fillRect(sx+1, sy+lineHeight/2, sw-2, sh-1-lineHeight/2, ColorManager.dimColor1());

this.contents.gradientFillRect(sx+1, sy-lineHeight/2, sw-2, lineHeight, ColorManager.dimColor2(), ColorManager.dimColor1(), true);

// Draw Actor Name

this.drawText(actor.name(), sx, sy, sw, 'center');



// Draw Actor Level

sx = rect.x + Math.round((rect.width - 128) / 2);

sy += lineHeight;

this.drawActorLevel(actor, sx, sy);



// Draw Actor Class

const className = actor.currentClass().name;

sx = rect.x + Math.round((rect.width - this.textSizeEx(className).width) / 2);

sy += lineHeight;

this.drawTextEx(className, sx, sy, sw);



// Draw Actor Icons

sx = rect.x + Math.round((rect.width - 128) / 2);

sy += lineHeight;

this.drawActorIcons(actor, sx, sy);



// Draw Gauges

sx = rect.x + Math.round((rect.width - 128) / 2);

sy += lineHeight;

this.placeGauge(actor, "hp", sx, sy);

sy += gaugeLineHeight;

this.placeGauge(actor, "mp", sx, sy);

sy += gaugeLineHeight;

if ($dataSystem.optDisplayTp) {

this.placeGauge(actor, "tp", sx, sy);

}
Well, there's a place clearly labeled "Draw Dark Rectangle." 😉 Have you tried taking out that code?

You can surround it with /* */ to comment it out without physically deleting it.
Yes! I did try both of those options. I get this error:

Error
Uncaught ReferenceError: sx is not defined
Okay, so you leave the variable declarations and just take out the rectangle drawing. Thusly:
Code:
let sx = rect.x;
let sy = Math.max(rect.y, rect.y + (rect.height - totalHeight));
let sw = rect.width;
let sh = rect.y + rect.height - sy;
/* this.contents.fillRect(sx+1, sy+lineHeight/2, sw-2, sh-1-lineHeight/2, ColorManager.dimColor1());
this.contents.gradientFillRect(sx+1, sy-lineHeight/2, sw-2, lineHeight, ColorManager.dimColor2(), ColorManager.dimColor1(), true);
*/

Original thread: https://forums.rpgmakerweb.com/threads/help-with-yanfly-menucore-portrait-dark-boxes-and-moving-icons.163469/