Add new command to Window_TittleCommand.

Hello Everyone, I'm C4-N.
I'm a Newbie to this RPG Maker Software.

I had a problem with the Window_TittleCommand. so i'm trying to add an Exit to Window/ Quit Game button, it works but the problem is there is no text appear on the screen it just blank. i trying to edit the TextManager and it didn't shows up. is there a way to make the Text appear on the Window_Tittle?

1664553759413.png



1664553782460.png

1664553541628.png
Moved to: Javascript/Plugin Support
Hi there!

The problem is that does not exist any command with the ID 26, as you created:
1664587876743.png


To explain better, let's take a look at two methods of text manager:

JavaScript:
TextManager.command = function(commandId) {
    return $dataSystem.terms.commands[commandId] || '';
};

TextManager.getter = function(method, param) {
    return {
        get: function() {
            return this[method](param);
        },
        configurable: true
    };
};

So as you can see on the TextManager.command, when it does not find a command ID under the $dataSystem.terms.commands, it will return an empty string.

Those commands IDs came from here:
1664588034421.png


So you can't create a new command ID like that.

The better solution will just do that:

TextManager.exit = "My command Name"

Then on the Window_GameEnd.prototype.makeCommandList, it will work.

Or if you also like, you don't even need to create a new property on TextManager. Just write the command name there.
Hi there!

The problem is that does not exist any command with the ID 26, as you created:
View attachment 241713

To explain better, let's take a look at two methods of text manager:

JavaScript:
TextManager.command = function(commandId) {
    return $dataSystem.terms.commands[commandId] || '';
};

TextManager.getter = function(method, param) {
    return {
        get: function() {
            return this[method](param);
        },
        configurable: true
    };
};

So as you can see on the TextManager.command, when it does not find a command ID under the $dataSystem.terms.commands, it will return an empty string.

Those commands IDs came from here:
View attachment 241714

So you can't create a new command ID like that.

The better solution will just do that:

TextManager.exit = "My command Name"

Then on the Window_GameEnd.prototype.makeCommandList, it will work.

Or if you also like, you don't even need to create a new property on TextManager. Just write the command name there.

1664599482930.png


God bless! Thank you so much for your help. IT WORK!
I'm still learning about javascript and how a Code works, with the way explain it to me.i can easliy understand.:LZScheeze:

Original thread: https://forums.rpgmakerweb.com/threads/add-new-command-to-window_tittlecommand.151672/