Weapon Damage Scales from MP Rate

Not sure I'm in the right area for this.

I'm designing weapons that would make sense when using a materia system so I was wanting to avoid using Yanfly's attachable augments where possible. An idea I came up with was a magic based weapon that would change in strength depending on how much MP the actor has. As an example the basic attack would deal around 50% or 75% of the usual damage if the actor has no MP at all but would deal around 50% more damage than usual if their MP was full.

Yanfly released a Tips and Tricks called Berserker Power, but that's for all physical damage. I can easily convert it for magical damage but the problem remains that it scales all damage rather than just the weapon damage.

I may end up creating a new Attack skill using magical attack for it's damage formula and use Yanfly's Weapon Unleash plugin to replace the basic attack command with this new one. Is there an eval I can use in the skill's notebox to accomplish this? I'm not good at JS, only what I pick up on from reading existing JS.

For clarification, I want weapon damage only to scale based on MP Rate. No other skill damage should be affected when equipping this weapon with the exception of the added stats you'd get from something like a basic sword.
An idea I came up with was a magic based weapon that would change in strength depending on how much MP the actor has
if you use yanfly's equip core, you can use the parameter eval notetag to make its parameters more dynamic. youd make the weapon's atk in the database whatever it should be at its lowest and then use the notetag to give it more based on the user's mpRate()

As an example the basic attack would deal around 50% or 75% of the usual damage if the actor has no MP at all but would deal around 50% more damage than usual if their MP was full.

I can easily convert it for magical damage but the problem remains that it scales all damage rather than just the weapon damage.
the damage your basic attack will do is a result of its formula. unless youre explicitly separating and using the weapon's parameters in formulas, you cant adjust the "weapon damage". If you did separate the weapon's parameters and added the logic to see if the weapon is equipped and to use whatever percentage of it, that formula change would have to be done for all your skills.

you could use the buffs and states core state notetags to add a percentage or a set amount to damage dealt like the tips and tricks entry linked does, but you cant go into the formula and rewrite bits just like that.
So you're saying it's difficult to separate weapon damage and skill damage? The idea I was aiming for is just the weapon itself to deal more damage rather than applying the modifier to all magical damage.

I'll be using Yanfly's Weapon Unleash plugin to change basic attack skills for some weapons, such as canes that use a magic spell as basic attack or rods that replace basic attack with a healing spell. Similar to the Final Fantasy X-2 garments Black Mage and White Mage.

I can do the same for this MP scaled weapon, swap the basic attack for a skill made just for this weapon type. That was my initial idea but I don't know what type of damage formula or eval to use to make it work. Or would this be feasible in the first place?
i missed the notification, but
So you're saying it's difficult to separate weapon damage and skill damage?
yes, because the engine makes no such distinction. when you make a formula use a.atk, it will use the entirety of the attacker's atk parameter. its not going to be able to calculate what portion of the formula's resulting value is derived from the actor's weapons as opposed to any of the other contributions to their atk.

The idea I was aiming for is just the weapon itself to deal more damage rather than applying the modifier to all magical damage.
which is why i mentioned the equip core, as you can make the weapon's parameters scale with the users mp rate

That was my initial idea but I don't know what type of damage formula or eval to use to make it work. Or would this be feasible in the first place?
you can give every weapon a skill if you wanted. thats perfectly fine, as thats the point of the weapon unleash plugin. im not sure what you mean by giving it a formula to make it work.
you can give every weapon a skill if you wanted. thats perfectly fine, as thats the point of the weapon unleash plugin. im not sure what you mean by giving it a formula to make it work.
I meant giving a skill a formula to make it work then use the Weapon Unleash notetag in the weapon. When making a skill that scales its damage based on MP rate I don't know what damage formula I need to use or if I need to use a js eval from Skill Core.

What I was getting at was setting up a skill to have its damage scale with MP rate then attach it to the weapon, replacing the basic attack. At empty MP the skill will do half it's normal damage, full MP it will do 50% more than normal damage and half MP it does normal damage.
setting up a skill to have its damage scale with MP rate
more based on the user's mpRate()
mpRate is a function on battlers that returns the percentage of their mp. so
Code:
a.mpRate()
when at 80/80 returns 1, 50/80 0.625, etc. even without that, the rate is just dividing their mp by their max mp. when you hover over the formula box it tells you how to get the basic params
1739305249508.png

Code:
a.mp/a.mmp
will also get you the rate

so if you wanted to make the skill do the damage of the normal attack but add a 50-150% modifier based on mp, you just copy the formula and then multiply it by .5+ the user's mp rate

Original thread: https://forums.rpgmakerweb.com/threads/weapon-damage-scales-from-mp-rate.175279/