MV Mog Menu Scene Show variable on main menu page.

Hello everybody, o/ hope you're all having a fantastic day.


I'm using the Mog Meny secens plugin and would like to have a variable displayed on the main menu.

This is to represent the Party level of the party. So if someone could provide a snippet of a wippet to just display a single varible on the menu. That would be great, thanks 😀


1780054721262.png
Don't know much about this plugin.

When it allows Text Codes, then it's \V[1] (or sometimes \\V[1]) to show variable 1.
When it allows scripting, it's $gameVariables.value(1)
Hmmm, if you check the plugin how it creates that location text for example, imitating it would be like (change variable id and locations and add as plugin):

const _myEdit1_SceneMenu_createMonogatari = Scene_Menu.prototype.createMonogatari;
Scene_Menu.prototype.createMonogatari = function() {
_myEdit1_SceneMenu_createMonogatari.call(this);
this.createPartyLevel();
};

Scene_Menu.prototype.createPartyLevel = function() {
this._partyLevel = new Sprite(new Bitmap(260,32));
this._partyLevel.x = 25;
this._partyLevel.y = 50;
this._partyLevel.bitmap.fontSize = 32;
const variable = $gameVariables.value(10) || 1;
this._partyLevel.bitmap.drawText(variable,0,0,32,32,"center");
this._field.addChild(this._partyLevel);
};
Hmmm, if you check the plugin how it creates that location text for example, imitating it would be like (change variable id and locations and add as plugin):

const _myEdit1_SceneMenu_createMonogatari = Scene_Menu.prototype.createMonogatari;
Scene_Menu.prototype.createMonogatari = function() {
_myEdit1_SceneMenu_createMonogatari.call(this);
this.createPartyLevel();
};

Scene_Menu.prototype.createPartyLevel = function() {
this._partyLevel = new Sprite(new Bitmap(260,32));
this._partyLevel.x = 25;
this._partyLevel.y = 50;
this._partyLevel.bitmap.fontSize = 32;
const variable = $gameVariables.value(10) || 1;
this._partyLevel.bitmap.drawText(variable,0,0,32,32,"center");
this._field.addChild(this._partyLevel);
};

That works perfectly, thank you Mii Lord ^^

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/mog-menu-scene-show-variable-on-main-menu-page.183845/