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

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
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?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,091
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
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. :kaoswt:

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. :kaoslp:

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?
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
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. :kaoswt:

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. :kaoslp:

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?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,091
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
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. :kaoswt2:

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. :kaophew:
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top