Pixel Dungeon does not allow for the game to be saved and reverted (apart from the Ankh). However, with a little bit of work, the save files can be copied to an external location, and then copied back outside of the game. WARNING: this process is error prone and can lead to destroying a good run.
To save the game, root file access is needed. (Note: Helium Backup also works if you are not rooted!) This can be done through various means, but this article will be performing the process via connecting the device to the computer and using adb commands. If you don’t want to install adb, then terminal emulator is another option. The process is much the same regardless of software used.
In PC, just find the save file (explanations below).
Making checkpoint saves using Titanium Backup Edit
If all you want to do is make checkpoint saves in your game, and your device is rooted, rather than copying the files manually, it is easier to just buy the Titanium Backup Pro key than to go with the free Titanium backup tool.
This will give you the ability to have multiple backups on your phone.
The free version of TB only lets you have one backup, per program stored on your device, at one time.
Get the key there:
Then set the number of backups stored to something reasonably large, and backup PixelDungeon whenever you have done something significant.
If you die, revert to your last backup - no computer needed.
Note, you can sort your Titanium backups by 'date you last made a backup', which will mean that PixelDungeon comes out on top, so you can save and restore more quickly than if you are waiting for the information to be loaded in alphabetical order.
The save files Edit
The game files are a collection of JSON files under the directory
The save files can be viewed by:
- setting the device to USB debugging,
- connect the device to the computer,
- open cmd and run a remote shell:
- navigate to the save files:
- view the files:
This should give a list that looks like:
- To continue, exit the shell:
PC Version Edit
The files will be located somewhere in the main users home directory.
~/Library/Application Support/Pixel Dungeon
All the files listed above should be there.
General files Edit
rankings.dat are files that do what the title suggests.
They do not need to be copied when saving.
bones.dat is what will be transferred through the Hero's remains the next run; this file should be copied when saving, but does not need to be.
game_<largeNumber>.dat files store information about previous runs for the score board.
These files do not need to be copied.
Character files Edit
Each character currently in a game is saved in a separate file:
Those files need to be copied when saving.
Depth files Edit
Each depth visited by each character currently in a game, is saved in a file named after the class and the depth:
- Warrior :
- Mage :
- Rogue :
- Huntress :
Those will also need to be copied.
Save game Edit
- Quit to the game’s menu to ensure that the game has written its data to the save file.
- Copy the save file to your computer:
adb pull data/data/com.watabou.pixeldungeon/files/ "c:/<directory>/".
- This will have copied all classes and the unnecessary files.
It doesn’t matter that they were copied, but you can delete them if you want to.
- Your game is saved.
PC version Edit
Saving on PC is a simple matter of copying the files in the save folder to somewhere
Revert game Edit
- Start a new game of the desired class.
This must be done because the game remembers if there is a game to load in a file that was not copied; therefore, without this step, we would not have the option in the menu screen to load a game.
- Quit back to the menu.
- Copy the files onto the device:
adb push "c:/<directory>/" data/data/com.watabou.pixeldungeon/files/.
- The above line will revert all classes, badges and high scores.
If you want to revert one class only, then you will have to copy the relevant files individually, or delete the irrelevant files before copying.
- Your game is reverted.
You may notice that the description for your current save in the menu states incorrect information; don’t worry, the file should be reverted.
Edit a save EditOnce the files are copied to your computer, open the character file you want to edit in your favorite text editor (Notepad, Notepad++, Editpad, vim, emacs, etc.). PC save files have a simple encryption applied to them. You can use You can use this fiddle to encrypt/decrypt saves. Shattered Pixel Dungeon files are gzipped , to get access to JSON you should unpack them with either 7zip or WinRar or gzip console utility. On android you need the command
gzip -d <name_of_file>
to unpack. You can put them back unpacked.
WARNING: JSON MUST be minified to be correctly recognized by the game.
If you use any indentation, don't forget to remove it.
In Notepad++ you can do it with the help of JSTool plugin (Plugins→JSTool→JSMin).
Also, you can apply indentation (Plugins→JSTool→JSMin in Notepad++, you first need to install it via Plugins→Plugin Manager→Show Plugin Manager→ [find and check JSTool in the list] → Click Install → agree with NPP restart).
All the labels in the save files are well named and self explanatory, but some examples are given below.
Edit inventory Edit
You will find a list of items in your inventory.
- If you want Plate armor +20, add to the inventory section:
- If you want 364 Potions of Frost, add:
- As you cannot have more than 19 items in your inventory, it’s recommended that you drop some items on the floor before saving and editing your save files.
Edit current status Edit
- If you want to increase your current health, search for
HP(current health) and increase the value after it.
You will also need to increase
- Other fun values to play with:
levelis not the same as
- If you haven’t obtained the Tome of Mastery yet, you can change the sub-class value to whatever you want. (You can even get subclasses on classes they weren't made for.):
Re-encrypt the file and change it back to its file of origin if changed. Return to original location if moved. Then it should be fully usable again!
Class names Edit
A list of the item class names can be found on the Item class names page.
Enemy names Edit
In the floor files (e.g. warrior2.dat, mage11.dat), by editing the mob names / stats, you can create very odd situations, like this: →
A list of the enemy class names can be found on the Enemy class names page.