How to drain HP/MP out of battle (Hunger-like System)

In my game, I'm trying to implement a hunger system using MP as there will be no battles, but you have to eat food to survive long enough to see the ending. I've already figured that I will have MP drain about 1 point every 10 seconds from a total of 100, and depending on what you eat, you can get more MP back or even lose more. But the issue is I'm not sure how to set this up at all. I have no scripting skills and I don't think this is something that can be done through a common event, though I've been wrong before on many occasions.
It can easily be done by common event, you just need a parallel process (which means it'll update constantly) and utilize wait commands to attain the correct timespan (60 frames = 1 second (theoretically, anyway) so the event could be as simple as:


Ghost.png


In the example above, the entire party will lose 1 mp every ten seconds as long as switch 15 is set to on. From there you could get even more creative by having conditional branches for varying levels of 'hunger' like having a message display saying something like "I need to eat something soon" whenever mp drops below 50 and forcing a gameover whenever it hits 0, common events are actually pretty powerful, and can encompass a lot of scripts/plugins that both exist and are requested though people don't realize it.


Ghost2.png

Original thread: https://forums.rpgmakerweb.com/threads/how-to-drain-hp-mp-out-of-battle-hunger-like-system.55869/