How can I make it so battlers fall asleep at 0 MP?

Using just the standard turn battle system, I actually intend to rename MP to something that would relate to exhaustion instead so I'd like to have everyone potentially fall asleep whenever their MP runs out and then regenerate by a small amount each turn while sleeping.
I'd also like it so that if they fell asleep at their turn but got hit after sleeping, they'd wake up and do nothing for the remainder of that turn only to fall back to sleep the next turn due to still having 0 MP (or SP/stamina points to show exhaustion).
(For the record, even the basic attack costs 1 SP as I feel that people should potentially get tired from attacking).
Can someone please tell me how to do this (I currently don't know how to code)?
I'm not that great at searching and the closest thing I've found is the plugin that causes death at 0 MP. Will I need to request a modification of that plugin? If this cannot be achieved easily by eventing, shall this thread be moved to plugin requests then?
Thanks for any help in advance.

Edit: In case you're wondering here's the link to the similar plugin I mentioned
http://mvplugins.com/search/0 MP/page/1

Also, I already know how to change MP to SP and make attack cost one SP so I don't think I need help with that part but I only mentioned it for context.
Get the Auto Passive States Plugin fron Yanfly.
Make a copy of the sleep state. And place this notetag in the notebox:

<Custom Passive Condition>
condition = user.mp < 1 && $gameParty.inBattle();
</Custom Passive Condition>
And in the plugin parameters put the state id in either Actor or Global Passive, depending if you want enemies to be affected.
Thanks.
I copied and pasted that exactly what was shown into the notetag. I also created a skill that would use up all of an ally's MP just to test it. However, I get the following error. I'm stuck again now. Any ideas why this happens?
upload_2018-3-7_15-14-33.png
I don't get it, there's a tag for this kind of thing already.

<Passive Condition: MP Below 1%>

The only issue you might notice is that it'll apply the state if you have even 0.9% of MP left.
Zarsla's solution works for me in a new project. This error seems familiar...double-check that any plugins you're using are up-to-date, e.g. Yanfly's Core Engine is currently at version 1.27. The latest versions of Yanfly's plugins can be found here: http://yanfly.moe/yep/
Zarsla's solution works for me in a new project. This error seems familiar...double-check that any plugins you're using are up-to-date, e.g. Yanfly's Core Engine is currently at version 1.27. The latest versions of Yanfly's plugins can be found here: http://yanfly.moe/yep/

A lot of my plugins are indeed outdated. It surprised me that in Yanfly's changelog, it only mentioned 1.25 even though it was indeed 1.27 when I clicked on it. Anyway, thanks. I realised it was actually the state I created itself that caused an error though ([probably related to a plugin which I'll figure out later). I started off with way too many plugins months ago and then mostly focused on writing rather than the engine itself so everything's a mess for me. Thanks anyway.


Edit: Thanks for all the help. It was the plugins. I've refreshed them all now. However, there's still just one thing missing in that I gave the sleeping character a taunt ring for my battle test against an enemy that's slower than her so that she'd fall asleep after using up her MP and then get damaged and woken up before the next turn begins. I've set it so that sleeping restores 2% of MP (and HP) each turn. How do I set it so that she wouldn't regain that MP if she'd been woken up before that turn of battle ended (so that her MP would remain at 0 for her to fall right back to sleep again)? Basically, I only want the actors and enemies to be able to regain MP from undisturbed sleep each turn. Anyone know how to do that?

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-it-so-battlers-fall-asleep-at-0-mp.92309/