Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shattered Pixel Dungeon Save Trainer

A comprehensive Python-based trainer for modifying Shattered Pixel Dungeon save files with automatic detection of randomized item labels.

Features

Core Features

  • 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

Hero Modifications

  • Level, STR, HP, Max HP, Gold
  • Unlimited HP: Sets HP/Max HP to extremely high values that persist through level ups and weakening debuffs

Equipment Modifications

  • 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 Management

  • 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

Advanced Features

  • 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

Installation

Quick Install (Recommended)

Linux:

./install_linux.sh

Windows: Double-click install_windows.bat or run:

install_windows.bat

Manual Install

pip install pynput

Linux users: Install tkinter if needed:

# Ubuntu/Debian
sudo apt install python3-tk

# Fedora
sudo dnf install python3-tkinter

# Arch
sudo pacman -S tk

Windows users: tkinter is included with Python installations from python.org

Usage

GUI Trainer (Recommended)

Run the GUI trainer in the background:

python3 gui_trainer.py

Workflow:

  1. The trainer runs in the background
  2. Press ` (backtick) key anywhere to open the trainer window
  3. Select your save slot and click "Load Save"
  4. The trainer automatically detects potion/scroll labels from your identified items
  5. Modify stats, equipment, and add items
  6. Click individual buttons to apply changes (they save automatically)
  7. Use "Clean Save" if your save file gets corrupted

Command Line Trainer

python3 trainer.py <slot> [options]

Options:

  • level=<num>: Set hero level
  • str=<num>: Set hero STR
  • hp=<num>: Set hero HP
  • gold=<num>: Set gold amount
  • gear=yes: Add starting gear

Examples:

python3 trainer.py 1 level=10 gold=1000 gear=yes

Available Items to Add

Potions

  • Potion of Healing
  • Potion of Strength

Scrolls (All Available)

  • 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

Wands

  • Wand of Magic Missile
  • Wand of Lightning

Rings

  • Ring of Accuracy
  • Ring of Elements

Food

  • Food Ration, Small Ration, Overpriced Ration
  • Chargrilled Meat, Frozen Carpaccio, Mystery Meat, Stewed Meat
  • Pasty

Equipment Options

Weapons

Short Sword, Hand Axe, Spear, Quarterstaff, Sword, Mace

Armor

Leather Armor, Mail Armor, Scale Armor, Plate Armor

How Label Detection Works

Since Shattered Pixel Dungeon randomizes potion colors and scroll runes each game, the trainer automatically:

  1. Scans your inventory for identified potions and scrolls
  2. Learns the correct color/rune for each item type in your current game
  3. 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.

Troubleshooting

Save Won't Load

If your save becomes corrupted (especially after using certain scrolls), use the "Clean Save" button to remove corrupted items and buffs.

Unlimited Features Not Working

  • 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

Items Not Working

  • Ensure you have identified items in your inventory for label detection
  • The trainer shows how many labels it detected when loading a save

Warning

  • 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

Files

  • gui_trainer.py - Main GUI trainer application
  • trainer.py - Command-line trainer (legacy)
  • install_linux.sh - Automated Linux installer
  • install_windows.bat - Automated Windows installer
  • README.md - This documentation

About

Shattered Pixel Dungeon Trainer

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages