Hide useless stats

Draw

Veteran
Veteran
Joined
Oct 11, 2015
Messages
83
Reaction score
1
First Language
French
Primarily Uses
Hi everyone !

I've already made a topic for the same thing with VX ACE not so long ago. I would like to hide stats I don't use in the Equip Window. ATK, MAT, AGI instead of ATK, DEF, MAT, MDF, AGI, LUK. I found "ParamId" in the js script but I don't know how to write stats one by one. If someone knows, feel free to post it there :)
 

Aluvien

Veteran
Veteran
Joined
Nov 14, 2014
Messages
33
Reaction score
15
First Language
English
Primarily Uses
I'm new to this too, but I figured I'd give this one a shot. The order of parameters is in objects_js:

Object.defineProperties(Game_BattlerBase.prototype, { // Hit Points hp: { get: function() { return this._hp; }, configurable: true }, // Magic Points mp: { get: function() { return this._mp; }, configurable: true }, // Tactical Points tp: { get: function() { return this._tp; }, configurable: true }, // Maximum Hit Points mhp: { get: function() { return this.param(0); }, configurable: true }, // Maximum Magic PointsAnd so on. You want ATK, MAT, and AGI, which conveniently, are parameters 1, 3, and 5. The most straightforward way to do this is to replace the counter code in Window_EquipStatus so that it skips the unwanted stats. Try this:

Window_EquipStatus.prototype.refresh = function() { this.contents.clear(); if (this._actor) { this.drawActorName(this._actor, this.textPadding(), 0); for (var i = 0; i < 6; i+=2) { this.drawItem(0, this.lineHeight() * (1 + i / 2), 2 + i); } }};Note that here, your stats are parameters 0, 2, and 4. In rpg_objects, ATK is parameter 1, so note for any future changes that item in this function is 1 lower than param in rpg_objects. The order, however, seems to be the same. Note also that I changed the y value for each line to adjust for the missing lines on the screen. Hope this helps!
 
Last edited by a moderator:

Draw

Veteran
Veteran
Joined
Oct 11, 2015
Messages
83
Reaction score
1
First Language
French
Primarily Uses
It works fine, thank you !

By the way, can we do it with other stats, but one by one ?

Something like that :

atk(x, y, lineHeight x 1)

mat(x, y, lineHeight x 2)

...
 

Aluvien

Veteran
Veteran
Joined
Nov 14, 2014
Messages
33
Reaction score
15
First Language
English
Primarily Uses
That is possible, but is slightly more complicated. If you look at the code above, the relevant line is:

this.drawItem(0, this.lineHeight() * (1 + i / 2), 2 + i);The first two arguments are clearly X and Y, but the last one is unclear. (It's important to note that the last argument is 2 + i, meaning that what I said in my last post is mistaken: ATK is parameter 2 here, not parameter 0.)

In order to find out what that argument is, we need to look for the drawItem function of Window_EquipStatus (since the function itself is "this.drawItem"):

Window_EquipStatus.prototype.drawItem = function(x, y, paramId) { this.drawParamName(x + this.textPadding(), y, paramId); if (this._actor) { this.drawCurrentParam(x + 140, y, paramId); } this.drawRightArrow(x + 188, y); if (this._tempActor) { this.drawNewParam(x + 222, y, paramId); }};This function takes three arguments: x, y, and parameter ID. Thus, you should be able to structure calls for individual parameters like this:

this.drawItem(0, this.lineHeight() * (1 + 1 / 2), 2) //Draws ATKSo that the code as a whole would be:

Window_EquipStatus.prototype.refresh = function() { this.contents.clear(); if (this._actor) { this.drawActorName(this._actor, this.textPadding(), 0); this.drawItem(0, this.lineHeight() * 1, 2); this.drawItem(0, this.lineHeight() * 2, 4); this.drawItem(0, this.lineHeight() * 3, 6); }};I removed the counter, since we're directly writing each command instead of iterating over a list. Note that because of this, I had to change how Y is calculated, since variable i no longer exists. This way you can put in individual lines for every parameter you want, and only have to change Y and paramId. Hope this helped.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Would be nice to have this made into a proper plugin for everyone to use. I myself hate seeing this:

 

Draw

Veteran
Veteran
Joined
Oct 11, 2015
Messages
83
Reaction score
1
First Language
French
Primarily Uses
Thank you, it works fine !

I hope it'll be usefull for all.
 
Last edited by a moderator:

Amuseum

Veteran
Veteran
Joined
Oct 27, 2015
Messages
71
Reaction score
66
First Language
English Chinese
Primarily Uses
RMXP
several steps. 1. create an array to hold the ids of the stats you want in specific order. 2. iterate through this new array. a temp var to hold the current id, not i, is passed to drawItem.
 
Last edited by a moderator:

junglechief

Veteran
Veteran
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
Running this right now. Trying to only show HP, Atk, Def, and Agi. 

Window_EquipStatus.prototype.refresh = function() {

    this.contents.clear();

    if (this._actor) {

        this.drawActorName(this._actor, this.textPadding(), 0);

        this.drawItem(0, this.lineHeight() * 1, 2);

  this.drawItem(0, this.lineHeight() * 2, 3);

        this.drawItem(0, this.lineHeight() * 3, 6);

    }

};

 

Doesn't appear to be doing anything.
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
647
Reaction score
382
First Language
English
Primarily Uses
N/A
Running this right now. Trying to only show HP, Atk, Def, and Agi. 

Window_EquipStatus.prototype.refresh = function() {

    this.contents.clear();

    if (this._actor) {

        this.drawActorName(this._actor, this.textPadding(), 0);

        this.drawItem(0, this.lineHeight() * 1, 2);

  this.drawItem(0, this.lineHeight() * 2, 3);

        this.drawItem(0, this.lineHeight() * 3, 6);

    }

};

 

Doesn't appear to be doing anything.
Are you using Yanfly's Equip Core? This won't work if you are. There's something else you have to edit.
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
647
Reaction score
382
First Language
English
Primarily Uses
N/A
Yes I am, you wouldn't happen to know what else needs to be added?
No, but I think I can figure it out in a bit. I also used the Equip Core plugin and ran some quick tests with and without it. It definitely overwrites whatever displays the parameters. I'll take a look shortly. Stay tuned for the edit.

EDIT:

Window_StatCompare.prototype.refresh = function() {    this.contents.clear();    if (this._actor) {        this.drawActorName(this._actor, this.textPadding(), 0);        this.drawItem(0, this.lineHeight() * 1, 2);this.drawItem(0, this.lineHeight() * 3, 3);this.drawItem(0, this.lineHeight() * 5, 4);    }};

Create a new plugin with this code and put it below Equip Core. Notice the numbers "1, 2" "3, 3" "5, 4" The first number (1, 3, and 5) is the spacing and placement of which row the parameters will be in. The second number (2, 3, and 4) is tied to the Parameter that you want to display. In this example, ATK, DEF, and MAT should show with a skipped row between them.

Hope this helps.
 
Last edited by a moderator:

junglechief

Veteran
Veteran
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
No, but I think I can figure it out in a bit. I also used the Equip Core plugin and ran some quick tests with and without it. It definitely overwrites whatever displays the parameters. I'll take a look shortly. Stay tuned for the edit.

EDIT:

Window_StatCompare.prototype.refresh = function() {    this.contents.clear();    if (this._actor) {        this.drawActorName(this._actor, this.textPadding(), 0);        this.drawItem(0, this.lineHeight() * 1, 2);this.drawItem(0, this.lineHeight() * 3, 3);this.drawItem(0, this.lineHeight() * 5, 4);    }};
Create a new plugin with this code and put it below Equip Core. Notice the numbers "1, 2" "3, 3" "5, 4" The first number (1, 3, and 5) is the spacing and placement of which row the parameters will be in. The second number (2, 3, and 4) is tied to the Parameter that you want to display. In this example, ATK, DEF, and MAT should show with a skipped row between them.

Hope this helps.
Got the equip screen to work, now which function draws the stats on the item screen.
 
Last edited by a moderator:

BloodletterQ

Chaotic Neutral Assassin
Veteran
Joined
Aug 15, 2012
Messages
1,532
Reaction score
1,175
First Language
English
Primarily Uses
N/A
So what do I do if I want to skip MP? Would that also remove the box for it?
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
647
Reaction score
382
First Language
English
Primarily Uses
N/A
So what do I do if I want to skip MP? Would that also remove the box for it?
Can't really explain it any better than I did above. Each number is tied to a parameter. Aluvien also explains where you can find out which parameters are tied to which number in post #2. Take a look at the code, you'll definitely figure it out. 
 

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

Latest Threads

Latest Profile Posts

We are truly intellectuals.
Without using violence without weapons
Our group has as many as 1.3 million people and more than 1 hundred thousand talks.
We gathered in an hour, more than 4.5 Half a hundred thousand



I got a Sword.
I got an Axe.
I got two Swords.
Nothing to see here, just walking with my dog.
I haven’t worked on my game in a while. Tomorrow might be the day.
*squeals* :kaoblush:


I've been experimenting with improved memory management again, which allowed me to include items to increase player path length. These are both 44 grid spaces long, and stable. :LZSexcite:
I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!

Forum statistics

Threads
104,463
Messages
1,006,477
Members
135,971
Latest member
Akasheee
Top