MV Custom Command Window not showing text (solved)

Hi everyone, just as the title suggest. I'm trying to create a custom command window with options that will open another custom scene that I'm working on, and so far I'm having a trouble at this command window. I got the thing working, but for some reason the text aren't showing up and just looks like this.

pic1.png


This is just some random window that I'm fiddling around with to try and figure out how things work. I was hoping to get it to look like this at the end.

pic2.png


Here's the code that I'm working on. I replaced the custom scenes that it's supposed to push with already existing scenes for testing purposes.

JavaScript:
function Scene_Datab() {
    this.initialize.apply(this, arguments);
}

Scene_Datab.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Datab.prototype.constructor = Scene_Datab;

Scene_Datab.prototype.initialize = function() {
    Scene_MenuBase.prototype.initialize.call(this);
};

Scene_Datab.prototype.create = function() {
    Scene_MenuBase.prototype.create.call(this);
    this.createCommandWindow();
};

Scene_Datab.prototype.createCommandWindow = function() {
    this._commandWindow = new Window_DataCommand(109, 217);
    this._commandWindow.setHandler('option1', this.commandOption1.bind(this));
    this._commandWindow.setHandler('option2', this.commandOption2.bind(this));
    this._commandWindow.setHandler('option3', this.commandOption3.bind(this));
    this._commandWindow.setHandler('option4', this.commandOption4.bind(this));
    this.addWindow(this._commandWindow);
};

Scene_Datab.prototype.commandOption1 = function() {
    SceneManager.push(Scene_Item);
};

Scene_Datab.prototype.commandOption2 = function() {
    SceneManager.push(Scene_Options);
};
Scene_Datab.prototype.commandOption3 = function() {
    SceneManager.push(Scene_Save);
};

Scene_Datab.prototype.commandOption4 = function() {
    SceneManager.push(Scene_GameEnd);
};

//////////////////////////////////////

function Window_DataCommand() {
    this.initialize.apply(this, arguments);
}

Window_DataCommand.prototype = Object.create(Window_Command.prototype);
Window_DataCommand.prototype.constructor = Window_DataCommand;

Window_DataCommand.prototype.initialize = function(x, y) {
    Window_Command.prototype.initialize.call(this, x, y);
    this.selectLast();
};

Window_DataCommand._lastCommandSymbol = null;

Window_DataCommand.initCommandPosition = function() {
    this._lastCommandSymbol = null;
};

Window_DataCommand.prototype.windowWidth = function() {
    return 240;
};

Window_DataCommand.prototype.numVisibleRows = function() {
    return this.maxItems();
};

Window_DataCommand.prototype.makeCommandList = function() {
    this.addOption1Command();
    this.addOption2Command();
    this.addOption3Command();
    this.addOption4Command();
};

Window_DataCommand.prototype.addOption1Command = function() {
        this.addCommand(TextManager.option1, 'option1');
};

Window_DataCommand.prototype.addOption2Command = function() {
        this.addCommand(TextManager.option2, 'option2');
};

Window_DataCommand.prototype.addOption3Command = function() {
        this.addCommand(TextManager.option3, 'option3');
};

Window_DataCommand.prototype.addOption4Command = function() {
    this.addCommand(TextManager.option4, 'option4');
};

Window_DataCommand.prototype.needsCommand = function(name) {
    var flags = $dataSystem.menuCommands;
    if (flags) {
        switch (name) {
        case 'option1':
            return flags[0];
        case 'option2':
            return flags[1];
        case 'option3':
            return flags[2];
        case 'option4':
            return flags[3];
        }
    }
    return true;
};

Window_DataCommand.prototype.processOk = function() {
    Window_DataCommand._lastCommandSymbol = this.currentSymbol();
    Window_Command.prototype.processOk.call(this);
};

Window_DataCommand.prototype.selectLast = function() {
    this.selectSymbol(Window_DataCommand._lastCommandSymbol);
};

I have 0 knowledge in javascript and don't have any coding experience and just got here by watching some youtube videos and fiddling around rpg maker mv's source code and frankenstining things. If somebody can explain what's going on here or point me in the right direction, or better, know a plugin that can get something similar to what I plan it to look like in the end to avoid coding things altogether I'd be extremely happy (I'm working on this for almost a week now ToT) Thanks in advance.
Have you also modified the TextManager somewhere else? Because if not then TextManager.option1 isn't going to return anything, resulting in empty text being drawn.
most options can be disabled and "TextManager.option4" doesn't exist unless
you made it.

best is to use "option 1" instead of "TextManager.option4".
Welcome!

I have 0 knowledge in javascript and don't have any coding experience and just got here by watching some youtube videos and fiddling around rpg maker mv's source code and frankenstining things.
I don't want to be discouraging, but this is really pretty advanced to be trying to implement that way.

It's like saying "I have 0 knowledge of cars and don't have any mechanics experience, but I'm watching videos on how to splice pieces together to build a go cart."

I feel like you'd be better off with a plugin request thread that clearly explains what your end goal is. Then you can get help determining whether there's an existing plugin that can do it for you.

If the answer is no, then you'd have the choice to save up for a commission or start doing tutorials to make it yourself.

Making windows and correctly loading and positioning graphical elements on them can be tricky enough when you do actually know what you're doing. I feel it would be an exercise in frustration to blindly stab at it.
Have you also modified the TextManager somewhere else? Because if not then TextManager.option1 isn't going to return anything, resulting in empty text being drawn.
I thought I already combed through the files but looks like not enough, I haven't indeed modified the text manager. I ended up going with ShadowDragon's solution since I don't wanna mess with the core scripts. Thank you!

most options can be disabled and "TextManager.option4" doesn't exist unless
you made it.

best is to use "option 1" instead of "TextManager.option4".
This works, thank you very much!

Welcome!


I don't want to be discouraging, but this is really pretty advanced to be trying to implement that way.

It's like saying "I have 0 knowledge of cars and don't have any mechanics experience, but I'm watching videos on how to splice pieces together to build a go cart."

I feel like you'd be better off with a plugin request thread that clearly explains what your end goal is. Then you can get help determining whether there's an existing plugin that can do it for you.

If the answer is no, then you'd have the choice to save up for a commission or start doing tutorials to make it yourself.

Making windows and correctly loading and positioning graphical elements on them can be tricky enough when you do actually know what you're doing. I feel it would be an exercise in frustration to blindly stab at it.
Yeah, I know that I'm biting more than I can chew. I realized earlier this morning that this is way too complicated and that I can make something less flashy but with less headaches using plugins, but I figured I'd just do this one last thing so I can finally put this thought to rest.

I'm just working on testing stuffs and trying to learn the engine, see what works or not and what to implement and to scrap before working on my final thing. It IS a frustrating process to just blindly stab at it though hahaha but I guess that's my way of learning things. Though I know that jumping straight into plugins is not the best way to learn javascript.
just you know, YEP_MainMenuManager and CGMV_MenuCommands let you
set the menu you want, probably reposition it as well.

you set name, symbol and use personal binds or common event to call
the menu that way, and is customizable.

the way ATT_Turan said is best to learn JS or request to make it easier for you,
TextManager["Name"] for the option needs to be made so it can be used correctly.
but I need to find that for the way, probably around:

TextManager.option1 = "option 1";

than the TextManager can proceed it correctly when set.

but most can be default, and if not, alias a function instead of a totally new
plugin is probably also better or overwrite what you need, this saved you
much coding and less code to make it functional as most is already existed.

Original thread: https://forums.rpgmakerweb.com/threads/custom-command-window-not-showing-text-solved.167151/