RPG Maker Forums

I am trying to make a new menu and am having no luck.


What I want, is to have new menu option in the main menu that you select, and it leads to a new menu. Essentially what i am trying to create is a character book, containing info on all of the characters that you have met on your journey. The only two plugins for this that i could find don't work.


I use YANFLYs main menu manager to add a new option to access the menu, and that works fine. 


I am able to get a background image to appear, so the plugin command I made to access the menu works.


The problem is when I try to have the menu appear. 


I have been using other js files as reference, and initially I used an instance of the window_menuCommand (based on the main menu code), but it just made a new copy of the main menu appear.


I realised what was going on at this point and am now using the window_command class. Only now, no options appear at all. I get a little window box with nothing in it.


I have been using addCommand, followed by setHandler.

Code:
//==============================================================================================================
// 		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();
	};












})();

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top