MV How do I make (only) the TP bar shorter

Hello everyone,

I'm sorry if the question has been asked a lot already, but I couldn't find anything relevant to my issue on internet

Basically, I'd need to make the TP bar a lot shorter, and at the same time giving back the space I freed to the HP bar. I have zero idea how to change the length of only one of the bars, not all three.

I own most Yanfly plugins, if any of them is relevant here

1756404226664.png


If this is somehow borderline impossible, I'd be fine hiding the bar but then I'd need a way to showcase the TP number on the screen in any way, and I don't know how to that either.

Thanks in advance for the help! 🙂
Hello everyone,

I'm sorry if the question has been asked a lot already, but I couldn't find anything relevant to my issue on internet

Basically, I'd need to make the TP bar a lot shorter, and at the same time giving back the space I freed to the HP bar. I have zero idea how to change the length of only one of the bars, not all three.

I own most Yanfly plugins, if any of them is relevant here

View attachment 348518

If this is somehow borderline impossible, I'd be fine hiding the bar but then I'd need a way to showcase the TP number on the screen in any way, and I don't know how to that either.

Thanks in advance for the help! 🙂

Hi,

You can put that in a mini plugin "BattleStatus_GaugeLayout.js"

JavaScript:
/*:
 * @plugindesc Customize HP/MP/TP gauge widths and X positions in the battle status window.
 * @author ALASTH
 *
 * @param HPWidth
 * @text HP Gauge Width
 * @type number
 * @min 1
 * @default 108
 *
 * @param MPWidth
 * @text MP Gauge Width
 * @type number
 * @min 1
 * @default 96
 *
 * @param TPWidth
 * @text TP Gauge Width
 * @type number
 * @min 1
 * @default 96
 *
 * @param HPX
 * @text HP Gauge X Offset
 * @type number
 * @min -9999
 * @default 0
 *
 * @param MPX
 * @text MP Gauge X Offset
 * @type number
 * @min -9999
 * @default 123
 *
 * @param TPX
 * @text TP Gauge X Offset
 * @type number
 * @min -9999
 * @default 234
 *
 * @help
 * ─────────────────────────────────────────────────────────────────────────────
 * What this does :
 * ─────────────────────────────────────────────────────────────────────────────
 * This mini plugin customizes, inside Window_BattleStatus (battle status):
 *   • the WIDTH of each gauge: HP, MP, TP
 *   • the X position (offset) of each gauge: HP, MP, TP
 *
 * It does NOT change gauges in other windows (Party/Status menus, etc.).
 *
 * Defaults match vanilla MV (HP:108 @ x+0, MP:96 @ x+123, TP:96 @ x+234).
 */

(() => {
  'use strict';

  const PLUGIN_NAME = 'BattleStatus_GaugeLayout';
  const P = PluginManager.parameters(PLUGIN_NAME);

  const HP_WIDTH = Number(P.HPWidth || 108);
  const MP_WIDTH = Number(P.MPWidth || 96);
  const TP_WIDTH = Number(P.TPWidth || 96);

  const HP_X = Number(P.HPX || 0);
  const MP_X = Number(P.MPX || 123);
  const TP_X = Number(P.TPX || 234);

  // Override only the battle status gauge area with TP
  const _drawGaugeAreaWithTp = Window_BattleStatus.prototype.drawGaugeAreaWithTp;
  Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
    // Draw with custom widths and X offsets
    const y = rect.y;
    this.drawActorHp(actor, rect.x + HP_X, y, HP_WIDTH);
    this.drawActorMp(actor, rect.x + MP_X, y, MP_WIDTH);
    this.drawActorTp(actor, rect.x + TP_X, y, TP_WIDTH);
  };

})();
Hey,

Thank you so much for the fast answer, it works perfectly! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-only-the-tp-bar-shorter.179825/