MZ How to Solve the Problem that Force Action Cancels the Battler Default Move Action

Hi there:
I'm planning to create a counter system by using force action. I know that RPG Maker has its own counter system. But the counter system I want to create is quite unique, which I guess could only be built from scratch.

Regarding on the process, I bind common event in skill effect, and then call force action to fight back in common event. Once I tested this solution, I found that although the counter itself can be executed, but if the battler(No matter actor or enemy) executes the force action before it's own action, then it will no longer execute its own action in that turn. I guess it's because the forced action counts as one action time so the battler won't act anymore.

Regarding on the fix, my plan is to change the script to 'Not count an action as one action time if it's a forced action'. I would like to know which section should I start from in the project code. Solutions from other perspectives or plugins are also appreciated.

Thanks in advance
Modifying the default force action behavior is generally not an easy task. You might have more luck with another approach. However, without specific details of what it is you actually want to accomplish, it's hard to say.

Rather than looking for help with how to modify the base force action code, I might suggest that you outline your objectives and desired functionality and see if others can suggest an alternative approach.
One possibly better approach would be to use yanfly's action sequence instead of common events with force action.
unfortunately that will require some experience with both javascript and action sequence programming.
Like @Kenen suggests - if you don't know how to do something (change the Force Action code), don't ask your question framing that as the solution.

It may not be (probably isn't) the actual best/correct solution.

Instead, tell us what you want to achieve and we can suggest how to approach it.

Have you looked into Yanfly's Counter Control? It offers a lot of options and flexibility in how the counters work and you could most likely implement your system with it.
Thank you all for the suggestioins. I will start to check some of the existing counter plugins if they can meet my requirement first

Original thread: https://forums.rpgmakerweb.com/threads/how-to-solve-the-problem-that-force-action-cancels-the-battler-default-move-action.159402/