Is it possible to display a health gauge through common events with/without plugins?

I'm making a custom evented menu for my game and I want to display a health bar and mana bar when you are inspecting the party members. I've debated on using SumRndmDde's HUD Maker Plus, but I want the animation to play every time the sub-menu is loaded, which HUD Maker Plus does not do.
Theoretically, yes, you could have a parallel event repeatedly checking every x frames for changes to the player's HP then drawing a calculated rectangle on the screen
I feel for what I would want, it would only need to check it once whenever the party sub-section is opened.
How would you draw rectangles from RPGMZ? Or would I just need to create a picture of the health gauge for each health percent?
I don't know how to draw rectangles, only that it's possible. It's some Pixi canvas function IIRC. I would look at the code for how SRD HUDMaker does it if I was really interested in replicating it in a common event.
If you have a small number of possible HP values then 1 picture per stage is feasible.

Otherwise, maybe show a picture and scale it according to current/max HP. You can get the values via Control Variables -> Game Data -> Actor. Due to editor limitations, scaling a picture to variable values requires a Script command, e.g.
JavaScript:
const picId     = 5;  // operate on picture 5
const duration  = 6;  // apply scaling smoothly over 6 frames
const fullScale = 100;  // gauge is full at 100% scale
const value     = $gameVariables.value(1);  // current value from variable 1
const max       = $gameVariables.value(2);  // maximum value from variable 2
const scale = value / max;  // calculate scale
const pic = $gameScreen.picture(picId);  // get picture reference
pic._targetScaleX = fullScale * scale;  // apply calculated scale to picture
pic._duration = pic._wholeDuration = duration;  // over given duration
...then Wait duration frames (6 in this example) before checking again. Use duration = 1 to scale it instantly.

(If you don't want the "fill" to look stretched, an alternative may be to make the background picture look full, then have the scaled picture on top look like "empty gauge". Scale values can be negative, just add a minus sign to the script call.)

In case it helps, I have an old demo of an evented stamina gauge using this approach:
HP would be simpler: you just need to get the values and rescale the picture.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-display-a-health-gauge-through-common-events-with-without-plugins.171401/