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 🙂
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!
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)
...
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.
Thank you, it works fine !
I hope it'll be usefull for all.
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.
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.
So what do I do if I want to skip MP? Would that also remove the box for it?