Elemental damage/defense buff/debuff stack system

Hi, everyone!

I'm working on a system where elemental rate will be applied and added constantly for buffs and debuffs to elemental damage and am looking for suggestions on the best way to approach it.

Currently I'm working on these fronts:
*percentages just for illustration purposes*

Characters have innate elements, say an Innate Fire gets you +20% fire dmg, but -20% ice damage, also makes you more susceptible to status related to fire (+30%) and less susceptible to status related to ice (-30%), those status are arbitrary, let's say poison (fire), slow (ice).

Certain spells will trigger a field effect in battle that further raises the damage of that element +10%, checki via a variable so I can add all field effect at once, since a new field effect cancels the previous.

These should stack with Weapons/Armor buffs, class buffs, even event related buffs (via switches).

So these minor buffs would stack and the actor would have a +170% fire damage, -50% damage reduction, 200% poison vunerability but 0%, immune to slow with the proper stacking of buffs from differente sources adding to the character's final rates.

How should I put this all together? I've been trying JS Pre Damage checks on actions, but I'm running into issues since I'm not familiar hot to use the dealtelement, or rate vs plus, etc. I'm having a hard time wrapping my head around it. Should these things be added to the actors, or the skills, items, etc.

Any suggestion would be deeply appreciated!
I don't know if there's one for MZ, but a passive state plugin that gives element buffs and debuff states should work.
Thanks, I'll test that out.

So, just adding a passive would make them stack? I can't select a buff/debuff for specific element, I'm assuming that means I need to add it as a JS or script, am I in the right path?
Coding it yourself would be your best choice if you had the know-how.
And passives states probably don't stack, but I'm fairly certain you can find a plugin that can make states that stack.
The passives were more for the area wide state applications you mentioned.

And I'm not sure if you tried it, but you can use the damage formula to check for a state and if present, put a different state on the battler. So one skill can apply a state that applies fire + 25%. If you use the skill again and the first state is still present, it could erase that state and apply a different one that gives fire +50%. I do something similar in my game and can walk you thru it if that would work for you.
Coding it yourself would be your best choice if you had the know-how.
And passives states probably don't stack, but I'm fairly certain you can find a plugin that can make states that stack.
The passives were more for the area wide state applications you mentioned.

And I'm not sure if you tried it, but you can use the damage formula to check for a state and if present, put a different state on the battler. So one skill can apply a state that applies fire + 25%. If you use the skill again and the first state is still present, it could erase that state and apply a different one that gives fire +50%. I do something similar in my game and can walk you thru it if that would work for you.

My coding is really basic, I work my way around things through eventing and basic scripting. I do get lost in functions and maths more often than not though.

For the field effects, for example, I'd like for the buff/debuff to work battle-wide, both party members and enemies alike. I'll test your suggestion on the damage formulas. Thanks for reaching out!

Original thread: https://forums.rpgmakerweb.com/threads/elemental-damage-defense-buff-debuff-stack-system.167630/