Goto Menu Scene after loading a file

Hi and hello big sry if im posting in the wrong section!
I wonder if i can get vx ace to open the menu instead of going to scene map after loading a file?
I tried to set a switch to true when the game gets saved and again to false after that and then added
a condition in scene map which checks if the switch is on and then go to the menu scene but you can see the map
before which i dont want.
I tried to put a Graphics.brightness = 0 at the top of the start method but that didnt worked so i have no clue what to do.
Maybe someone can help me out with that.
Sry for the bad grammar and big thx in advance! 🙂
Let's see, in Scene_Load, this is what happens after you load a file (which happens after DataManager is successfully loaded):

Code:
def on_load_success
  Sound.play_load
  fadeout_all
  $game_system.on_after_load
  SceneManager.goto(Scene_Map)
end

And here is the code to determine when the menu is called via event or Cancel button, and what call_menu does:

Code:
def update_call_menu
  if $game_system.menu_disabled || $game_map.interpreter.running?
    @menu_calling = false
  else
    @menu_calling ||= Input.trigger?(:B)
    call_menu if @menu_calling && !$game_player.moving?
  end
end

def call_menu
  Sound.play_ok
  SceneManager.call(Scene_Menu)
  Window_MenuCommand::init_command_position
end

However, using cancel to return from the Menu will execute SceneManager's return method, which is:
Code:
def self.return
  @scene = @stack.pop
end
pop pretty much returns the last item in that array and removes it. By default, calling a menu from the map would be:
1.Map
2.Menu

So changing the SceneManager part in Load wouldn't be recommended as the Map is loaded, meaning that replacing it straight with Menu and then exiting from the menu will return you to...nothing. However, you notice that the two codes above use goto() and call()?

Code:
def self.call(scene_class)
  @stack.push(@scene)
  @scene = scene_class.new
end

def self.goto(scene_class)
  @scene = scene_class.new
end
Both methods replace the current scene, but call() will put the current scene into the array before getting replaced. This here is our answer.

===

Try this snippet:

Code:
module SceneManager
  self.loadmenu
    @stack.push(Scene_Map.new)
    @scene = Scene_Menu.new
  end
end

class Scene_Load < Scene_File
  def on_load_success
    Sound.play_load
    fadeout_all
    $game_system.on_after_load
    SceneManager.loadmenu
  end
end

In theory, this should make the current scene the Menu, and cancelling will bring you to a Map.

Original thread: https://forums.rpgmakerweb.com/threads/goto-menu-scene-after-loading-a-file.84891/