Event Reference

Event Reference (MZ → React)

This page lists real events emitted by the stock overrides under js/plugins/rpgreact/ so your custom overrides can follow the same patterns. The event(eventType, eventSpecifier, data?, trace?) helper available inside overrides automatically decorates data with the current platform/app context.

Conventions

  • eventType comes from RPGEventType (in menus/shared/types.js); compare against enum values (not strings).

  • eventSpecifier is usually an enum value from one of: RPGScreen, RPGMessageType, RPGBattleEvent, RPGWindowEvent, but some flows use custom strings (example: "Formation").

  • data is a plain object; the bridge will merge platform context into it before React receives it.

  • trace is an optional string to help debug where the event came from.

  • InputType is exposed alongside the other enums for input-change payloads.

Screen events

  • Open screen

    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.Splash], null, "PluginSceneSplash");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.Title], { actions }, "PluginSceneTitle");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.Map], {}, "PluginSceneMap");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.MainMenu], menuData, "PluginSceneMenu");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.Shop], menuData, "PluginSceneShop");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.Battle], BattleData, "PluginSceneBattle");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.GameOver], actions, "PluginSceneGameOver");
    event(RPGEventType.SCREEN_OPEN, RPGScreen[RPGScreen.GameEnd], actions, "PluginSceneGameOver");
  • Close screen

    event(RPGEventType.SCREEN_CLOSE, null, null, "PluginSceneTitle");

Scene lifecycle events

Overlay window events

Toast/message events

Window/UI events

Actor selection and cancel events

Battle events (partial list)

Notes

  • The enums used above are emitted by your build to menus/shared/types.js. Ensure you rebuild menus/ so the plugin loads these types at boot.

  • This is a representative list based on the stock overrides present in the plugin. If you add your own events, prefer namespacing under existing types or document them for your React team.

Last updated