MZ How do I put icons in abbreviated terms?

I'm trying to use icons to represent MP and TP by using text codes; it displays properly for skill costs but not for party member stats. Having poked through the database I think this means that the MP code is working but MP (abbr.) is not. How do I fix this?
Screenshot 2026-02-08 133408.png
Screenshot 2026-02-08 133340.png
Hi!
You can use my Global Text plugin that allow you to use the escape codes in places that usually you don't:
Hi!
You can use my Global Text plugin that allow you to use the escape codes in places that usually you don't:
I tried this (both manual and auto modes); it still doesn't work.
I tried this (both manual and auto modes); it still doesn't work.
Are you using my core plugin? EliMZ_Book? That menu you shown on the screenshots are the default or custom ones?

[EDIT] Oh, my bad! That on the scene menu is techically a sprite, not a window. The escape codes only works on windows. So yes, it will not work there =/
I'm actually working on this feature for my menu customizer plugin, but it will take a few more days until it's ready:

Aha, I knew this looked familiar:
MZ's gauges are sprites, Sprite_Gauge; text codes are for windows, not sprites.

Instead you could try something like this:
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Icons for gauge labels.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/167682/
 * @help Free to use and/or modify for any project, no credit required.
 */
;void (() => {
'use strict';

  /** Maps gauge type to icon index, for label. Unlisted types are unaffected. */
  const ICONS = {
    hp: 84,
    mp: 67,
    tp: 69
  };

  /** X draw offset for gauge label icons. */
  const DX = 0;

  /** Y draw offset for gauge label icons. */
  const DY = 0;

  /**
   * @param {Bitmap} bitmap Reference bitmap.
   * @param {number} iconIndex Index of icon to draw.
   * @param {number} x X draw coordinate.
   * @param {number} y Y draw coordinate.
   * @returns {boolean} `true` iff icon was drawn.
   */
  const drawIcon = function(bitmap, iconIndex = 0, x = 0, y = 0) {
    if (iconIndex > 0 && bitmap instanceof Bitmap) {
      // cf Window_Base.prototype.drawIcon
      const b  = ImageManager.loadSystem("IconSet");
      const pw = ImageManager.iconWidth;
      const ph = ImageManager.iconHeight;
      const sx = (iconIndex % 16) * pw;
      const sy = Math.floor(iconIndex / 16) * ph;
      bitmap.blt(b, sx, sy, pw, ph, x, y);
      return true;
    }
    return false;
  };

  // Patch - draw icon 
  const alias = Sprite_Gauge.prototype.drawLabel;
  Sprite_Gauge.prototype.drawLabel = function() {
    const i = ICONS[this._statusType];
    if (i > 0) {
      const x = DX + (this.labelOutlineWidth() >> 1);
      const y = DY + this.labelY();
      drawIcon(this.bitmap, i, x, y);
    } else
      alias.apply(this, arguments);
  };

})();
Edit the ICONS numbers, in the code, as appropriate. I did a quick test and it seemed OK for me~
This is very specifically focused on showing an icon instead of the usual label, but that seems to be what you want in this case?

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-put-icons-in-abbreviated-terms.182354/