Changing Parameter Order

Status
Not open for further replies.

jojarth

Villager
Member
Joined
Oct 16, 2012
Messages
9
Reaction score
1
First Language
English
Primarily Uses
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:

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. 
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
826
First Language
English
Primarily Uses
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:

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
 

Redenius

Warper
Member
Joined
Nov 21, 2017
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@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).

[mod]Closing[/mod]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top