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?
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
Sign up to join this communityYou 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.
hg init
on your save folderhg add; hg commit
to save the state of your game.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!`
hg rollback
to undo the last commit and restore the save game to your previous save state.hg revert
to restore the save games to your last commit.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
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.
Here's how I did it on Windows:
%AppData%\.minecraft\saves\
)My Dropbox\Minecraft\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
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.
ln -s ~/Dropbox/minecraft/saves ~/Library/Application\ Support/minecraft/
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.