Author Topic: AI War Automatic Dropbox Save Sync  (Read 3196 times)

Offline Echo35

  • Master Member Mark II
  • *****
  • Posts: 1,703
  • More turrets! MORE TURRETS!
AI War Automatic Dropbox Save Sync
« on: December 20, 2010, 04:19:39 am »
There are definitely those of you out there who, like me, play AI War on different machines and are praying desperately for the day Steam Cloud is enabled for our saves. If you're also like me, you have a bunch of other indie games that you play on multiple machines and have to either copy the save files to a jump drive or toss them on a cloud storage service like Dropbox (I use Dropbox myself, as it's probably the best one out there and completely full of win http://www.dropbox.com/). Well I got to thinking about Dropbox and automatic file syncs and I wondered if it would work with symlinks (Symbolic Links for those of you undisciplined in the art of command line fu ;D). Turns out, you can copy your AI War save folder into Dropbox and symlink said folder right back into AI War and it automatically syncs your save files right into Dropbox. Of course I'm going to tell you how!

Note: This tutorial is based on my file and folder locations. I have AI War installed through Steam on my C: drive and am running a 64 bit OS (Windows 7 to be exact) so your directories may differ, so of course, change them as needed.

Step 1: Well of course Step 1 is to set up a Dropbox account if you haven't already. I'm assuming you used the default options and your Dropbox folder is in your Documents and called "My Dropbox". Doesn't matter, just as long as it's somewhere you know where to find it.

Step 2: Next, we need to move your AI War save folder into your Dropbox folder. I did it through command line since the symlink is also made through command line and I had it open anyway, but I suppose just copying it over would work if you feel like being boring ::). So, to do this, open up your command line (Typing in cmd into the Run box/command works) and enter in this:
Code: [Select]
>move "C:\Program Files (x86)\Steam\steamapps\common\ai war fleet command\RuntimeData\Save" "C:\Users\Echo\Documents\My Dropbox\Saves\AI War"Just so you understand what's going on there so you can modify for your own computer, the move command moves the folder directory (Obviously!) from the first location (My steamapps folder on my C: drive as I mentioned earlier. You need to move the AI War\RuntimeData\Save folder itself, hence the first directory address) to the second location, your Dropbox folder (I manage several games' save files through my Dropbox, so in mine I created a Saves folder and an AI War sub folder, but again, this could be whatever you want). Double check your AI War RuntimeData folder to make sure that the Save folder is no longer there, and check your Dropbox folder to make sure that it has been moved properly. Once that's all good, we can move on to the last step (Yes, that's right, this whole mess is three easy steps!).

Step 3: Now we get to make the symlink. This is a bit tricky, because when you create the symlink, you want to make it from the Save directory in your Dropbox (As in, inside the Save folder, not the folder itself) to the original location in your AI War RuntimeData folder. To do so, we use the mklink command with the Junction modifier, and (For me anyway) it looks like this:
Code: [Select]
mklink /J "C:\Program Files (x86)\Steam\steamapps\common\ai war fleet command\RuntimeData\Save" "C:\Users\Echo\Documents\My Dropbox\Saves\AI War\Save"Now a diagnosis of this! the command is basically making a symlink to the first location (In this case, back into my AI War steamapps folder. Notice how I typed in the exact original file structure. This will create a link in the AI War folder named "Save", and AI War needs to have that so it knows where to load from!) from the second location (Your Dropbox folder. Notice how you have to link the folder itself, not just where you copied it to. This is so that it links the files inside to the Save folder link that is now in the AI War directory).

If all went according to plan, if you look in your AI War RuntimeData folder, you'll see a folder called Save (Just like before) only it has a little Shortcut icon next to it. If you click on it you should see your save files. If you enter your Dropbox folder, you should see the save files there as well. We've basically just told Windows "Hey, this Save folder links to over here in this Dropbox folder." Now, whenever you save your game or make a new save file or whatever, it'll automatically be synced to your Dropbox (To be exact, the AI War folder has a shortcut pointing to the Dropbox one, so if you want to delete a file manually, delete it in Dropbox)! Yes, this works with other games too. So if you bought the Humble Indie Bundle like I did, you can do the same thing (Only with different folder locations of course) with your Machinarium, Osmos, Braid, Cortex Command, and Revenge of the Titans saves as well ;D.
« Last Edit: December 20, 2010, 04:23:40 am by Echo35 »

Offline PineappleSam

  • Full Member
  • ***
  • Posts: 103
Re: AI War Automatic Dropbox Save Sync
« Reply #1 on: December 20, 2010, 08:26:42 am »
Nice! Although I do have to ask how exactly you managed to link up the cortex command save folder ;)

Offline Mánagarmr

  • Core Member Mark V
  • *****
  • Posts: 4,272
  • if (isInRange(target)) { kill(target); }
Re: AI War Automatic Dropbox Save Sync
« Reply #2 on: December 20, 2010, 11:14:21 am »
That's command fu worthy of a linux user! I'm impressed! Nice work and a great idea at that!
Click here to get started with Mantis for Suggestions and Bug Reports.

Thank you for contributing to making the game better!

Offline Rustayne

  • Full Member Mark II
  • ***
  • Posts: 180
Re: AI War Automatic Dropbox Save Sync
« Reply #3 on: December 20, 2010, 11:32:21 am »
Wouldn't it be an easier method to just setup AI war to have the save folder linked to the dropbox location in game?  In the AI war settings you can tell the game where to save the files already, which would negate making the symlink for the game.  I can see the use on other games that don't have such a feature, and it is quite impressive with what you can do, but I'd figured I'd ask why not do it the easy way.

Offline KingIsaacLinksr

  • Master Member
  • *****
  • Posts: 1,332
  • A Paladin Without A Crusade...
Re: AI War Automatic Dropbox Save Sync
« Reply #4 on: December 20, 2010, 01:00:07 pm »
So much win in using Dropbox as a sync-program these days its crazy.  Its our own personal cloud and I've been seeing all sorts of interesting and good ways of using it.  :)

King
Casual reviewer with a sense of justice.
Visit the Arcen Mantis to help: https://www.arcengames.com/mantisbt/
A Paladin's Blog. Long form videogame reviews focusing on mechanics and narrative analyzing. Plus other stuff. www.kingisaaclinksr.com

Offline Echo35

  • Master Member Mark II
  • *****
  • Posts: 1,703
  • More turrets! MORE TURRETS!
Re: AI War Automatic Dropbox Save Sync
« Reply #5 on: December 20, 2010, 04:29:37 pm »
Wouldn't it be an easier method to just setup AI war to have the save folder linked to the dropbox location in game?  In the AI war settings you can tell the game where to save the files already, which would negate making the symlink for the game.  I can see the use on other games that don't have such a feature, and it is quite impressive with what you can do, but I'd figured I'd ask why not do it the easy way.

You can't change the location of the AI War save directory. You could install the game itself right into Dropbox of course, but you are limited to 2 GB of space for the free tier and I do save a lot of other stuff there.

Nice! Although I do have to ask how exactly you managed to link up the cortex command save folder ;)

Well CC doesn't have Saves of course, so I'm just using it to Sync any mods I may download so I can keep a consistent play between my Laptop and PC.

That's command fu worthy of a linux user! I'm impressed! Nice work and a great idea at that!

I might be a raging Linux fanboy. Just a little ;D You can tell, because they're actually called "Junctions" in Windows and "Symlinks" in Linux, but I used the term symlink ><
« Last Edit: December 20, 2010, 04:33:08 pm by Echo35 »

Offline Mánagarmr

  • Core Member Mark V
  • *****
  • Posts: 4,272
  • if (isInRange(target)) { kill(target); }
Re: AI War Automatic Dropbox Save Sync
« Reply #6 on: December 20, 2010, 04:59:59 pm »
I figured you were. I'd use my beloved Archlinux if it wasn't for the fact that all I use my computer for is gaming and entertainment.
Click here to get started with Mantis for Suggestions and Bug Reports.

Thank you for contributing to making the game better!

Offline Echo35

  • Master Member Mark II
  • *****
  • Posts: 1,703
  • More turrets! MORE TURRETS!
Re: AI War Automatic Dropbox Save Sync
« Reply #7 on: December 20, 2010, 05:10:47 pm »
I figured you were. I'd use my beloved Archlinux if it wasn't for the fact that all I use my computer for is gaming and entertainment.

Gaming is the only reason I still hang on to windows, and even that is getting thin these days with how many things work in Wine. As far as entertainment goes, there's no reason not to stay with Linux. XBMC works with Linux after all, and there's a shell script for playing Pandora now too :P