MV Show the enemy MP bar in battle

Hey Howdy Hi swagatrons

Im trying to find a way for the enemy MP bar to show up in battle similar to how Yanfly lets you see the enemy HP bar or how Pretty Sleek Gauges shows the HP bar alongside the MP bar but i ONLY want the MP bar to fit the system i created.
Bump!
Mjshi gives permission to edit his/her code to suit your needs as long as you give credit here: https://mjshi.weebly.com/faq.html, so I would think it wouldn't be too difficult to go into the code for pretty sleek gauges and just comment out the lines the bring in the HP bar. Then you would have code that brings in only the MP bar.

Just throwing the idea out there. Good luck with your project 🙂.
Im trying to find a way for the enemy MP bar to show up in battle similar to how Yanfly lets you see the enemy HP bar... but i ONLY want the MP bar to fit the system i created.
if youre already using yanfly's hp bar plugin, save this as a .js file, load it beneath it, and configure the yanfly one in all the ways you would if every mention of "hp" was "mp" instead

Spoiler
Code:
Window_VisualHPGauge.prototype.drawActorHp = function(actor, x, y, width) {
  width = width || 186;
  var color1 = this.hpGaugeColor1();
  var color2 = this.hpGaugeColor2();
  var rate = this._displayedValue / actor.mmp;
  if (Imported.YEP_AbsorptionBarrier && actor.barrierPoints() > 0) {
    ww = this.drawBarrierGauge(actor, x, y, width);
  } else {
    this.drawGauge(x, y, width, rate, color1, color2);
  }
  if (Yanfly.Param.VHGShowHP) {
    this.changeTextColor(this.systemColor());
    this.drawText(TextManager.hpA, x, y, 44);
  }
  if (Yanfly.Param.VHGShowValue) {
    var val = this._displayedValue
    var max = actor.mmp;
    var w = width;
    var color = this.hpColor(actor);
    this.drawCurrentAndMax(val, max, x, y, w, color, this.normalColor());
  }
};


Window_VisualHPGauge.prototype.updateHpPosition = function() {
  if (!this._battler) return;
  if (this._currentHpValue !== this._battler.mp) {
    this._visibleCounter = Yanfly.Param.VHGGaugeDuration;
    this._currentHpValue = this._battler.mp;
    var difference = Math.abs(this._displayedValue - this._battler.mp);
    this._dropSpeed = Math.ceil(difference / Yanfly.Param.VHGGaugeDuration);
  }
  this.updateDisplayCounter();
};

Window_VisualHPGauge.prototype.setBattler = function(battler) {
  if (this._battler === battler) return;
  this._battler = battler;
  this._currentHpValue = this._battler ? this._battler.mp : 0;
  this._displayedValue = this._battler ? this._battler.mp : 0;
};
just keep in mind that unlike max hp, max mp can usually be 0. in that case it'd crash the game if a battler with 0 max mp were to be loaded. if its how your battle system works, then id doubt it would be an issue as presumably everything would have a max mp greater than 0, but just putting that out there
if youre already using yanfly's hp bar plugin, save this as a .js file, load it beneath it, and configure the yanfly one in all the ways you would if every mention of "hp" was "mp" instead

Spoiler
Code:
Window_VisualHPGauge.prototype.drawActorHp = function(actor, x, y, width) {
  width = width || 186;
  var color1 = this.hpGaugeColor1();
  var color2 = this.hpGaugeColor2();
  var rate = this._displayedValue / actor.mmp;
  if (Imported.YEP_AbsorptionBarrier && actor.barrierPoints() > 0) {
    ww = this.drawBarrierGauge(actor, x, y, width);
  } else {
    this.drawGauge(x, y, width, rate, color1, color2);
  }
  if (Yanfly.Param.VHGShowHP) {
    this.changeTextColor(this.systemColor());
    this.drawText(TextManager.hpA, x, y, 44);
  }
  if (Yanfly.Param.VHGShowValue) {
    var val = this._displayedValue
    var max = actor.mmp;
    var w = width;
    var color = this.hpColor(actor);
    this.drawCurrentAndMax(val, max, x, y, w, color, this.normalColor());
  }
};


Window_VisualHPGauge.prototype.updateHpPosition = function() {
  if (!this._battler) return;
  if (this._currentHpValue !== this._battler.mp) {
    this._visibleCounter = Yanfly.Param.VHGGaugeDuration;
    this._currentHpValue = this._battler.mp;
    var difference = Math.abs(this._displayedValue - this._battler.mp);
    this._dropSpeed = Math.ceil(difference / Yanfly.Param.VHGGaugeDuration);
  }
  this.updateDisplayCounter();
};

Window_VisualHPGauge.prototype.setBattler = function(battler) {
  if (this._battler === battler) return;
  this._battler = battler;
  this._currentHpValue = this._battler ? this._battler.mp : 0;
  this._displayedValue = this._battler ? this._battler.mp : 0;
};
just keep in mind that unlike max hp, max mp can usually be 0. in that case it'd crash the game if a battler with 0 max mp were to be loaded. if its how your battle system works, then id doubt it would be an issue as presumably everything would have a max mp greater than 0, but just putting that out there
Oh this works actually! Thank you very very very much

Original thread: https://forums.rpgmakerweb.com/threads/show-the-enemy-mp-bar-in-battle.170294/