Having weapons affect the damage formula?

Is there a way to make specific weapons affect the damage formula? What I mean is, let's say the default attack damage formula is 4*atk - 2.def. Now, I want to make it where if you equip a specific weapon, it ignores 25% of defense (so in practical terms, it would be 4*atk - (2*def * 0.75).

I know there are plugins that give weapons their OWN damage formula, but I'm not sure this would work for what I want. This is because, I still want the character equipping that weapon to use different skills that have their own unique damage formula, while retaining the property of the weapon. So for example, let's say the character learns a skill called "mighty bash" which instead of the normal damage formula, does 10*atk - 4*def. But if he's using that specific weapon that ignores 25% of the target's defense, I want this to be reflected in the damage formula.

Hopefully this was clear - does anyone know if there's a way to do this through the damage formula - or would I need a plugin for this? Thank you in advance.
Making weapons affect the standard damage formula is easy, but what you seem to be asking for is for it to *always* be taken into account for any source of damage involving the weapon's property, which is quite a bit more complex.

The issue is that your standard attack is just a skill like any other, the only difference is that it has its own battle command instead of being used from the skill menu. There isn't really an easy way to make a formula for that and then go "oh, and also apply this to every skill used while this weapon is equipped".

Essentially you would have to incorporate the check for that weapon being equipped in the damage formula for every skill that would be affected by that weapon.
@jonthefox Let's look at trying to do this through the damage formula: 1st case you mention original damage formula is 4*a.atk - 2*b.def standard damage formula (I assume the a.atk and b.def were what you wanted). With your weapon, damage becomes 4*a.atk - 1.5*b.def ... so...there's a difference of 0.5*b.def which means you'd want the sword to just add 0.5*b.def to damage dealt in this case. Now consider the 2nd case original formula 10*a.atk - 4*b.def ... in this case, with the weapon the formula becomes 10*a.atk - 3*b.def ...now a difference of 1.0*b.def ... so the sword should add 1.0*b.def in this case. Since the sword does variable damage depending upon the role of b.def in the damage formula, you can't hard code a single modifier for b.def into the damage formula. As @Trihan says, you need to incorporate checks into the damage formulas for every skill in which b.def plays a role... or use a plugin that can find b.def in damage formulas and tack a 0.75 multiplier on to each b.def found in the formula immediately. I'm not sure that exists... but if not, it's probably something someone around here can do. An alternative might be to have the damage formulas listed such that the original gets used standard, and the "with weapon" formula (hard coded separately) gets used conditionally when the weapon is equipped. I've seen some ideas for multiple damage formulas used in the one damage formula field separated by semi-colons suggested in other threads, but don't know how they differentiate when one formula is used versus another, let alone how you would do that here in this case. Hope that all helps point you in some good directions. Sorry I couldn't provide a direct solution myself.
yeah....hrm this seems like such a simple concept, but surprisingly difficult to implement. basically what i want to be able to do is have various weapons with a defense-ignoring property, and i want the user to get full benefit from this when using a skill...so let's say they're trying to one-shot an enemy that has high defense, they can use a skill with a high damage multiplier in combination with a weapon that ignores a high portion of defense.

i just realized that yanfly's armor scaling plugin has armor penetration tags, which seem to do what i want....but, i don't want to use the armor scaling formula - i want to keep the default attack formula. Hmm. So perhaps I need to commission someone to make a basic armor penetration plugin for me. Doesn't seem possible with default formula. Alright, thanks for the help, guys!
Hmm. How are you implementing the defence-ignoring property on the weapons?
@Trihan the OP doesn't know - he is asking how he could do this.

@jonthefox Your main problem here is that all equipment only affects the battler that it is eqipped to by default, and you want an equipment to affect a target value instead of the value of the battler it is equipped to.
I don't think this can be done by default at all, you most probably need a plugin for that.

You might get a workaround giving thatweapon a specific damage element and then giving all enemies a vulnerbility to that element, but that will not be the same as you described it.
@Trihan the OP doesn't know - he is asking how he could do this.

@jonthefox Your main problem here is that all equipment only affects the battler that it is eqipped to by default, and you want an equipment to affect a target value instead of the value of the battler it is equipped to.
I don't think this can be done by default at all, you most probably need a plugin for that.

You might get a workaround giving thatweapon a specific damage element and then giving all enemies a vulnerbility to that element, but that will not be the same as you described it.

He was asking how he could incorporate the trait into the damage formula, but I was under the impression that the weapon property itself had already been figured out since he wasn't asking for help with doing that part.

I should rephrase my query: what I'm asking is "how do you intend to mark a given weapon with 'this weapon is going to ignore 25% of defence'?
Yanfly's Skill Core allows you to put some JS in a skill notetag to modify its effects. You could put a notetag for every skill. Something like "if weapon X equipped, then use this formula instead" with the formula containing less enemy defense.

I'm not good enough at JS to figure out how to structure this tho.

Original thread: https://forums.rpgmakerweb.com/threads/having-weapons-affect-the-damage-formula.110199/