(Solved) Multiple actions, states, and programming eloquence

Hey all! Fair warning: this one gets a little complicated.


Using Yanfly's instant cast plugin, I have created a system where characters can do two things each turn: use a "quick skill", and perform their normal action. It should be noted that the turn ends if the player uses their normal action before the "quick skill". One of these "quick skills" (let's call it "X" for simplicity) is intended to allow the player an aditional normal action on the turn after it is used, at the cost of the "quick skill" for that turn.

Here's the problem:

My current method is to give the player a status effect that allows them to act twice on a turn which wears off after their next turn, but because the plugin allows the player to use "X" and carry on with their turn as normal, and the status effect is applied instantly, this means the player would be able to perform two normal actions this turn as well as next turn, and we don't want that. (I don't have any problems with preventing users from using "quick skills" on either of the two turns, so no need to mention that.)

Here's what I've come up with so far:

I could use a combination of a bolean and the event pages in combat to add the effect at the end of the turn rather than during it, but the problem is that I have a great many different battles in my game (300+, I've yet to make them all but there's going to be a lot) and even if I use a common event to handle the code with each battle page redirecting to the common event, that's still a whole hell of a lot of copy pasting to do.


I feel like there's got to be a more eloquent solution. If you can think of anything, do let me know, and thank you for reading!

Note to moderators: I'm not sure whether this one should belong in this forum or in the plugin support forum, because even though the issue is caused by a plugin, the proposed solution is almost entirely a programming matter.
How do they obtain the status effect initially?
Have you tried using the 'action end' instead of 'turn end' on the custom state? If the quick skill gives an extra normal action, setting the state to action end 2-2 should end the state after the character takes 2 normal actions.
Grunwave The skill named X gives it to them.

Kamuipsyus I certainly could do that, but my desire is to make the extra action apply to the next turn and only the next turn. With your proposed solution they could use "X" and then both of the other actions on the first turn, which is what I am trying to avoid.
What turn battle system is in your project?
Grunewave Basically the default system. You pick what you want to do for all teammates one at a time and then all living actors and enemies do their turn all at once in order of agility.
I use CTB from yanfly and use Agility as my speed calculator.

If you want to use a CTB system, you temporarily raise Agility by a certain number to get two turns back-to-back.

This might accomplish what you are after too:
Grunwave Thanks for the help, but I'm not sure this would do what I'm looking to do. I'll be honest, I'm starting to think that this way of doing it...

Have you tried using the 'action end' instead of 'turn end' on the custom state? If the quick skill gives an extra normal action, setting the state to action end 2-2 should end the state after the character takes 2 normal actions.

...would just work better than my original idea anyway. Also, it's a solution that is proven to work, and that's more than I can offer.

At any rate, thank you both for your time and assistance.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-multiple-actions-states-and-programming-eloquence.102944/