MZ Playtime window in main menu

@Dev_With_Coffee thank you for your attempt!! You have been an amazing help.

Is there anyone that can continue this?
I need 3 things to show in the menu.

-Play time
-variable
-map location
Bumb, can anyone help with this? I just need a playtime, variable 1 and map name to show up in the menu but it will have to be in a separate window from the gold window as stated by Dev_With_Coffee.
Bump
Bump
Whoa, a whole year? 😅

I just wrote a quick plugin (attached) based on the mockup in your opening post. It seems OK from my quick tests but let me know if there are problems with it! 👋

Full code in spoiler below. Note that it should be saved as PauseMenuInfos.js, otherwise it won't be able to find its own parameters (unless you edit the plugin name in the code to match the new filename).
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Adds map name, variable, and playtime displays to the pause menu.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/index.php?threads/140600/
 * @help Leave a format string blank to hide that window.
 * 
 * Free to use and/or modify for any project, no credit required.
 *
 * @param Format: Map Name
 * @type string
 * @desc Format string for the map name display.
 * %1 = map display name, %2 = map ID.
 * @default %1
 * 
 * @param Format: Variable
 * @type string
 * @desc Format string for the variable display.
 * %1 = variable name, %2 = variable value.
 * @default \c[4]%1\c[0]: %2
 * 
 * @param Variable ID
 * @parent Format: Variable
 * @type variable
 * @desc The game variable to display.
 * @default 0
 * 
 * @param Format: Playtime
 * @type string
 * @desc Format string for the playtime display.
 * %1 = play time (as shown on save screen).
 * @default %1
 */
void (() => {
'use strict';

    // Get plugin params.
    const PLUGIN_NAME = 'PauseMenuInfos';
    const P = PluginManager.parameters(PLUGIN_NAME);

    // Parse/store params.
    const [fA, fB, iB, fC] = [
        P['Format: Map Name'],
        P['Format: Variable'],
        parseInt(P['Variable ID'], 10) || 0,
        P['Format: Playtime']
    ];

    // Validity checks.
    const [hA, hB, hC] = [
        fA       ? 1 : 0,
        fB && iB ? 1 : 0,
        fC       ? 1 : 0
    ];
    const hTotal = hA + hB + hC;

    // Inheritance base for new windows.
    const _BASE = Window_Gold.prototype;

    // ===== Map Name ===== //

    const A = globalThis.Window_MenuMapName_Cae = function() {
        this.initialize(...arguments);
    };
    const Ap = A.prototype = Object.create(_BASE);
    Ap.constructor = A;

    Ap.refresh = function() {
        const rect = this.itemLineRect(0);
        this.contents.clear();
        this.drawTextEx(this.value(), rect.x, rect.y, rect.width);
    };

    Ap.value = function() {
        return fA.format($gameMap?.displayName(), $gameMap.mapId());
    };

    // ===== Variable ===== //

    const B = globalThis.Window_MenuMapVar_Cae = function() {
        this.initialize(...arguments);
    };
    const Bp = B.prototype = Object.create(_BASE);
    Bp.constructor = B;

    Bp.refresh = Ap.refresh;

    Bp.value = function() {
        return fB.format($dataSystem.variables[iB], $gameVariables.value(iB));
    };

    // ===== Playtime ===== //

    const C = globalThis.Window_MenuMapPlaytime_Cae = function() {
        this.initialize(...arguments);
    };
    const Cp = C.prototype = Object.create(_BASE);
    Cp.constructor = C;

    // Auto-refresh.
    Cp.update = function() {
        _BASE.update.apply(this, arguments);
        if ($gameSystem.playtime() !== this._cache)
            this.refresh();
    };

    Cp.refresh = function() {
        Ap.refresh.apply(this, arguments);
        this._cache = $gameSystem.playtime();
    };

    Cp.value = function() {
        return fC.format($gameSystem.playtimeText());
    };

    // ======= Menu ======= //

    // Patch - add new windows.
    void (alias => {
        Scene_Menu.prototype.create = function() {
            alias.apply(this, arguments);
            const rect = this.goldWindowRect();
            if (hC) {
                rect.y -= rect.height;
                this.addWindow(this._playtimeWindowCae = new C(rect));
            }
            if (hB) {
                rect.y -= rect.height;
                this.addWindow(this._varWindowCae      = new B(rect));
            }
            if (hA) {
                rect.y -= rect.height;
                this.addWindow(this._mapNameWindowCae  = new A(rect));
            }
        };
    })(Scene_Menu.prototype.create);

    // Patch - reduce command window height.
    void (alias => {
        Scene_Menu.prototype.commandWindowRect = function() {
            const rect = alias.apply(this, arguments);
            rect.height -= hTotal * this.goldWindowRect().height;
            return rect;
        };
    })(Scene_Menu.prototype.commandWindowRect);

})();

Edit 2024-03-22: updated version available here, supporting multiple variables, left/centre/right alignment, and manual window order~
Thank you so much! It doesn't break during combat, the shop looks normal, the requested items look correct.

Thanks again @caethyril for saving me once again!!!

2022-09-28.png


This request is resolved!
Great! Happy RPG Making~

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/playtime-window-in-main-menu.140600/