How could I make Pharmacology be equal to a stat?

Hello gang, I've been wracking my brain on this one and feel I may be overlooking the obvious. What I want is to make an item for healing, no problem there. Then I want the amount the item heals to go up as the character who uses its magic defense goes up.

I changed the magic defense stat to first aid in my game and set everyone to 1 to start. I want it so their first aid stat (MDef) directly improves how much a certain item will heal. I believe the simplest way should probably be to set it so that the pharmacology stat is equal to the first aid stat then I wouldn't have to set up variables and what not for each of my way to many playable characters. But I am hitting a wall on how to make that happen correctly. Or possibly have the item damage formula to heal an amount based on the first aid stat but I am terrible with those formulas. I would love some input on this if anyone can lend a hand.
Why not just use the Mdef stat in the formula for the item?
Yeah I wasn't sure if that was doable I am terrible with those formulas but I guess I will try and figure out how to do it that way thank you.
You can make pha param be based on mdf param with plugins if you want to try.
You'll need latest versions found in my blog.
https://forums.rpgmakerweb.com/index.php?threads/icf-soft-main-utility.67848/
https://forums.rpgmakerweb.com/index.php?threads/icf-soft-params-core.65274/
Both are needed in order.

Then go to plugin parameter "SParam3 Base" and give as value: this.mdf / 30
You can change "30" to a value where magic defense count as 100%

I hope this will be usefull.
Thanks very much for the reply's🙂 it turns out the formula idea works perfectly for what I need with nothing but, "# + a.mdf * 2". I wont need the plugin for this Soft but Ill take a look I may still have use for it besides this issue I had, thanks for pointing me to it.
Use a.mdef if you want the actor's stat that is using the item to influence the healing or b.mdef if you want the target actor's stat to influence the healing.
I am running into a slight issue with getting this dialed perfectly. I have it so when using the healing item it also has Grow +1 for MDF. Now the issue I am having is when the player gets to be max HP because of the grow tag the item can still be used even though hp is maxed which results in an exploit of skill boosting the MDF stat.

Is it possible to have the formula add a +1 MDF to the character each time they use the item so I can remove the Grow tag. That would stop the item from being able to be used after max hp. If I could lower the Grow rate to say .01 that would work also but that doesn't seem doable from the options available.
Just wanted to post a follow up here I found a formula that seems to be working so far, only limited testing though. I took my formula of
50 + a.mdf * 5 and added to it so it reads.
a._paramPlus[5]+=1;50 + a.mdf * 5 This is adding the 1 mdf each use but not past full hp so all looks good here.

Original thread: https://forums.rpgmakerweb.com/threads/how-could-i-make-pharmacology-be-equal-to-a-stat.78443/