Poor Man's Cloud Save
Groo21
Member Posts: 3
NOTE: Read Borsook's solution below. It requires less ongoing effort
This isn't really a mod, but:
Nutshell:
1. Download zip file and extract copyBaldur2Cloud.pl
2. Download activestate perl and install it
3. Run "ppm install File-Copy-Recursive" from the cmd line
4. edit a text file called "copyBaldur2Cloud.bat"
put the following line in the text file and save it (no quotes)
"perl \copyBaldur2Cloud.pl"
5. edit "copyBaldur2Cloud.pl" and enter the directories for your save files
6. Click on copyBaldur2Cloud.bat and enjoy!
(note: copy copyBaldur2Cloud.pl to copyBaldur2Local.pl and swap the directories and you have the restore function)
I play Baldur's Gate on multiple machines. The lack of cloud saving has annoyed me.
I wrote a tiny perl script to copy my save games from my local machine to my dropbox folder, which of course syncs. I then use the same script with the paths reversed to restore them from the cloud.
Just edit the 2 paths in the scripts for where your saves are and where you want them to be.
The script is commented, so it shouldn't be too hard to figure out what I was thinking. I should note that it does NOT overwrite directories ever. It just keeps making backups if a directory already exists.
It means that I have to run a script before I start and after I finish each session, but that's not bad. There's likely a way to do this automatically in windows somehow.
To run perl on windows, you can use ActiveState Perl (http://www.activestate.com/activeperl/downloads) which is free and very standard or something like perl on cygwin. You'll need to install the File::Copy::Recursive package for activestate which is done by running "ppm install File-Copy-Recursive" via the command prompt (cmd) after you've installed activestate perl.
If perl is installed, you run the script by typing "perl CopyBaldur2Cloud.pl" on your command line, or by creating a batch file and clicking on it.
If this is useful to anyone, awesome.
If not, please enjoy your day!
This isn't really a mod, but:
Nutshell:
1. Download zip file and extract copyBaldur2Cloud.pl
2. Download activestate perl and install it
3. Run "ppm install File-Copy-Recursive" from the cmd line
4. edit a text file called "copyBaldur2Cloud.bat"
put the following line in the text file and save it (no quotes)
"perl \copyBaldur2Cloud.pl"
5. edit "copyBaldur2Cloud.pl" and enter the directories for your save files
6. Click on copyBaldur2Cloud.bat and enjoy!
(note: copy copyBaldur2Cloud.pl to copyBaldur2Local.pl and swap the directories and you have the restore function)
I play Baldur's Gate on multiple machines. The lack of cloud saving has annoyed me.
I wrote a tiny perl script to copy my save games from my local machine to my dropbox folder, which of course syncs. I then use the same script with the paths reversed to restore them from the cloud.
Just edit the 2 paths in the scripts for where your saves are and where you want them to be.
The script is commented, so it shouldn't be too hard to figure out what I was thinking. I should note that it does NOT overwrite directories ever. It just keeps making backups if a directory already exists.
It means that I have to run a script before I start and after I finish each session, but that's not bad. There's likely a way to do this automatically in windows somehow.
To run perl on windows, you can use ActiveState Perl (http://www.activestate.com/activeperl/downloads) which is free and very standard or something like perl on cygwin. You'll need to install the File::Copy::Recursive package for activestate which is done by running "ppm install File-Copy-Recursive" via the command prompt (cmd) after you've installed activestate perl.
If perl is installed, you run the script by typing "perl CopyBaldur2Cloud.pl" on your command line, or by creating a batch file and clicking on it.
If this is useful to anyone, awesome.
If not, please enjoy your day!
Post edited by Groo21 on
4
Comments
http://satyadeepk.in/dropbox-folder-sync/
I use this even for games that have could saves it's more reliable. You just need to remember to delete the folder before you try to make a link there.
You should use "use warnings", "use strict" is fine though. Use both.
"use warnings" will stop scripts when a warning occurs (such as an attempt to read from variables with undefined values). This is especially recommended on file manipulation operations to prevent corruption or unintended behaviour.
"exit(0)" is not necessary at the end of the script because scripts always exit when they reach the end of interpretable content.
On the exit comment, I find that I often add sub routines at the end of my scripts. As such, remembering to put the exit(0) in there often helps me from causing other errors. I also occasionally truncate my scripts during debug. It can also provide an obvious statement for those aren't familiar with perl to know when things end. I try not to be an obfuscated programmer. Since it doesn't hurt, I just do it.
(May have to be rooted if you're on KitKat. SD got flogged in 4.4)