Is there a way to add additional scaling to Attack/Skills through a state?

I want to add more scaling to actor attack or skills through a state. Say, that if Attack skill formula normally is just (a.atk - b.def) and if actor has Weapon Mastery B state (I'm using Yanfly Buffs and States Core&Auto Passive States) it will make Attack damage formula turn into (a.atk - b.def + a.mat - b.mdf)
I figured that using Yanfly Weapon Unleash plugin can replace the Attack skill to some other skill that has said scaling but is there a way to add said additional scaling of (a.mat - b.mdf) to other skills too just by using a state? I think I saw a method to just check if there's a state in damage formula like for example, (if (a.isStateAffected(10)) a.atk - b.def + a.mat - b.mdf; else a.atk - b.def ) but is there a way to simplify the process instead of adding and tweaking the formula one by one?
but is there a way to simplify the process instead of adding and tweaking the formula one by one?
to my knowledge, not without doing something like offloading your damage formulas into its own plugin and adding that there.

FWIW, if you look up yanfly's tips and tricks entry for "Enfire", itll show you how to add extra damage to attacks. so instead of adding the bonus to the damage formula, you can either add the damage as a separate instance of damage or add the additional value into the damage of the initial skill through just the buffs and states plugin
to my knowledge, not without doing something like offloading your damage formulas into its own plugin and adding that there.

FWIW, if you look up yanfly's tips and tricks entry for "Enfire", itll show you how to add extra damage to attacks. so instead of adding the bonus to the damage formula, you can either add the damage as a separate instance of damage or add the additional value into the damage of the initial skill through just the buffs and states plugin
I checked the Enfire video, it shows as 2 separate damage instances. I wonder if it's also treated as multiple hits instead of just boosting the damage? I have a battle condition that tracks hit counts for state(like, hit 12 times to cancel Enemy Skill/inflict state.) I guess the damage formula one is okay, just gotta do it one at a time.
Thank you for the tip 🙂.
is there a way to simplify the process instead of adding and tweaking the formula one by one?
It's not clear what you actually want to achieve - your only example is the Attack skill, so that's a single skill.

What do you really want to happen?

to my knowledge, not without doing something like offloading your damage formulas into its own plugin and adding that there.
Depending on exactly what the OP wants to do, you can use a single state notetag to manipulate damage (Custom Confirm Effect) before it damages the target. So, for example, to do this

Say, that if Attack skill formula normally is just (a.atk - b.def) and if actor has Weapon Mastery B...it will make Attack damage formula turn into (a.atk - b.def + a.mat - b.mdf)
you'd just do
Code:
<Custom Confirm Effect>
value += a.mat - b.mdf;
</Custom Confirm Effect>

Now this does have some nitpickiness; for example, it doesn't take into account the damage formula variance or whether it was a critical. But, of course, if you care about that you can just add it with additional lines of code.

So depending on exactly what you're trying to do, you certainly can put it in the state, it just may involve some moderately complex code.

I guess the damage formula one is okay, just gotta do it one at a time.
There's always copy and paste 😉
Depending on exactly what the OP wants to do, you can use a single state notetag to manipulate damage (Custom Confirm Effect) before it damages the target. So, for example, to do this
yeah, i had shared the enfire tip because thats how it goes about it. It uses a confirm effect, but its just written to save and replace the action result in order to make its own separate damage popup instead of just adding to the damage. it also shows how to factor elemental rate if OP didnt know.

i mentioned it could be used to make a separate damage instance or add additional damage directly so that OP could choose which would be preferable. the change would have just been removing half of the notetag's content 😛

I have a battle condition that tracks hit counts for state(like, hit 12 times to cancel Enemy Skill/inflict state.)
it depends on how youre checking for hits, but ill hazard a guess and say it mostly likely wont in your case. if your check its based on either the Game_Action executeDamage() or apply() functions like any of the action timing notetags in the buffs and states plugin, then it wouldnt count as additional hits
yeah, i had shared the enfire tip because thats how it goes about it.
Well...bothering to read linked articles was clearly for them and not me. I'm above such things 😛 🤣

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-add-additional-scaling-to-attack-skills-through-a-state.173502/