MZ Elements Status Core - Draw Actor Graphic JS help?

Hello, after googling for a while I've not yet found a fix for a little issue I'm having. Apologies if I've missed a recently asked thing, or if this isn't quite the right area for this post 🙂

Basically: I use images from the pictures folder for actor graphics in the menus. In the main menu and other scenes (Equip, Skill) they display perfect. (I'm sure MainMenuCore takes care of this? I do however have an offset set in each actor's notes to nudge the pictures down as they are slightly oversized.

in the Status scene, however, the JS in the Elements and Status Core plugin is what I believe is governing the drawing of the actor graphic. The graphic is presenting just a bit too big and the top and bottom of the image are cut off.

I'm sure this is the line I need to tweak:
JavaScript:
// Draw Actor Graphic
this.drawActorGraphic(0, this.innerWidth / 2);

I want to nudge the graphic down 70 pixels. I thought this would be the easiest fix.

I tried this - no change.
JavaScript:
// Draw Actor Graphic
const yOffset = 70; // Offset to shift the graphic down by 70 pixels
this.drawActorGraphic(0, this.innerWidth / 2, yOffset);

I suspect this method won't accept a Y value as the third parameter. So...

tried this: - no change again. 🙁
JavaScript:
// Define the yOffset
const yOffset = 70;
// Save the current y position
const originalY = this._y || 0;
// Adjust the y position
this._y = originalY + yOffset;
// Draw Actor Graphic with adjusted y position
this.drawActorGraphic(0, this.innerWidth / 2);
// Restore the original y position
this._y = originalY;

Would any kind soul here know what I need to tweak? 🙂 My javascript skill is pretty much next to zero, I'm stumbling through assumptions.

Thanks! Atra
I assume the second argument is what you want - most draw functions are drawThisThing(x, y)

Except it's referencing width, which is kinda weird.

But still, try this.drawActorGraphic(0, this.innerWidth / 2 - 70);

If that doesn't work, you could try supplying the -70 as the first argument in case they reversed it for some reason.
I had a feeling it may be you here to rescue me again! 🙂 Amazingly fast reply, thank-you!

I gave that code a shot, the image moved to the left. Confusing!!


I'm getting the niggling feeling it might just be an easier task to modify every picture I have to a different size that will nicely fit in the given area. 🙁
If it moved to the left, then that's the X value (as assumed by it referencing the width).

Did you try putting the -70 as the first argument, as I suggested?
Hi, sorry for the late reply (food)

I did... that, too, moved the image left? A real head scratcher.
What I typed when I moved -70 to the first argument:
JavaScript:
// Draw Actor Graphic
this.drawActorGraphic(-70, this.innerWidth / 2);
Hi Turan, really appreciate your time on this - but I think I'm going to go with resizing all of my pictures. (There's a lot! bah!)

Thank-you, once again. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/elements-status-core-draw-actor-graphic-js-help.170326/