Changing 'To Title' option

How can I just exit the game when I click "To Title"
and also how to change the text "To Title" into "Exit"


Btw I made a customed title, I get some errors if I click 'To title'....
I just wana shut the entire game down when click ' To title '.... lol
You may ask how could player load saved file if not go back to title..no worry, i have already put load option in the menu.😤
Untitled.jpg
To change the text is easy, just go to the "Terms" section within your database.

Spoiler: Text Manager
upload_2017-11-24_17-57-43.png

Next is that you want the whole game to close when the player clicks the "Exit" option. To do this requires a plug-in but don't worry, it is simple.

We're just going to replace the "commandToTitle" method within the 'Scene_GameEnd' to exit the game instead of sending the player to the title.

Spoiler: Exit game plugin code
Code:
// =========================================
// Close game from Scene_GameEnd
// =========================================

/*:
* @plugindesc Normally the player returns to the title screen from the
* Scene_GameEnd when pressing the 'To Title' button.
* Instead this plugin will cause the game to close when the player presses the
* 'To Title' button.
* Note the 'To Title' button can be renamed from the standard database.
*/

Scene_GameEnd.prototype.commandToTitle = function() {
this.fadeOutAll();
SceneManager.exit();
};

/* This is the original code from rpg_scenes.js for reference
Scene_GameEnd.prototype.commandToTitle = function() {
this.fadeOutAll();
SceneManager.goto(Scene_Title);
};
*/

Just copy this code into a new javascript file and save it to your project/js/plugins folder. In the editor, access the Plugin Manager and turn this new plugin ON for your game.
To change the text is easy, just go to the "Terms" section within your database.

Spoiler: Text Manager

Next is that you want the whole game to close when the player clicks the "Exit" option. To do this requires a plug-in but don't worry, it is simple.

We're just going to replace the "commandToTitle" method within the 'Scene_GameEnd' to exit the game instead of sending the player to the title.

Spoiler: Exit game plugin code
Code:
// =========================================
// Close game from Scene_GameEnd
// =========================================

/*:
* @plugindesc Normally the player returns to the title screen from the
* Scene_GameEnd when pressing the 'To Title' button.
* Instead this plugin will cause the game to close when the player presses the
* 'To Title' button.
* Note the 'To Title' button can be renamed from the standard database.
*/

Scene_GameEnd.prototype.commandToTitle = function() {
this.fadeOutAll();
SceneManager.exit();
};

/* This is the original code from rpg_scenes.js for reference
Scene_GameEnd.prototype.commandToTitle = function() {
this.fadeOutAll();
SceneManager.goto(Scene_Title);
};
*/

Just copy this code into a new javascript file and save it to your project/js/plugins folder. In the editor, access the Plugin Manager and turn this new plugin ON for your game.
Thank You soooo much!
Your answer is very detailed and helpful!

Original thread: https://forums.rpgmakerweb.com/threads/changing-to-title-option.87684/