Basically like the title says, how would I go about storing ex/sp parameters into variables?
Preferably done through a script call.
Seriously can anyone at all please help with this.
I just need to know what kind of thing I'd need to type to save ex-parameters and sp-parameters into a variable.
I.E. $gameVariables.value(1) = actor1.hit_rate, or whatever.
I've been digging through any JS file I could for hours and found nothing, or atleast nothing helpfull.
You got it right. If you want to store a parameter into a variable, just use $gameVariables.value(1) = value
The only part that you need to figure out is which actor you want to point at this way ($gameActors.actor(ID)) and the name of the parameter you want to store.
So for every parameter you want to store into a variable, here's what you need to write as a script:
$gameVariables.value(ID1) = $gameActors.actor(ID2).PARAM
ID1 is the variable ID, ID2 is the target actor's ID, and PARAM is the JS name of the parameter you want to store.
For EX-parameters, here are the names:
Hit Rate: hit
Evasion Rate: eva
Crit Rate: cri
Critical Evasion Rate: cev
Magic Evasion Rate: mev
Magic Reflection Rate: mrf
Counter-Attack Rate: cnt
HP Regen Rate: hrg
MP Regen Rate: mrg
TP Regen Rate: trg
Note: these values are equal to the percentage divided by 100. So for a rate of 100%, the value will be 1.
If you want to store the percentage instead, you'll have to multiply the value by 100, which can be done in the same line:
$gameVariables.value(ID1) = $gameActors.actor(ID2).PARAM * 100
I edited my post with the information. I'm sorry, I pressed TAB then space so it sent my message prematurely.
I just noticed that, lol.
Thank you very much for the help, and quick response.