Changing Parameter Order

Good day everyone, and thanks ahead of time for your help.


I'm trying to change the order the parameters show up in the various menus. I'm pretty sure I'll have the change it in multiple locations (for example, the status menu the equip menu and the shop menu), but the problem is I'm not sure how. I'm still very new to javascript (and programming in general).


I'd like to change the order so it's (Top to bottom) Strength, Magic Attack, Agility, Defense, Magic Defense, Luck. 


I tried to figure it out myself, and I *THINK* I'm going in the right direction. Under rpg_windows.js, there is a section for Window_Status.prototype.drawparameters. It looks like this:

Spoiler
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');



I'm pretty sure that I need to change that for loop to read something else, but I'm just not sure what I change it to. I'm hoping someone can point me in the right direction (and any lessons I can learn from it would be great too!


Again, thanks ahead of time. 
Good day everyone, and thanks ahead of time for your help.


I'm trying to change the order the parameters show up in the various menus. I'm pretty sure I'll have the change it in multiple locations (for example, the status menu the equip menu and the shop menu), but the problem is I'm not sure how. I'm still very new to javascript (and programming in general).


I'd like to change the order so it's (Top to bottom) Strength, Magic Attack, Agility, Defense, Magic Defense, Luck. 


I tried to figure it out myself, and I *THINK* I'm going in the right direction. Under rpg_windows.js, there is a section for Window_Status.prototype.drawparameters. It looks like this:

Spoiler
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');



I'm pretty sure that I need to change that for loop to read something else, but I'm just not sure what I change it to. I'm hoping someone can point me in the right direction (and any lessons I can learn from it would be great too!


Again, thanks ahead of time. 

I'm going to assume you mean attack instead of strength.


Try this:



Window_Status.prototype.drawParameters = function(x, y) {
// parameters to show in order
var myParamOrder = [2, 4, 6, 3, 5, 7]

var lineHeight = this.lineHeight();
for (var i = 0; i < myParamOrder.length; i++) {
var paramId = myParamOrder;
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');
}
};


I'm also making a plugin that will allow you to do this more easily here
This didn't work for me unfortunately. I've been trying to manipulate this code:

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');


I want to be able to show only the following attributes on the status window in this order:
Attack
Defense
M. Defense
Hit Rate
Evasion Rate

Any assistance would be greatly appreciated.
@Redenius Please do not hi-jack an existing (dead) thread with a different query. Instead post a new thread in this section ( i.e. Javascript/Plugin Support).

Moderator note: Closing

Original thread: https://forums.rpgmakerweb.com/threads/changing-parameter-order.62244/