Deklaration

Villager
Member
Joined
Jul 23, 2013
Messages
10
Reaction score
5
First Language
Swedish
Hi

New to javascript.

How do I disable the menu and title screen? I want the game to start without the "Start, option & exit"-options. I also would like to disable the pause menu. Been searching, but haven't found anyhting yet.

Oh, and if someone knows the new way to use the scriptline SceneManager.exit to just quit the game, it would be great!

Thanks!  :D
 

NoTaku

Villager
Member
Joined
Nov 10, 2015
Messages
6
Reaction score
3
First Language
English
 I also would like to disable the pause menu. Been searching, but haven't found anyhting yet.

I'm not sure what a pause menu is. I'm hoping you mean the Menu (when you press 'cancel").

 I want the game to start without the "Start, option & exit"-options.

Should be easy enough.


The SceneManager object is what you want to look at.

When the game is loaded, the Boot_Scene is initialized, which loads all the resources for the game and then calls SceneManager.goto(Scene_Title).

There are two ways of going about this.

1) You can modify rpg_scenes.js (Cleaner)
2) You can create a plug-in that will modify the Scene_Boot prototype object. (Safer)

Method #1:

Open rpg_scenes.js and browse to line 200. (I like Sublime Text 3)
 

Scene_Boot.prototype.start = function() { Scene_Base.prototype.start.call(this); SoundManager.preloadImportantSounds(); if (DataManager.isBattleTest()) { DataManager.setupBattleTest(); SceneManager.goto(Scene_Battle); } else if (DataManager.isEventTest()) { DataManager.setupEventTest(); SceneManager.goto(Scene_Map); } else { this.checkPlayerLocation(); DataManager.setupNewGame(); SceneManager.goto(Scene_Title); Window_TitleCommand.initCommandPosition(); } this.updateDocumentTitle();};You will want to modify the last else clause in this function, which would otherwise set up the title scene.

 

Scene_Boot.prototype.start = function() { Scene_Base.prototype.start.call(this); SoundManager.preloadImportantSounds(); if (DataManager.isBattleTest()) { DataManager.setupBattleTest(); SceneManager.goto(Scene_Battle); } else if (DataManager.isEventTest()) { DataManager.setupEventTest(); SceneManager.goto(Scene_Map); } else { this.checkPlayerLocation(); DataManager.setupNewGame(); SceneManager.goto(Scene_Map); } this.updateDocumentTitle();};The menu can be disabled using an event: "Change Menu Access...", or via script: $gameSystem.disableMenu(); You can add the script line to the above code, or you can trigger it in an event if you want.


Now, there's another way. It's a bit safer than just modifying the javascript files all willy nilly. It uses a plugin.

Plugins are actually really neat, and allow you to do a lot of things if you understand the javascript module pattern. This plugin is slightly problematic because it doesn't extend the Scene_Boot.start function, it completely replaces it. If you are using another plugin that changes the Scene_Boot.start function, you will need to make sure that they load in order so that the new Scene_Boot.start function is modified by the later plugins. Plugin load order is important to pay attention to when you are fully overriding. Not very important when you are just modifying. (See the modification I did to the DataManager.createGameObjects function for an example of modification vs overriding.)

 

//=============================================================================// CleanSlate.js//=============================================================================/*: * @plugindesc Optionally disables the title screen or the menu screen. * @author NoTaku * * @param Disable Title Screen * @desc Skips the title screen and goes straight into a new game. 0: Show Title, 1: Skip Title * @default 1 * * @param Disable Menu Screen * @desc Immediately disables the menu screen on game start. 0: Allow Menu, 1: Disable Menu * @default 1 * * @help This plugin does not provide plugin commands. */(function() { var parameters = PluginManager.parameters('CleanSlate'); var disableTitleScreen = Number(parameters['Disable Title Screen'] || 1); var disableMenuScreen = Number(parameters['Disable Menu Screen'] || 1); if(disableTitleScreen) { Scene_Boot.prototype.start = function() { Scene_Base.prototype.start.call(this); SoundManager.preloadImportantSounds(); if (DataManager.isBattleTest()) { DataManager.setupBattleTest(); SceneManager.goto(Scene_Battle); } else if (DataManager.isEventTest()) { DataManager.setupEventTest(); SceneManager.goto(Scene_Map); } else { this.checkPlayerLocation(); DataManager.setupNewGame(); SceneManager.goto(Scene_Map); } this.updateDocumentTitle(); }; } if(disableMenuScreen) { var _DataManager_createGameObjects = DataManager.createGameObjects; DataManager.createGameObjects = function() { _DataManager_createGameObjects.call(this); $gameSystem.disableMenu(); }; }})();Be aware, this is my first day with RMMV. I still have very little idea what I'm doing. I've just been picking through the source code trying to figure things out. Luckily, I've got an HTML5/Javascript background to begin with, and am an old RMXP veteran from a decade ago, so I'm making quick work of the engine so far.

Oh, and if someone knows the new way to use the scriptline SceneManager.exit to just quit the game, it would be great!

Just insert a script event somewhere that calls SceneManager.exit(). It will immediately quit the game without saving.
 

Marsigne

Veteran
Veteran
Joined
Sep 7, 2013
Messages
1,834
Reaction score
4,643
First Language
English
Primarily Uses
RMVXA
To disable menu: Use the "Change Menu Access" (in event commands tab 3) command and change it to "Disable" before the player have control of the main character. Anything before that can work.

To disable title screen: Just use a script to skip the title screen. Here is one (click on link after "Skip Title:").

About the scriptline thing, I don't know about that, sorry :(
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,091
Reaction score
14,629
First Language
English
Primarily Uses
RMMV
I've moved this thread to JS/Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Latest Threads

Latest Posts

Latest Profile Posts

Kinda hate it everytime reinstall rpg maker because the program refuse to testplay
For every amazing step of the way I make, I find myself in a moment where I feel really stupid for not knowing something. I probably shouldn't though, but still, it sometimes feels more obvious than perhaps it is
Just spent $174 on Shining the Holy Ark on the Saturn. Good lord.
My brain when designing quests:
There is piano, it needs help --> The organ (yes organ now) is missing a component! --> Where the heck am I supposed to put this missing piece!??! --> Add an entire new mini dungeon specifically created to house this new piece. --> Connect this brand new mini dungeon to an already designed dungeon with background information about the town it's found it.

Me: :LZYhuh:
Rising of the Shield Hero!

Forum statistics

Threads
111,097
Messages
1,058,237
Members
144,297
Latest member
FruityRPG
Top