modifying the "exit" option in an existing script
#4
The stock game-end screen is only two small classes (Window_EndCommand + Scene_End). The script you linked redefines Scene_End itself to act as the menu, which is why the original vanished - but you can put the same pair back under new names and call it from the menu's exit option:

Code:
class Window_EndConfirmCommand < Window_Command
  def initialize
    super(0, 0)
  end

  def window_width
    return 160
  end

  def make_command_list
    add_command(Vocab::to_title, :to_title)
    add_command(Vocab::shutdown, :shutdown)
  end
end

class Scene_EndConfirm < Scene_MenuBase
  def start
    super
    create_command_window
  end

  def create_command_window
    @command_window = Window_EndConfirmCommand.new
    @command_window.set_handler(:to_title, method(:command_to_title))
    @command_window.set_handler(:shutdown, method(:command_shutdown))
    @command_window.set_handler(:cancel, method(:return_scene))
  end

  def command_to_title
    close_command_window
    fadeout_all
    SceneManager.goto(Scene_Title)
  end

  def command_shutdown
    close_command_window
    fadeout_all
    SceneManager.exit
  end
end

Paste it below the menu script (still in Materials), then look inside the menu script for the method its exit option is bound to - it ends in Graphics.exit or SceneManager.exit - and replace that line with:

Code:
SceneManager.call(Scene_EndConfirm)

Because it is called as its own scene, Esc / X hits the cancel handler and simply drops you back into the menu, so a misclick costs nothing. Scene_MenuBase also gives it the same dimmed background as the default game-end screen.

One caveat: if that menu draws its own cursor graphics instead of using Window_Command, the pop-up will look plainer than the rest of the menu - the behaviour is still the stock one.
Reply


Messages In This Thread
RE: modifying the "exit" option in an existing script - by gamingirdb - 11-27-2026, 11:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Is there a script to make train actors face the same way as the player? Ace_V 12 8,889 04-07-2026, 10:01 AM
Last Post: Ace_V
   Lead Actor Swapper script error Ace_V 25 31,045 09-07-2025, 01:22 PM
Last Post: DerVVulfman
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 3 8,482 11-22-2024, 07:02 PM
Last Post: JayRay
   Script compatibility help Lord Vectra 3 12,646 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 39,943 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 36,492 04-28-2020, 04:06 PM
Last Post: Whisper
   Skill Cooldown script Fenriswolf 11 36,075 12-10-2019, 11:10 AM
Last Post: Fenriswolf
   Help iwth script (RGSS Player crash) Whisper 3 15,571 06-17-2017, 05:03 PM
Last Post: Whisper
   Help modifying a script Keeroh 7 21,749 06-11-2017, 04:43 PM
Last Post: DerVVulfman
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 19,133 05-31-2017, 05:10 AM
Last Post: Zachariad



Users browsing this thread: 1 Guest(s)