IssaMeMino

Living in a Peculiar World
Veteran
Joined
Apr 11, 2017
Messages
54
Reaction score
26
First Language
English
Primarily Uses
RMMV
Hello! I'm using a larger screen resolution- I love the single player menu, but now it sits to the left side of the screen. Do you know how to center it onto the page?
 

Attachments

  • menu.JPG
    menu.JPG
    185.2 KB · Views: 64

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Could there be an option where if there are more actors in the party (like 'followers') to have a small sub-window displayed to the right side just showing their name, Level, HP/MP (no actor face or anything like that) to still keep the focus on the single actor? I'm creating a single actor game, and this plugin has been perfect so far, but I'm thinking of implementing a 'follower/mercenary' system where characters temporarily join the main character to help out in battles. As it is, if there are multiple actors in the party, you can still select items like healing potions to use on them (which is great), but it would be nice if there was a way to show their HP/MP beforehand, without having to select the healing item and then the actor to see if they need healing.
 
Joined
Jul 27, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Does anyone know how you'd make it so custom windows like gold and time don't go to their regular (multiparty) position when the menu opens?
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
302
Reaction score
90
First Language
Enlish
Hello,

I'm running into an issue where Yanfly's stat allocation script doesn't open when using this menu system. If this script is above Stat allocation, the game freezes. If this script is below, the menu simply doesn't open and nothing happens.
 

Djajapena

Villager
Member
Joined
Oct 28, 2017
Messages
17
Reaction score
5
First Language
Indonesia
Primarily Uses
RMMV
This plugin is just what I need for my simple game. The windows didn't center automatically on a wider screen setting, so I modify the code a little bit so it is easier to change the windows' position.

Copy to notepad and save as VE_Single_Actor.js

JavaScript:
//=============================================================================
// One-Actor Menu Version 1.05+
//=============================================================================

/*:
* @plugindesc One-Actor's menu. This plugin is made for one playable actor only.
* @author Ventiqu - 2017
*
* @param Level Number x Distance
* @desc Set 'level' -number x distance from the text.
* default: 50
* @default 50
*
* @param Class text x Distance
* @desc Set 'Class' -text's x distance.
* default: 160
* @default 160
*
* @param ExptoLvl text x Distance
* @desc Set 'ExpToLvl' -numbers x distance.
* default: 160
* @default 160
*
* @param Status Window Width
* @desc Set Status window's width. You might need to change other
* parameters as well. Default: 325
* @default 325
*
* @param Command Window Row
* @desc Command Window's visible row(s).
* default: 7
* @default 7
*
* @param Command Window x
* @desc Set Command Window's y position.
* default: 95
* @default 95
*
* @param Command Window y
* @desc Set Command Window's y position.
* default: 130
* @default 130
*
* @param Gold Window x
* @desc Set Gold Window's x position.
* default: 95
* @default 95
*
* @param Gold Window y
* @desc Set Gold Window's y position.
* default: 418
* @default 418
*
* @param Status Window x
* @desc Set Status window's x position.
* default: 335
* @default 335
*
* @param Status Window y
* @desc Set Status Window's y position
* default: 130
* @default 130
*
* @help
* -Customized 28.1.2020
*  Added Parameters:
*      - "x" and "y" coordinate position for Command, Gold, and Status Window
*      - Command window's visible row(s)
*
* -Update #4 25.1.2017-
*
* Remember to turn off Formation! Go to Database - System - Menu Commands and turn off Formation.
* This changes menu to look like its meant for one actor only.
*
* --Using ACTOR NOTES--
* Go to Database (f9) and to Actors. Then there you can set a note to that actor.
*
* <avatar:filename> set actor's different picture.
* put file at img/pictures and use same file name as parameter.
*
* example: <avatar:Bust_test>
* Case sensetive.
*
* -------------
* --Changelog--
* -------------
* 1.05+- 20.1.2020 - Added params for "x" and "y" coordinates and command row visibility
* 1.05 - 25.1.2017 - Actor note added so you can add a bust picture of the actor. Plugin commands added.
* 1.04 - 20.11.2016 - Modified script.
* 1.03 - 25.6.2016 - Minor fixes.
* 1.02 - 11.6.2016 - Fixed black screen bug.
* 1.01 - 1.12.2015 - Skill-, Equip- and Status menu will open for actor 1 only so no more need to press OK before you can jump to new window.
*/

(function() {

   function Scene_Base() {
     this.initialize.apply(this, arguments);
   }

   var parameters  = PluginManager.parameters('VE_Single_Actor');
   var xdistance   = Number(parameters['Level Number x Distance'] || 50);
   var xclass      = Number(parameters['Class text x Distance'] || 160);
   var xexptolvl   = Number(parameters['ExptoLvl text x Distance'] || 160);
   var windowwidth = Number(parameters['Status Window Width'] || 325);
   var comwinrow   = Number(parameters['Command Window Row'] || 7);
   var comwinx     = Number(parameters['Command Window x'] || 95);
   var comwiny     = Number(parameters['Command Window y'] || 130);
   var golwinx     = Number(parameters['Gold Window x'] || 95);
   var golwiny     = Number(parameters['Gold Window y'] || 418);
   var statwinx    = Number(parameters['Status Window x'] || 335);
   var statwiny    = Number(parameters['Status Window y'] || 130)


// this will create menus like status- and gold window
     var _Scene_Menu_create = Scene_Menu.prototype.create;
     Scene_Menu.prototype.create = function() {
         _Scene_Menu_create.call(this);
         this._statusWindow.x = statwinx;   //512;
         this._statusWindow.y = statwiny;   //130;
         this._goldWindow.x = golwinx;  //Graphics.boxWidth / this._goldWindow.width + 92;
         this._goldWindow.y = golwiny;  //Graphics.boxHeight - this._goldWindow.height - 135;
     };
// this will create commandwindow
    Scene_Menu.prototype.createCommandWindow = function() {
        this._commandWindow = new Window_MenuCommand(comwinx, comwiny); //new Window_MenuCommand(95, 130);
        this._commandWindow.setHandler('item',      this.commandItem.bind(this));
        this._commandWindow.setHandler('skill',     this.commandPersonal.bind(this));
        this._commandWindow.setHandler('equip',     this.commandPersonal.bind(this));
        this._commandWindow.setHandler('status',    this.commandPersonal.bind(this));
        this._commandWindow.setHandler('formation', this.commandFormation.bind(this));
        this._commandWindow.setHandler('options',   this.commandOptions.bind(this));
        this._commandWindow.setHandler('save',      this.commandSave.bind(this));
        this._commandWindow.setHandler('gameEnd',   this.commandGameEnd.bind(this));
        this._commandWindow.setHandler('cancel',    this.popScene.bind(this));
        this.addWindow(this._commandWindow);
    };

// this will push skill, equip or status depends on which you selected.
    Scene_Menu.prototype.commandPersonal = function() {
        this._statusWindow.setFormationMode(false);
        switch (this._commandWindow.currentSymbol()) {
        case 'skill':
            SceneManager.push(Scene_Skill);
            break;
        case 'equip':
            SceneManager.push(Scene_Equip);
            break;
        case 'status':
            SceneManager.push(Scene_Status);
            break;
          }
    };

    Scene_ItemBase.prototype.showSubWindow = function(window) {
        window.x = this.isCursorLeft() ? Graphics.boxWidth - window.width : 0;
        window.show();
        window.activate();
    };

// removed text from this so this wont mess around
    Scene_Menu.prototype.onPersonalOk = function() {
    };

// Rows for menucommands
    Window_MenuCommand.prototype.numVisibleRows = function() {
        return comwinrow; //7;
    };

// height for goldwindow
    Window_Gold.prototype.windowHeight = function() {
        return this.fittingHeight(1);
    };

// width for menustatus
    Window_MenuStatus.prototype.windowWidth = function() {
        return windowwidth;
    };
// height for windowstatus
    Window_MenuStatus.prototype.windowHeight = function() {
        var h1 = this.fittingHeight(1);
        var h2 = this.fittingHeight(2);
        return Graphics.boxHeight - h1 - h2 - 85;
    };
// maxCols is for max party members shown. This is set to 1, because this is single-player menu.
// do not change this unless you know what you are doing.
    Window_MenuStatus.prototype.maxCols = function() {
        return 1;
    };
// just like maxCols, but this is rows. This is set to 1, because this is single-player menu.
// do not change this unless you know what you are doing.
    Window_MenuStatus.prototype.numVisibleRows = function() {
        return 1;
    };

// draws actor face.
Window_MenuStatus.prototype.drawItemImage = function(index) {
    var actor = $gameParty.members()[index];
    var rect = this.itemRectForText(index);
    // load stand_picture
    var bitmapName = $dataActors[actor.actorId()].meta.avatar;
    var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null; // ? on ternary operator.
    var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144));
    var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144));
    var lineHeight = this.lineHeight();
    this.changePaintOpacity(actor.isBattleMember());
    // if actor has note <actor: filename> then do this.
    if ( bitmap ) {
        var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0;
        var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0;
        var dx = (bitmap.width > rect.width) ? rect.x :
            rect.x + (rect.width - bitmap.width) / 2;
        var dy = (bitmap.height > rect.height) ? rect.y :
            rect.y + (rect.height - bitmap.height) / 2;
        this.contents.blt(bitmap, sx, sy, w, h, dx, dy);
    } else { // if there is not a note or its invalid, do the normal setting.
        this.drawActorFace(actor, rect.x + 60, rect.y + lineHeight * 2.0, w, h);
    }
    this.changePaintOpacity(true);
};
// draws actor name, level, class, hp, mp and status icons.
    Window_MenuStatus.prototype.drawItemStatus = function(index) {
        var actor = $gameParty.members()[index];
        var rect = this.itemRectForText(index);
        var x = rect.x;
        var y = rect.y;
        var width = rect.width;
        var bottom = y + rect.height;
        var lineHeight = this.lineHeight();
        this.drawActorName(actor, x, y + lineHeight * 0, width);
        this.drawActorLevel(actor, x, y + lineHeight * 1, width);
        this.drawActorClass(actor, x + xclass, y + lineHeight * 0, width);
        this.drawActorHp(actor, x, bottom - lineHeight * 3.1, width);
        this.drawActorMp(actor, x, bottom - lineHeight * 2.1, width);
        this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);

        // Thanks to thalesgal's friend who did this 'to Level' text!
        var toLevel = actor.nextRequiredExp() +  actor.currentExp();
        this.drawText(actor.currentExp() + "/ " + toLevel, x + xexptolvl, y + lineHeight * 1, width);
    };

// Draws actor's level number.
    Window_Base.prototype.drawActorLevel = function(actor, x, y) {
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.levelA, x, y, 48);
        this.resetTextColor();
        this.drawText(actor.level, x + xdistance, y, 36, 'left');
    };

Game_System.prototype.winCount = function() {
    return this._winCount;
};

})();

18 September 2020 update:
Now EXP on the main menu can be displayed in number or percentage.
JavaScript:
//=============================================================================
// One-Actor Menu Version 1.07+
//=============================================================================
/*:
* @plugindesc One-Actor's menu. This plugin is made for one playable actor only.
* @author Ventiqu - 2017
*
* @param Level Number x Distance
* @desc Set 'level' -number x distance from the text.
* default: 50
* @default 50
*
* @param Class text x Distance
* @desc Set 'Class' -text's x distance.
* default: 160
* @default 160
*
* @param Display EXP in Number
* @desc EXP is displayed in number or percentage.
* default: Yes
* @default true
* @type boolean
* @on Yes
* @off No
*
* @param ExptoLvl text x Distance
* @desc Set 'ExpToLvl' -numbers x distance.
* default: 160
* @default 160
*
* @param Status Window Width
* @desc Set Status window's width. You might need to change other
* parameters as well. Default: 325
* @default 325
*
* @param Command Window Row
* @desc Command Window's visible row(s).
* default: 7
* @default 7
*
* @param Command Window x
* @desc Set Command Window's y position.
* default: 95
* @default 95
*
* @param Command Window y
* @desc Set Command Window's y position.
* default: 130
* @default 130
*
* @param Gold Window x
* @desc Set Gold Window's x position.
* default: 95
* @default 95
*
* @param Gold Window y
* @desc Set Gold Window's y position.
* default: 418
* @default 418
*
* @param Status Window x
* @desc Set Status window's x position.
* default: 335
* @default 335
*
* @param Status Window y
* @desc Set Status Window's y position
* default: 130
* @default 130
*
* @help
* -Customized 18.9.2020
*  Can choose to display EXP in number or percentage
*
* -Customized 28.1.2020
*  Added Parameters:
*      - "x" and "y" coordinate position for Command, Gold, and Status Window
*      - Command window's visible row(s)
*
* -Update #4 25.1.2017-
*
* Remember to turn off Formation! Go to Database - System - Menu Commands and turn off Formation.
* This changes menu to look like its meant for one actor only.
*
* --Using ACTOR NOTES--
* Go to Database (f9) and to Actors. Then there you can set a note to that actor.
*
* <avatar:filename> set actor's different picture.
* put file at img/pictures and use same file name as parameter.
*
* example: <avatar:Bust_test>
* Case sensetive.
*
* -------------
* --Changelog--
* -------------
* 1.07+- 18.9.2020 - EXP can be displayed in number or percentage
* 1.05+- 20.1.2020 - Added params for "x" and "y" coordinates and command row visibility
* 1.05 - 25.1.2017 - Actor note added so you can add a bust picture of the actor. Plugin commands added.
* 1.04 - 20.11.2016 - Modified script.
* 1.03 - 25.6.2016 - Minor fixes.
* 1.02 - 11.6.2016 - Fixed black screen bug.
* 1.01 - 1.12.2015 - Skill-, Equip- and Status menu will open for actor 1 only so no more need to press OK before you can jump to new window.
*/
(function() {
   function Scene_Base() {
     this.initialize.apply(this, arguments);
   }
   var parameters  = PluginManager.parameters('VE_Single_Actor');
   var xdistance   = Number(parameters['Level Number x Distance'] || 50);
   var xclass      = Number(parameters['Class text x Distance'] || 160);
   var dispExp     = String(parameters['Display EXP in Number'] || true);
   var xexptolvl   = Number(parameters['ExptoLvl text x Distance'] || 160);
   var windowwidth = Number(parameters['Status Window Width'] || 325);
   var comwinrow   = Number(parameters['Command Window Row'] || 7);
   var comwinx     = Number(parameters['Command Window x'] || 95);
   var comwiny     = Number(parameters['Command Window y'] || 130);
   var golwinx     = Number(parameters['Gold Window x'] || 95);
   var golwiny     = Number(parameters['Gold Window y'] || 418);
   var statwinx    = Number(parameters['Status Window x'] || 335);
   var statwiny    = Number(parameters['Status Window y'] || 130)

// this will create menus like status- and gold window
     var _Scene_Menu_create = Scene_Menu.prototype.create;
     Scene_Menu.prototype.create = function() {
         _Scene_Menu_create.call(this);
         this._statusWindow.x = statwinx;   //512;
         this._statusWindow.y = statwiny;   //130;
         this._goldWindow.x = golwinx;  //Graphics.boxWidth / this._goldWindow.width + 92;
         this._goldWindow.y = golwiny;  //Graphics.boxHeight - this._goldWindow.height - 135;
     };
// this will create commandwindow
    Scene_Menu.prototype.createCommandWindow = function() {
        this._commandWindow = new Window_MenuCommand(comwinx, comwiny); //new Window_MenuCommand(95, 130);
        this._commandWindow.setHandler('item',      this.commandItem.bind(this));
        this._commandWindow.setHandler('skill',     this.commandPersonal.bind(this));
        this._commandWindow.setHandler('equip',     this.commandPersonal.bind(this));
        this._commandWindow.setHandler('status',    this.commandPersonal.bind(this));
        this._commandWindow.setHandler('formation', this.commandFormation.bind(this));
        this._commandWindow.setHandler('options',   this.commandOptions.bind(this));
        this._commandWindow.setHandler('save',      this.commandSave.bind(this));
        this._commandWindow.setHandler('gameEnd',   this.commandGameEnd.bind(this));
        this._commandWindow.setHandler('cancel',    this.popScene.bind(this));
        this.addWindow(this._commandWindow);
    };
// this will push skill, equip or status depends on which you selected.
    Scene_Menu.prototype.commandPersonal = function() {
        this._statusWindow.setFormationMode(false);
        switch (this._commandWindow.currentSymbol()) {
        case 'skill':
            SceneManager.push(Scene_Skill);
            break;
        case 'equip':
            SceneManager.push(Scene_Equip);
            break;
        case 'status':
            SceneManager.push(Scene_Status);
            break;
          }
    };
    Scene_ItemBase.prototype.showSubWindow = function(window) {
        window.x = this.isCursorLeft() ? Graphics.boxWidth - window.width : 0;
        window.show();
        window.activate();
    };
// removed text from this so this wont mess around
    Scene_Menu.prototype.onPersonalOk = function() {
    };
// Rows for menucommands
    Window_MenuCommand.prototype.numVisibleRows = function() {
        return comwinrow; //7;
    };
// height for goldwindow
    Window_Gold.prototype.windowHeight = function() {
        return this.fittingHeight(1);
    };
// width for menustatus
    Window_MenuStatus.prototype.windowWidth = function() {
        return windowwidth;
    };
// height for windowstatus
    Window_MenuStatus.prototype.windowHeight = function() {
        var h1 = this.fittingHeight(1);
        var h2 = this.fittingHeight(2);
        return Graphics.boxHeight - h1 - h2 - 85;
    };
// maxCols is for max party members shown. This is set to 1, because this is single-player menu.
// do not change this unless you know what you are doing.
    Window_MenuStatus.prototype.maxCols = function() {
        return 1;
    };
// just like maxCols, but this is rows. This is set to 1, because this is single-player menu.
// do not change this unless you know what you are doing.
    Window_MenuStatus.prototype.numVisibleRows = function() {
        return 1;
    };
// draws actor face.
Window_MenuStatus.prototype.drawItemImage = function(index) {
    var actor = $gameParty.members()[index];
    var rect = this.itemRectForText(index);
    // load stand_picture
    var bitmapName = $dataActors[actor.actorId()].meta.avatar;
    var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null; // ? on ternary operator.
    var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144));
    var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144));
    var lineHeight = this.lineHeight();
    this.changePaintOpacity(actor.isBattleMember());
    // if actor has note <actor: filename> then do this.
    if ( bitmap ) {
        var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0;
        var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0;
        var dx = (bitmap.width > rect.width) ? rect.x :
            rect.x + (rect.width - bitmap.width) / 2;
        var dy = (bitmap.height > rect.height) ? rect.y :
            rect.y + (rect.height - bitmap.height) / 2;
        this.contents.blt(bitmap, sx, sy, w, h, dx, dy);
    } else { // if there is not a note or its invalid, do the normal setting.
        this.drawActorFace(actor, rect.x + 60, rect.y + lineHeight * 2.0, w, h);
    }
    this.changePaintOpacity(true);
};
// draws actor name, level, class, hp, mp and status icons.
    Window_MenuStatus.prototype.drawItemStatus = function(index) {
        var actor = $gameParty.members()[index];
        var rect = this.itemRectForText(index);
        var x = rect.x;
        var y = rect.y;
        var width = rect.width;
        var bottom = y + rect.height;
        var lineHeight = this.lineHeight();
        this.drawActorName(actor, x, y + lineHeight * 0, width);
        this.drawActorLevel(actor, x, y + lineHeight * 1, width);
        this.drawActorClass(actor, x + xclass, y + lineHeight * 0, width);
        this.drawActorHp(actor, x, bottom - lineHeight * 3.1, width);
        this.drawActorMp(actor, x, bottom - lineHeight * 2.1, width);
        this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
        // Thanks to thalesgal's friend who did this 'to Level' text!
        var toLevel = actor.nextRequiredExp() +  actor.currentExp();
        if (String(dispExp) == 'true') {
            this.drawText(actor.currentExp() + "/ " + toLevel, x + xexptolvl, y + lineHeight * 1, width);
        } else {
            // much thx to Lady_Blackpearl post about exp gauge
            // maxExp is used to calculate the exact exp need for level up on the CURRENT characters level.
            var maxExp = (actor.expForLevel(actor._level + 1) - actor.expForLevel(actor._level));;
            // levelExp is used for know the exact exp obtained within the CURRENT LEVEL.
            var levelExp = maxExp - actor.nextRequiredExp();
            var expPerc = Math.round((levelExp / maxExp) * 100);
            this.changeTextColor(this.systemColor());
            this.drawText(TextManager.expA, x + xexptolvl, y + lineHeight *1, 60);
            this.resetTextColor();
            this.drawText(expPerc + "%", x + xexptolvl + 60, y +lineHeight * 1, width); 
        }
     
    };
// Draws actor's level number.
    Window_Base.prototype.drawActorLevel = function(actor, x, y) {
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.levelA, x, y, 48);
        this.resetTextColor();
        this.drawText(actor.level, x + xdistance, y, 36, 'left');
    };
Game_System.prototype.winCount = function() {
    return this._winCount;
};
})();

19 September 2020 update:
Add other options to show EXP in gain/need for the current level or disable it.
At Max Level, EXP displayed in the main menu will change to "MAX" text in red.
JavaScript:
//=============================================================================
// One-Actor Menu Version 1.08+
//=============================================================================
/*:
* @plugindesc (v1.08+) One-Actor's menu. This plugin is made for one playable actor only.
* @author Ventiqu - 2017
*
* @param Level Number x Distance
* @desc Set 'level' -number x distance from the text.
* default: 50
* @default 50
*
* @param Class text x Distance
* @desc Set 'Class' -text's x distance.
* default: 160
* @default 160
*
* @param Main Menu EXP Display
* @desc Set the EXP displayed in Main menu. See help for detail.
* default: Total
* @default 0
* @type select
* @option Total
* @value 0
* @option Current
* @value 1
* @option Percent
* @value 2
* @option None
* @value 3
*
* @param ExptoLvl text x Distance
* @desc Set 'ExpToLvl' -numbers x distance.
* default: 160
* @default 160
*
* @param Status Window Width
* @desc Set Status window's width. You might need to change other
* parameters as well. Default: 325
* @default 325
*
* @param Command Window Row
* @desc Command Window's visible row(s).
* default: 7
* @default 7
*
* @param Command Window x
* @desc Set Command Window's y position.
* default: 95
* @default 95
*
* @param Command Window y
* @desc Set Command Window's y position.
* default: 130
* @default 130
*
* @param Gold Window x
* @desc Set Gold Window's x position.
* default: 95
* @default 95
*
* @param Gold Window y
* @desc Set Gold Window's y position.
* default: 418
* @default 418
*
* @param Status Window x
* @desc Set Status window's x position.
* default: 335
* @default 335
*
* @param Status Window y
* @desc Set Status Window's y position
* default: 130
* @default 130
*
* @help
* -Customized 19.9.2020
*  Add choice:
*      to hide EXP
*      to display it in "gain/need" for this level
*
* -Customized 18.9.2020
*  Can choose to display EXP in number or percentage
*
* -Customized 28.1.2020
*  Added Parameters:
*      - "x" and "y" coordinate position for Command, Gold, and Status Window
*      - Command window's visible row(s)
*
* -Update #4 25.1.2017-
*
* Remember to turn off Formation! Go to Database - System - Menu Commands and turn off Formation.
* This changes menu to look like its meant for one actor only.
*
* --Using ACTOR NOTES--
* Go to Database (f9) and to Actors. Then there you can set a note to that actor.
*
* <avatar:filename> set actor's different picture.
* put file at img/pictures and use same file name as parameter.
*
* example: <avatar:Bust_test>
* Case sensitive.
*
* Main Menu EXP Display:
*    -Total  : Show total EXP gained/needed
*    -Current: Show EXP gained/needed this level
*    -Percent: Show how many EXP gained this level in percentage
*    -None   : Hide EXP.
*  At Max Level, EXP displayed in main menu will change to "MAX" text.
*
* -------------
* --Changelog--
* -------------
* 1.08+- 19.9.2020 - EXP can be hidden or displayed in "gain/need" for this level
* 1.07+- 18.9.2020 - EXP can be displayed in number or percentage
* 1.05+- 20.1.2020 - Added params for "x" and "y" coordinates and command row visibility
* 1.05 - 25.1.2017 - Actor note added so you can add a bust picture of the actor. Plugin commands added.
* 1.04 - 20.11.2016 - Modified script.
* 1.03 - 25.6.2016 - Minor fixes.
* 1.02 - 11.6.2016 - Fixed black screen bug.
* 1.01 - 1.12.2015 - Skill-, Equip- and Status menu will open for actor 1 only so no more need to press OK before you can jump to new window.
*/
(function() {
   function Scene_Base() {
     this.initialize.apply(this, arguments);
   }
   var parameters  = PluginManager.parameters('VE_Single_Actor');
   var xdistance   = Number(parameters['Level Number x Distance'] || 50);
   var xclass      = Number(parameters['Class text x Distance'] || 160);
   var dispExp     = Number(parameters['Main Menu EXP Display'] || 0);
   var xexptolvl   = Number(parameters['ExptoLvl text x Distance'] || 160);
   var windowwidth = Number(parameters['Status Window Width'] || 325);
   var comwinrow   = Number(parameters['Command Window Row'] || 7);
   var comwinx     = Number(parameters['Command Window x'] || 95);
   var comwiny     = Number(parameters['Command Window y'] || 130);
   var golwinx     = Number(parameters['Gold Window x'] || 95);
   var golwiny     = Number(parameters['Gold Window y'] || 418);
   var statwinx    = Number(parameters['Status Window x'] || 335);
   var statwiny    = Number(parameters['Status Window y'] || 130)

// this will create menus like status- and gold window
     var _Scene_Menu_create = Scene_Menu.prototype.create;
     Scene_Menu.prototype.create = function() {
         _Scene_Menu_create.call(this);
         this._statusWindow.x = statwinx;   //512;
         this._statusWindow.y = statwiny;   //130;
         this._goldWindow.x = golwinx;  //Graphics.boxWidth / this._goldWindow.width + 92;
         this._goldWindow.y = golwiny;  //Graphics.boxHeight - this._goldWindow.height - 135;
     };
// this will create commandwindow
    Scene_Menu.prototype.createCommandWindow = function() {
        this._commandWindow = new Window_MenuCommand(comwinx, comwiny); //new Window_MenuCommand(95, 130);
        this._commandWindow.setHandler('item',      this.commandItem.bind(this));
        this._commandWindow.setHandler('skill',     this.commandPersonal.bind(this));
        this._commandWindow.setHandler('equip',     this.commandPersonal.bind(this));
        this._commandWindow.setHandler('status',    this.commandPersonal.bind(this));
        this._commandWindow.setHandler('formation', this.commandFormation.bind(this));
        this._commandWindow.setHandler('options',   this.commandOptions.bind(this));
        this._commandWindow.setHandler('save',      this.commandSave.bind(this));
        this._commandWindow.setHandler('gameEnd',   this.commandGameEnd.bind(this));
        this._commandWindow.setHandler('cancel',    this.popScene.bind(this));
        this.addWindow(this._commandWindow);
    };
// this will push skill, equip or status depends on which you selected.
    Scene_Menu.prototype.commandPersonal = function() {
        this._statusWindow.setFormationMode(false);
        switch (this._commandWindow.currentSymbol()) {
        case 'skill':
            SceneManager.push(Scene_Skill);
            break;
        case 'equip':
            SceneManager.push(Scene_Equip);
            break;
        case 'status':
            SceneManager.push(Scene_Status);
            break;
          }
    };
    Scene_ItemBase.prototype.showSubWindow = function(window) {
        window.x = this.isCursorLeft() ? Graphics.boxWidth - window.width : 0;
        window.show();
        window.activate();
    };
// removed text from this so this wont mess around
    Scene_Menu.prototype.onPersonalOk = function() {
    };
// Rows for menucommands
    Window_MenuCommand.prototype.numVisibleRows = function() {
        return comwinrow; //7;
    };
// height for goldwindow
    Window_Gold.prototype.windowHeight = function() {
        return this.fittingHeight(1);
    };
// width for menustatus
    Window_MenuStatus.prototype.windowWidth = function() {
        return windowwidth;
    };
// height for windowstatus
    Window_MenuStatus.prototype.windowHeight = function() {
        var h1 = this.fittingHeight(1);
        var h2 = this.fittingHeight(2);
        return Graphics.boxHeight - h1 - h2 - 85;
    };
// maxCols is for max party members shown. This is set to 1, because this is single-player menu.
// do not change this unless you know what you are doing.
    Window_MenuStatus.prototype.maxCols = function() {
        return 1;
    };
// just like maxCols, but this is rows. This is set to 1, because this is single-player menu.
// do not change this unless you know what you are doing.
    Window_MenuStatus.prototype.numVisibleRows = function() {
        return 1;
    };
// draws actor face.
Window_MenuStatus.prototype.drawItemImage = function(index) {
    var actor = $gameParty.members()[index];
    var rect = this.itemRectForText(index);
    // load stand_picture
    var bitmapName = $dataActors[actor.actorId()].meta.avatar;
    var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null; // ? on ternary operator.
    var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144));
    var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144));
    var lineHeight = this.lineHeight();
    this.changePaintOpacity(actor.isBattleMember());
    // if actor has note <actor: filename> then do this.
    if ( bitmap ) {
        var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0;
        var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0;
        var dx = (bitmap.width > rect.width) ? rect.x :
            rect.x + (rect.width - bitmap.width) / 2;
        var dy = (bitmap.height > rect.height) ? rect.y :
            rect.y + (rect.height - bitmap.height) / 2;
        this.contents.blt(bitmap, sx, sy, w, h, dx, dy);
    } else { // if there is not a note or its invalid, do the normal setting.
        this.drawActorFace(actor, rect.x + 60, rect.y + lineHeight * 2.0, w, h);
    }
    this.changePaintOpacity(true);
};
// draws actor name, level, class, hp, mp and status icons.
    Window_MenuStatus.prototype.drawItemStatus = function(index) {
        var actor = $gameParty.members()[index];
        var rect = this.itemRectForText(index);
        var x = rect.x;
        var y = rect.y;
        var width = rect.width;
        var bottom = y + rect.height;
        var lineHeight = this.lineHeight();
        this.drawActorName(actor, x, y + lineHeight * 0, width);
        this.drawActorLevel(actor, x, y + lineHeight * 1, width);
        this.drawActorClass(actor, x + xclass, y + lineHeight * 0, width);
        this.drawActorHp(actor, x, bottom - lineHeight * 3.1, width);
        this.drawActorMp(actor, x, bottom - lineHeight * 2.1, width);
        this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
        if (actor.isMaxLevel()) {
            //if character reach max level, MAX will be displayed in main menu.
            this.changeTextColor(this.textColor(10));
            this.drawText("MAX", x + xexptolvl, y + lineHeight * 1, width);
            this.resetTextColor();
        } else {
            switch (dispExp) {
                //show Total EXP gain/need
                case 0:
                    // Thanks to thalesgal's friend who did this 'to Level' text!
                    var toLevel = actor.nextRequiredExp() +  actor.currentExp();
                    this.drawText(actor.currentExp() + "/ " + toLevel, x + xexptolvl, y + lineHeight * 1, width);
                    break;
                //show EXP gain/need for this level
                case 1:
                    // much thx to Lady_Blackpearl post about exp gauge
                    // maxExp is used to calculate the exact exp need for level up on the CURRENT characters level.
                    var maxExp = (actor.expForLevel(actor._level + 1) - actor.expForLevel(actor._level));;
                    // levelExp is used for know the exact exp obtained within the CURRENT LEVEL.
                    var levelExp = maxExp - actor.nextRequiredExp();
                    this.drawText(levelExp + "/" + maxExp, x + xexptolvl, y +lineHeight * 1, width / 2);
                    break;
                //show EXP gained in this level in percentile
                case 2:
                    var maxExp = (actor.expForLevel(actor._level + 1) - actor.expForLevel(actor._level));;
                    var levelExp = maxExp - actor.nextRequiredExp();
                    var expPerc = Math.round((levelExp / maxExp) * 100);
                    this.changeTextColor(this.systemColor());
                    this.drawText(TextManager.expA, x + xexptolvl, y + lineHeight *1, 60);
                    this.resetTextColor();
                    this.drawText(expPerc + "%", x + xexptolvl + 60, y +lineHeight * 1, width);
                    break;
                //don't show the EXP
                case 3:
                    break;
            }
        }
      
              
    };
// Draws actor's level number.
    Window_Base.prototype.drawActorLevel = function(actor, x, y) {
        this.changeTextColor(this.systemColor());
        this.drawText(TextManager.levelA, x, y, 48);
        this.resetTextColor();
        this.drawText(actor.level, x + xdistance, y, 36, 'left');
    };
Game_System.prototype.winCount = function() {
    return this._winCount;
};
})();
 
Last edited:

Holographicmatt

Villager
Member
Joined
Jul 6, 2019
Messages
18
Reaction score
0
First Language
English
Primarily Uses
RMMV
Can you make it so it shows specific Parameters of your character?
Parameters that you can choose from?
 

Killerslash

Veteran
Veteran
Joined
Mar 31, 2017
Messages
94
Reaction score
19
First Language
Arabic
Primarily Uses
RMMV
There's a problem:
It's working very well, everything is fine, but when I see the main menu exp (like hp, mp, face, and etc...), it's different than the status menu.
I will send it a picture right away.
Screenshot (128).png
 

Attachments

  • Screenshot (129).png
    Screenshot (129).png
    966.1 KB · Views: 5

Djajapena

Villager
Member
Joined
Oct 28, 2017
Messages
17
Reaction score
5
First Language
Indonesia
Primarily Uses
RMMV
@Killerslash In Ventiqu's latest version, the EXP displayed is Total EXP acquired/Total EXP to level up.
I assume you want the EXP displayed like in the status screen? I was only able to change it so the EXP displayed in percentage (V 1.07+ from my last post).
 

Latest Threads

Latest Profile Posts

I just lost an hour plus of time to trying to modify the _battlefield sprite... when in reality MZ calls it _battleField ;_;

Even when debugging for the "undefined value", it looked exactly the same to my 20/60 eyesight.

I really prefer this_naming_convention rather than thisNamingConvention !!
hmm... I just solved one of the more annoying sideview battler problems in MV.. Passive States and Visual States can make it so when your character is in crisis HP, they don't go back to normal walk/wait when it's their turn. they stay in the crisis motion... neat.
Apparently all of LGBT reddit hates me. I posted a simple question and only got hate mail. What's the deal? The doompost was literally 6 months ago and I've changed my views since then and apologized.
MOD NOTE: See second response before replying to this. - Wavelength
Amazing. Simply amazing...

JRPG Browser - Playlist:

Forum statistics

Threads
109,100
Messages
1,042,036
Members
141,585
Latest member
CiderV
Top