Hiding display icons of specfic states

In rpg maker mv, state icon is showing like below.

36360-8a3228c9999732965095d470d1a68b79.jpg


I want to hide some specific state icons by notetag in states.
At first I thought adjusting priority but all buff were showed irrelevantly.
And I tried using empty icon but empty icon was showed for a moment, in state-round display.
(Yeah, as you know, at least two states, they were circulated in a short time)


But I had no knowledge... I tried and found relative scripts in rpg_object.js
(only my thought. i don't know all of this well)


Game_BattlerBase.prototype.buffIcons = function() {
var icons = [];
for (var i = 0; i < this._buffs.length; i++) {
if (this._buffs !== 0) {
icons.push(this.buffIconIndex(this._buffs, i));
}
}
return icons;
};



I wish to control this with <Hidden State> of specific state note.

I want to make lots of passive skill but display screen is so messy. (see below)

36362-c3564548cc3b55e65603e6f6172bc6cd.jpg


36363-5a7cc60d27ba2b67929e644be34b31ae.jpg


Could you help me out of the diffculty?
Hi there!

Firstly, I can't see any of the images you posted, so I kinda had to guess as to what you wanted to see (or NOT see) from your descriptions.

Secondly, you were almost spot on with your guess of what to edit.
Unless you wanted to edit buff icons out instead of or with regular state icons.

Here's the snippet that should allow what you want:

Code:
Game_BattlerBase.prototype.stateIcons = function() {
    return this.states().map(function(state) {
        if (!state.meta.hideIcon) return state.iconIndex;
    }).filter(function(iconIndex) {
        return iconIndex > 0;
    });
};

You only need to tag the "invisible" states with <hideIcon> and they won't show as icons at all.
Note that if you want to do this with the de/buff icons, it'll require a bit more work and a formal plugin since buffs don't have note fields in the database.

Hope this helps!

EDIT: Oh! And just in case, I don't recommend directly editing the default plugin code.
You should make your own JS file for this change and add it in via the plugin manager.
If you don't know how to do that, let me know and I'll try to walk you thru it.
Thank Goodness!

Code:
/*:
 * @plugindesc adjust visibility of icons.
 * @author Maliki79
 *
 * @help
 *
 *
 * To hide icon, Insert <hideIcon> in the state note
 *
 *
 */

Game_BattlerBase.prototype.stateIcons = function() {
    return this.states().map(function(state) {
        if (!state.meta.hideIcon) return state.iconIndex;
    }).filter(function(iconIndex) {
        return iconIndex > 0;
    });
};

I add this scripts as new JS file and it works well~!
I'm grateful for the help you have given me.
(Also I didn't use buff/debuff fuctions but thank your suggestion)
Waouw!
Awesome plugin, thanks.
Yet, how would make it work with Yanfly's "In Battle Status". Indeed, I'd like to hide "special" state I'm using to "sort" character. For exemple, certain state like racial one, or from where there are from. Etc.
As the snippet I made for for the default engine, I'm not sure. I'd have to look and see what other edits woukd need to be made.
Alright, I'll wait or try to figure out an another solution.
I updated the plugin.
Try it and see if it works.

Sorry for the late reply (I was debbuging my game). It works pretty fine, thank you.
Putting the two notetag removed the state, like if it was 100% normal and healthy to have it. Perfect.
Any term of use for it?
Credit in-game is fine.
Glad it worked ok.

Original thread: https://forums.rpgmakerweb.com/threads/hiding-display-icons-of-specfic-states.74664/