How can I go towards making a 'save attack for later' pluggin and menu

In my game, using mp at the right moment is curical as each attack costs mp and if you lose all your mp, you are stuck in a state where you can't attack and the enemy can just get hits on you until your mp gets up to 50.
So I thought of a mechanic where before the player uses a skill, it will have a small window, menu that will give them the choice to either save the skill for later or use it now. Saving it for later means they can use it later regardless of if their MP is drained, this will be very helpful in boss battles but how would I go towards making this ?

I attached a photo I made of the idea.
Screenshot_20231029-225752~2.png
I think we're a bit too in the weeds in the sense of your overall game mechanics and we need to focus more specifically on what you want to accomplish at the micro-level with this skill cost mechanic.

So... You want actors to be able to pay the MP cost for skills in advance ("save" them) and then presumably execute them with no MP cost at a later time?

What happens if they choose "save"? Do they forfeit their turn? Or do they get to choose another skill or attack afterwards?

From a design standpoint, I'd probably caution you against a scenario where "each attack" requires MP. Since MZ is a turn-based engine, you need to be sure that each actor is able to take their turn in some form, whether it be using a basic attack that requires no MP, or guarding, or otherwise passing their turn. Otherwise you can create a scenario where it's impossible for players to progress past an actor's input phase which would effectively brick your game.
I think we're a bit too in the weeds in the sense of your overall game mechanics and we need to focus more specifically on what you want to accomplish at the micro-level with this skill cost mechanic.

So... You want actors to be able to pay the MP cost for skills in advance ("save" them) and then presumably execute them with no MP cost at a later time?

What happens if they choose "save"? Do they forfeit their turn? Or do they get to choose another skill or attack afterwards?

From a design standpoint, I'd probably caution you against a scenario where "each attack" requires MP. Since MZ is a turn-based engine, you need to be sure that each actor is able to take their turn in some form, whether it be using a basic attack that requires no MP, or guarding, or otherwise passing their turn. Otherwise you can create a scenario where it's impossible for players to progress past an actor's input phase which would effectively brick your game.
If the player chooses to save a skill, they would lose that turn. And mp has a cooldown meaning It will always automatically generate if lost, the player will never not be able to attack in a battle but they will have to wait for their MP to rise unless they have items.
@D_Draco
there are two big problems with your idea that needs to be solved before anything can be done - one technical and one game mechanical.

Let's start with the problem in the game mechanics:
What is the advantage for the player to save the skill for later as opposed to use it now?
It is always better to kill an enemy as fast as possible, because he cannot harm you if he's dead.
And since the MP regenerates automatically that sentence about "then he can act later" is absolutely useless - all fights are won by initiative and the faster you act the better for tactics.

Unless there is an additional advantage to delaying your own action, no player will ever do that - this is one of the cases where an option sounds nice in theory but is useless in practice.

Then there is the technical problem of "later" - what is later in your battle mechanic? How does your battlesystem handle time?
I'm assuming you plan to use one of the turn-based battlesystems from the context, but you never state that and even in a turn-based there are variants on how to handle that.

additionally, a much better solution would be to provide a wait skill that does nothing and costs nothing, because then you can choose at the later time to pay for the skill best use then, instead of guessing which skill would be usefull then and not commit now to use that specific skill later.
@Andar
The main concept of the idea was if the user was in a boss battle, and thier mp all got taken down, they would still have a way to defend their self with a saved attack and it will also cost no mp to do so.
Let's say there's a scenario: the player is in a battle with a boss, when their MP is used up, they have no items to help regen faster meainig the boss is just taking more of their hp down. What if the player was so close to winning before this happened, being able to use a saved skill from before would be useful, for example if the player saved a shield skill. This his would be helpful for the player as their MP is regenerating.

Another thing I would like to point out is. If the player triggers a special skill, wouldn't you think they may want to save it till the enemy's hp is low enough? In the game special skills can only come at a small rate where triggered meaning if you don't pick it that turn, it will be removed from the available skills list and the player will have to trigger one again. In a situation where one is triggered being able to save it for times where example if the enemy transforms instead of dying would be better as it would be if more use then.

In a general battle this may be useless but for boss battles depending on difficulty I would say this would be a good mechanic
@Andar
The main concept of the idea was if the user was in a boss battle, and thier mp all got taken down, they would still have a way to defend their self with a saved attack and it will also cost no mp to do so.
Let's say there's a scenario: the player is in a battle with a boss, when their MP is used up, they have no items to help regen faster meainig the boss is just taking more of their hp down. What if the player was so close to winning before this happened, being able to use a saved skill from before would be useful, for example if the player saved a shield skill. This his would be helpful for the player as their MP is regenerating.

Another thing I would like to point out is. If the player triggers a special skill, wouldn't you think they may want to save it till the enemy's hp is low enough? In the game special skills can only come at a small rate where triggered meaning if you don't pick it that turn, it will be removed from the available skills list and the player will have to trigger one again. In a situation where one is triggered being able to save it for times where example if the enemy transforms instead of dying would be better as it would be if more use then.

In a general battle this may be useless but for boss battles depending on difficulty I would say this would be a good mechanic
That seems like an inordinate amount of work to put into creating a mechanic that will basically never be used outside of boss fights.
If you want to make such a mechanic, I think one easy way to do it is make duplicate skills that cost 0 mp. When you choose to save the original skill, have it increase a variable tied to that skill by 1. Then use VS Skill and States to show the duplicate skill if variable > 0 (maybe in their own 'saved skills' skill type section). And the duplicate skills decrease the variable tied to them by 1. Not too much work, unless you have a million skills.

But then you still have to make the change that selecting a skill directs it to that new Use/Save window, before it executes, which I don't know how to do LOOOL.
If you want to make such a mechanic, I think one easy way to do it is make duplicate skills that cost 0 mp. When you choose to save the original skill, have it increase a variable tied to that skill by 1. Then use VS Skill and States to show the duplicate skill if variable > 0 (maybe in their own 'saved skills' skill type section). And the duplicate skills decrease the variable tied to them by 1. Not too much work, unless you have a million skills.

But then you still have to make the change that selecting a skill directs it to that new Use/Save window, before it executes, which I don't know how to do LOOOL.
Thank you very much
They made some valid points though, I think, I only skimmed the posts 😀

And about the use/save selection, I think if you want an easy way, you can just make an action sequence which asks you use/save at the beginning. But then you'd have to select a target etc even if you wanted to save it, which isn't as cool I guess.
They made some valid points though, I think, I only skimmed the posts 😀

And about the use/save selection, I think if you want an easy way, you can just make an action sequence which asks you use/save at the beginning. But then you'd have to select a target etc even if you wanted to save it, which isn't as cool I guess.
Thank you
Thank you very much for this, you are the first person to actually help me with the idea without slandering my concept. I really appreciate this and will use this.
No one "slandered" your concept. Problems with it were pointed out, likely in an attempt to help you make an informed decision as to whether or not you should put time into creating this system or go back to the drawing board. Nobody was rude, so to have you say that is kinda messed up.

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-go-towards-making-a-save-attack-for-later-pluggin-and-menu.162507/