Non-intrusive out-of-battle State alerts, a la Gab Window?

I've been searching for a way to create pop-up alerts for application and removal of states, except without the big message box that pauses the game and must be clicked off. My game just has a lot of stats and each has 4-5 levels that change all the time. It seems important to have alerts of some kind, but it'd be very annoying to click through the alert spam.

99% of these states and alerts are going to be happening outside of battle, by the way. It's mostly a story game. It'd be stuff like, if Hunger drops below 20 then the PC gets the Starving state, and so on.

I know of Yan's Gab Window, and that's precisely the sort of functionality that would work, but the tutorial video and readme for it makes it seem like it can't be used for State alerts, only dialogue text boxes. Would I be wrong about that? If not, is there another plugin or way to make this work?
Couldn't you use conditionals to check for states to prompt the gab window?
Possibly? I haven't tried out Gab Window. I wanted to buy it just to mess around. But it seems like whoever's running Yanfly's site doesn't want people buying individual plugins anymore, so I'd have to buy the entire utility bundle just on the chance that it would work for me. I might've still done it if there were other utility plugins I'd see myself using, but I've already bought the ones I'm likely to use, so it's just not a good value.

If you're confident that Gab would work for this purpose, then I'll probably shelve the idea and add the Gab alerts later.
Here i made this for you, now go support yanfly :mrsatan:

Tested it a bit and it works nicely. you can set notetags for each state and show a gab window when its applied or removed. if i happened to miss something i can update it, currently it only utilizes command313 but i guess maybe items? depends on how you add/remove your states i guess, this is for the evented 'Change State' method but adding in item and step removal wouldn't be too bad.

JavaScript:
/*:
*
* @plugindesc State alert YEP Gab Ext
*
* @author Ritter
*
* @help
*
* Add state notetags to display a gab window for add/remove states!
*
* note tags:
*
* <addGab:text>
* <removeGab:text>
*
* Example useage:
*
* <addGab:Suffering from Poison>
* <removeGab:No longer suffering from Poison>
*
* You can also use the word actor to display actors name.
*
* <addGab:actor is suffering from Poison>
* <removeGab:actor is no longer suffering from Poison>
*
* This would make it say Harold is suffering from Poison
* Harold is no longer suffering from Poison
*
*/




// Change State
var alias_Game_Interpreter_command313 = Game_Interpreter.prototype.command313;
Game_Interpreter.prototype.command313 = function() {
    this.iterateActorEx(this._params[0], this._params[1], function(actor) {
        var alreadyDead = actor.isDead();
        if (this._params[2] === 0) {
            if ($dataStates[this._params[3]].meta.addGab) {
                this.addStateGab(this._params[3], actor);
                this.showGab();
            }
        } else {
            if ($dataStates[this._params[3]].meta.removeGab) {
                this.removeStateGab(this._params[3], actor);
                this.showGab();
            }
        }
    }.bind(this));
    return alias_Game_Interpreter_command313.call(this);
};

Game_Interpreter.prototype.addStateGab = function(state, actor) {
    text = this.gabMeta(state, 1);
    if (text.contains("actor")) text = text.replace("actor", actor._name);
    this._gabText = text;
}

Game_Interpreter.prototype.removeStateGab = function(state, actor) {
    text = this.gabMeta(state, 0);
    if (text.contains("actor")) text = text.replace("actor", actor._name);
    this._gabText = text;
}

Game_Interpreter.prototype.gabMeta = function(state, value) {
    if (value == 1) return $dataStates[state].meta.addGab;
    if (value == 0) return $dataStates[state].meta.removeGab;
}

Edit: had to fix and reupload, forgot to add actor name to removeStateGab function, its fixed now :mrsatan:

Edit for terms:

Free to use for any purpose as long as you own Yanfly Gab Windows plugin.
You can credit me if you want, though its not needed but appreciated.
Damn, that's so incredibly useful! I was pretty sure I could make it work with some janky conditionals and such. But seeing how you whipped something up for me without even being asked, I bought the pack and had something working in minutes! There's a lot of customization I can do eventually but this should work amazing. Thank you so much. 😀
@Ritter Is this your code or something you've taken from Yanfly?
@mlogan The only yanfly code in my code there is script calls like
this.showGab(); and this._gabText = text; everything other than those two calls is my code :LZYcool:
so by itself this little extension would do nothing but throw you an error as it calls to yanflys gab plugin, figured no harm here otherwise i wouldn't have done it :mrsatan:

Glad to see its working well for you @charisma6 , enjoy!
@Ritter Thank you for understanding our need to clarify. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/non-intrusive-out-of-battle-state-alerts-a-la-gab-window.122991/