[RMMZ] Actors do nothing if they lose the required MP for their spell before they cast it

Hello, folks! I've run into an unexpected issue regarding enemies that attack the MP of my characters and could use some help!

The issue:
When you're selecting a spell for an actor to use, you obviously can only select the ones you have enough MP to cast. However, if you select a spell and then, over the course of the turn, that actor dips under the required MP to cast it because an enemy damaged their MP, when their turn comes up they just do literally nothing and their turn is skipped.

There are two easy solutions I can see to fix this. Unsure if I have any preference, so if you know how to do either or both of the following [or some other way to fix this], please let me know!

[1] Make it so spells have their costs deducted from current MP when the selection input is made, instead of when the spell actually fires.

[2] Make it so if an actor's MP dips below what's required to cast the current spell, they default to attacking or a specific action of my choosing.

For context, I use 9 out of 10 of the VisuStella free plugins, and a couple other rando ones. I'm not sure if any of them would make this be a thing or if it's a default-platform thing.

Thanks in advance for your time!
Which plugin are you using that causes there to be a difference in time between when you enter the command and when it goes off? I would look there.

That's not how MZ works by default, so you have to know what you're changing in your own game 😛
Which plugin are you using that causes there to be a difference in time between when you enter the command and when it goes off? I would look there.

That's not how MZ works by default, so you have to know what you're changing in your own game 😛
In retrospect, my first troubleshooting step absolutely should have been to disable the battle-related plugins and seeing which, if any, made the change 😅
Which plugin are you using that causes there to be a difference in time between when you enter the command and when it goes off? I would look there.

That's not how MZ works by default, so you have to know what you're changing in your own game 😛
Update - I tested it with every combination of plugins on and off I could think of that might have done it, including shutting off EVERY plugin. It actually does still happen with default MZ 🙁
Hello, folks! I've run into an unexpected issue regarding enemies that attack the MP of my characters and could use some help!

The issue:
When you're selecting a spell for an actor to use, you obviously can only select the ones you have enough MP to cast. However, if you select a spell and then, over the course of the turn, that actor dips under the required MP to cast it because an enemy damaged their MP, when their turn comes up they just do literally nothing and their turn is skipped.

There are two easy solutions I can see to fix this. Unsure if I have any preference, so if you know how to do either or both of the following [or some other way to fix this], please let me know!

[1] Make it so spells have their costs deducted from current MP when the selection input is made, instead of when the spell actually fires.

[2] Make it so if an actor's MP dips below what's required to cast the current spell, they default to attacking or a specific action of my choosing.

For context, I use 9 out of 10 of the VisuStella free plugins, and a couple other rando ones. I'm not sure if any of them would make this be a thing or if it's a default-platform thing.

Thanks in advance for your time!
Yep, this is how it's designed. If you use a skill that requires resources, you run the risk of not being able to use it if you're drained of that resource before your turn executes.

The quickest way to resolve this would be to use a battle system plugin where turns are executed immediately after choosing the action (like VisuStella's STB )
Yep, this is how it's designed. If you use a skill that requires resources, you run the risk of not being able to use it if you're drained of that resource before your turn executes.

The quickest way to resolve this would be to use a battle system plugin where turns are executed immediately after choosing the action (like VisuStella's STB )
Ah, drat. Both for money reasons and for design reasons I don't want to get any battle system plugins or change from the default, at least until I move on to making my full dream game. Do you know of a way that I can accomplish it in the default battle system?
I believe the default turn-based battle doesn't suffer from this (as skills execute immediately when picked), but the TPB/ATB battle system definitely does.

Also I can confirm that that behaviour still happens even when using VisuStella's Battle Core with or without the ATB plugin. Might be worth asking in JS Plugin Requests for assistance?
I believe the default turn-based battle doesn't suffer from this (as skills execute immediately when picked)

Ah, I'm actually using the default turn-based battle system and assumed this is how it would work but it isn't. I weep! What could be wrong? I tried it with and without all my plugins on and in various combos, but the issue persisted.

[also, as a fellow enby, I'm a big fan of your profile pic and...sub-name? Title?]
Isn't that kind of a good thing? I mean the character starts focusing to cast a powerful spell and if their mp reserve is drained / their magic is disrupted then the spell fails and they waste the time they've concentrated on it.
Isn't that kind of a good thing? I mean the character starts focusing to cast a powerful spell and if their mp reserve is drained / their magic is disrupted then the spell fails and they waste the time they've concentrated on it.
Kind of! I'm not upset that the spell gets canceled, I'm upset the character literally does nothing and skips their turn when it does. I want them to at least default to SOMEthing, like one of the free commands, etc
Update - I tested it with every combination of plugins on and off I could think of that might have done it, including shutting off EVERY plugin. It actually does still happen with default MZ 🙁
...it doesn't for me? I made a test project, I got into a battle, the spells cast as soon as I select them.

Do I have to modify the speed of the skill in order to see this effect? If so, that would be the solution to your problem, take away those changes.

Kind of! I'm not upset that the spell gets canceled, I'm upset the character literally does nothing and skips their turn when it does. I want them to at least default to SOMEthing, like one of the free commands, etc
That is standard (expected) behavior in games with that kind of skill system. See things like Grandia 2+, Final Fantasy Tactics...if you have a move with charging time, the whole point is that nothing happens if you get knocked out of it.
Do I have to modify the speed of the skill in order to see this effect? If so, that would be the solution to your problem, take away those changes.
I suppose that's technically a solution, but the combat system is built around it. I don't want the actions to happen immediately, I still want them slotted into a queue based on their speed.
That is standard (expected) behavior in games with that kind of skill system. See things like Grandia 2+, Final Fantasy Tactics...if you have a move with charging time, the whole point is that nothing happens if you get knocked out of it.
Sure, but that doesn't mean I want it in my game, haha 😅

Luckily, Trihan was kind enough to whip up a script that does exactly what I'm looking for! If a character doesn't have enough MP to use the action command the player selected, they'll default to attack [well, whatever skill 0001 in your game is, which for me is different but that's besides the point]!

They should have a post about it on the forum soon, in case anyone was following this thread for a similar solution 😀
Here's the plugin I made for this:

Original thread: https://forums.rpgmakerweb.com/threads/rmmz-actors-do-nothing-if-they-lose-the-required-mp-for-their-spell-before-they-cast-it.145271/