Wednesday, March 03, 2010

Dropbox: Sync World of Warcraft and other save game files

- I've talked about dropbox (here is my referral link. I would appreciate it if you use that to sign up.) a few times on this blog in the past. It's a great free service that lets you store 2GB of pretty much anything in the cloud. You install a little service (windows or mac, there is also a web interface, mobile web interface, and free iphone app) and it will sync your files with the cloud and from there to all other computers that are linked to your dropbox account. You can also create public links to the files which is how I host most of the files I have available here on my blog. The backend is Amazon's S3 storage system.
- It's great for backing up files and even more sensitive stuff if you add a layer of encryption like truecrypt depending on how much you trust the cloud.
- Another great use is keeping your World of Warcraft addons and other save game files in sync between different pc's and even macs. If you are like me I have Wow installed on my gamer pc, my server, my htpc, my laptop, and my macbook. If you mess with a lot of mods, tweak their settings often, and like to keep them updated it can be a pain to keep it all synchronized on all your wow installs. With dropbox and symbolic links you can make this synchronization process completely automated and seamless, and it even works between windows and osx.
- Another advantage is dropbox has undelete and also keeps a history of multiple versions of a file as it changes. This is great for save game files not only as a backup but also the ability to restore a previous version.
- I got a lot of my ideas from this article and this one.
- First, a little background on symbolic links will help explain how this will work. Here is a pretty good article:
http://www.maximumpc.com/article/howtos/howto_master_your_file_system_mklink
My preferred windows tool for creating symbolic links:
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
- So the basic idea is we are going to move some key Wow directories into your dropbox folders. We will delete the folders in the original location. Then we will create a symbolic link in the Wow folder point back to the ones in the dropbox directory structure. The cool thing about symbolic link folders is wow (and most games and programs) can't tell the difference between that and real folders/files. It will treat them the same. As files get updated in those folders, they are actually being updated in dropbox which will then sync out to all other linked computers.
- Here's another tip. Once you've got wow setup on one machine there is no need to install it from discs/patch on any other pc. Just copy the entire World of Warcraft directory and create a shortcut to "C:\games\World of Warcraft\Launcher.exe". That's pretty much it. The Wow install is really quite portable.

Windows 7
- Install Link Shell Extension that I've linked above. Remember, this is a shell extension so there is no executable to run after install. You just get new options in the right click menu off of file explorer (and it is context sensitive so make sure you are right clicking on the right thing in file explorer). Also, if you are doing this on XP you won't see a symbolic link option in the right click menu because xp doesn't support symbolic links. That's ok since you can just use hard links or junctions instead and it should work just fine.

1)Pick a machine that will act as your "main/master" machine. It should be the machine you play wow the most on and where you do addon updates and tweaking. For me it's obviously my gaming rig. Install the dropbox service and make sure it is up and running.

2) There are two key folders in wow that we need to keep in sync with all other installations of wow. I installed into a games directory but you might have it under Program Files. Either way you get the idea.
C:\games\World of Warcraft\Interface\AddOns
C:\games\World of Warcraft\WTF\Account\YOURACCOUNTNAME
Back those folders up right now before you start. Zip them up or copy them somewhere just in case.

3) I like to organize my dropbox folder as such:
\My Dropbox\Save Games\World of Warcraft
Now MOVE (the two wow folders should no longer exist in their original locations) the two folders (addons, youraccountname) under the dropbox world of warcraft folder so it looks something like this:

At this point those wow files should start uploading to your dropbox account. You should see the status in the dropbox system tray icon. This initial upload could take some time depending on your upstream connection speed and how many addons you have.

4) Pick the first folder (addons) as your link source by right clicking it and selecting "Pick Link Source"


5) Now go navigate to your wow installed directory where addons was originally: C:\games\World of Warcraft\Interface\
Right click an empty space and choose Drop As... and SymbolicLink


- After that AddOns should appear like it is back where it belongs except only one copy of the files in addons exist in the dropbox folder. As far as wow client is concerned it is none the wiser. When anything gets updated/added here it really is done in the dropbox folder through the symbolic link and then silently uploaded to the dropbox cloud.


- Now, repeat the exact same steps except this time for YOURACCOUNTNAME (steps 4-5). Go back to the dropbox folder, pick youraccountname as your link source, navigate to C:\games\World of Warcraft\WTF\Account\, and drop a symbolic link there. It should look like this when you are done:


- For each additional computer you have wow installed on you will want to install the dropbox service and let it sync so that all the wow files are downloaded into your dropbox directory. Once that is completed go ahead and delete these two folders:
C:\games\World of Warcraft\Interface\AddOns
C:\games\World of Warcraft\WTF\Account\YOURACCOUNTNAME
and repeat steps 4-5 for AddOns and YOURACCOUNTNAME.

OSX
- I use this tool which has nice Finder integration for creating symbolic links. The process is pretty much the same as PC with a few small differences. The cool part is the files in AddOns and YOURACCOUNTNAME are operating system agnostic.
- Install the osx version of the dropbox service. Watch the menu icon until all the dropbox files are done downloading.

1) Delete the AddOns and YOURACCOUNTNAME folders which hare probably in /Applications/World of Warcraft

2) Pick AddOns in your dropbox folder which will be your link source and right click "Make Symbolic Link":


This creates a symbolic link in the same directory as the source with symlink tacked on the end.


3) Copy the "AddOns symlink" folder to /Applications/World of Warcraft/Interface. Then rename "AddOns symlink" to "AddOns"


4) Go back to /Users/username/Dropbox/Save Games/World of Warcraft and delete "AddOns symlink" since you no longer need it.

- Repeat steps 2-4 except for YOURACCOUNTNAME.

That should just about do it. Now you can make changes to your addons, add new ones, update them, tweak them and those changes will sync automatically to all your wow installations on pc or mac. Just make sure when you first turn on a computer let dropbox sync first before firing up wow. Also, after playing a wow session let dropbox upload/sync before shutting down the computer. This usually takes less than 1 min and is a small price to pay for the convenience.

- I also do this for other save games and even steam games like Dragon Age, Borderlands, Peggle, Plants vs Zombies, World of Goo, etc. It just takes a little research to find out where the save files are and follow basically the same procedure outlined above to get them to sync through dropbox. Until more games use cloud storage for save files (like torchlight) this works pretty well if you play the same game on multiple computers.

UPDATE: 3/4/2010
- Tips on computers with different screen sizes and resolution. First, get all your UI elements sized and positioned properly on your main computer. On all other computers and laptops that may have a different screen size/resolution you will have to check the scale UI option and move the slider. For example, on my macbookpro 13" it's only 1280x800 but my desktop is a 24" 1920X1200. If you scale the ui down it will be smaller but fits perfectly and looks exactly the same on my 13" as on my 24" just tiny. It's in options, video, check use UI scale, move the slider around until everything fits right. The best part is all these video/audio options are stored in the World of Warcraft\WTF\Config.wtf so it is NOT in a folder that is synced in dropbox. This works out perfectly since those settings should be specific to each computer.
- Be careful not to flip the link source and the location of the symbolic link. In other words don't use the wow install directory as the link source and create the symbolic link in the dropbox directory. At least in windows dropbox service for some reason when you create the symbolic link in dropbox and have the source be the original wow directories sometimes dropbox doesn't know the files were updated and therefore it won't update the cloud (you have to actually stop and restart the dropbox service before it notices the files have changed). Maybe dropbox has fixed that in the latest release but I found it unreliable. By moving the addons and youraccountname to the dropbox folder and then creating the symbolic link in the wow install directory, dropbox always picks up any updated files and properly immediately uploads the changes to the cloud.

UPDATE: 10/23/2010
- I recently upgraded my main monitor to a nice 27" samsung. The problem is it is 1920X1080 vs 1920X1200. That is a 16:9 aspect ratio vs 16:10. My macbooks are all 16:10. So now the UI no longer fits quite right no matter how you try and scale it on my macbook because of the difference in aspect ratios. The solution I came up with is quite an ugly kludge. I'm interested in any other options and opinions.
- General strategy using an apple script:
- Identify files in WTF/Account/YOURACCOUNTNAME/SavedVariables/ that will have to be unique to 16:10 (mostly UI elements like custom frames, viewports, cast bars, buff/debuff frames, etc.
- Copy those files to a separate directory that will hold the 16:10 specific versions. Lets call it MBP15. I have this directory in dropbox. This ends the one time setup stuff you need to take care of. The rest goes into an apple script.
1) Copy those lua files to another directory. Lets call it dropboxori. I have this folder outside of dropbox.
2) restore mbp15 (16:10) files (MBP15 dir -> your normal wtf dir)
3) Launch World of Warcraft application. Now you can safely rearrange your UI and it won't affect your original 16:9 setup.
4) Wait for World of Warcraft application to exit.
5) copy the lua files out of your normal wtf to your mbp15 dir (normal dropbox wtf -> mbp15 dir)
6) restore those dropboxori files (dropboxori -> normal dropbox wtf dir)
7) restart dropbox.
- Drawbacks: You are launching the actual wow app instead of the launcher. It might be a good idea to run the launcher first to make sure it gets all the updates, close it, then run your script.
- Once you quit wow you MUST wait around 10 or more seconds for the script to detect you quit wow, copy all the files around, and let dropbox start backup and finish syncing. If you don't do this you could get your files all mixed up. Luckily it isn't too bad if this happens since dropbox keeps older versions of your files. It works. This way auctioneer files and other non UI bits are still globally synced yet you get specific UI positioning for each aspect ratio. If only dropbox had a way to exclude certain files from syncing (it has to be at the file level, not folder) this would all be so much easier.

Sample script:

--stop dropbox
try
do shell script "killall Dropbox"
end try

delay 2

--backup original dropbox copy of files
set maggie to "/Applications/World of Warcraft/WTF/Account/YOURACCOUNTNAME/Moonrunner/YOURCHARACTERNAME/SavedVariables/"
set s1 to "/Applications/World of Warcraft/WTF/Account/YOURACCOUNTNAME/SavedVariables/"
set d1 to "/Applications/World of Warcraft/dropboxori/"
do shell script "cp " & quoted form of s1 & "EavesDrop.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Decursive.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "PitBull4.lua" & " " & quoted form of d1
--do shell script "cp " & quoted form of s1 & "ElkBuffBars.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Quartz.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SexyCooldown.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SunnArt.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CoolLine.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SatrinaBuffFrame.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "StarTip.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "DoTimer.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "omen.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "recount.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CombustionHelper.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of maggie & "MageNuggets.lua" & " " & quoted form of d1

--restore mbp15 specific files
set s1 to "/Users/USERNAME/Dropbox/Save Games/World of Warcraft/MBP15/"
set d1 to "/Applications/World of Warcraft/WTF/Account/YOURACCOUNTNAME/SavedVariables/"
do shell script "cp " & quoted form of s1 & "EavesDrop.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Decursive.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "PitBull4.lua" & " " & quoted form of d1
--do shell script "cp " & quoted form of s1 & "ElkBuffBars.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Quartz.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SexyCooldown.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SunnArt.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CoolLine.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SatrinaBuffFrame.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "StarTip.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "DoTimer.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "omen.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "recount.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CombustionHelper.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "MageNuggets.lua" & " " & quoted form of maggie

-- launch wow
tell application "World of Warcraft"
activate
end tell

repeat
if application "World of Warcraft" is not running then exit repeat
delay 5
end repeat

--------------- quit wow --------------
--copy mbp15 specific files out to dropbox.
set s1 to "/Applications/World of Warcraft/WTF/Account/YOURACCOUNTNAME/SavedVariables/"
set d1 to "/Users/USERNAME/Dropbox/Save Games/World of Warcraft/MBP15/"
do shell script "cp " & quoted form of s1 & "EavesDrop.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Decursive.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "PitBull4.lua" & " " & quoted form of d1
--do shell script "cp " & quoted form of s1 & "ElkBuffBars.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Quartz.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SexyCooldown.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SunnArt.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CoolLine.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SatrinaBuffFrame.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "StarTip.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "DoTimer.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "omen.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "recount.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CombustionHelper.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of maggie & "MageNuggets.lua" & " " & quoted form of d1

--restore original dropbox files
set s1 to "/Applications/World of Warcraft/dropboxori/"
set d1 to "/Applications/World of Warcraft/WTF/Account/YOURACCOUNTNAME/SavedVariables/"
do shell script "cp " & quoted form of s1 & "EavesDrop.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Decursive.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "PitBull4.lua" & " " & quoted form of d1
--do shell script "cp " & quoted form of s1 & "ElkBuffBars.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "Quartz.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SexyCooldown.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SunnArt.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CoolLine.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "SatrinaBuffFrame.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "StarTip.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "DoTimer.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "omen.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "recount.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "CombustionHelper.lua" & " " & quoted form of d1
do shell script "cp " & quoted form of s1 & "MageNuggets.lua" & " " & quoted form of maggie

delay 1

--restart dropbox
tell application "Dropbox"
activate
end tell

12 comments:

Unknown said...

Thanks for the write up! I've just started using Dropbox for some standard backup stuff, but this will be perfect for keeping my interface synched up in WoW between my gaming rig and my laptop.

Cheers!

Andytizer said...

I also sync my WoW folders over the cloud, but I think an easier way to set this up is to use Live Sync Beta to do this. This avoids creating sym links. I wrote up how I did it here: http://www.shinyhacks.com/2010/09/how-to-sync-savegames-on-cloud.html

ARogan said...

Yeah there's only one small issue with windows live sync. It only works with WINDOWS. If you have a mixed environment like I do and you need to sync cross platform like between windows 7 and osx dropbox is still the way to go.

Andytizer said...

Actually Windows Live Sync Beta has OSX compatibility.

ARogan said...

Wow they do have an osx version in the beta. I had no idea. Thanks for the heads up. I'll have to give it a look. Microsoft supporting mac again. Who would have thought.

John Mattos said...

This is an awesome guide. Thanks so much!!!

Gravity said...

Thank you very much. I linked to you from my site.

Wordpad said...

Thanks a lot, this will be a huge help for me! I just used the "Magic briefcase" feature within SugarSync instead of DropBox, since I was already a sugarsync user - but tomato tomato... Anyways, I'm a bit confused as to the chose a master computer, why should one computer be the master? Would you please elaborate?

jackreap said...

If you want to play on a private server, WoW-Titans is the best wow fun server. Join and experience the best PvP ever! www.wow-titans.com

allianceforever said...

Dropbox is awesome, sorry i'm already signed up so I can't sign up with you, i mean can you have 2 accounts and therefore 4GB of storage space? Wow is this actually possible? I would make 5 accounts :P
Good post, I save there all the important things I don't want to lose, passwords and stuff for works, saves...

alliance leveling guide said...

BTW jackreap Private servers suck, you usually get level 80 with gear and then you have to pay for more, it's not the same.

voji said...

If you doesn't want to create symlinks, or want to synchronize only a part of a directory, try out synctocloud.

http://www.synctocloud.net/