MZ Setting minimum damage

I am using Visutella plugins (bought 8 wave pack) and was looking into the battle core plugin but didn't see anywhere that I could set the minimum damage to like 1 or something so enemies that are too low of a level don't do like 0 damage.

Am I blind? Thanks for your help!
Math.max(value, 1)
Replace value with skill damage formula (default one is a.atk * 4 - b.def *2) should make the minimum damage to 1.
Use FOSSIL (if using MZ) and use this MV plugin https://mrtrivelrpg.wordpress.com/2016/02/14/minimum-damage/
Use FOSSIL (if using MZ) and use this MV plugin
I don't see any reason you'd need FOSSIL to use that.
just like a thread (a.atk - b.def) + 1 = minimum dmg of 1 😛

but that is without plugin but require in each dmg formula you want it too.
so your not restricted to all, maybe there is something in Visustella plugins
to a set a minimum dmg?
just like a thread (a.atk - b.def) + 1 = minimum dmg of 1
...no, it doesnt. Parentheses means that happens first (and in this example is mathematically irrelevant). It doesn't mean that portion of math is capped at 0.

If you put that in your damage formula and your 2 ATK hits a 4 DEF, it will produce -1.
Yeah just adding +1 does nothing if the results before it are below -1.

You would have to instead use the JS code for max and make it return the max of 1 and your damage formula.

Or just work out the math so your formula cannot go negative ever. That's what I did instead.
I am using Visutella plugins
I don't have them but from what I've heard they have a lot of (if not all) functionality from Yanfly's plugins in MV. One of Yanfly's plugins (I think Damage Core) lets you put in additional lines of code to determining damage. You can then set the final damage to minimum 1 (or put it before certain multipliers like critical damage so they apply to that minimum). Just glancing over Visustella, you might find the same thing in Damage Serttings inside the Battle Core.
Sorry, been a minute.

Math.max(value, 1)
Replace value with skill damage formula (default one is a.atk * 4 - b.def *2) should make the minimum damage to 1.

I'm assuming this would be my best bet. Don't wanna use fossil because personal reasons.

I don't have them but from what I've heard they have a lot of (if not all) functionality from Yanfly's plugins in MV. One of Yanfly's plugins (I think Damage Core) lets you put in additional lines of code to determining damage. You can then set the final damage to minimum 1 (or put it before certain multipliers like critical damage so they apply to that minimum). Just glancing over Visustella, you might find the same thing in Damage Serttings inside the Battle Core.

I looked over it myself. Bad thing about visustella is they over document the plugins so there is a lot of unnecessary information and you need to scour the entire thing. I still couldn't find anything, unfortunately.

Thanks guys for helping me. I'll attempt to implement this when I have time either today or tomorrow
You could also do it with a notetag and not have to modify every damage formula in your game.

Put on each actor/enemy
Code:
<JS Pre-Damage as User>
if (this.isDamage() && value < 1)
    value = 1;
</JS Pre-Damage as User>
You could also do it with a notetag and not have to modify every damage formula in your game.

Put on each actor/enemy
Code:
<JS Pre-Damage as User>
if (this.isDamage() && value < 1)
    value = 1;
</JS Pre-Damage as User>

Unfortunately, this does -1 damage. Ill try the attack formula one now and see.

Math.max(value, 1)
Replace value with skill damage formula (default one is a.atk * 4 - b.def *2) should make the minimum damage to 1.

Seems to do the same. Maybe its clashing with Visustella...
Unfortunately, this does -1 damage. Ill try the attack formula one now and see.
That's very weird. VisuStella does not do anything to reverse how damage formulae work. I've done lots of VS notetags like this for various people that affects damage and there's never been an issue.

I'd suggest you turn off all plugins except the Battle Core, save your project, start a new playtest, test it again.
Unfortunately, this does -1 damage. Ill try the attack formula one now and see.



Seems to do the same. Maybe its clashing with Visustella...
Does the game show -1 damage normally? Thought it's capped at 0 and only with modification like elemental absorption / reverse damage, etc., change the damage value to negative(which shows up as healing rather than -1 instead).
Does the game show -1 damage normally? Thought it's capped at 0
The damage formula is capped at 0 (and to an integer), but this notetag is manually changing the value after the damage formula has run. I still don't see how it could reverse the sign.

Original thread: https://forums.rpgmakerweb.com/threads/setting-minimum-damage.171278/