MZ Edit HPGauge plugin to update TP, even if damage isn't dealt

I want my enemies to have a visible TP bar, which has been surprisingly difficult to find (Though if someone has one I'd gladly make use of it). The best alternative I've found so far is Theo_EnemyHPGauge, which I then edited to show TP instead of HP.

It works, but only if the acting Enemy receives HP damage or healing. I imagine there is some line in the code that a knowledgeable JS user could edit to say "Update on TP change" rather than "Update on HP change," but I really can't figure it out.

I attached the edited file, feel free to tell me I'm a moron if this won't work. For context, the only edits from the original were to replace every instance of "hp" with "tp."
You're not a moron, but it's often going to be more complicated to try to repurpose a plugin to do something very different than to just ask for help in the first place.

Your problem is that the gauge is specifically tied to the damage popups - and since using a skill with a TP cost doesn't generate any popup from the battler, the gauge isn't called to update.

You can try adding this:
Code:
Game_Enemy.prototype.paySkillCost = function(skill) 
{
    this._mp -= this.skillMpCost(skill);
    this._tp -= this.skillTpCost(skill);
    this._refreshGauge = true;
};
No dice unfortunately. Seems like this is more complicated than I thought. Thanks for the response.

Original thread: https://forums.rpgmakerweb.com/threads/edit-hpgauge-plugin-to-update-tp-even-if-damage-isnt-dealt.172402/