MZ Extra action once per turn (Bonus Action D&D)

From D&D Bonus Actions are once per turn and can do multiple things, usually things that happen in seconds or are class or skill specific. A rogue can use "hide" after they preform an attack to become safe or have the enemy search from them before able to counter-attack. Potions are another example, you can chug a potion then charge in and swing.
However if the player wanted to use 2 potions they have that option, but this expends action for the turn.

I used Yanfly Instant cast with cooldown plugins for MV to accomplish this. But I want to go about it without any additional plugins and trying to work around using the maker. I have VisuStella Battle Core plugin.

MZ Objective: Using a potion on yourself or an ally, counts as a bonus action. You may perform any other action freely however if you decide to use another bonus action it will count as an action and then end your turn.

The Plan:
Step 1:

So on my potion I put the note:
Code:
<JS Pre-Apply>
user.addState(bonusaction)
</JS Pre-Apply>
Step 2:
I created a state called Bonus Action, with the traits "Action Times + 100%", removal conditions: Turn end (1) and finally a post action that adds the state to resist this state (Bonus Action), so it ensure it is a hard once per turn.
Code:
<JS Post-End Action>
user.addState(resistbonusaction)
</JS Post-End Action>
Step 3:
Resist Bonus Action state, with the traits "State Resist - Bonus Action", removal conditions: Turn end (1).
This effectively removes the Bonus State at then end of your 2nd action and makes it so you cannot gain another action.

The Problem: It doesn't work lol. The Bonus Action State applies from the item but it does not give me an extra action. I tried Pre-Start Action, but again it does not work. If I understand Action Times +, you need to start the turn with this state to select 2 actions (which is not the objective at all).

Possible Solutions: JS code to allow actor to gain an extra action if certain skills and item are used while not under the bonus action state.

In any event im stuck, can anyone help?
That logic only work with instant cast of Yanfly, because the action is resolved when you use it, giving a aditional action in the same turn. The standart logic of Maker is to resolve everything on the "battle phase", not in the "choising phase". Soo, when you got a "extra action ", you lose it before the start of next turn, because it resolve in the "end of the turn".

To try something alike, but diferent, you can try to make everyone got two action. When they use bonus action, you don't do anything, but when they use a normal action, the player got a debuff to lose the leftover action. Maybe that will stop the seccond action on the "battle phase".

You can try to make a check before the attack resolve. Give two action to everyone. When they use a normal action, check if they have a "normal action state", if not, resolve the attack and add the debuff "normal action state". If they have a "normal action state", stop the attack (you can make the formula damage became zero; show a mensage text saying "he's exaust and can't do another action" or anything you want).

That way, if they chose two bonus action, both will resolve. But if they chosse two normal action, the seccond one will be stoped because of the "normal action state" proc on the first one to resolve.

I don't use the VisuStella plugin, but i think you can do it in the sameway you can do with Yanfly Battle Core plugin.​

To try something alike, but diferent, you can try to make everyone got two action. When they use bonus action, you don't do anything, but when they use a normal action, the player got a debuff to lose the leftover action. Maybe that will stop the seccond action on the "battle phase".
​

I thought of that but the way the game operates make it impossible. Since you don't perform actions instantly it will not work. Giving all actors Action Times + 100%, makes you choose both actions before either is resolved and they are resolved one after another.

It would be very messy and not a fun way to play the game when each turn you select 2 actions and more often then not, you would perform first action, then get a message saying "exhausted" and pass to the next actor. 🙁
"bonus action" only worked because of the instant skills plugin which allows skills to trigger during the skill selection phase.
without that kind of plugin the best you can do is action times +X% for extra "standard actions" (picking skills during the selection phase but they dont trigger until the combat phase)

from what i can tell MZ doesnt have instant skills plugin, at least not 1 from visustella

edit: and when you were using this in MV, if you had that same 3 steps you were already using more steps then needed. you only needed 1 step: setup action addstate <cancle instant: x-y> with 1 turn duration
"bonus action" only worked because of the instant skills plugin which allows skills to trigger during the skill selection phase.
without that kind of plugin the best you can do is action times +X% for extra "standard actions" (picking skills during the selection phase but they dont trigger until the combat phase)

from what i can tell MZ doesnt have instant skills plugin, at least not 1 from visustella

edit: and when you were using this in MV, if you had that same 3 steps you were already using more steps then needed. you only needed 1 step: setup action addstate <cancle instant: x-y> with 1 turn duration
Yes I had that, a state that canceled instant cast for every item and skill in the game.
Yanfly plugins were so simple to use.

So your saying it is not possible in MZ?
Moved to: Plugin Support
Moved to plugin support then vanished?
nobody else had any further input. why are you necro posting on something over a year old just to say that?
Because I'm also trying to do something similar, but got even more confused by the engine.

Original thread: https://forums.rpgmakerweb.com/threads/extra-action-once-per-turn-bonus-action-d-d.140446/