I would like to be able to connect main parameters with each other. For example, I would to be able to have a character's Magic Attack parameter be increased by a percentage of their Defense parameter. The hope is to encourage players to not just choose magic attack boosting items for their wizards. I would prefer that this be a state option (so it could be turned on and off easily), but a class option would work as well.
I have tried desperately to implement this feature myself, but have had no luck. If anyone could help me out, I would be extremely grateful.
You can also just utilize the damage formula of your skills to implement some of these.. Like include the def parameter of the caster in your formula instead of just the mat
Else, Yanfly's Parameter plugin can allow you to make custom formulas for the parameters, just take care that you dont make parameters that has a circular reference which would make an infinite loop.
Right. For instance, if DEF uses MDF, then MDF can't use DEF, that is a circular loop that will always be updating. But a better way would be to use the damage formula, for instance have your physical skills use a percentage of the MDF stat too in damage reduction and so on.
I can change the base parameter formula for MAT to include DEF, but then MAT wont increase when i equip a +100 DEF item , right? I need it to increase when items are applied as well. I do have skills that factor in DEF, I was interested to see if i could create a passive as an alternative.
No, but you can change your damage formula to include the increase. For instance, if you want a +100 to DEF to include +10% of your DEF to MAT you do this:
(a.mat + a.def * 0.10) instead of a.mat.
If you want it to be a different percent, you change the number in the formula.
I have it working finally, but the code below murders my game performance. Is there an alternative way to access the characters defense parameter? Thank you guys so much for your help.
<Custom Class Parameters>
maxhp = level * 25 + 300;
maxmp = level * 8 + 300;
atk = level * 12 + 12;
def = level * 15 + 15;
mat = level * 17 + 17 + $gameActors.actor(5).param(3); //add defense to magic attack
mdf = level * 15 + 15;
agi = level * 16 + 16;
luk = level * 15 + 15;
exp = level * (level / 2) * 20 +10;
</Custom Class Parameters>
Update: I believe the reason my performance is dying is because the code listed above is constantly reevaluating the formula and as such i am getting the Maximum Call Stack Size Exceeded error. Any ideas on how to stop the game from repeatedly checking? Also, I realize this is a different question to my original issue. Is there a different forum I should move this too?