APPDATA Saving
by Jet
Introduction
Okay well, this is a bit of a quicky but I realize some people may need it for some games, or for convenience, commercial games sometimes require it to.
That is, saving in the player's APPDATA directory instead of the game's root folder, which can be useful for still having save files easily accessible after a game uninstall/reinstall/carry-over from an old game/whatever. Other programmers can easily help with other save file things since you know exactly where to look now.
Features
- Save in the APPDATA folder
- Plug-n-play
- And more...
Script
http://pastebin.com/raw.php?i=KMK0RLkE
Credit
Jet
Note
I have a license, it's in my signature. Use in commercial games, PM me and I'll lay out my very simple terms.
APPDATA Saving
● ARCHIVED · READ-ONLY
-
-
Have you tested this with a user who has non-English characters in their user name? We had issues where the folder could not be created in APPDATA if someone had non-English characters.
-
Yes, I just updated the script to include that functionality, though testing it more thoroughly on another person's computer would be helpful so please let me know if the issue arises.Have you tested this with a user who has non-English characters in their user name? We had issues where the folder could not be created in APPDATA if someone had non-English characters.
-
I don't have the issue on my computer. I just mentioned it because it's one we've run into before with our beta testers :)
-
Right, doing this purely with ruby has presented a problem, mainly people get stuck because you can't even read the directory without nabbing an error.I don't have the issue on my computer. I just mentioned it because it's one we've run into before with our beta testers :)
That's why I use the Win32API to grab it, as i can get it without error. Of course, Ruby isn't UTF-8 which is what causes the issues, so i convert the string to UTF-8 by unpacking it and repacking it.
Then I ran into the issue that ruby would not recognize files inside the directory, luckily 1.9.2 has an additional option i can pass to Dir.glob which allows me to read them.
The only problem is this script is in-fact exclusive to ACE, as it needs Ruby 1.9.2 to actually work. -
is this really commercial use?
-
This has been updated to hopefully fix the issue listed here: http://forums.rpgmakerweb.com/index.php?/topic/34225-ace-trouble-with-jets-appdata-saving-script/