Proportional Damage Help

Hey all, I'm super new to this. So I don't know if what I'm trying to do will be doable using in-game variables or if it will need a script ... I'm using RPG Maker MV and the YEP Battle Engine Core (if that's relevant).

I'm hoping to have one character that:

- Starts every fight with 0 MP
- Drains MP from enemies using drain skills
- Casts spells that cost all of his current MP
- Those spells deal damage that is (base damage * proportion of MP gauge he had stored when using attack). So casting the
same spell will deal a lot more damage if he had saved up 70% of his max MP as opposed to 30%.

I've figured out how to do the MP drain using Yanfly's LifeSteal plug-in, and I figured out how to set the skill's MP cost to be the character's current MP. Getting the character to start with 0 MP and having the skill do proportional damage ... not so much.


Any help would be greatly appreciated, and I apologize if this is an obvious set-up that I'm just too novice to know lol
You dont even need yanfly's to do MP drain skills as there's a default option on the skills's damage type to actually deal MP drain instead of damage. Assuming it doesnt need to deal damage, else you can also just use the damage formula for that.

For the 0 MP, you can maybe make a troop event for all troops or use a base troop event plugin and make that event turn the MP to 0

For MP based damage when you've already used all MP to use the skill, you'd need to have a plugin that will save the MP value before its used up since your MP is already 0 when the damage formula runs so you cant use it to get the current MP anymore.
As far as I know this will require a plug-in, so:

Moved to Plug-in Requests

- Starts every fight with 0 MP
- Those spells deal damage that is (base damage * proportion of MP gauge he had stored when using attack). So casting the
same spell will deal a lot more damage if he had saved up 70% of his max MP as opposed to 30%.

Getting the character to start with 0 MP and having the skill do proportional damage ... not so much.

We were able to do something similar with one of our projects. We ended up using the TP mechanic instead of the MP mechanic. All of our skills damage formulas would have a multiplier of ((a.tp* 100)/(a.mtp*100)) + 1. Therefore with 45 TP, our skills would be multiplied by 1.45

Original thread: https://forums.rpgmakerweb.com/threads/proportional-damage-help.107509/