Unfortunately an upgrade is not an option, since I do not currently have any money for it. I have been going through c# lessons but am not anywhere near ready to port my game to to unity anytime soon.
What I intend to do at least is to create files with the file name being for example a characters name, and that file has hundreds of pieces of data, at least. And there might even be hundreds of these files.
Today I will look into using just one file, and figuring out if there is a "read_line" sort of function in GMS. I have only spent the latter part of yesterday figuring this out, but for example saving multi dimensional arrays into a file is so easy when you just write them as reals onto a file, and bring them back using for loops. It works perfectly, and I don't see why this type of saving system isn't more available, since the other saving systems I have tested have no been working at all. They demand too much input when all one really needs is a line of numbers separated by spaces. I am still new to this type of functionality, but the time I spent with python, it was fairly easy to save a long string of numbers, go through each of them in any way you wished, and place the data from different objects on different lines and so on. For example I just can't get the map ds to work at all, even when I copy pasted code and changed some of the variables to fit my needs. For me it just seems overly complicated, probably due to me being a simple guy.
But like said, I will look into this better today, I didn't really have the time yesterday evening when I started working on saving functionality.
EDIT:
Ok, so I made a temporary file, that I will write things to, and then I copied that file to another file that wasn't in the included files, but was in one of the games folders, and it seems to have worked. So are all the files in the games directory open for editing, or does this copying skip the sandbox somehow?
It also seems that this copying of the file using file_copy is not accurate. The data changes during this copying process, but it might be something on my end since I am just beginning to test things out. I don't really get how the copied file can be so different this way. The amount of data is the same, and the last two sort of test integers in the back are the same, but the rest of the data is scrambled. It consists of -1, 0, -1, so I don't get how the data changes. If you have any info on this that would be great.
I first just write onto a file, then directly copy it with no other actions between these two events.
Saving:
GML:
var file;
file = file_text_open_write("Saves/Temp/temp.ini");
for (i = 0; i < number_of_traits; i ++){
file_text_write_real(file, array_traits[i,0]);
}
file_copy("Saves/Temp/temp.ini","Saves/Characters/" + string(name1) + string(name2) + "Traits.ini");
file_text_close(file);
Loading:
Code:
///Load Character Data
var path, file;
path = "Saves/Characters/" + string(name1) + string(name2) + "Traits.ini"
file = file_text_open_read(path);
for (i = 0; i < number_of_traits; i ++){
array_traits[i,0] = file_text_read_real(file);
}
file_text_close(file);
EDIT2:
So I guess I don't have to add files to the "sandbox" if they are in a folder in the game directory? It seems to be working fine now with a direct writing on the file I want. Just not sure why the copying process is not working. It can't be the order of the items in the file that changes, since the last to integers are always the same. None of the integers are disappearing since there is always the exact same amount of them. It just jumbles it up for some reason.
I will have to figure that one out at some point, but for now saving and loading seems to be working this way.