A comprehensive Python-based trainer for modifying Shattered Pixel Dungeon save files with automatic detection of randomized item labels.
- GUI Interface: Easy-to-use graphical interface with scrollable window
- Hotkey Activation: Press ` (backtick) anywhere to open the trainer
- Automatic Label Detection: Detects current game's randomized potion colors and scroll runes from your inventory
- Level, STR, HP, Max HP, Gold
- Unlimited HP: Sets HP/Max HP to extremely high values that persist through level ups and weakening debuffs
- Weapon Modifications: Level upgrades, Augment selection (Speed/Damage/Defense)
- Armor Modifications: Level upgrades, Augment selection (Speed/Damage/Defense)
- Wand/Staff Charges: Set current and max charges, or enable unlimited charges that persist through usage
- Item Addition: Add potions, scrolls, wands, rings with correct labels for your current game
- Food Addition: Add various food types (rations, meat, pasty, etc.)
- Equipment Replacement: Replace current weapon/armor with better gear
- Save Cleaning: Automatically removes corrupted items and buffs that could crash the game
- Persistent Modifications: Unlimited HP/charges survive level ups, debuffs, and game events
Linux:
./install_linux.shWindows:
Double-click install_windows.bat or run:
install_windows.batpip install pynputLinux users: Install tkinter if needed:
# Ubuntu/Debian
sudo apt install python3-tk
# Fedora
sudo dnf install python3-tkinter
# Arch
sudo pacman -S tkWindows users: tkinter is included with Python installations from python.org
Run the GUI trainer in the background:
python3 gui_trainer.pyWorkflow:
- The trainer runs in the background
- Press ` (backtick) key anywhere to open the trainer window
- Select your save slot and click "Load Save"
- The trainer automatically detects potion/scroll labels from your identified items
- Modify stats, equipment, and add items
- Click individual buttons to apply changes (they save automatically)
- Use "Clean Save" if your save file gets corrupted
python3 trainer.py <slot> [options]Options:
level=<num>: Set hero levelstr=<num>: Set hero STRhp=<num>: Set hero HPgold=<num>: Set gold amountgear=yes: Add starting gear
Examples:
python3 trainer.py 1 level=10 gold=1000 gear=yes- Potion of Healing
- Potion of Strength
- Scroll of Upgrade
- Scroll of Identify
- Scroll of Magic Mapping
- Scroll of Remove Curse
- Scroll of Mirror Image
- Scroll of Recharging
- Scroll of Teleportation
- Scroll of Lullaby
- Scroll of Rage
- Scroll of Retribution
- Scroll of Terror
- Scroll of Transmutation
- Wand of Magic Missile
- Wand of Lightning
- Ring of Accuracy
- Ring of Elements
- Food Ration, Small Ration, Overpriced Ration
- Chargrilled Meat, Frozen Carpaccio, Mystery Meat, Stewed Meat
- Pasty
Short Sword, Hand Axe, Spear, Quarterstaff, Sword, Mace
Leather Armor, Mail Armor, Scale Armor, Plate Armor
Since Shattered Pixel Dungeon randomizes potion colors and scroll runes each game, the trainer automatically:
- Scans your inventory for identified potions and scrolls
- Learns the correct color/rune for each item type in your current game
- Uses these correct labels when adding new items
Example: If healing potions are "pink" in your game (not crimson), the trainer will detect this and add healing potions with the pink label.
If your save becomes corrupted (especially after using certain scrolls), use the "Clean Save" button to remove corrupted items and buffs.
- Unlimited HP/charges use extremely high values (999,999) to persist through game events
- If they still get reset, the game may have additional recalculation logic
- Ensure you have identified items in your inventory for label detection
- The trainer shows how many labels it detected when loading a save
- Backup your saves before using the trainer
- Modifying saves may cause game instability or crashes
- Some modifications may be detected as cheating by the game
- Use at your own risk
gui_trainer.py- Main GUI trainer applicationtrainer.py- Command-line trainer (legacy)install_linux.sh- Automated Linux installerinstall_windows.bat- Automated Windows installerREADME.md- This documentation