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

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
200
Reaction score
49
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,716
Reaction score
1,165
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
200
Reaction score
49
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,716
Reaction score
1,165
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,902
Reaction score
8,263
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

Grass... Earth... Sand... Snow! Working on edits for some new autotiles for MZ/MV
Waiting on approval on my One Map Challenge game, which I made to get a feel for RPG Maker. I was able to complete it before MZ's release, now I can focus fully on the MZ game I want to make. I'm excited, ya'll.

I have recently returned to try and developing games after I learned how to use digital drawing software.

My goal is to start simple and small. I am mostly aiming to create a game that I would play, and to tell a story that I would like to read. :smile:
RayGarden7 wrote on Geovid's profile.
Hey I'm new the RPG Maker forms as well and was having the same problem you are with needing 30 post or 30 threads we must complete. Maybe we could help each other out? Why you on the forms what is your goal?

Apparently the various VS core plugins are going to be free. :LZSexcite:
Now to go wash the stink off myself from having had to look at Twitter.
:rtear:

Forum statistics

Threads
100,811
Messages
979,841
Members
132,450
Latest member
GriffithVIII
Top