Advertisement
LiTTleDRAgo

[RGSS] BlizzABS Save Data Convert

May 19th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.48 KB | None | 0 0
  1. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  2. # BlizzABS Save Data Convert
  3. # Version: 1.00
  4. # Author : LiTTleDRAgo
  5. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  6. # Can convert Blizz Abs Save data into clean project
  7. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  8. #==============================================================================
  9. # ** Scene_Load
  10. #------------------------------------------------------------------------------
  11. #  This class performs load screen processing.
  12. #==============================================================================
  13. class Scene_Load
  14.   #--------------------------------------------------------------------------
  15.   # * Read Save Data
  16.   #     file : file object for reading (opened)
  17.   #--------------------------------------------------------------------------
  18.   def read_save_data(file)
  19.     characters = Marshal.load(file)
  20.     Graphics.frame_count = Marshal.load(file)
  21.     $game_system        = Marshal.load(file)
  22.     $game_switches      = Marshal.load(file)
  23.     $game_variables     = Marshal.load(file)
  24.     $game_self_switches = Marshal.load(file)
  25.     $game_screen        = Marshal.load(file)
  26.     $game_actors        = Marshal.load(file)
  27.     $game_party         = Marshal.load(file)
  28.     $game_troop         = Marshal.load(file)
  29.     $game_map           = Marshal.load(file)
  30.     $game_player        = Marshal.load(file) rescue nil
  31.     if $game_player.nil?
  32.       $game_system        = Game_System.new
  33.       #------------------------------------------------------------------------
  34.       # If you want to load Switches and Variables in your game, disable below
  35.       #-------------------------------------------------------------------------
  36.       $game_switches      = Game_Switches.new
  37.       $game_variables     = Game_Variables.new
  38.       $game_self_switches = Game_SelfSwitches.new
  39.       #------------------------------------------------------------------------
  40.       # If you want to load Actor and Party data in your game, disable below
  41.       #-------------------------------------------------------------------------
  42.       # $game_actors        = Game_Actors.new
  43.       # $game_party         = Game_Party.new
  44.       #------------------------------------------------------------------------
  45.       $game_screen        = Game_Screen.new
  46.       $game_troop         = Game_Troop.new
  47.       $game_map           = Game_Map.new
  48.       $game_player        = Game_Player.new
  49.       $game_map.setup($data_system.start_map_id)
  50.       $game_player.moveto($data_system.start_x, $data_system.start_y)
  51.       $game_player.refresh
  52.       $game_map.autoplay
  53.       return
  54.     end
  55.     if $game_system.magic_number != $data_system.magic_number
  56.       $game_map.setup($game_map.map_id)
  57.       $game_player.center($game_player.x, $game_player.y)
  58.     end
  59.     $game_party.refresh
  60.   end
  61. end
  62. #==============================================================================
  63. # BlizzABS
  64. #------------------------------------------------------------------------------
  65. #  Empty
  66. #==============================================================================
  67. module BlizzABS
  68.   #============================================================================
  69.   # BlizzABS::AlignmentData
  70.   #----------------------------------------------------------------------------
  71.   #  Empty
  72.   #============================================================================
  73.   class AlignmentData
  74.   end
  75. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement