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.

Sandgolem's Temporary Save: non-SDK version?

Well, Sandgolem has some pretty cool scripts, but they all use the SDK. So I can't really see how they work. I'm wondering if there is a non-SDK version of the Temporary Save script? Here's his original script:

Code:
#==========================================================================
# ** SG Temporary Save
#==========================================================================
# sandgolem 
# Version 1
# 9.04.06
#==========================================================================
#
# To temporarily save ingame, use this in a call script:
#   sg_temp_save
#
# To load it, use this:
#   sg_temp_load
#
# Best used before you start what you want it for, then start it right after.
# This is NOT an actual saved game a player can load.
#
#==========================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
#
# To use this script, copy it and insert it in a new section above "Main",
# but under the default scripts and the SDK if you're using it. This script
# needs to be placed under any that alter the saves and SG Settings Control.
#
# Have problems? Official topic:
#   http://forums.gamebaker.com/showthread.php?t=152
#
#==========================================================================

begin
  SDK.log('SG Temporary Save', 'sandgolem', 1, '9.04.06')
  if SDK.state('SG Temporary Save') != true
    @sg_tempsave_disabled = true
  end
  rescue
end

if !@sg_tempsave_disabled
#--------------------------------------------------------------------------

class Scene_Save < Scene_File  
  def sg_write_tempsave_data
    file = File.open("Data/sg_temps.rxdata", "wb")
    Marshal.dump($game_temp, file)
    write_save_data(file)
    file.close
  end
end

class Scene_Load < Scene_File  
  def sg_read_tempsave_data
    file = File.open("Data/sg_temps.rxdata", "rb")
    $game_temp = Marshal.load(file)
    read_save_data(file)
    file.close
  end
end

def sg_temp_save
  sg_scene_tsave_temp = Scene_Save.new
  sg_scene_tsave_temp.sg_write_tempsave_data
  sg_scene_tsave_temp = nil
end

def sg_temp_load
  sg_scene_tsave_temp = Scene_Load.new
  sg_scene_tsave_temp.sg_read_tempsave_data
  sg_scene_tsave_temp = nil
  $game_temp.player_new_map_id = $game_map.map_id
  $game_temp.player_new_x = $game_player.x
  $game_temp.player_new_y = $game_player.y
  $game_temp.transition_processing = true
  $game_temp.transition_name = ""  
  $game_temp.player_transferring = true
end

#--------------------------------------------------------------------------
end

So I'd want a script like this except non-SDK. It doesn't necessarily have to be from Sandgolem.

Thanks.
 
sandgolem;258688 said:
I'm pretty sure you don't need the SDK for that one unless there was more to it. It's actually optional for 99% of my scripts, most of them suffer from copy & pasted instructions. :)

Yeah, actually, it worked for me when I tried even without SDK. I was just curious if it would have been written differently/more clearly if it were non-SDK. That's what I meant by, "so I can't really see how it would work." Sorry, I should've been clearer (when I looked at it again just now I realized it could be read as, "I don't think it would work").

Or is that part in the beginning only checking to see if SDK was being used?
 

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