Weapon Damage w/ modifiers

First of all, it's been almost two years since I last used MV, so I'm still relearning/remembering the basics. If I ask a question with an obvious answer or don't understand something, please bear this in mind.

With that out of the way, I'm trying to set up a damage system where each individual weapon has a base minimum and maximum amount of damage that the actor using it would do when attacking. Say, for example, a Warrior equips a sword that does 85 minimum and 115 maximum. When that Warrior goes to make a basic Attack, the base damage dealt would be 85, 115 or anything in between.

However, I also want certain factors to influence this damage output. For example, if that same Warrior were to have an Attack stat of, say 100, and I were using a formula like "Bonus DMG = ATK/10", the damage output would be somewhere along the lines of 95, 125 or anything in between.

Or, to use a different example, if that Warrior were to not use the base Attack, but instead use an attack that does 1.2x the base weapon damage, the damage output would be 102, 138 or anything in between (not including the previous modifier example).

As long as I can avoid decimal number results (which MV has trouble with if I recall correctly), this sort of system should work out in the end.

All of this is perfectly doable (to my limited knowledge), but the biggest problem I've faced thus far is the first step; giving the weapons that base damage range. How would I go about setting that up? The only relevant plugin I'm using so far is Yanfly's Damage Core plugin, but I won't object to using others if that's what's needed.

Any and all advice you lovely people could give would be greatly appreciated.

I've moved this thread to MV Support. Thank you.

Maybe I'm not understanding you correctly, but you can create a formula like this:
Code:
Math.randomInt(30) + 85

This will give you a random number between 0-30, and then add 85. This makes the highest damage possible 115 (30 + 85), and the lowest damage possible 85 (0 + 85).

If you want to change the skill based on the weapon equipped, there are a few ways to do this, but I highly recommend Yanfly's Weapon Unleash. http://yanfly.moe/2015/12/26/yep-51-weapon-unleash/

With this plugin, you can put a notetag in the weapon to replace your basic attack with a new one. You can leave the attack name the same, but modify the damage formula.

For example, you basic attack will look like this:

Code:
Name: Sword Attack
ID: 1
Damage Formula: Math.randomInt(30) + 85

Then you would create your weapon:

Code:
Sharp Sword
In the note tag, you would write: <Replace Attack: 5>
Description: Applies bonus attack power to your basic attack.

And then you would create a skill under ID 5:

Code:
Name: Sword Attack
ID: 5
Damage Formula: (Math.randomInt(30) + 85) + (a.atk/10)

Is that what you're looking for?
That....could actually be exactly what I'm looking for. I will demo it and see how it works. Thank you so much!

EDIT: Okay, so testing it works. The base damage range is exactly what I want it to be, but it's not as universal as I need it to be. As in, I'll need to make basic Attack skills for every different damage range I want to use for each weapon. Which could bloat the file size unnecessarily and make it all really messy.

Is it possible to assign the (Math.randomInt(x) + y) equation to individual weapons, and have the basic Attack and Skills call on those equations when calculating damage?
@CaptainRed1000 I'm not exactly sure that you can do that in a non-complex way. The only thing I could think of would be to have numerous checks in the damage formula to ascertain what weapon is equipped.

Code:
a.hasWeapon($dataWeapons[x]) ? (Math.randomInt(30) + 85) : a.hasWeapon($dataWeapons[x]) ? (Math.randomInt(50) + 70)

But you would need to do that for all weapons.

There may be a better way of doing it by using Yanfly's Damage Core: http://yanfly.moe/2015/11/07/yep-25-damage-core/

With this plugin, you can use notetags to write your damage formula, giving you more room. However, I think that this solution is much more complex then just adding a new skill associated with each weapon. Sorry I couldn't be of more help, I will keep looking.
@boikish Mate, you put me on the right track, which is more than I can say for myself. You’ve already been a great help to me, and I thank you for it.

I’ll give Damage Core another look in the meantime.

Original thread: https://forums.rpgmakerweb.com/threads/weapon-damage-w-modifiers.96188/