Custom buff by a percentage of a user's stat

So I'm sort of at a loss as to how to achieve this. How would one make a buff be measured by the percentage of a user's stats?
For example, I want to give the user a skill that buff's the party's total atk but I want it to vary depending on the user's Mind stat (A custom stat of mine). I want the buff to be a flat number of 40% of the user's Mind stat.


If this doesn't make much sense... I will try my best to clarify.
I can't promise we'd figure it out, but if you feel like it, add me on discord and I'll see if I can help you achieve this. I have some ideas, but I'm not certain about it. Zerothedarklord#8459

Original thread: https://forums.rpgmakerweb.com/threads/custom-buff-by-a-percentage-of-a-users-stat.127321/