Hey guys! I actually just need help formatting this script done by Lecode in
this thread. I think it'll do what I want but I can't test it because in an apparent forum update several months back, all the old script posts got messed up. I tried formatting it myself based on scripts I've seen, and... it was embarrassing.
#- By Lecodeclass Scene_System < Scene_MenuBase alias lessshutconf_start start def start super lessshutconf_start create_shutdown_confirm_window end alias lessshutconf_create_command_window create_command_window def create_command_window lessshutconf_create_command_window @command_window.set_handler

shutdown, method

command_prepare_shutdown)) end def create_shutdown_confirm_window @shutconfirm_window = Window_ShutdownConfirm.new @shutconfirm_window.set_handler

ok, method

shutconfirm_ok)) @shutconfirm_window.set_handler

cancel, method

shutconfirm_cancel)) end def command_prepare_shutdown @shutconfirm_window.open @shutconfirm_window.activate @shutconfirm_window.select(1) end def shutconfirm_ok @shutconfirm_window.close command_shutdown end def shutconfirm_cancel @shutconfirm_window.close @command_window.activate end endclass Window_ShutdownConfirm < Window_Command def initialize super(get_x, get_y) self.openness = 0 end def get_x Graphics.width/2 - window_width/2 end def get_y Graphics.height/2 - window_height/2 end def window_width return 160 end def window_height fitting_height(2) end def make_command_list add_command("Yes",

k) add_command("No", :cancel) end end
Like this
As described in the thread I got it from, I believe it will create a window popup which asks "Are you sure?" then a Yes/No selection after the player activates the shutdown command from the esc menu. Since my game is so simple, the esc menu's only two options are Items and Quit Game. Naturally I don't want the player to accidentally shutdown when trying to get to an item, and I'm hoping this will act as a safeguard against that.
Ideally it'd just go to the title screen instead of totally shutting down, because I find that to be a weird feature anyway, but hey, I'll take what I can get.
I'm using
Yanfly's Ace Message System and the
mjishi Basic Non-Combat Menu.