Concerning escape codes (icons for parameters)

Hi everyone—

I wish to have icons in front of my parameters anytime there is a scene that calls them (namely the Equip and Status menus.) There is a plugin that was able to achieve this, Global Text Codes v1.0.1. This allowed escape codes to be used anywhere which caused a lot of other scenes to become extremely laggy, such as the BeastBook plugin. In any case, that plugin no longer works with RMMV v.1.5.1 and up.

I'm not looking to use a script with such a large scope—just the 8 major parameters (Max HP-Luck). Does anyone know how to add such code or tweak the rpg_windows.js to allow/show icons? Surprisingly, none of Yanfly's plugins achieve this, unless I'm overlooking something. I can't find any others after searching.

Any help is greatly appreciated.
Use Victor Engine Control Text. Just place the Basic Module(it's a mandatory plugin to use Vic tore Engine Plugins) and Control Text under all of you're Yanfly plugins and it will work with no problem.
Thank you for providing those. It's exactly what I'm trying to avoid. Using an entirely different engine and having escape codes allowed anywhere is causing scenes like BeastBook to lag immensely—I just tested this. It's overkill. Even in Victor's script, it states in the description that drawing escape codes is slower than drawing normal text. This is probably the cause of the lag.

I just want something basic that can add an icon in front of a parameter name whenever it's drawn. Nothing else. It doesn't even have to be an escape code, I guess. Maybe I'll look in the script and see if I can dissect and salvage some code and add it to the rpg_window's draw parameter string. I imagine it's something along these lines:

Code:
Window_Status.prototype.drawParameters = function(x, y) {
    var lineHeight = this.lineHeight();
    for (var i = 0; i < 6; i++) {
        var paramId = i + 2;
        var y2 = y + lineHeight * i;
        this.changeTextColor(this.systemColor());
        this.drawIcon(iconIndex, textState.x + 2, textState.y + 2);
        this.drawText(TextManager.param(paramId), x, y2, 160);
        this.resetTextColor();
        this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
    }
};

The "drawIcon" line is the new addition. Obviously this doesn't work, but does anyone know how to make it so?
I'm a bump chump.
♬♪ Once ♩♫
Actual what you have could work. The this.drawIcon stuff.
But you need to define what:
iconIndex,
textState.x,
and
textState.y
are.

Remember the base format of
this.drawIcon(iconId, x, y); which means iconId ie that index number that you put when you write out say \i[x]. X is the x postion and y is the y postion (think of it like a graph, x is the horiztonal postion and y is the vertical postion)

Since parameters are drawn in a loop, this means the icons need to be in order.
For example lets
the Max Hp Icon is 76
Max Mp Icon icon is 77
Attack Icon is 78
Def Icon is 79
and on and on.

With this in mind this means that a simple formula can be used inside the for loop for the icon index:
var iconIndexId = z + i* w;
Where z is the id of the first icon and w is the number of icons between the icons you want(ie if you want 78, 79,80, etc it's 1. If you want 100, 96, 92, 88 etc it's -4, negatives also make the numbers go down.)
Now with this make sure that your icons are next to eachother or in a pattern on your icon sheet(you may have to edit it for it to work. Use Gimp or photoshop or paint.net)

So in the Status function, remember that it starts with Attack not Max HP, so you're startin with the Attack Icon which I'm going say is 76. And I'm going to countue from there:

Window_Status.prototype.drawParameters = function(x, y) {
var lineHeight = this.lineHeight();
for (var i = 0; i < 6; i++) {
var paramId = i + 2;
var y2 = y + lineHeight * i;
var iconIndexId = 76 + i* 1;
this.changeTextColor(this.systemColor());
this.drawIcon(iconIndexId, x, y2 + 2);
this.drawText(TextManager.param(paramId), x + 50, y2, 160);
this.resetTextColor();
this.drawText(this._actor.param(paramId), x + 210, y2, 60, 'right');
}

Original thread: https://forums.rpgmakerweb.com/threads/concerning-escape-codes-icons-for-parameters.88800/