MV Main menu fade out/in event

Hello all, I am trying to replicate the fade transition for super mario rpg, where upon clicking on the button menu, the screen quickly fades to black, then fades in revealing the menu scene. Upon exiting, the same thing happens: fade out, back to map scene, fade in.

However I cant figure out of to do it in MV, I tried this event but it just doesn't work, and I can't figure out how to do it for exiting.

Any help would be appreciated. 😢
Events are only supported on the map and battle scenes, not the pause menu. You could disable the normal pause menu using the Change Menu Access command, then make your own menu using events, e.g. transfer to a map with events that act like a menu.

Alternatively, to do this with the core pause menu you'll need a plugin. Maybe something like this:
Spoiler: plugin code
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Add fade out/in to transitions between map & menu scenes.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/179887/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Patch - map to menu: fade out/in.
;void (function(alias) {
  Scene_Map.prototype.stop = function() {
    alias.apply(this, arguments);
    if (!this._fadeDuration && SceneManager.isNextScene(Scene_Menu))
      this.startFadeOut(this.fadeSpeed(), false);
  };
})(Scene_Map.prototype.stop);
void (function(alias) {
  Scene_Menu.prototype.start = function() {
    alias.apply(this, arguments);
    if (!this._fadeDuration && SceneManager.isPreviousScene(Scene_Map))
      this.startFadeIn(this.fadeSpeed(), false);
  };
})(Scene_Menu.prototype.start);

// Patch - menu to map: fade out/in.
;void (function(alias) {
  Scene_Menu.prototype.stop = function() {
    alias.apply(this, arguments);
    if (!this._fadeDuration && SceneManager.isNextScene(Scene_Map))
      this.startFadeOut(this.fadeSpeed(), false);
  };
})(Scene_Menu.prototype.stop);
void (function(alias) {
  Scene_Map.prototype.needsFadeIn = function() {
    return alias.apply(this, arguments) || SceneManager.isPreviousScene(Scene_Menu);
  };
})(Scene_Map.prototype.needsFadeIn);
(I did a quick test and this seemed to work for me.)

Plaintext-to-plugin instructions:
  1. Copy + paste the code into a text editor (e.g. Notepad).
  2. File -> Save As:
    • File Type: All Files
    • Filename: whatever.js
    (This works because .js files are plaintext.)
  3. Import that file as a plugin.
  4. Save your project to apply Plugin Manager changes.
  5. Test!
Thank you, the plugin is a really good start!!
A good start? Is there still a problem? If so, what is the problem? 😅

If everything's working now, that's good! 👋
Yes I meant it's all good, tysm!! 😢
Great, no worries! Just wanted to make sure~

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/main-menu-fade-out-in-event.179887/