//==============================================================================================================
// Character profile screen
//==============================================================================================================
/*:
* @plugindesc Displays detailed statuses of characters met in the game.
* @author Omni
*
* @param Unknown Data
* @desc The index name for an unknown character.
* @default ??????
*
* @help
*
* Plugin Command:
* CharProfile open # Open the character profile screen
*
*
*/
(function() {
var parameters = PluginManager.parameters('OMNI_Character Profile');
var unknownData = String(parameters['Unknown Data'] || '??????');
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
var selected = '';
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === 'CharProfile') {
switch (args[0]) {
case 'open':
SceneManager.push(Scene_CharProfile);
break;
case 'add':
//$gameSystem.addToEnemyBook(Number(args[1]));
break;
case 'remove':
//$gameSystem.removeFromEnemyBook(Number(args[1]));
break;
case 'complete':
// $gameSystem.completeEnemyBook();
break;
case 'clear':
// $gameSystem.clearEnemyBook();
break;
}
}
};
// === character profile select menu =======================================================================
// this is the menu where the player selects the character the wish to view.
function Scene_CharProfile() {
this.initialize.apply(this, arguments);
}
Scene_CharProfile.prototype = Object.create(Scene_MenuBase.prototype);
Scene_CharProfile.prototype.constructor = Scene_CharProfile;
Scene_CharProfile.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_CharProfile.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
//this._backgroundSprite = new Sprite();
//this._backgroundSprite.bitmap = ImageManager.loadBitmap('img/CharBook/', 'CharBookBG', 0, true);
//this.addChild(this._backgroundSprite);
this.createCommandWindow();
};
Scene_Menu.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
//this._commandWindow.refresh();
};
Scene_CharProfile.prototype.createCommandWindow = function() {
this._commandWindow = new Window_Command(0, 0);
this._commandWindow.addCommand('Char1','Char1');
this._commandWindow.addCommand('Char2','Char2');
this._commandWindow.setHandler('Char1', this.commandDisplay.bind(this));
this._commandWindow.setHandler('Char2', this.commandDisplay.bind(this));
this._commandWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._commandWindow);
};
Scene_CharProfile.prototype.commandDisplay = function() {
selected = this._commandWindow.currentSymbol();
SceneManager.push(Scene_CharDetails);
};
// ==== character details section ================================================================
// this is where all of the character information is displayed.
function Scene_CharDetails() {
this.initialize.apply(this, arguments);
}
Scene_CharDetails.prototype = Object.create(Window_Selectable.prototype);
Scene_CharDetails.prototype.constructor = Scene_CharDetails;
Scene_CharDetails.prototype.initialize = function() {
$gameMessage.add("Details of " + selected + "");
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
Window_Selectable.prototype.initialize.call(this, 0, 0, width, height);
//this.refresh();
//this.activate();
};
})();