I decided to tackle it another way by using
Moghunter's Battle HUD since I can replace the gauges with my own images (and I feel I may have underestimated the issue's complexity initially). My gauge images are below:
First, I initialized the second image after line 2101:
if (String(Moghunter.bhud_tp_meter_visible) == "true") {this._tp_meter2_img = ImageManager.loadBHud("TPMeter2");};
I edited the TP meter function a little bit such that it'll use the black gauge when afflicted with the aforementioned status. For quick debugging I just had an enemy add the state immediately. My edit:
Spoiler
Code:
Battle_Hud.prototype.create_tp_meter = function() {
if (String(Moghunter.bhud_tp_meter_visible) != "true") {return};
this.removeChild(this._tp_meter_blue);
this.removeChild(this._tp_meter_red);
if (!this._battler) {return};
this._tp_meter_red = new Sprite(this._tp_meter_img);
this._tp_meter_red.x = this._pos_x + Moghunter.bhud_tp_meter_pos_x;
this._tp_meter_red.y = this._pos_y + Moghunter.bhud_tp_meter_pos_y;
this._tp_meter_red.rotation = Moghunter.bhud_tp_meter_rotation;
this.addChild(this._tp_meter_red);
/*this._tp_meter_blue = new Sprite(this._tp_meter_img);
this._tp_meter_blue.x = this._tp_meter_red.x;
this._tp_meter_blue.y = this._tp_meter_red.y;
this._tp_meter_blue.rotation = this._tp_meter_red.rotation;
this.addChild(this._tp_meter_blue);*/
// above is the original code
if (this._battler.isStateAffected(11)) {
this._tp_meter_blue = new Sprite(this._tp_meter2_img);
this.addChild(this._tp_meter_blue);
}
else {
this._tp_meter_blue = new Sprite(this._tp_meter_img);
this.addChild(this._tp_meter_blue);
}
this._tp_meter_blue.x = this._tp_meter_red.x;
this._tp_meter_blue.y = this._tp_meter_red.y;
if (String(Moghunter.bhud_tp_meter_flow) === "true") {
this._tp_flow[0] = true;
this._tp_flow[2] = this._tp_meter_img.width / 3;
this._tp_flow[3] = this._tp_flow[2] * 2;
this._tp_flow[1] = Math.floor(Math.random() * this._tp_flow[2]);
};
};
Anyway, it works partially... it only shows the black gauge once I enter a new battle. I'm hoping that someone with better javascript knowledge or someone who's more familiar with this plugin could help me find a way to refresh the gauge mid-battle (while also not interrupting the flow animation!)
EDIT: Forgot to mention I'm using the 2_Light HUD.