MZ Stat scaling based on current HP/MP/TP values

There was a plugin that did something similar in MV: https://fallenangelolivia.itch.io/battle-effects-pack-2

I've tried to search the forums for something like this, but the minimum character count per word for searches makes using the necessary search terms impossible, and using longer terms gives results completely unrelated to the features desired.

Essentially, I'm looking for a plugin that can allow stats stats to increase or decrease as a percentage multiplier in proportion to current HP/MP/TP values. Any base param is valid except HP, MP or TP. As an example of low HP effects, a state or actor note tag that increases Attack in proportion to missing HP, where the value in the note tag, let's say 150%, is what the Attack increase would be at one HP. For an MP equivalent, an example would be increasing Magic Defense by 200% at 0 MP (having 0 MP doesn't KO you, so there's no need to have the full increase be what happens at 1 MP). For a TP equivalent, an Agility increase of 125% when TP is at 0. These are all scaling values, so the MP example would be an increase of 150% at half MP, and the HP example would be roughly 125% at half HP, since the fact that the full increase is at 1 HP rather than 0 would make it slightly imprecise.

The high HP/MP/TP increases would work the same way, but with the logic inverted. Thus, the high HP Attack buff would be a 150% increase at full HP, and the lower the actor's HP goes, the weaker the stat increase becomes, with no increase applied at 1 HP. The increases based on MP and TP values would work the same way, just with the buffs not applying at 0 MP/TP instead, as, again, having 0 MP or TP wouldn't KO you.

Ideally, these would exist in the form of note tags that can be put in the actors, classes, weapons, armors, enemies and states note boxes, but if that’s asking too much, only the actors and states note boxes would be strictly necessary, at least for my own project.

I mostly use VisuStella plugins, so it would need to be compatible with those. Hopefully I explained things well enough; I can be rather verbose at times, so if it's too confusing, I'll try to edit it.
visustella's batle core has a set of notetags for directly modifying a battler's parameters that you may be able to use for that.

<JS param Plus: code>
<JS param Flat: code>

but you would have to use JS, and im not sure if theres a way to refer to the value of the parameter before this boost is applied or if you have to use paramBase().

I did something similar with Quasi's Parameters Plus plugin for MV, but i cant guarantee that it'd work in MZ or with visustella
visustella's batle core has a set of notetags for directly modifying a battler's parameters that you may be able to use for that.

<JS param Plus: code>
<JS param Flat: code>

but you would have to use JS, and im not sure if theres a way to refer to the value of the parameter before this boost is applied or if you have to use paramBase().

I did something similar with Quasi's Parameters Plus plugin for MV, but i cant guarantee that it'd work in MZ or with visustella
Would these be done with one line of code, or would it be something that would look like <JS param Plus> </JS param Plus> with multiple lines of code in between? I don't use a lot of JS note tags in my projects, which is why I went to this board specifically, but if this is something that can be done without creating a new plugin by using existing VisuStella js note tags, that's also fine if it's something I can memorize.
its a single line notetag. the instructions on how to use them are in the plugin's help section, but the code would be along the lines of
Code:
(1-this.hpRate())*this.paramBase(2)*1.5

Original thread: https://forums.rpgmakerweb.com/threads/stat-scaling-based-on-current-hp-mp-tp-values.182406/