modifying the "exit" option in an existing script
#1
first off, hello again! i haven't been here in like 2 years, almost to the day

now i don't know if script requests is the right place to put this, since i'm technically asking for advice on altering an existing script, but i hope this is a fine place to ask this

so, i'm setting the groundwork for a slightly more concrete project than my last, and i'm starting with the menu before i get into any of the meat of the game. i found this script right here that greatly simplifies the menu of VX Ace, which is almost exactly what i've been looking for. only problem is, the exit button no longer gives you the usual options of 'to title', 'shutdown', and 'cancel', instead just shutting down when you press exit, which isn't horrible in theory, but i for one very frequently misclick menu options in games. i spent about an hour fiddling with it to see if i could figure out how to make the exit button call that original option sequence, but my coding literacy unfortunately falls short enough that i was left stumped.

if anyone better with script editing could help me figure this out, that'd be much appreciated! or, if you know another script that can reduce the menu to just a basic item menu, saving/loading, and quitting with the usual options, that would be just as welcome!
Reply
#2
Moved to code support.

ALSO, a link to the script in question is kinda needed. Winking  OH, its "right here" , in the body of your text.  Twas kinda concealed.  Snagging...

EDIT:

Ugh.  On looking at it, the code has these very specific bits of text:

# Overwrites the old, boring menu to use the cooler-looking Game End menu

class Scene_Map
  def call_menu
    Sound.play_ok
    SceneManager.call(Scene_End)
  end
end

and

# Overwrites Scene_End to use Save/Load/Items

class Scene_End
 
  def start
    super
    create_command_window
    create_invisible_formation_window
  end
 
  def create_command_window
    @command_window = Window_GameEnd.new

From all appearances, she gutted the Main Menu (Scene_Menu), and made it so anyone calling the main menu would have control passed to "Scene_End" aka the  END menu.
 
The script uses Scene_End  End Menu to control everything... 
 
    @command_window = Window_GameEnd.new
 
This is now being used in the End menu, not to display your three options, but to display the main menu options with his take on the GameEnd window.   In short, you cannot use this version of the menu to take you to a separate TITLE-SHUTDOWN-RETURN menu, because you are in that menu already... totally taken over.

The only option, per say, would be to use this system to add an optional "Return to Title" option.  You do that here:

  ['Items',  :item],
  ['Status', :status],
  ['Save',   :save],
  ['Exit',   :shutdown],

Here, you add the To TItle option like so:

  ['Items',  :item],
  ['Status', :status],
  ['Save',   :save],
  ['Title',  :to_title],
  ['Exit',   :shutdown],


I took a look at the system.  It takes the object argument (eg :shutdown) and combines the string of the name combined with the prefix "command_"  (eg  command_shutdown) and executes the method that still exists in Scene_End. He did not 'delete' the "command_shutdown" method. But by that respect, he did not delete the "command_to_title" method either. So the use of ':to_title' in the config must work.

This is me understanding its mechanics without even having VXAce.

I do have a copy of the default scripts...  I study.

But sadly, again, she gutted the actual End menu to create this.  You would need to make ANOTHER separate End menu replete with its own window script otherwise.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply
#3
(2 hours ago)DerVVulfman Wrote: Moved to code support.

ALSO, a link to the script in question is kinda needed. Winking  OH, its "right here" , in the body of your text.  Twas kinda concealed.  Snagging...

EDIT:

Ugh.  On looking at it, the code has these very specific bits of text:

# Overwrites the old, boring menu to use the cooler-looking Game End menu

class Scene_Map
  def call_menu
    Sound.play_ok
    SceneManager.call(Scene_End)
  end
end

and

# Overwrites Scene_End to use Save/Load/Items

class Scene_End
 
  def start
    super
    create_command_window
    create_invisible_formation_window
  end
 
  def create_command_window
    @command_window = Window_GameEnd.new

From all appearances, she gutted the Main Menu (Scene_Menu), and made it so anyone calling the main menu would have control passed to "Scene_End" aka the  END menu.
 
The script uses Scene_End  End Menu to control everything... 
 
    @command_window = Window_GameEnd.new
 
This is now being used in the End menu, not to display your three options, but to display the main menu options with his take on the GameEnd window.   In short, you cannot use this version of the menu to take you to a separate TITLE-SHUTDOWN-RETURN menu, because you are in that menu already... totally taken over.

The only option, per say, would be to use this system to add an optional "Return to Title" option.  You do that here:

  ['Items',  :item],
  ['Status', :status],
  ['Save',   :save],
  ['Exit',   :shutdown],

Here, you add the To TItle option like so:

  ['Items',  :item],
  ['Status', :status],
  ['Save',   :save],
  ['Title',  :to_title],
  ['Exit',   :shutdown],


I took a look at the system.  It takes the object argument (eg :shutdown) and combines the string of the name combined with the prefix "command_"  (eg  command_shutdown) and executes the method that still exists in Scene_End.  He did not 'delete' the "command_shutdown" method.    But by that respect, he did not delete the "command_to_title" method either. So the use of ':to_title' in the config must work.

This is me understanding its mechanics without even having VXAce.

I do have a copy of the default scripts...  I study.

But sadly, again, she gutted the actual End menu to create this.  You would need to make ANOTHER separate End menu replete with its own window script otherwise.

much appreciated! the script repurposing the usual end menu was about what i had gathered from tinkering with it myself, though i didn't realize how much an issue that'd be to achieve what i'm looking for :( though i appreciate the proposed alternative! i'll give it a try and see what other tinkering i can do to make an unfortunate misclick less likely
Reply


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,571 04-07-2026, 10:01 AM
Last Post: Ace_V
   Lead Actor Swapper script error Ace_V 25 30,018 09-07-2025, 01:22 PM
Last Post: DerVVulfman
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 3 8,300 11-22-2024, 07:02 PM
Last Post: JayRay
   Script compatibility help Lord Vectra 3 12,485 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 39,394 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 36,132 04-28-2020, 04:06 PM
Last Post: Whisper
   Skill Cooldown script Fenriswolf 11 35,710 12-10-2019, 11:10 AM
Last Post: Fenriswolf
   Help iwth script (RGSS Player crash) Whisper 3 15,447 06-17-2017, 05:03 PM
Last Post: Whisper
   Help modifying a script Keeroh 7 21,535 06-11-2017, 04:43 PM
Last Post: DerVVulfman
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 18,971 05-31-2017, 05:10 AM
Last Post: Zachariad



Users browsing this thread: 1 Invisible User(s), 1 Guest(s)