If you use Steam you probably know that some games sync your saved games to the Steam cloud (e.g. Half-Life), so owning multiple gaming-capable computers doesn’t become a chore. However, not all games currently support the Steam cloud (e.g. Terraria). For those games you can use DropBox to sync your saved games across multiple computers and, due to its cross-platform nature, multiple operating systems (e.g. if your game runs on a Mac, too).
For this how-to I am going to use Terraria on Windows as an example, but it can be easily translated to other games and operating systems as well.
Firstly, locate the necessary folders. Your DropBox folder is wherever you put it, probably in Documents. Your game’s save folder is wherever they put it. Terraria’s saved games are in My Documents\My Games\Terraria, or more specifically:
Windows Vista/7: C:\Users\Username\Documents\My Games\Terraria
Windows XP: C:\Documents and Settings\Username\My Documents\My Games\Terraria
Secondly, copy whatever saved files you want into a folder in your DropBox folder. For Terraria I just copied my Players folder, config file and my primary world into a folder called …DropBox\savegames\Terraria. Some people working off very slow connections or strict data caps might want to leave the worlds, as they can get relatively big. After copying the files and/or folders, make note of where their originals are and what they’re called (exactly), for example World 1 is called world1.wld and is in …\Terraria\Worlds. Next, delete the original files that have been copied to your DropBox.
Thirdly, create symbolic links (symlinks). A symlink is like a shortcut to a file or folder but looks like an actual file or folder to the operating system instead of a shortcut file. Thus if we create symlinks in the Terraria save folder that point to the copies in DropBox, Terraria won’t notice the difference. To create a symlink to a file, use the command mklink
in a command prompt. To create a symlink to a folder, use mklink
with the /D
flag set. For example, if I copied config.dat from Terraria to DropBox, I’d create the symlink with the following command:
mklink "C:\Users\Username\Documents\My Games\Terraria\config.dat" "C:\Users\Username\Documents\DropBox\savegames\Terraria\config.dat"
And I’d create the symlink to the Players folder with the following:
mklink /D "C:\Users\Username\Documents\My Games\Terraria\Players" "C:\Users\Username\Documents\DropBox\savegames\Terraria\Players"
Just replace Username with your Windows user name, and change the drive letter and/or DropBox location where necessary. Once the symlinks are created you can begin playing and your savegames should be synced to their new folders.
Note: If you’re not concerned with data usage, you can move the entire Terraria folder into DropBox and just do one directory symlink, e.g.:
mklink /D "C:\Users\Username\Documents\My Games\Terraria" "C:\Users\Username\Documents\DropBox\savegames\Terraria"
If you get stuck with making symlinks, the command mklink /?
might help.
Useful tip
Create environment variables for your DropBox and the game’s save location:
set DROPBOX="C:\Users\Username\Documents\DropBox"
set TERRARIA="C:\Users\Username\Documents\My Games\Terraria"
You can then use these variables in your mklink commands like this:
mklink /D "%DROPBOX%\savegames\Terraria\Players" "%TERRARIA%\Players"
Other OS
In Linux (and possibly the same in Mac OS) the ln
command creates symlinks. However, there are a few differences from mklink
:
link
and target
are swapped, the -s
flag must always be set if you want to make a symbolic link, and there’s no need for the -d
flag to be set for directories, as this only applies to hard links.
If you get stuck, read the man page! (man ln
)