Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Should be pretty simple to do... (Skipping title)

I have already acquired a script that skips the title screen and goes to the first map of the game. This where I will create my own custom title screen using events. Now, I need to know what code I would need to place in a call script command to load the first save slot.

That is all I basically need, but this is kind of an extra that would be sweet. If there could also be a call script that saved to only the first slot.

If anyone can help me out with this, many thanks ;)
 
thanks alot dude...works like a charm, who do I credit for this though :P. Did you make this script? Sorry bout this btw, I know how to use almost everything in RMXP except scripts <.<
but yeah, jw who I credit.

thanks alot again ;)
 
I wouldn't suggest making a new module to save data. If any script creates new $game data, using that will not include it in the savefile, and it won't load correctly. Eventually, you'll end in disaster.

I suggest using:
Code:
class Scene_Save
  @@dummy_self = Scene_Save.new
  def self.quick_save(index = 0)
    file = File.open(@@dummy_self.make_filename(index), "wb")
    @@dummy_self.write_save_data(file)
    file.close
  end
end

class Scene_Load
  @@dummy_self = Scene_Save.new
  def self.quick_load(index = 0)
    filename = @@dummy_self.make_filename(index)
    return unless FileTest.exist?(filename)
    file = File.open(filename, "rb")
    @@dummy_self.read_save_data(file)
    file.close
    if $scene.is_a?(Scene_Map)
      $game_system.bgm_play($game_system.playing_bgm)
      $game_system.bgs_play($game_system.playing_bgs)
      $game_map.update
    end
  end
end

Now to save or load, just use:
Code:
Scene_Save.quick_save(index)
Scene_Load.quick_load(index)

Just replace either index with your desired index.
 
where do I put this script...? slightly confused on yours sephiroth, like i said, I'm not good with scripts...I tried replacing both scene save and load with the scripts you provided and it doesn't work? I also put it in one separate script and that doesn't seem to work either -_-...if you could explain further where I install the scripts so I can get this to work that would be great. thanks alot :)
 
Below Scene_Debug, add that longer code I gave you.


Then in call script box or whatever, just call

Scene_Save.quick_save(index)
or
Scene_Load.quick_load(index)


Either replace index with a number 0 - 3, or leave erase it to look like Scene_Save.quick_save or Scene_Load.quick_load. If you don't define a number 0 - 3, it will default to 0.
 
gaaah I feel really stupid...I did put this script above main under Scene_Debug. I named the script 'Quick_Save'

I go to save and I think it works, but then when I go to load I get this message:

?????'Quick_Save' ? 16 ??? NoMethodError ????????
undefined method 'read_save_data' for #<Scene_save:0x48b26c0 @help_text="Save to which file?">

I have 'Scene_Load.quick_load(0)' written in a call script command for the loading and I have 'Scene_Save.quick_save' for the save (because you said if I erase it, it automatically creates it for 0 )

now what am I doin wrong :( I'm starting to feel retarded and I hate it cuz I'm usually good with RMXP >.<
 
It was my mistake. Replace the code with this:
Code:
class Scene_Save
  @@dummy_self = Scene_Save.new
  def self.quick_save(index = 0)
    file = File.open(@@dummy_self.make_filename(index), "wb")
    @@dummy_self.write_save_data(file)
    file.close
  end
end

class Scene_Load
  @@dummy_self = Scene_Load.new
  def self.quick_load(index = 0)
    filename = @@dummy_self.make_filename(index)
    return unless FileTest.exist?(filename)
    file = File.open(filename, "rb")
    @@dummy_self.read_save_data(file)
    file.close
    if $scene.is_a?(Scene_Map)
      $game_system.bgm_play($game_system.playing_bgm)
      $game_system.bgs_play($game_system.playing_bgs)
      $game_map.update
      $scene = Scene_Map.new
    end
  end
end

Sorry about the confusion.
 
Just add this above the script I gave you:
Code:
  #--------------------------------------------------------------------------
  # ** Quick Save/Load System
  #   SephirothSpawn
  #   Version 0.9
  #   July 8th, 2008: 3:44pm GMTL-6:00
  #--------------------------------------------------------------------------

A little credit wouldn't hurt, but it's a pretty simple snippet.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top