MZ Executing Common Event in Equip Scene?

The Situation
I'm trying to make a RPG Maker MZ plugin which change player's clothes based on equipped item.
The plugin works in combo with common event: the plugin assign a designated common event so it will be executed after an armor/weapon is equipped.
The common event is currently a hierarchy of ifs and case switches that control what faceset / spriteset to be used.

So far, I can make it partially work through this code

JavaScript:
(function() {

Scene_Equip.prototype.onItemOk = function() {
    SoundManager.playEquip();
    this.executeEquipChange();
    this.hideItemWindow();
    $gameTemp.reserveCommonEvent(ID);
    this._slotWindow.refresh();
    this._itemWindow.refresh();
    this._statusWindow.refresh();
};

})();

The Problem
That code doesn't change anything in the Menu and Equip Scene. The spriteset is changed successfully, but the faceset only changed when you exit Menu and Equip scene completely, then go back to the Menu/Equip Scene.

So in conclusion, the Common Event is working, but not executed in the supposed time and place.

I just realized that based on $gameTemp.reserveCommonEvent(ID) is exist to just queue the soon-to-be-executed common event. It doesn't execute that common event right away in the Equip Scene.

Is there any way to execute common event right away in Equip Scene?
not by default.

the problem is that only the map and the battlescene have game interpreters to run events, none of the other scenes have them. That is why the common event can only be processed after returning to the map.

You'll need a plugin to add a game interpreter to the equip scene - such scripts or plugins have been written for older makers, but I don't think they exist for MZ yet.
@Andar So, in theory, if I managed to translate everything in the supposed common event to a plugin function, it should be able to execute and update those facesets in the Menu and Equip Scene, right?
if you go by the javascript equivalent of those functions directly it should work
if you go by the javascript equivalent of those functions directly it should work

Looks like I'm going to have some interesting works to do!

Thank you for the enlightenment!

-hereby I declare this thread as solved-
-hereby I declare this thread as solved-
you need to report the topic to be closed, the mods don't read every topic.

and there is a pinned topic on this forum that lists the script equivalent for every event command, so converting the common event should only be tedious but not complicated.

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/executing-common-event-in-equip-scene.126871/