Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Is it possible to setup Minecraft so that the maps are loaded and saved from a different folder (like my Dropbox folder)?

Where are they stored by default?

share|improve this question
add comment

4 Answers

up vote 19 down vote accepted

You would need soft links to do that.

Create a soft link from your minecraft savegame folder to inside the Dropbox folder.

However, it will be quite suboptimal. Minecraft stores save games in many, many small files and Dropbox does not support folder-wide rollbacks.

What I would use instead is a source control versioning system.

First time setup

  1. Learn the basics of Mercurial
  2. Get Mercurial for your operative system
    • If you use a modern operative system, use your distribution's package manager.
    • For other operative systems, download mercurial here.
  3. Run hg init on your save folder
  4. Run hg add; hg commit to save the state of your game.

Backing up

  1. Play the game normally.
  2. When you close the game, run hg commit again to save the state of your game. Give a meaningful commit message (e.g. "got my first iron pickaxe!")

This, except maybe for the commit message, should be easily automated with batch files. Here's a very simple bash script for Ubuntu:

java -jar minecraft.jar
cd ~/.minecraft/
hg commit -m `zenity --entry --title Minecraft --text Announce your deeds!`

Going "back in time"

  1. Notice your save file is corrupted.
    • If you did commit last time you played, run hg rollback to undo the last commit and restore the save game to your previous save state.
    • If you did not commit last time you played, run hg revert to restore the save games to your last commit.
  2. Be glad you bothered and keep on playing.

Dropbox backup

While we are scripting, we might as well have a single file copy of your game files to be put on Dropbox.

java -jar minecraft.jar
cd ~/.minecraft/
hg commit -m `zenity --entry --title Minecraft --text Announce your deeds!`
zip -r ~/Dropbox/Minecraft/savefile.zip .

This makes for a much more Dropbox-friendly solution -- just be aware you are backing up the repository, not just the game files. If you want just the latter:

java -jar minecraft.jar
cd ~/.minecraft/
hg commit -m `zenity --entry --title Minecraft --text Announce your deeds!`
hg archive zip ~/Dropbox/Minecraft/savefile.zip

Remote hosting

If you want to keep game files up to date between different machines, it is trivial to do so - even without Dropbox. You can have a remote copy of your repository for free at these hosting solutions. Choose one that will not complain about your not using their service for a non-code project... Intuxication for example.

Be very careful, however -- you want to avoid conflicts. Merging will not work, so you will need to always push after you play and always pull before you play. This is trivial to do if you are using a script:

hg pull #get remote changes 
java -jar minecraft.jar
cd ~/.minecraft/
hg commit -m `zenity --entry --title Minecraft --text Announce your deeds!`
hg push #push to remote server

Specific setup details vary based on your hosting solution.

share|improve this answer
4  
Porting the above to your operative system is left as an exercise to the reader. –  badp Oct 20 '10 at 8:58
    
It's a little bit overkill for what I was looking for, but great info anyways, thanks! –  travis Oct 20 '10 at 14:54
    
@travis, it seems overwhelming because I did a lot thinking for you :) but Dropbox isn't going to save you the moment your save file goes belly up with a simple symlink I'm afraid. –  badp Oct 20 '10 at 15:06
    
It's not overwhelming, I use source control all the time, although I usually use SVN (I also use git, TFS, and VSS shudder at work). How would a save file go belly up from using a symlink though? –  travis Oct 20 '10 at 15:37
    
@travis It's not the symlink, it's not the versioning system -- it's the game that will occasionally junk your save file :( –  badp Oct 20 '10 at 16:39
show 1 more comment

Here's how I did it on Windows:

  1. Backup your saves
    (located in %AppData%\.minecraft\saves\)
  2. Move your saves to a folder inside your Dropbox or Live Mesh or whatever file syncing service
    (eg: My Dropbox\Minecraft\saves\)
  3. Create a junction that points to your sync'd saves:
    mklink /J "%AppData%\.minecraft\saves" "Your Dropbox Folder\minecraft\saves"

More info on NTFS Junctions, Dropbox (2GB, cross-platform, referral link), Live Mesh (5GB, Windows/Mac only).

Update: Here's a handy batch file to backup your save games in a zip file before launching minecraft:

@echo off
echo "Backing up save files..."
"Your Path To 7zip\7-Zip\7z.exe" a -r -mx7 -tzip "Your Dropbox Folder\minecraft\saves.zip" "%AppData%\.minecraft\saves"
minecraft.exe
share|improve this answer
add comment

On the Mac, your worlds are stored in ~/Library/Application Support/minecraft/saves/. You can create an symbolic link at that location to wherever you'd like, Dropbox or otherwise, and Minecraft will follow that symlink to a different location.

share|improve this answer
    
So it sounds like you'd move the saves folder to Dropbox (or whatever) and then just command+option+drag the folder back ro its original location right? apple.com/pro/tips/alias.html –  travis Oct 20 '10 at 16:11
    
Yep, that is exactly how you would do it. –  authenticgeek Oct 20 '10 at 16:22
    
hmm, when I did that minecraft shows all the slots as empty, is there a better way to create an alias (or symlink or junction) on the mac? –  travis Oct 21 '10 at 4:54
    
When I try to go there in Terminal: $ cd saves -bash: cd: saves: Not a directory –  travis Oct 21 '10 at 4:56
2  
This worked: ln -s ~/Dropbox/minecraft/saves ~/Library/Application\ Support/minecraft/ –  travis Oct 21 '10 at 5:46
show 1 more comment

Have you tried Sugarsync? It will allow you to sync specific folders on your computer as opposed to having to link everything through the dropbox folder.

share|improve this answer
    
Sounds cool, but sadly I'm too cheap to spend $5 a month on it :-) –  travis Oct 20 '10 at 15:28
1  
Actually... they're hiding the free version that I was using when I tried it. sugarsync.com/trialpay they're limiting it to 2 gb max (not an issue), and 2 computers only (possibly an issue), at least worth giving a try now –  Alex Larzelere Oct 23 '10 at 12:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.