Pixel Dungeon Wiki
Advertisement

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.

Requirements[]

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[]

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:

https://play.google.com/stor/apps/details?id=com.keramidas.TitaniumBackupPro&hl=en.

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[]

The game files are a collection of JSON files under the directory /data/data/com.watabou.pixeldungeon/files/.
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:
adb shell
  • navigate to the save files:
cd data/data/com.watabou.pixeldungeon/files/
  • view the files:
ls

This should give a list that looks like:

badges.dat
bones.dat
game_<largeNumber>.dat
game_<moreLargeNumbers>.dat
rankings.dat
warrior.dat
warrior1.dat
warrior2.dat
  • To continue, exit the shell:
exit

PC Version[]

The files will be located somewhere in the main users home directory.

Windows: C:/Users/youruser/Saved Games
linux: ~/.watabou/pixel-dungeon
mac: ~/Library/Application Support/Pixel Dungeon

All the files listed above should be there.

General files[]

The badges.dat and 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.

The game_<largeNumber>.dat files store information about previous runs for the score board.
These files do not need to be copied.

Character files[]

Each character currently in a game is saved in a separate file:


Those files need to be copied when saving.

Depth files[]

Each depth visited by each character currently in a game, is saved in a file named after the class and the depth:


Those will also need to be copied.

Save game[]

  • 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[]

Saving on PC is a simple matter of copying the files in the save folder to somewhere

Revert game[]

  • 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[]

Once 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 [citation needed], 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 enable syntax highlighting. JSON is a subset of JavaScript (this means that any correct JSON string is a correct JavaScript source), so you can enable JavaScript highlighting for better experience.

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[]

Search for inventory.
You will find a list of items in your inventory.

  • If you want Plate armor +20, add to the inventory section:
{"cursed":false,"quantity":1,"level":20,"__className":"com.watabou.pixeldungeon.items.armor.PlateArmor","cursedKnown":true,"levelKnown":true}
{"cursed":false,"quantity":364,"level":0,"__className":"com.watabou.pixeldungeon.items.potions.PotionOfFrost","cursedKnown":true,"levelKnown":true}
{"cursed":false,"quantity":1,"level":1,"__className":"com.watabou.pixeldungeon.items.weapon.melee.Knuckles","cursedKnown":true,"enchantment":{"__className":"com.watabou.pixeldungeon.items.weapon.enchantments.Fire"},"levelKnown":true}
WARNING:
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[]

  • 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 HT (max health).
  • Other fun values to play with: attackSkill (accuracy), defenseSkill (dodge), STR, lvl, exp.
    Note: level is not the same as lvl.
  • 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.):
"subClass":"WARLOCK"

Re-use[]

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[]

A list of the item class names can be found on the Item class names page.

Enemy names[]

Yog-Dzewa Madness.png

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.

Advertisement