Hide HP of specific actor with question marks

As the title says. I'm looking for a way to hide a certain actor's HP when in combat. It has to be changeable in game, because later, the character will be playable.

My game doesn't do "add character" in the normal sense. Instead, the player will select a party to play for specific quests, but at some early points they will encounter a character who will temporarily join their party. It only happens for one battle, so the player will not be able to open the menu to see their stats, but their HP displays in combat. I want to replace their actual HP with something like ????/???? for key battles, but not permanently.

Is there a plugin that will allow me to do this? Or, perhaps, something already built in?
I'm pretty busy right now, but if no one has a solution I can write a small plugin for you. It's 7Am right now where I live, if my toddler naps later I will give it a try.
Add me on Discord so I can send it to you. (I'll PM you my name)

Edit: I allready had time to write it. Just add me and I can send it to you 🙂

Edit2: I'm fairily new to the programming community. I created a GitHub account right now. You can extract the plugin from there --> Masasori - Github
@Masajatsu It's awesome that you want to help! I don't really see the reason to keep trying to get someone to talk to you on Discord, which not everyone uses, instead of just pasting your solution here in the person's existing thread.

@Phlar1245 Try pasting this into a text editor, save as a *.js file, and include it as a plugin. Replace the X on the indicated line with the ID of your actor, no leading 0s. Then replace Y with the ID of a switch. While that switch is turned on in your game, the actor's HP won't display.

Code:
Window_Base.prototype.drawActorHp = function(actor, x, y, width) {
    width = width || 186;
    var color1 = this.hpGaugeColor1();
    var color2 = this.hpGaugeColor2();
// Replace the X and Y on the next line
    if (actor.actorId()==X && $gameSwitches.value(Y))
        this.drawText("????", x, y, 4);
    else
    {
        this.drawGauge(x, y, width, actor.hpRate(), color1, color2);
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.hpA, x, y, 44);
        this.drawCurrentAndMax(actor.hp, actor.mhp, x, y, width,
                           this.hpColor(actor), this.normalColor());
    }
};
@Masajatsu It's awesome that you want to help! I don't really see the reason to keep trying to get someone to talk to you on Discord, which not everyone uses, instead of just pasting your solution here in the person's existing thread.

@Phlar1245 Try pasting this into a text editor, save as a *.js file, and include it as a plugin. Replace the X on the indicated line with the ID of your actor, no leading 0s. Then replace Y with the ID of a switch. While that switch is turned on in your game, the actor's HP won't display.

Code:
Window_Base.prototype.drawActorHp = function(actor, x, y, width) {
    width = width || 186;
    var color1 = this.hpGaugeColor1();
    var color2 = this.hpGaugeColor2();
// Replace the X and Y on the next line
    if (actor.actorId()==X && $gameSwitches.value(Y))
        this.drawText("????", x, y, 4);
    else
    {
        this.drawGauge(x, y, width, actor.hpRate(), color1, color2);
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.hpA, x, y, 44);
        this.drawCurrentAndMax(actor.hp, actor.mhp, x, y, width,
                           this.hpColor(actor), this.normalColor());
    }
};
Hey ATT_Turan,
as I stated, I'm fairily new and don't know what's the etiquette.

I will remember what you said and will next time just post the code.
Hey all, thanks for your responses, and sorry for taking so long to get back to you. I appreciate all the hard word you each put in to help me.

@ATT_Turan I saved the code and adjusted the variables as you said and it worked to change that character's HP bar, but it replaced the whole thing with an !

ATT_Turan Plugin Screenshot 1.png


@Masajatsu I set up the "MASA_HideActorHP" plugin with the 5 ID Actor slots to their respective actors and Game Variable 32 to 1 (the Actor ID for Echo). I'm not entirely sure how I'm supposed to set it up. It works, but it changes all the characters HP bars to ????. Does it require the other plugin listed in your link?

Masajatsu Plugin Screenshot 1.png


Masajatsu Plugin Screenshot 2.png


Thanks again for your help!

EDIT:
Okay, I in the MASA plugin, I set ID Actor 2-5 to 0 and it worked in isolating only Echo. I'm still not sure how it works. Is it an array? I'm not very well versed in those.
Hey all, thanks for your responses, and sorry for taking so long to get back to you. I appreciate all the hard word you each put in to help me.

@ATT_Turan I saved the code and adjusted the variables as you said and it worked to change that character's HP bar, but it replaced the whole thing with an !

View attachment 255648

@Masajatsu I set up the "MASA_HideActorHP" plugin with the 5 ID Actor slots to their respective actors and Game Variable 32 to 1 (the Actor ID for Echo). I'm not entirely sure how I'm supposed to set it up. It works, but it changes all the characters HP bars to ????. Does it require the other plugin listed in your link?

View attachment 255649

View attachment 255650

Thanks again for your help!

EDIT:
Okay, I in the MASA plugin, I set ID Actor 2-5 to 0 and it worked in isolating only Echo. I'm still not sure how it works. Is it an array? I'm not very well versed in those.
Hey 🙂

I didn't saw that you need it for only one character.
Yes, it is an array.
Change the "ID Actor x" parameters to the ID of the actor you don't want to see the HP.
If you want to see the HP again, simply change the value to 0.
In your case it would be :
Code:
$gameVariables.value(32)[0] = 0;

Original thread: https://forums.rpgmakerweb.com/threads/hide-hp-of-specific-actor-with-question-marks.155640/