Alright so have you looked at Scene_File in VX? Its ok if you haven't. When this scene is started it either has the ability to save information or load information to and from a file respectively speaking. Saving information to a file is really easy and the way RGSS/2 achieves this is through the Marshal module.
To save information you need two things to save to a file. First the piece of data you are trying to save. So for the sake of simplicity and for this example we will save a string, "I used Marshal.dump to save this data." First we need to define a port or the destination where we want the data to be saved to. Afterwards saving is a simple task.
Save Example:
save_string = 'I used Marshal.dump to save this data.'
save_file = File.new('test.txt', 'wb')
Marshal.dump(save_string, save_file)
save_file.close
In File.new I used a second argument which was a string, 'wb', this tells the file that whatever data is written to it to save it in binary. There are plenty more types of arguments that could be placed there. For more of them with explanations visit
here and look up "IO". Anyway now the data has been saved how do we go about retrieving it? Marshal has a method to achieve this as well conveniently called "load". "load" requires only one parameter/argument which is the file we are trying to read from. So first let's make a file that reads in the same mode as the data was written. The mode that we wrote the file in must match the read's equivalent otherwise you might run into odd bugs. Save it in binary, read it in binary. Get it? Also if you are saving multiple items to a file. The order the data is saved in better match the way the data is loaded. Save string1 then string2 then int1, you have to load it in that same order.
Load Example:
load_file = File.open('test.txt', 'rb')
load_string = Marshal.load(load_file)
load_file.close
print load_string
If you were to place that code directly above main together with the saving you should see that the string was loaded from the file that we just wrote to. And it will print "I used Marshal.dump to save this data.". I hope that helps you out Nuberus. If not just clarify the confusing parts if possible.
Good luck with it Nuberus! :thumb: