MZ Jams Debugger - Add Metrics to FPS window

Jams Debugger - Add Metrics to FPS window.

Ability to add metrics to the FPS window via F2 to help with plugin development and testing.

1650948158214.png


Parameters (Can set page to 0 or 1)

Default Metrics:
  • FPS - Frames Per Second
  • Player Position - (x,y) positions
  • Console Peek - shows the last message in the console window.

Example add new metrics:

JavaScript:
var _updateFrameCount = SceneManager.updateFrameCount;
SceneManager.updateFrameCount = function() {   
    if ($gamePlayer) {
        if(this._PosEvent == undefined){this._PosEvent = new Jams_PlayerPosEvent("playerPos")};
        this._PosEvent.update ({"x": $gamePlayer.x, "y": $gamePlayer.y});
    }
    _updateFrameCount();
};

Github Download
I updated the code to use an event bus (Publish/Subscriptions)

Original thread: https://forums.rpgmakerweb.com/threads/jams-debugger-add-metrics-to-fps-window.147090/