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.
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.
Are you using Yanfly's Equip Core? This won't work if you are. There's something else you have to edit.
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: Spoiler 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.
Spoiler 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.
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.