Armor/Weapon that can Add Extra Stuff to Damage Formula

So essentially what I'd like to try and have is an equipped item that can add extra information to the damage formulation of all of a unit's skills. So, for example, a sword that adds the unit's Agility to their damaging skills. Not just their basic attack, but their skills/magic, as well. I feel like there might be a really janky and cursed way of doing this by just adding tons of variables to EVERY damage formula in the game, but I'd rather not do that if it can be avoided.
You'd need to use a plugin for it. If you don't already have something suitable in your project, you could use my Eval Note Tags plugin; if you're already using VisuStella plugins, you could use notetags from Battle Core.

As an example, from my plugin, you could put the notetag onto the weapon:
Code:
<Action Hit Eval>
if (this.isPhysical() && this.isDamage())
    value += user.agi;
</Action Hit Eval>

and that will add the wielder's agility to all physical damage skills. If you want it to apply to magic, also, take out the isPhysical() bit. if (this.isDamage())
You'd need to use a plugin for it. If you don't already have something suitable in your project, you could use my Eval Note Tags plugin; if you're already using VisuStella plugins, you could use notetags from Battle Core.

As an example, from my plugin, you could put the notetag onto the weapon:
Code:
<Action Hit Eval>
if (this.isPhysical() && this.isDamage())
    value += user.agi;
</Action Hit Eval>

and that will add the wielder's agility to all physical damage skills. If you want it to apply to magic, also, take out the isPhysical() bit. if (this.isDamage())
This seems like exactly what I'm looking for, but unfortunately it's not working. I added the plugin and added that code to a weapon wielded by one of the actors, but the attacks aren't any stronger. I even bumped up their agility a crazy amount just to make sure, and nothing.

I'm using the SRPG Plugin, which is pretty extensive and changes a lot of stuff. Do you suppose there's any chance that could be interfering? Otherwise, maybe I'm just missing something with my implementation.
I'm using the SRPG Plugin, which is pretty extensive and changes a lot of stuff.
Yes - it's important when you're making requests to tell people if you're already using plugins that dramatically alter the engine.

The SRPG plugin, as far as I know, doesn't use the battle scene at all, so I expect it wouldn't be compatible with any other plugins that interact with the standard action resolution.

I think your only safe bet is to put your calculations inside of the damage formula.
Yes - it's important when you're making requests to tell people if you're already using plugins that dramatically alter the engine.

The SRPG plugin, as far as I know, doesn't use the battle scene at all, so I expect it wouldn't be compatible with any other plugins that interact with the standard action resolution.

I think your only safe bet is to put your calculations inside of the damage formula.
Sorry, I should've been more specific about my situation. Definitely unfortunate that the two plugins aren't compatible, though SRPG doesn't mix well with a lot of stuff so it's not too surprising.

Still, thanks for your help!
One quick suggestion, have you considered using a State that modifies all outgoing damage with <Custom Confirm Effect>, and have the weapon add that state as a passive when equipped?

something like...
Code:
<Custom Confirm Effect>
var bonus = x;
value += bonus;
</Custom Confirm Effect>

Not entirely sure how to implement passives, though. I think it should work with SRPG, if you're using SRPG GEAR as that is compatible with most Yanfly Battle Engine and Yanfly Buffs States Core (aside for "between turns" effects, there's a separate fix plugin for that)
One quick suggestion, have you considered using a State that modifies all outgoing damage with <Custom Confirm Effect>, and have the weapon add that state as a passive when equipped?
He said in post 3 that using a notetag to modify the effects of an action didn't work (presumably because the SRPG system doesn't use the default action resolution functions).

I think it should work with SRPG, if you're using SRPG GEAR as that is compatible with most Yanfly Battle Engine and Yanfly Buffs States Core
The OP is using MZ. 😉
Sorry, I missed the header. Gear is on MZ but if they said they couldn't get it working, then that's that...

I guess you could bodge it by introducing a variable / custom parameter to the damage formula (say, Hakuen Studio Custom Parameters), make that weapon increase that param (maybe it's a hidden stat called "bonusDamage") and introduce it in every relevant damage formula.

Kinda overkill tho haha. Just spitballing, it has been a while since I wrote on this forum.

Original thread: https://forums.rpgmakerweb.com/threads/armor-weapon-that-can-add-extra-stuff-to-damage-formula.166491/