Skip to content

Poor Man's Cloud Save

Groo21Groo21 Member Posts: 3
edited June 2013 in General Modding
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!

Post edited by Groo21 on

Comments

  • mlnevesemlnevese Member, Moderator Posts: 10,214
    I just synchronize my savegames folder through Sugarsync. It's all automatic.
  • batiudramibatiudrami Member Posts: 4
    I do a similar thing - I use Dropbox Folder Sync to keep my 'save' folder in sync on my Dropbox - you just have to link the folders up once on both machines and it'll do the rest automatically.

    http://satyadeepk.in/dropbox-folder-sync/
  • BorsookBorsook Member Posts: 152
    wow. that's so complicated.... you can just move your save folder to dropbox or something like that and on all machines type in the command line something like this: "mklink /d "c:/BGEE/save" C:/dropbox/bgee/"
    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.
  • Groo21Groo21 Member Posts: 3
    Thanks Borsook. I couldn't get the mklink command to work before. Since then, I edited the security policy for making symbolic links in Windows and that worked fantastically. This is indeed a superior solution. Thanks!
  • AendaeronBluescaleAendaeronBluescale Member Posts: 335
    edited June 2013
    I don't like to sound like a d-bag, but:

    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.
  • Groo21Groo21 Member Posts: 3
    Agree on the 'use warnings'. I ran the command line with "-w", as is my habit.

    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.
  • ZeldabochZeldaboch Member Posts: 56
    in windows i have mklink /j my savage folder in dropbox, that do the sync. But i'm looking for a good solution also for android. Suggestions?
  • dibdib Member Posts: 384
    What we need is a real internal cloud save function that works cross device. That's something that could really incentivize people to buy the game for more than one platform.
  • specter597specter597 Member Posts: 16
    Zeldaboch said:

    in windows i have mklink /j my savage folder in dropbox, that do the sync. But i'm looking for a good solution also for android. Suggestions?

    DropSync App. Allows for automatic 2 way with any Android Folder to Dropbox.
    (May have to be rooted if you're on KitKat. :( SD got flogged in 4.4)
  • CerevantCerevant Member Posts: 2,314
    I don't think it helps for mobile, but I use Bittorrent Sync for my cross-platform save sync needs.
Sign In or Register to comment.