Bypass Title Only If There Are No Saves
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Yay! I'm on Script no. 2!
Okay. I found a script that Killswitch had made that allowed
you to bypass the title screen. I thought that it was cool but it
still left me wanting more. So I took the liberty of making it
scan for save files and if it found any it would take you to
the title screen, and if not than it sarts a new game. I'ven't a
chance to make a demo yet so if anyone wants to, then go ahead.

Here is the script:

Replace your Main class with this.

Code:
#==============================================================================
#Auto New Game System
#By: Eccid
#------------------------------------------------------------------------------
# This is my second script and it is something used in many old RPG's.
# What this does is searches to see if there are any save files before
# the game starts. If it does not see any save files then it will automatically
# start a new game. If, however, it does find a save file, it will send
# you to the title screen.
#------------------------------------------------------------------------------
# Thanks Killswitch for showng me how to bypass the title screen.
#==============================================================================
begin

  $defaultfonttype = $fontface = $fontname = Font.default_name = "Arial" #Enables all commands for changing the font type
  $defaultfontsize = $fontsize = Font.default_size =  18 #Enables all commands for changing the font size

  #Loads system data
Graphics.freeze
$data_actors = load_data("Data/Actors.rxdata")
$data_classes   = load_data("Data/Classes.rxdata")
$data_skills  = load_data("Data/Skills.rxdata")
$data_items   = load_data("Data/Items.rxdata")
$data_weapons   = load_data("Data/Weapons.rxdata")
$data_armors  = load_data("Data/Armors.rxdata")
$data_enemies  = load_data("Data/Enemies.rxdata")
$data_troops  = load_data("Data/Troops.rxdata")
$data_states  = load_data("Data/States.rxdata")
$data_animations  = load_data("Data/Animations.rxdata")
$data_tilesets  = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system  = load_data("Data/System.rxdata")
$game_system = Game_System.new
@sprite = Sprite.new

  #Loads switches, variables, etc.
$game_temp  = Game_Temp.new
$game_system  = Game_System.new
$game_switches  = Game_Switches.new
$game_variables   = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen  = Game_Screen.new
$game_actors  = Game_Actors.new
$game_party   = Game_Party.new
$game_troop   = Game_Troop.new
$game_map   = Game_Map.new
$game_player  = Game_Player.new
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
  $game_map.autoplay
$game_map.update

#Start-----Searching for save files
       if FileTest.exist?("Save1.rxdata") #You can change "Save1.rxdata" to whatever your settings are
$title=1 #Sets variable "title" to 1 if "Save1.rxdata" exists
end
           if FileTest.exist?("Save2.rxdata")
$title=1
end
          if FileTest.exist?("Save3.rxdata")
$title=1
end
          if FileTest.exist?("Save4.rxdata")
$title=1
end
#End---

#Start-----Searching for quick save files
# this is in case you are using my quick save system
# if you are not using my quick save system delete this group
if FileTest.exist?("QSave1.rxdata")
   $title=1
   end
if FileTest.exist?("QSave2.rxdata")
   $title=1
   end
if FileTest.exist?("QSave3.rxdata")
   $title=1
   end
if FileTest.exist?("QSave4.rxdata")
   $title=1
end
#End---

if $title == 1             #If a save was found it will take you to the title
   $scene = Scene_Title.new #If not you will automatically start a new game
   else
   $scene = Scene_Map.new
   end

while $scene != nil
$scene.main
end

Graphics.transition(20)
rescue Errno::ENOENT
filename = $!.message.sub("No such file or directory - ", "")
print("File #{filename} not found.")
end

Tell me what you think and I hope you enjoy!
:icon_fU:

P.S.
How does one go up in rank on this site?

*Edit*
Ok, I was being an idiot.
I made the script longer than it needed to be.
Replace

Code:
#Start-----Searching for save files
       if FileTest.exist?("Save1.rxdata") #You can change "Save1.rxdata" to whatever your settings are
$title=1 #Sets variable "title" to 1 if "Save1.rxdata" exists
end
           if FileTest.exist?("Save2.rxdata")
$title=1
end
          if FileTest.exist?("Save3.rxdata")
$title=1
end
          if FileTest.exist?("Save4.rxdata")
$title=1
end
#End---

#Start-----Searching for quick save files
# this is in case you are using my quick save system
# if you are not using my quick save system delete this group
if FileTest.exist?("QSave1.rxdata")
   $title=1
   end
if FileTest.exist?("QSave2.rxdata")
   $title=1
   end
if FileTest.exist?("QSave3.rxdata")
   $title=1
   end
if FileTest.exist?("QSave4.rxdata")
   $title=1
end
#End---

with

Code:
#Setting variable i for save number
for i in 0..3
#Start-----Searching for save files
  if FileTest.exist?("Save#{i+1}.rxdata") #You can change "Save1.rxdata" to whatever your settings are
    $title=1 #Sets variable "title" to 1 if "Save1.rxdata" exists
  end
#End----

#Start-----Searching for quick save files
# this is in case you are using my quick save system
# if you are not using my quick save system delete this group
  if FileTest.exist?("QSave#{i+1}.rxdata")
   $title=1
  end
#End----
end
#End----

thanks
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pre-Title menu Tony 0 2,544 08-04-2006, 01:00 PM
Last Post: Tony
  Transparent command box in title ryujijitei 0 2,282 04-29-2006, 01:00 PM
Last Post: ryujijitei
  introtexte in menu title, Berith 0 2,814 12-28-2005, 01:00 PM
Last Post: Berith
  Advanced Title Screen 2 kaito 0 2,734 09-19-2005, 01:00 PM
Last Post: kaito
  Cursor in the Title Sheol 0 2,303 09-18-2005, 01:00 PM
Last Post: Sheol
  Title Script RPG Fan 0 2,550 09-12-2005, 01:00 PM
Last Post: RPG Fan
  Putting Saves Into Seperate Folder Eccid 0 2,583 08-29-2005, 01:00 PM
Last Post: Eccid
  Title Screen Mod Hadriel 0 2,489 02-19-2005, 01:00 PM
Last Post: Hadriel
  Here's how to bypass the title screen Killswitch 0 2,642 01-13-2005, 01:00 PM
Last Post: Killswitch



Users browsing this thread: 1 Guest(s)