MV Show a message in Menu Screen (RPG Maker MV)

So I was planning to show a message in Menu Screen. How to do it? I've been search but quite confused how to make it work

1736689364459.png


For context, I was create a custom formation menu where specific hero cannot be main party and it will show the message that you can't place it on main party if it's still want to change it

I also try to use SRD HUD but it didn't work
do you mean a popup info that you cannot change actors?
or where do you want to show it?
do you mean a popup info that you cannot change actors?
or where do you want to show it?
Yes, I want to show a popup info about not allowed to change actors in Formation

I was trying to show normal message but it will show after the menu is closed

Update:
I was referring to this post, and it works well


I was use a reference from plugin from Zero_G

And here's the result
1736730793268.png


The only left is to make box window so it will readable

Here's the code I use so far

JavaScript:
/*:
 * Prevent Assist Main Party
 *
 * @plugindesc v1.0.0 This plugin prevent Assist to be in Main Party.
 * @author Vyndicate
 *
 *
 * @help
 * There is no Plugin Command for this plugin.
 *
 * ============================================================================
 * Prevent actor to change
 *
 * Reference from Plugin Zero_G
 *
 * ============================================================================
 */

(function () {
    var popupMessage;
    var _Scene_Base_start = Scene_Base.prototype.start;
    Scene_Base.prototype.start = function () {
        _Scene_Base_start.call(this);

        popupMessage = new Sprite(new Bitmap(Graphics.width, Graphics.height));
        popupMessage.opacity = 255;
        this.addChild(popupMessage);
    };

    SceneManager.showMessagePreventChange = function () {
        popupMessage.bitmap.clear();
        popupMessage.opacity = 255;

        popupMessage.bitmap.drawText("Assist hero cannot be in Main Party!", 0, Graphics.height / 2, Graphics.width, 30, 'center');
    };

    var _Scene_Base_update = Scene_Base.prototype.update;
    Scene_Base.prototype.update = function () {
        _Scene_Base_update.call(this);

        if (typeof popupMessage !== 'undefined') {
            if (popupMessage.opacity > 0) {
                popupMessage.opacity -= 3;
            }
        }
    }

    var _Swapping_Actor = Scene_Menu.prototype.onFormationOk
    Scene_Menu.prototype.onFormationOk = function() {
        var index = this._statusWindow.index();
        var actor = $gameParty.members()[index];
        var pendingIndex = this._statusWindow.pendingIndex();
        if (pendingIndex >= 0) {
            if(!this.preventSwap(index, pendingIndex)) {
                $gameParty.swapOrder(index, pendingIndex);
                this._statusWindow.setPendingIndex(-1);
                this._statusWindow.redrawItem(index);
            }
        } else {
            this._statusWindow.setPendingIndex(index);
        }
        this._statusWindow.activate();
    };

    var _Prevent_Swap = Scene_Menu.prototype.preventSwap
    Scene_Menu.prototype.preventSwap = function(index, pendingIndex) {
        if((index < 4 || pendingIndex < 4) && ($gameParty.members()[index].currentClass().name == "Assist" || $gameParty.members()[pendingIndex].currentClass().name == "Assist")) {
            console.log("You can't use Assist in main party")
            SceneManager.showMessagePreventChange()
            return true
        }
        return false
    }
}());

Thanks for Reply @ShadowDragon ! I just found what I want. Sorry for late reply because I was sleeping

I will close this
if you want a window, you need to call a window scene for it.
or try to add a gradientfill if possible.

I don't know how that works inside a sprite, but you can make a rectangle in a different way or filler.
but I think you could find that too.

another way it to make the actor name greyed out for swapping for visibility, and instead of text,
a buzzer sound (which could be cleaner too) or use both.

see what works best 🙂
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/show-a-message-in-menu-screen-rpg-maker-mv.174635/