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

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
197
Reaction score
48
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
1,701
Reaction score
1,147
First Language
EN
Primarily Uses
RMMV
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
197
Reaction score
48
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
1,701
Reaction score
1,147
First Language
EN
Primarily Uses
RMMV
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
14,887
Reaction score
8,242
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 Profile Posts

Working on Zelda-like tileset. Should be greatly refined. And tonight extra pave tiles, outward corners, abyss and water...
Is it possible to move posts from the in-progress project forum to completed games? I think I need to message a mod but a bit worried about bothering them
Bleeding Moons has its release date: September 3rd!
Do you stick with the RM default, or set a custom one?

Forum statistics

Threads
100,539
Messages
976,985
Members
132,081
Latest member
Kaezyelnatz
Top