MZ Derivative stats?

I am working on a Shin Megami Tensei/Megami Tensei-based project and I'm having a hard time adapting the stat system from that game into RPGMMZ. Can someone help please?

Basically, the gist of it is that there's two types of stats the player has - the primary stats and the derivative stats. Primary stats are what the player can directly increase by leveling up, whereas derivative stats are calculations made based on those stats during battle.
Spoiler
1659333109832.png


Primary stats are the little gauges at the bottom. Derivative stats are the numbers to the right of the spell list.

There are six primary stats - STR, INT, MAG, STM, SPD and LUK.
Spoiler
STRENGTH (STR):Increases Max HP, Power, and Accuracy
INTELLIGENCE (INT):Increases Evade and Magic Effect;
MAGIC (MAG):Increases Magic Power and Magic Effect.
VITALITY (VIT):Increases Max HP twice as much as STR does and Defense.
AGILITY (AGI):Increases Accuracy and Evade; increases the chances of escaping in battle and increases ability to act sooner in battle.
LUCK (LCK):Increases Accuracy and Evade; increases the chances of finding an item after battle, increases chances of getting in a first strike in battle, increases the chances of escaping from battle.

The derivative calculations are based on those stats, more specifically:

Spoiler
POWER =STR + WEAPON POWER - Improves the damage dealt by a physical attack.
ACCURACY =AGI + [(STR + LCK)/4] + WEAPON ACCURACY - Improves the likelihood of an hitting a target.
DEFENSE =[(VIT + SPD)/2] + ARMOR DEFENSE - Decreases the amount of damage received from a physical attack.
EVADE =AGI + [(INT + LCK)/4] - Decreases the likelihood that an attack or ability will hit.
MAGIC POWER =MAG + (INT/8) - Improves the damage dealt or HP healed by a Magic ability.
MAGIC EFFECT =INT + (MAG/8) - Improves the chances that spell's effects (if we're talking status effects, for example) will work.

However, same stats are calculated differently for demon party members, which are basically another class altogether. For them it's:

Spoiler
POWER =(STRx3) + (VIT/4) + (LEVEL - 19)
ACCURACY =AGI + (STR/4)
DEFENSE =(AGIx2) + (STR/4) + [(LEVEL - 19)/2]
EVADE =AGI + (INT/8)
MAGIC POWER =MAG + (INT/8)
MAGIC EFFECT =INT + (MAG/8)

So, in other words, I want additional stats which, in turn, affect "derivative" stats which are used for damage calculations and the such. "Derivative" stats, however, are used differently depending on the class, so either being able to differentiate stat usage using a notetag (<human> for humans and <demon> for demons), or just being able to assign different stat properties to each class (For example, class 1's power formula is STR+(LEVEL) while class 2 uses (STR*4)+(VIT/4)).
At least for MV there were several Yanfly plugins where you could provide custom formulas for pretty much anything. I am willing to bet VisuStella offers similar features for MZ.

You can structure your formulas like this:
JavaScript:
a._classId == humanClassId ? humanFormula : demonFormula
Obviously you would need to replace all the placeholders with actual values. Also I don't own MZ, so I can't verify wether a._classId is still a thing or if it is slightly different. But the same principle should still be applicable.
At least for MV there were several Yanfly plugins where you could provide custom formulas for pretty much anything. I am willing to bet VisuStella offers similar features for MZ.
There is a plugin which lets you decide stat calculation for classes, yes! It still only relies on the base stats RPG maker provides and I don't think it can actually do calculations like those, though. (Something like ATK=ATK+WEAPON STRENGTH simply wouldn't be possible because it would then try to calculate itself indefinitely).
Edit: it's for MV, too, so it's probably not compatible with MZ like most other Yan plugins.
However, I have yet to find how to (or if it's even possible) to basically have a whole new bunch of stats in VisuStella.
I did a Google for "RPG Maker MZ custom parameters" and VisuStella Core Engine allows you to do this.
I did a Google for "RPG Maker MZ custom parameters" and VisuStella Core Engine allows you to do this.
Interesting, quite interesting indeed.

I'm not sure if some things like max HP/MP growth rate based on stats or status effect proficiency can really be done with this but it's pretty nice.

I'm also not quite sure if this lets you assign different stat calculations to different classes?
I didn't look at it in depth, but I saw a screenshot that allowed you to define a parameter and associate a JavaScript formula to it.

So if that's accurate, then you can base it on...anything. Other parameters, class ID, whatever.

As for
I'm not sure if some things like max HP/MP growth rate based on stats or status effect proficiency can really be done with this
I don't see where in your original post you say you want/need this.
I don't see where in your original post you say you want/need this.
Status effect proficency, along with evasion, were mentioned among the derivative stats. HP growth wasn't, sorry about that.
I am also not 100% sure you can make buffs that affect custom stats. I've seen an additional plugin that seems to be able to modify things somewhat, but it's applicable only to equipment and actor/class tags.
Status effect proficency, along with evasion, were mentioned among the derivative stats. HP growth wasn't, sorry about that.
I was referring to HP - unless you're going to get deeper into reprogramming MZ's engine, state rates and evasion aren't parameters at all. They're based on traits, so trying to get into making them change during gameplay is more complex.

Also, we're not supposed to double post - if you have a thought you forgot to mention, you can use the Edit button at the bottom of your post.
I was referring to HP - unless you're going to get deeper into reprogramming MZ's engine, state rates and evasion aren't parameters at all. They're based on traits, so trying to get into making them change during gameplay is more complex.
Oh, well, I guess that was to be expected with an engine like RPG maker. I'm not really experienced enough to mess around with system code, so I guess it's out of the question for now.
For your Magic Effect derivative stat you would need to mess around with some code. But if you google how to disable the default luck effect you are bound to find which function you need to change. Then instead of returning fixed 1 you return whatever formula calculation you wish.

Power, Defense and Magic Power don't even need a plugin. Just use them in your skills' damage formulas.

The other effects should be fairly easily achieved through VisuStella. At least I am sure they all could be achieved through Yanfly with custom evade and accuracy formulas 😅

HP growth rate can't be controlled directly, as far as I am aware. But again with Yanfly you could define custom HP max formulas. If you include something like a.level * (yourCustomStat) you will get a similar effect.
HP growth rate can't be controlled directly, as far as I am aware. But again with Yanfly you could define custom HP max formulas. If you include something like a.level * (yourCustomStat) you will get a similar effect.
It's quite a handy idea for hp-based damage or something, but I wanted it more or less to make HP scaling easier. Still, thanks for the suggestion ^_^

Original thread: https://forums.rpgmakerweb.com/threads/derivative-stats.149995/