Posts: 201
Threads: 14
Joined: Nov 2009
Just want to know if it's possible to import certain data (switches and variables mostly) to a new game, preferably a sequel?
(Meaning like everything you do in the first game have heavy influence and impact on the second game as well as difficulty)
Posts: 1,019
Threads: 76
Joined: Jan 2010
Easy.
Marshal.dump($game_variables, file)
You can exchange $game_variables with the following:
$game_switches - switches
$game_party - party gold and stuff.
+ all other data of your choice.
Exchange "file" with location of the file.
"Save_File.rxdata" saves it directly into the game folder
"Data/Save_File.rxdata" saves it into the data folder.
EDIT:
If you want to save more than one variable into the file (both switches and variables for instance), you should make an array:
@file = [$game_variables, $game_switches]
Marshal.dump(@file, "Save_File.rxdata"]