jno8034

Villager
Member
Joined
Mar 4, 2021
Messages
9
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Hi there, hopefully this is a quick fix for you JS pros out there. I know enough to know what I'm looking at usually, but not enough to know how to fix things.

I'm using the Yanfly ItemsEquipsCore plugin and have a weird misalignment with stats shown on the the equip screen.

The two extra lines at the top do not interact with any parameters for my actors that I am aware of and they are just kind of...there. All other stats work correctly and are aligned correctly. How can I remove those first two lines? I'm fairly certain the JS: Parameter Lower settings are the issue, since that is what governs the section beneath the actor face and main stats. I've plugged in the screen image below and the JS that I suspect is the issue.

I'm still really new to RPG Maker as a whole and just barely above noob with JS, so I'm sorry if this is one of those silly easy questions.

Thank you!
Capture.PNG
// Declare variables

const params = this.actorParams();
const lineHeight = this.lineHeight();
const padding = this.itemPadding();
const baseX = 0;
const baseY = this.innerHeight - params.length * lineHeight;
const baseWidth = this.innerWidth;
const valueFontSize = this.paramValueFontSize();


// Calculate Widths

let paramNameWidth = Math.max(...params.map(param => this.textWidth(TextManager.param(param))));
paramNameWidth += padding * 2;
if (this.isUseParamNamesWithIcons()) {
paramNameWidth += ImageManager.iconWidth + 4;

}

let arrowWidth = this.rightArrowWidth();
const totalDivides = this.innerWidth >= 500 ? 3 : 2;
let paramValueWidth = Math.floor((baseWidth - paramNameWidth - arrowWidth) / totalDivides);
paramNameWdth = baseWidth - (paramValueWidth * totalDivides) - arrowWidth;


// Draw Parameters

let x = baseX;
let y = baseY;
let value = 0;
let diffValue = 0;
let alter = 2;

for (const paramId of params) {

// Draw Param Name

this.drawItemDarkRect(x, y, paramNameWidth, lineHeight, alter);
this.drawUpdatedParamName(paramId, x, y, paramNameWidth);
this.resetFontSettings();

x += paramNameWidth;


// Draw Param Before

this.contents.fontSize = valueFontSize;
this.drawItemDarkRect(x, y, paramValueWidth, lineHeight, alter);
this.drawUpdatedBeforeParamValue(paramId, x, y, paramValueWidth);
this.resetFontSettings();
x += paramValueWidth;

// Draw Arrow

this.drawItemDarkRect(x, y, arrowWidth, lineHeight, alter);
this.drawRightArrow(x, y);
x += arrowWidth;

// Draw Param After

this.contents.fontSize = valueFontSize;
this.drawItemDarkRect(x, y, paramValueWidth, lineHeight, alter);
this.drawUpdatedAfterParamValue(paramId, x, y, paramValueWidth);
x += paramValueWidth;

// Draw Param Change

if (totalDivides > 2) {

this.drawItemDarkRect(x, y, paramValueWidth, lineHeight, alter);
this.drawUpdatedParamValueDiff(paramId, x, y, paramValueWidth);

}

// Prepare Next Parameter

x = baseX;
y += lineHeight;
alter = alter === 2 ? 1 : 2;

}
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
910
Reaction score
574
First Language
English
Primarily Uses
RMMV
I'm pretty sure those first two boxes are for MaxHp and MaxMp.

If you've removed those from the parameters to show in that window already, but the scene itself didn't update to not draw those boxes, there might have been a configuration issue on your end causing the problem, perhaps instead of deleting the 'mhp' and 'mmp' values from the box, you replaced it with a space or something.

Indeed, the default equip scene from the VS sample project shows HP and Mp in those boxes.
equip scene default.PNG
 

Latest Threads

Latest Posts

Latest Profile Posts

I managed to review my previous lessons on Learn MV and fixed a lot of things. Yay! :kaopride:
I've decided "Attack on Equestria" should be released first... hence this new ARG channel! https://www.youtube.com/channel/UClKiUI8xOVx9dsF4kRXUmxw
Check it out, and subscribe! The ARG will lead up to the video game. It's not a creepy game, but I just thought it should follow ARG standards.
For anyone interested in my project M - i finally made a gamethread about it :D

Yay. I turned 39 today. Another year older, another year closer to the grave.

Forum statistics

Threads
110,409
Messages
1,053,086
Members
143,472
Latest member
Rocket
Top