[MV] Is there a way to increase Pharmacology via events/scripting/etc?

Looking through the editor, there doesn't appear to be a way to increase PHA or any SP Parameter for that matter...

What I was trying to do was have a Variable called 'First Aid' that would be tied to Pharmacology.

So if Variable 'First Aid' = 50, PHA = 150%.
if Variable 'First Aid' = 100, PHA = 200%.

ETC, ETC.

I was hoping there would be a way to do this, am I missing something?
By default both Ex- and Sp-params are defined solely in terms of traits active on the battler. Ex-param traits combine additively and Sp-param traits combine multiplicatively. If you want to tie a trait's magnitude to a variable, or adjust the game's formula for PHA, that will need a plugin. 😅

I think the only non-plugin option here would be to have several states for specific PHA values, e.g. one for 150% PHA, one for 200%, etc. Then apply/remove those states as appropriate. 😴

I believe Yanfly's Special Param Formula can do what you're seeking (currently not free):
Amongst other things, it adds "plus" values for Sp-params and script calls to set those values, e.g.
JavaScript:
$gameActors.actor(1).setPhaPlus($gameVariables.value(5)/100);
I.e. "set the PHA plus value for actor 1 equal to the value of game variable 5 divided by 100". I imagine you could just stick something like that immediately after anything that changes the variable's value?
By default both Ex- and Sp-params are defined solely in terms of traits active on the battler. Ex-param traits combine additively and Sp-param traits combine multiplicatively. If you want to tie a trait's magnitude to a variable, or adjust the game's formula for PHA, that will need a plugin. 😅

I think the only non-plugin option here would be to have several states for specific PHA values, e.g. one for 150% PHA, one for 200%, etc. Then apply/remove those states as appropriate. 😴

I believe Yanfly's Special Param Formula can do what you're seeking (currently not free):
Amongst other things, it adds "plus" values for Sp-params and script calls to set those values, e.g.
JavaScript:
$gameActors.actor(1).setPhaPlus($gameVariables.value(5)/100);
I.e. "set the PHA plus value for actor 1 equal to the value of game variable 5 divided by 100". I imagine you could just stick something like that immediately after anything that changes the variable's value?

I actually already am using Yanflys SP parameters and I tried to input your script for the PHA in Yanflys plugin but it gave me an error when I tried to use the item, is there another way or another formula to do what you've suggested?
I actually already am using Yanflys SP parameters and I tried to input your script for the PHA in Yanflys plugin but it gave me an error when I tried to use the item, is there another way or another formula to do what you've suggested?
Did you put it in the plugin parameter? As mentioned, it should be a script call after the variable changes value...I tested quickly and it seems OK for me. 😅

If you want to add something to the PHA Formula parameter in the Plugin Manager, maybe try this:
JavaScript:
(base + plus + $gameVariables.value(5)/100) * rate + flat
Remember to replace the 5 with the appropriate variable ID. Note that this approach will affect all battlers equally, which is why I initially suggested the script call thing. 😮‍💨

I've moved this thread to Plugin Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/mv-is-there-a-way-to-increase-pharmacology-via-events-scripting-etc.123079/