MP Battle - MP healing over time

Hi, I'm new here. Wow these forums are overwhelming, hope I posted in the right place.. ^_^

Title: MP Healing Over Time (Battle) (Not HP Regen, but MP Regen)
Game: RPG Maker MV
Label: Battle Skill Script/Code
Plug-Ins Currently Owned: Yanfly Engine (Full Collection, including Core, BuffsStatesCore, X_ExtDoT)

Description: I want an MP recovery spell that only works in-battle. The plug-ins only give me HP options, but no MP. I'm sure there has to be an in-battle MP recovery over every turn (I'm thinking 5% max MP per battle turn).

Desired Result: User casts spell (only on self, not others), spell recovers an initial 5% MP upon first cast, continues recovering 5% MP each turn for the next 4 rounds of battle.

If the answer is JavaScript instead of formula, please let me know exactly where to put it as I'm a newbie to this game. Thank you!!!

Glad to be joining the community to help others in the future!
(And if I mistakenly put this in the wrong thread please move it accordingly, I promise I tried!)
Moved to: MV Support

Resources Requests is more for assets and audio.
Thank you! Sorry about that.
You can make a MP regen state, it is similar to HP regen or poison state.

On States database create a new state and double click over Traits

1610412412084.png


Under the Param tab, set Ex-Parameter: MP Regeneration and write 5%

1610412377878.png
You can make a MP regen state, it is similar to HP regen or poison state.

Thank you, this answers my question.
I spent all this time looking over the skills that I didn't even think about making it a State!

One follow-up question:

It asks for percentages. If you wanted a 7% regen tick, would you make the state 100% regen and the skill itself 7%, or vice versa?
@mothervain the paramater in the state is to be modified if you want a 7% mp regen
Yes, you can, you can make a skill having instant effect and also add a state:

1610494285882.png


you can see all the variables for making a formula hovering the mouse cursor over the formula input box:

1610494432574.png


Where a is the caster and b is the target.
The skill isn't 100% regen, it's a 100% chance of applying the State. And then the State is 7% regen. The immediate MP increase (at the moment the skill is used) is handled in the MP Recover Formula at the top, as @stramin pointed out.

Original thread: https://forums.rpgmakerweb.com/threads/mp-battle-mp-healing-over-time.132070/