Help - Search - Members - Calendar
Full Version: Skip Title Screen
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
TheBen
Title Screen Skipper
TheBen

Abstract
My first posted script. This removes the title screen and instead skips straight to the starting map, which opens up a plethora of opportunities for the event-savvy designer.
Also, if a save file is present, then the File screen will open up to let the player choose a save file.

Scripter's Note

The latest version of the script was designed so that you could access the Title Screen if you wanted to. Just use the script call
CODE
$scene = Scene_Title.new(false)

to access the title screen.

Le Script
Here it is. Just paste it in below "Materials" and above "Main".
CODE
class Scene_Title < Scene_Base
  @@first_time = true #Used to fix a Save Screen situation in which you
  #couldn't get the new game option
  
  def initialize(skiptitle=true)
    @skiptitle = skiptitle #Whether or not to skip to the map
  end
  
  def main
    if $BTEST
      battle_test
    elsif @skiptitle
      skip_to_map
    else
      super
    end
  end
  
  #Skip directly to map screen, sans passing GO and collecting 200 bucks
  def skip_to_map
    load_database                     # Load database
    create_game_objects               # Create game objects
    check_continue                    # Determine if continue is enabled
    if @continue_enabled and @@first_time  #Save Screen Processing
      @@first_time = false
      $scene = Scene_File.new(false, true, false)
    else
      confirm_player_location
      $game_party.setup_starting_members            # Initial party
      $game_map.setup($data_system.start_map_id)    # Initial map position
      $game_player.moveto($data_system.start_x, $data_system.start_y)
      $game_player.refresh
      $scene = Scene_Map.new
      Graphics.frame_count = 0
      $game_map.autoplay
    end
  end
  
end

Useful Notes
As I said before, you should delete Scene_Title before putting this script in.
Also, the "To Title" command in the Menu now does nothing more than reset the game - you might want to change the name of the command to "Reset" or just use this bonus script.
CODE
class Scene_End < Scene_Base
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#  Remove "To Title" Command | TheBen V1.0
#
#  Rewrites Scene_End so that the "To Title" option isn't available.
#  This isn't strictly necessary for Skip Title Screen to work, but you need
#  to change the "to title" vocab to something like "Reset".
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_menu_background
    @command_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 0  # Quit
        command_shutdown
      when 1  # Cancel
        command_cancel
      end
    end
  end

  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::shutdown
    s2 = Vocab::cancel
    @command_window = Window_Command.new(172, [s1, s2])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = (416 - @command_window.height) / 2
    @command_window.openness = 0
  end

  #--------------------------------------------------------------------------
  # * Process When Choosing [To Title] Command (Deleted)
  #--------------------------------------------------------------------------
  def command_to_title
  end
end


Kread-EX
I can't test it right now, but if there's something I can say, it's that forcing players to delete one of the default scripts is bad practice. You can ensure compatibility by aliasing as much as possible and keep only the default methods you absolutely have to overwrite. Although, by the look of things, you seem to also have included unchanged methods, such as load_bt_database.
TheBen
Alright. I'll work on rewriting the script now.
EDIT: Alright, folks - the script is now fully functional and shouldn't yield any errors unless you do something really dumb. It's also a bit faster, I think, but that's another story.
ASCIIgod
not an awesome script... considering it do less...
TheBen
Um... plenty of ellipses, there... um... alright. I suppose you mean "not totally destroy Scene_Title in the process". So I'm working on that.
Again. (Yes, but what do you mean, exactly?)

So far, I haven't gotten too far with that(except maybe in the field of accepting that I need to put more consideration into writing/posting my scripts). The script is admittedly "not awesome", but I'll do my best to make sure that it becomes at the very least something acceptable.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.