MZ Choosing several actions during a turn / Action Points

Hello everyone,

I'm looking for a way to make each character in battle have Action Points (AP), a new resource that limits the usage of skills :

Using a command in battle takes more or less AP. As long as the AP pool isnt empty, the battler's turn shouldnt end, and they should be able to play again : In the case of an actor not auto-battling, the player should select a new command after each action taken from the character they control.

As I don't think Rpg Maker offers a way to force actor/enemy to use several times commands during their turn, this is where I need a plugin.

I don't want the action to be executed several times I'd like actors to choose another action right after they acted as long as they're able to (have some AP left) :

=====
eg :

In the case of a party of 2 actors against a boss :

TURN 1
[GREEN
|| 4 AP] uses for Attack for 2 AP. --> Green starts with 4 AP. She uses a standard attack that costs 2 AP.
[GREEN || 2 AP] uses Potion for 1 AP. --> Green's AP > 0, the player is able to select another action for Green to use.
[GREEN ||1 AP] skips her turn. --> Green decides to skip her turn, saving remaining AP but ending her turn prematurely.

[ALEX || 4 AP] uses Potion for 1 AP.
[ALEX || 3 AP] uses Super-Attack for 3 AP. -->
Different types of actions mean different AP costs.
[ALEX || 0 AP] has no AP left ! ALEX ends his turn. --> Alex's AP = 0, his turn ends.

[BOSS || 6 AP] uses Attack for 2 AP. --> This is not a regular enemy. It starts with the maximum of 6 AP.
[BOSS || 4 AP] uses Giga-Attack for all is AP ! --> AP/AP cost should be manipulable through formulas and notetags (states, item, equipments, actors and enemies)

TURN 2
[GREEN
|| 5 AP] gets 4 AP for beginning her turn ! --> AP are refulled at a fixed rate. Since Green didnt spend all of her AP last turn, she stacks it together (up to a maximum of a fixed cap) for a total of 5 AP to start her turn with.
=====

To specify the needs :

-Battlers should be able to act several times during their turn, after using the chosen command.
-This ability to play again should be tied with a custom resource (eg AP).
-If said resource = 0, turn should end for that battler.
-Custom resource should have a maximum cap / regeneration rate.
-It should be able to manipulate the custom resource parameter in formulas.
-it should be able to manipulate resource as notetags : cost, base rate, regen rate (for actors/enemies/states/items/equip)
-Resource should be visible on the hud/menus.

-It could have a CoolDown system for balance issues.

To my knowledge, the only plugin that offers everything above is VCM's : https://vcm-plugins.itch.io/vcm-actionpoints
Unfortunately it doesn't exist for MZ.


Thanks for your time
For anyone interested, I figured how to implement this system, but I have to use a plugin that allows instant casting (VisuStella's OTB battle system comes with this functionnality, i'm not sure about other plugins) :

-Give a skill some MP cost (I use MP instead of a new parameter)
-Give this skill the "Instant cast" Tag (which is <OTB Instant> for the plugin I use)
-Create a new state : Set it to "Cannot Move", "End of Action 0 ~ 0"
-In skill's formula (i use the basic Attack skill formula) : a.mp > 0 ? a.atk * 4 - b.def * 2 : a.addState(31);
-Grant your actors/enemies MP regeneration (ExParam), or they won't be able to act after their first turn.


What it does : If user's MP are above 0, the skill/attack will be executed as normal. If not, the user gets the state "31", which virtually "stuns" them = turn passes.

It is required to get a "instant cast" plugin for the trick to work : that way turns are "free" (for a MP cost), until MP goes to 0.

However it doesnt work for items as I can't set MP cost for it. I could use a formula, to set a cost and reduce MP but it won't show the cost automatically, I'll have to inform the player in the description.

Original thread: https://forums.rpgmakerweb.com/threads/choosing-several-actions-during-a-turn-action-points.166795/