MZ Common Events based on Action Results (Strict Timing Required)

Hi there,

So I have been looking for the MZ plugin equivalent to this particular VXAce script below:
but I have had no luck thus far after searching both the EN/JP plugin libraries I know

Summary of what the above script does:
Allows you to trigger common events based on the result of an action/skill during a battle.
For Eg. Trigger common event X when actor 1 evades an attack, or Common Event Y when actor 2 takes a certain amount of damage, when a critical occurs, etc. Whether they occur are based on eval conditions that can be freely configured by the user. For the script above, configuration is done using comments within the common event itself.

Why I needed this particular script:
In short, I'm using the common events as split-second reaction to skills. This means I need the execution timing of the events to trigger on the exact moment when an action's result is displayed (ie. during a damage popup that confirms a hit).
Naturally this isn't possible with any common event script I know and it requires meddling around with BattleManager. $gameTemp.reserveCommonEvent(ID) obviously doesn't work as well due to said timing requirement. For the script above, this is achieved by aliasing/overwriting Scene_Battle and the Window_BattleLog method to inject and execute said common events, so it does not interfere with the standard action sequences regardless of the battle system you are using.

This is a particularly useful function to have to greatly improve the visual aspects of a battle so I'm hoping for a way to achieve this in MZ. If I missed a plugin (VisuStella ones excluded, those doesn't work) here or there is a workaround, feel free to point me in the right direction.
Much appreciated.
Naturally this isn't possible with any common event script I know and it requires meddling around with BattleManager. $gameTemp.reserveCommonEvent(ID) obviously doesn't work as well due to said timing requirement. For the script above, this is achieved by aliasing/overwriting Scene_Battle and the Window_BattleLog method to inject and execute said common events, so it does not interfere with the standard action sequences regardless of the battle system you are using.
Well since you seem to already know what function you need to modify and how CT_Bolt's plugin will help you alias any function you want

Well since you seem to already know what function you need to modify and how CT_Bolt's plugin will help you alias any function you want
Unfortunately I do not know how to actually write a custom script to achieve what's required in first place, so I'll need an actual solution here instead of a DevTool. Thanks for the recommendation though.
the thing is, common events aren't fired until the current process is finished (usually an attack, or a turn, or the round).
if you must fire [batches of processes] after an [immediate input from the player] in [real time], what you need is a rework of the GUI, or a whole different battle system altogether.
adding on top of the existing battle system via common events to achieve that functionality, is going straight into spaghetti code territory.
As mentioned above, common events generally aren't called at specific times, they're put into a queue.

If you need code to execute at a specific moment, you're better off using something like VisuStella's Battle Core, which provides notetags you can put code into for the various phases of an action.

Of course, you've said both that you can't/won't use VisuStella plugins, and that you're unable to learn how to translate your common events into JavaScript commands.

So, unfortunately, I can't think of any UI-driven solution to offer you.
If I'm not being clear enough, I am perfectly aware common events when called are put into a queue by default, hence I'd like to know if there is a script call/code snippet way to simply execute them correctly on the spot if a plugin for that doesn't exist, which is the crux of the matter.
if you must fire [batches of processes] after an [immediate input from the player] in [real time], what you need is a rework of the GUI, or a whole different battle system altogether.
You misunderstood my intentions. I do not need to fire them after an immediate input from the player nor in real time, only during the moment of an action result or a specific function like performDamage.
The linked RGSS3 script managed to do just that while providing conditional flexibility, it doesn't require a rework of GUI nor using a different battle system, and it's meant to work on the default battle system.

Original thread: https://forums.rpgmakerweb.com/threads/common-events-based-on-action-results-strict-timing-required.157363/