MV Plugin to tweak YEP_X_VisualHpGauge

Link to the original plugin: https://www.yanfly.moe/wiki/Visual_HP_Gauges_(YEP)

I'm requesting a plugin that adds functionality to this plugin. This plugin allows you to hide the HP bars of an actor or enemy by adding <Hide HP Gauge> to the actor or enemy's notetags in the database as described on the plugin page.

I would like to add this functionality to states as well.

Thanks, and feel free to ask for clarification etc!
If you mean just the state icon, I think something simple like this works. Add the below as a plugin (copy to notepad, save as .js file, add in plugin manager). Use <hideStates> notetag on enemies or actors.

Sprite_StateIcon.prototype.setup = function(battler) {
this._battler = battler;
if (battler && battler.isEnemy()) {
if (battler.enemy().meta.hideStates)
this.visible = false;
}
if (battler && battler.isActor()) {
if (battler.actor().meta.hideStates)
this.visible = false;
}
};
If you mean just the state icon, I think something simple like this works. Add the below as a plugin (copy to notepad, save as .js file, add in plugin manager). Use <hideStates> notetag on enemies or actors.

Sprite_StateIcon.prototype.setup = function(battler) {
this._battler = battler;
if (battler && battler.isEnemy()) {
if (battler.enemy().meta.hideStates)
this.visible = false;
}
if (battler && battler.isActor()) {
if (battler.actor().meta.hideStates)
this.visible = false;
}
};

I apologize, I meant hiding the HP bar of the enemy when the enemy has a state with the <Hide HP Gauge> note tag. I appreciate the reply though!
Ah ok, use this plugin. <hideHpGauge> notetag

Game_Actor.prototype.hpGaugeVisible = function() {
if (this.states().some(state => state.meta.hideHpGauge)) return false;
if (this.isHidden()) return false;
if (this.currentClass().showHpGauge) return true;
if (!eval(Yanfly.Param.VHGDisplayActor)) return false;
if (this.currentClass().hideHpGauge) return false;
return Game_Battler.prototype.hpGaugeVisible.call(this);
};

Game_Enemy.prototype.hpGaugeVisible = function() {
if (this.states().some(state => state.meta.hideHpGauge)) return false;
if (this.isHidden()) return false;
if (this.enemy().hideHpGauge) return false;
if (BattleManager.isBattleTest()) return true;
if (this.enemy().showHpGauge) return true;
if (!$gameSystem.showHpGaugeEnemy(this._enemyId)) return false;
return Game_Battler.prototype.hpGaugeVisible.call(this);
};
Ah ok, use this plugin. <hideHpGauge> notetag

Game_Actor.prototype.hpGaugeVisible = function() {
if (this.states().some(state => state.meta.hideHpGauge)) return false;
if (this.isHidden()) return false;
if (this.currentClass().showHpGauge) return true;
if (!eval(Yanfly.Param.VHGDisplayActor)) return false;
if (this.currentClass().hideHpGauge) return false;
return Game_Battler.prototype.hpGaugeVisible.call(this);
};

Game_Enemy.prototype.hpGaugeVisible = function() {
if (this.states().some(state => state.meta.hideHpGauge)) return false;
if (this.isHidden()) return false;
if (this.enemy().hideHpGauge) return false;
if (BattleManager.isBattleTest()) return true;
if (this.enemy().showHpGauge) return true;
if (!$gameSystem.showHpGaugeEnemy(this._enemyId)) return false;
return Game_Battler.prototype.hpGaugeVisible.call(this);
};

Awesome, I'll try it out, thanks!!!

Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-tweak-yep_x_visualhpgauge.182432/