atreyoray

Veteran
Veteran
Joined
Mar 16, 2013
Messages
38
Reaction score
100
First Language
Portuguese
Title Command Exit v1.00

by Atreyo Ray

 

Introduction

A very simple script that gives back the "Quit Game" option to the title screen.

 

Features

- You can type the text you want to appear as the exit option.

 

Screenshots

[IMG]http://i.imgur.com/KKgzXtT.jpg[/IMG]

 

How to Use

Create a .js in your project plugins folder (.../js/plugins) with the code below and use the Plugin Manager to add it to your project.
You should name it 'ARP_TitleCommandExit.js'

Alternatively, you can download the plugin with the link provided below.
For more information, watch this video: https://youtu.be/ym_qA6hO5d0?list=PLeDwqxgcpMGm40eocVtKL6owR6W8E6kyg

 

Script

Code:
//=============================================================================// ARP_TitleCommandExit.js//=============================================================================/*: * @plugindesc v1.00 Adds an option in the title screen to close * game window. * @author Atreyo Ray * * @param Command Exit * @desc The text that should appear as the exit command. * @default Quit * * @help Highly recommended to show the 'exit game' option ONLY when deploying to Windows   or Mac.   For Web or mobile applications, turn the plugin off. */(function() {    var parameters = PluginManager.parameters('ARP_TitleCommandExit');    var textExit = parameters['Command Exit'];    var _Window_TitleCommand_makeCommandList =            Window_TitleCommand.prototype.makeCommandList;    Window_TitleCommand.prototype.makeCommandList = function() {        _Window_TitleCommand_makeCommandList.call(this);        this.addCommand(textExit, 'exitGame');    };    var _Scene_Title_createCommandWindow =            Scene_Title.prototype.createCommandWindow;    Scene_Title.prototype.createCommandWindow = function() {        _Scene_Title_createCommandWindow.call(this);        this._commandWindow.setHandler('exitGame', this.commandExitGame.bind(this));    };    Scene_Title.prototype.commandExitGame = function() {        this._commandWindow.close();        this.fadeOutAll();        SceneManager.exit();    };})();

 

Download
Or, you can download it here

 

 

FAQ

Q: Why should I use a 'Quit Game' option when I can simply close the window?

A: It might be interesting to have this option if you're making your game fullscreen at start. This way, players won't have to hit F4 to be able to close their game.

There's probably going to be a plugin to make a game fullscreen at start, though you can already do this simply by adding this line

"fullscreen": true,

to the 'window' object within the package.json file inside your deployed folder.

 

Credit

- You don't need to credit me.
 
Last edited by a moderator:

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
531
Reaction score
496
First Language
English
Primarily Uses
RMMV
This is great, thank you very much!
 

Richard John S

Rpg Maker Music Pack Contributor
Veteran
Joined
Jan 31, 2014
Messages
218
Reaction score
790
First Language
English
Primarily Uses
RMMZ
Thanks! I didn't realize the quit command was gone until I saw this.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thanks for this. Have you considered adding more options to add things like a Credit Screen for example or to open other things via the main menu?

Edit Strange mine is going invisible but works:

3UUARqs.png
 
Last edited by a moderator:

atreyoray

Veteran
Veteran
Joined
Mar 16, 2013
Messages
38
Reaction score
100
First Language
Portuguese
@Kane: I like your idea, but I'm keeping this one simple. Btw, even if you write something in the 'Command Exit' param, nothing shows up? Weird...
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
@Kane: I like your idea, but I'm keeping this one simple. Btw, even if you write something in the 'Command Exit' param, nothing shows up? Weird...
Yeah I tried even long text multiple spaces etc. I removed every plugin too still no luck. Very strange hehe. 
 

atreyoray

Veteran
Veteran
Joined
Mar 16, 2013
Messages
38
Reaction score
100
First Language
Portuguese
Oh, I guess I know now. Did you name your plugin file as "ARP_TitleCommandExit.js" ? It should be like this so that the parameter works.

This, or change this line:

var parameters = PluginManager.parameters('ARP_TitleCommandExit');

to have whatever file name you used:

var parameters = PluginManager.parameters('your File Name');
 
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Oh, I guess I know now. Did you name your plugin file as "ARP_TitleCommandExit.js" ? It should be like this so that the parameter works.

This, or change this line:

var parameters = PluginManager.parameters('ARP_TitleCommandExit');

to have whatever file name you used:

var parameters = PluginManager.parameters('your File Name');
That my friend is correct. I had no clue a such thing was needed :)

Thanks for the solution :)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,552
Reaction score
16,443
First Language
English
Primarily Uses
RMMV
Very good point.  OP, you might like to add that info to your post, or remove the script from your post and just leave a download link.
 

Pherocity_Studios

Pherocity Studios
Veteran
Joined
Jul 19, 2013
Messages
59
Reaction score
25
First Language
English
Primarily Uses
RMMV
I just needed this script call snippet. Lol!


SceneManager.exit();


But it looks like a great script! Nicely done! :D
 

Riku_Masamune

Veteran
Veteran
Joined
Aug 23, 2016
Messages
50
Reaction score
19
First Language
English
Primarily Uses
RMMZ
Edited: Alright fixed my problem. I was trying to implement the function into the Game End section whilst in game. So I had to restore the rpg_Scenes, rpg_Windows, and rpg_Managers. I got it to partially work... But didn't work, but the text did. But aside, great plugin!
 
Last edited:

miksva44

Knight449
Veteran
Joined
Sep 26, 2016
Messages
66
Reaction score
8
First Language
swe/eng
Primarily Uses
RMMV
Awesome!!! :thumbsup-left::cutesmile::thumbsup-right:
 
Last edited:

LeetMusic

Veteran
Veteran
Joined
Sep 19, 2013
Messages
146
Reaction score
37
First Language
English
Primarily Uses
Other
Thank you for making this.
 

Latest Threads

Latest Posts

Latest Profile Posts

My mom showed up yesterday and I wanted to proudly show off my comic con web page. So of course, it no longer existed. I guess when the 4 day event was over they removed it.
Feeling like a creative Pattato this morning...
Calibrating the timing of dialogue is deffo my new least favorite thing.
I died aged 27 to cancer. Then I was reborn in a South-American state. I retained all memories and skill and had a goal from my previous life I needed to finish, but now I was just a 1-year-old girl capable of only smiling at others.

Dreams like this one make me glad I'm able to wake up from them at will.
Found a critical bug the other day with the time system that would have caused none of the NPCs to spawn. Since I use dev mode to test time-based stuff, I didn't catch this for way too long!

Forum statistics

Threads
129,979
Messages
1,206,686
Members
171,205
Latest member
CuriousMonkeyX
Top