MV Removing options plugin seems crash with other plugin

*This is my first visit at this forum. I'm sorry if i posted a thread on the wrong board!


Hello!

I'm using plugin to add 'shutdown' in title window(i'll attach that plugin file below),

test.png


and I also wanted to remove that "options" from main menu.

so i used plugin from here:


and it goes like this:

test2.png


it removes 'options' and 'shutdown' together.

When i change that two plugin's order, removing option plugin doesn't work and it returns like the first picture.

I think that two plugins seem to crash, but i don't know what's the problem because i don't know about JavaScript at all.


How can I remove 'options' and keep 'shutdown' in main menu?

Thank you for your help in advance!
Use just the TitleShutdownCommand plugin and delete the two references to 'options'.

Modify line 18:
Code:
    this.addCommand(TextManager.continue_, 'continue', this.isContinueEnabled());

Then delete line 26.
And to understand the comment above better:
Plugins do not remove things from screens, thzey replace the entire screen with a variant that has been changed in a specific way as the programmer wanted.
So when two plugins change the same screen, only the last one can work and the first one is ignored.

To change a screen you'll either have to request a plugin that does all the changes you want in one go, or modify the code of a plugins to fit your wishes (and that is what the post above tells you to do).
In case it helps: another way to remove a specific command from a list is to patch the addCommand method of the appropriate window so it skips that command. That approach is more likely to be compatible with other plugins, too. In this case (untested):
Spoiler: plugin code
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Do not show Options command on title or pause menus.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/157979/
 * @help Free to use and/or modify for any project, no credit required.
 */
void (function() {
'use strict';

  // Title - add commands like normal unless their symbol is "options".
  const _Window_Title_addCommand = Window_Title.prototype.addCommand;
  Window_Title.prototype.addCommand = function(name, symbol, enabled, ext) {
    if (symbol !== "options")
      _Window_Title_addCommand.apply(this, arguments);
  };

  // Pause menu - do not add options command.
  Window_MenuCommand.prototype.addOptionsCommand = function() {};

})();
Use just the TitleShutdownCommand plugin and delete the two references to 'options'.

Modify line 18:
Code:
    this.addCommand(TextManager.continue_, 'continue', this.isContinueEnabled());

Then delete line 26.
It works well! Thank you so much!

And to understand the comment above better:
Plugins do not remove things from screens, thzey replace the entire screen with a variant that has been changed in a specific way as the programmer wanted.
So when two plugins change the same screen, only the last one can work and the first one is ignored.

To change a screen you'll either have to request a plugin that does all the changes you want in one go, or modify the code of a plugins to fit your wishes (and that is what the post above tells you to do).
oh, I see. I didn't know that, so it's not a crash. Thanks 🙂

In case it helps: another way to remove a specific command from a list is to patch the addCommand method of the appropriate window so it skips that command. That approach is more likely to be compatible with other plugins, too. In this case (untested):
Spoiler: plugin code
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Do not show Options command on title or pause menus.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/157979/
 * @help Free to use and/or modify for any project, no credit required.
 */
void (function() {
'use strict';

  // Title - add commands like normal unless their symbol is "options".
  const _Window_Title_addCommand = Window_Title.prototype.addCommand;
  Window_Title.prototype.addCommand = function(name, symbol, enabled, ext) {
    if (symbol !== "options")
      _Window_Title_addCommand.apply(this, arguments);
  };

  // Pause menu - do not add options command.
  Window_MenuCommand.prototype.addOptionsCommand = function() {};

})();
Oh, a new code. it'll be very helpful. Thanks !
oh, I see. I didn't know that, so it's not a crash.
"Crash" means that your game stops working and closes. If you're running a playtest from inside MV, a crash would make everything stop and you'd see an error message. If you were running the game by itself, a crash means the window closes entirely.

In your case, your game didn't stop working, just something happened that you didn't think would happen. That's a "bug".
It's a plugin clash (as they're both overwriting the same scene) but not a crash.
@AquaEcho True to your name, making a splash.

Original thread: https://forums.rpgmakerweb.com/threads/removing-options-plugin-seems-crash-with-other-plugin.157979/