Additive Elemental Damage Reduction

Is there a plugin or way to change the way RPG Maker MZ calculates elemental damage so that is additive instead of multiplicative?

For example, right now when I equip four pieces of equipment that each have a 25% fire damage reduction and tested it against a fire skill that dose a flat 100 damage, the damage ended up getting reduced to 32 instead of reducing it to 0 like I wanted it.
Yes - this has been asked a few times and had code written that you can use to make it work the way you want.

You should be able to find the threads if you search/Google for them - if not, let us know.
Not having any luck getting it to work. tried using the method from here https://forums.rpgmakerweb.com/inde...into-elemental-resistances.80080/#post-746048 but something is causing the damage to be zero unless there is an elemental rate attached to equipment.
Are you using Yanfly's Element Core? the post you linked to said it's required.

Do not change things in your core scripts, but you can paste this into a text editor, save as a *.js file, and include as a plugin.

Same code here:
Yes and as far I can tell I done every thing right. I changed the code but after that the damage has been zeroing unless there is an element rates attached to an equipment then it deals damage equal to the sum of the elemental rates.
Yes and as far I can tell I done every thing right.
Do not change things in your core scripts
So step 1 is already wrong.

Aside from that:
the damage has been zeroing unless there is an element rates attached to an equipment then it deals damage equal to the sum of the elemental rates.
Well how have you had the states set up and how are you trying to make the math work?

If you're not using how the rate is normally calculated, then you don't a base of 100% unless you put that onto the actor or class or something.
@neosidoh13
This is just a FYI with some background information

There is a reason why the damage rates are multiplicative, and if you change that to additive then you'll need to take care of that reason.

With a multiplicative rate that number can never become negative, no matter what you do. If you have five equipments with 75% damage rate, the total would be a damage rate of around 23%.
However if you have five additive -25%, then the total damage rate would be negative, a -25%.

And that would mess up formulae in a lot of ways, meaning that additional damage reduction can result in that damage healing the actor and similar effects. Which in itself means that it would be your responsibility to prevent those cases manually, which requires more changes to the code and so on.


Additionally, as already said above: NEVER change the default core files.
If you want to change a default part of the engine, turn that change into a plugin overriding the default code.

The reason is the engine updates - each update will replace the core files with the new default ones, thereby erasing all your changes.
You would have to remember and repeat all your changes after every update - and while those updates are becoming rarer, MZ is still the latest engine and not yet declared Legacy, so it can get further updates.
Not 100% sure it works in MZ, but my element plugin SHOULD do what you need.

LINK

Original thread: https://forums.rpgmakerweb.com/threads/additive-elemental-damage-reduction.172900/