MV Javascript help! - Hide "Luck" from Window_Status

Hello, this is the code for the Window_Status that shows all the parameters of the actor.

Window_Status.prototype.drawBlock3 = function(y) {
this.drawParameters(48, y);

I would like to hide just the "luck" parameter. Could someone with JavaScript knowledge help me modify the code?
Specifically, I need assistance with the section marked in red.
there is another section that has a parameter [0,1,2,3,4,5,6,7] in it.
remove "7" to hide luck.
as that is the base parameter.

however, this does so for all actors, if you just want it for some actors,
there is a plugin to let you show what parameter to show and change
the name for them to a different one.

it depends what you feel most comfortable with.
Have you tried Googling this? There are many threads about not showing a specific parameter, even little plugins.

In fact, you just posted in one of those threads a few days ago - what's wrong with the the code you downloaded there?

The code you show is not what needs to be modified, it's just a function call. Inside of that function you just skip the index for luck.
Code:
Window_Status.prototype.drawParameters = function(x, y) {
    var lineHeight = this.lineHeight();
    for (var i = 0; i < 5; i++) {
        var paramId = i + 2;
        var y2 = y + lineHeight * i;
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.param(paramId), x, y2, 160);
        this.resetTextColor();
        this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
    }
};

Paste that into a *.js file, save it as a plugin, include in your project.
In fact, you just posted in one of those threads a few days ago - what's wrong with the the code you downloaded there?
You're right, nothing wrong with that plugin, it works well. I just need a different thing now. 😉
there is another section that has a parameter [0,1,2,3,4,5,6,7] in it.
remove "7" to hide luck.
as that is the base parameter.

however, this does so for all actors, if you just want it for some actors,
there is a plugin to let you show what parameter to show and change
the name for them to a different one.

it depends what you feel most comfortable with.

I can't find it :/

//-----------------------------------------------------------------------------
// Window_Status
//
// The window for displaying full status on the status screen.

function Window_Status() {
this.initialize.apply(this, arguments);
}

Window_Status.prototype = Object.create(Window_Selectable.prototype);
Window_Status.prototype.constructor = Window_Status;

Window_Status.prototype.initialize = function() {
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
Window_Selectable.prototype.initialize.call(this, 0, 0, width, height);
this._actor = null;
this.refresh();
this.activate();
};

Window_Status.prototype.setActor = function(actor) {
if (this._actor !== actor) {
this._actor = actor;
this.refresh();
}
};

Window_Status.prototype.refresh = function() {
this.contents.clear();
if (this._actor) {
var lineHeight = this.lineHeight();
this.drawBlock1(lineHeight * 0);
this.drawHorzLine(lineHeight * 1);
this.drawBlock2(lineHeight * 2);
this.drawHorzLine(lineHeight * 6);
this.drawBlock3(lineHeight * 7);
this.drawHorzLine(lineHeight * 13);
this.drawBlock4(lineHeight * 14);
}
};

Window_Status.prototype.drawBlock1 = function(y) {
this.drawActorName(this._actor, 6, y);
this.drawActorClass(this._actor, 192, y);
this.drawActorNickname(this._actor, 432, y);
};

Window_Status.prototype.drawBlock2 = function(y) {
this.drawActorFace(this._actor, 12, y);
this.drawBasicInfo(204, y);
this.drawExpInfo(456, y);
};

Window_Status.prototype.drawBlock3 = function(y) {
this.drawParameters(48, y);
this.drawEquipments(432, y);
};

Window_Status.prototype.drawBlock4 = function(y) {
this.drawProfile(6, y);
};

Window_Status.prototype.drawHorzLine = function(y) {
var lineY = y + this.lineHeight() / 2 - 1;
this.contents.paintOpacity = 48;
this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor());
this.contents.paintOpacity = 255;
};

Window_Status.prototype.lineColor = function() {
return this.normalColor();
};

Window_Status.prototype.drawBasicInfo = function(x, y) {
var lineHeight = this.lineHeight();
this.drawActorLevel(this._actor, x, y + lineHeight * 0);
this.drawActorIcons(this._actor, x, y + lineHeight * 1);
this.drawActorHp(this._actor, x, y + lineHeight * 2);
};

Window_Status.prototype.drawParameters = function(x, y) {
var lineHeight = this.lineHeight();
for (var i = 0; i < 6; i++) {
var paramId = i + 2;
var y2 = y + lineHeight * i;
this.changeTextColor(this.systemColor());
this.drawText(TextManager.param(paramId), x, y2, 160);
this.resetTextColor();
this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
}
};

Window_Status.prototype.drawExpInfo = function(x, y) {
var lineHeight = this.lineHeight();
var expTotal = TextManager.expTotal.format(TextManager.exp);
var expNext = TextManager.expNext.format(TextManager.level);
var value1 = this._actor.currentExp();
var value2 = this._actor.nextRequiredExp();
if (this._actor.isMaxLevel()) {
value1 = '-------';
value2 = '-------';
}
this.changeTextColor(this.systemColor());
this.drawText(expTotal, x, y + lineHeight * 0, 270);
this.drawText(expNext, x, y + lineHeight * 2, 270);
this.resetTextColor();
this.drawText(value1, x, y + lineHeight * 1, 270, 'right');
this.drawText(value2, x, y + lineHeight * 3, 270, 'right');
};

Window_Status.prototype.drawEquipments = function(x, y) {
var equips = this._actor.equips();
var count = Math.min(equips.length, this.maxEquipmentLines());
for (var i = 0; i < count; i++) {
this.drawItemName(equips, x, y + this.lineHeight() * i);
}
};

Window_Status.prototype.drawProfile = function(x, y) {
this.drawTextEx(this._actor.profile(), x, y);
};

Window_Status.prototype.maxEquipmentLines = function() {
return 6;
};

//-----------------------------------------------------------------------------
ATT_Turan has the information you need, the param array is inside a different part
of the core code, which is not inside the status, I think it was inside Game_Actor
section.

I kinda overread the "Window_Status" which is format a slightly differently to
read the parameters inside the windows 🙂

so it's my bad 🙁
I can't find it :/
I gave you the copy-and-paste solution to your question.
I gave you the copy-and-paste solution to your question.

Thank you, ATT_turan, but I didn't fully explain the situation. I thought I could handle it on my own.

I created a plugin with the help of chatgpt that allows me to show the window_status when the skill menu is opened, and everything is working as expected. However, I simply want to hide the luck parameter for all actors in the window_status. So, Silva's plugin or yours, which I tried to use together with chatgpt's plugin, are not working.

Here is the plugin in question. Is there a way to remove the luck parameter by modifying this plugin?

//=============================================================================
// RPG Maker MV
//=============================================================================

/*:
*
* @param Window X
* @desc The X position of the custom status window.
* @Default 0
*
* @param Window Y
* @desc The Y position of the custom status window.
* @Default 0
*
* @param Window Width
* @desc The width of the custom status window.
* @Default 240
*
* @param Window Height
* @desc The height of the custom status window.
* @Default 416
*
*/

(function() {

var parameters = PluginManager.parameters('AO_MenuInfo');
var windowX = Number(parameters['Window X'] || 0);
var windowY = Number(parameters['Window Y'] || 0);
var windowWidth = Number(parameters['Window Width'] || 240);
var windowHeight = Number(parameters['Window Height'] || 416);

//-----------------------------------------------------------------------------
// Window_Status
//
// The window for displaying full status on the status screen.

function Window_Status() {
this.initialize.apply(this, arguments);
}

Window_Status.prototype = Object.create(Window_Selectable.prototype);
Window_Status.prototype.constructor = Window_Status;

Window_Status.prototype.initialize = function() {
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
Window_Selectable.prototype.initialize.call(this, 0, 0, width, height);
this._actor = null;
this.refresh();
this.activate();
};

Window_Status.prototype.setActor = function(actor) {
if (this._actor !== actor) {
this._actor = actor;
this.refresh();
}
};

Window_Status.prototype.refresh = function() {
this.contents.clear();
if (this._actor) {
var lineHeight = this.lineHeight();
this.drawBlock1(lineHeight * 0);
this.drawHorzLine(lineHeight * 1);
this.drawBlock2(lineHeight * 2);
this.drawHorzLine(lineHeight * 6);
this.drawBlock3(lineHeight * 7);
this.drawHorzLine(lineHeight * 13);
this.drawBlock4(lineHeight * 14);
}
};

Window_Status.prototype.drawBlock1 = function(y) {
this.drawActorName(this._actor, 6, y);
this.drawActorClass(this._actor, 192, y);
this.drawActorNickname(this._actor, 432, y);
};

Window_Status.prototype.drawBlock2 = function(y) {
this.drawActorFace(this._actor, 12, y);
this.drawBasicInfo(204, y);
this.drawExpInfo(456, y);
};

Window_Status.prototype.drawBlock3 = function(y) {
this.drawParameters(48, y);
this.drawEquipments(432, y);
};

Window_Status.prototype.drawBlock4 = function(y) {
this.drawProfile(6, y);
};

Window_Status.prototype.drawHorzLine = function(y) {
var lineY = y + this.lineHeight() / 2 - 1;
this.contents.paintOpacity = 48;
this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor());
this.contents.paintOpacity = 255;
};

Window_Status.prototype.lineColor = function() {
return this.normalColor();
};

Window_Status.prototype.drawBasicInfo = function(x, y) {
var lineHeight = this.lineHeight();
this.drawActorLevel(this._actor, x, y + lineHeight * 0);
this.drawActorIcons(this._actor, x, y + lineHeight * 1);
this.drawActorHp(this._actor, x, y + lineHeight * 2);
};

Window_Status.prototype.drawParameters = function(x, y) {
var lineHeight = this.lineHeight();
for (var i = 0; i < 6; i++) {
var paramId = i + 2;
var y2 = y + lineHeight * i;
this.changeTextColor(this.systemColor());
this.drawText(TextManager.param(paramId), x, y2, 160);
this.resetTextColor();
this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
}
};

Window_Status.prototype.drawExpInfo = function(x, y) {
var lineHeight = this.lineHeight();
var expTotal = TextManager.expTotal.format(TextManager.exp);
var expNext = TextManager.expNext.format(TextManager.level);
var value1 = this._actor.currentExp();
var value2 = this._actor.nextRequiredExp();
if (this._actor.isMaxLevel()) {
value1 = '-------';
value2 = '-------';
}
this.changeTextColor(this.systemColor());
this.drawText(expTotal, x, y + lineHeight * 0, 270);
this.drawText(expNext, x, y + lineHeight * 2, 270);
this.resetTextColor();
this.drawText(value1, x, y + lineHeight * 1, 270, 'right');
this.drawText(value2, x, y + lineHeight * 3, 270, 'right');
};

Window_Status.prototype.drawEquipments = function(x, y) {
var equips = this._actor.equips();
var count = Math.min(equips.length, this.maxEquipmentLines());
for (var i = 0; i < count; i++) {
this.drawItemName(equips, x, y + this.lineHeight() * i);
}
};

Window_Status.prototype.drawProfile = function(x, y) {
this.drawTextEx(this._actor.profile(), x, y);
};

Window_Status.prototype.maxEquipmentLines = function() {
return 6;
};

//-----------------------------------------------------------------------------
// Scene_Skill
//
// The scene class of the skill screen.

var _Scene_Skill_create = Scene_Skill.prototype.create;
Scene_Skill.prototype.create = function() {
_Scene_Skill_create.call(this);
this.createStatusWindow();
};

Scene_Skill.prototype.createStatusWindow = function() {
this._statusWindow = new Window_Status();
this._statusWindow.move(windowX, windowY, windowWidth, windowHeight);
this._statusWindow.hide();
this.addWindow(this._statusWindow);
};

var _Scene_Skill_start = Scene_Skill.prototype.start;
Scene_Skill.prototype.start = function() {
_Scene_Skill_start.call(this);
this._statusWindow.setActor(this.actor());
this._statusWindow.show();
};

})();
Sorry, most coders on this forum have stated they won't offer support with AI-created plugins.

Also, I already gave you the answer.
Why not ask the plugin dev (ChatGPT) to modify it? If it is frustrating, then well, you will know how I feel looking at that code.
as a side note, ATT_Turan gave you the code, and if it does not work, replace
6 with 5 in your draw parameters.

but if you dont know JS or ask chatGPT to create plugins, you are on your own
for debugging it.

overwrite the Window_Status core part is also not a good idea as you could use
far less code with minimum changes to fit your needs.
Sorry, most coders on this forum have stated they won't offer support with AI-created plugins.

Also, I already gave you the answer.
I understand, I hope I didn't offend you.
as a side note, ATT_Turan gave you the code, and if it does not work, replace
6 with 5 in your draw parameters.
Thank you so much, it worked!

Original thread: https://forums.rpgmakerweb.com/threads/javascript-help-hide-luck-from-window_status.159247/