- Joined
- Apr 11, 2017
- Messages
- 54
- Reaction score
- 26
- First Language
- English
- Primarily Uses
- RMMV
//=============================================================================
// 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;
};
})();
//=============================================================================
// 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;
};
})();
//=============================================================================
// 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;
};
})();