A Python script to re-enable achievements in your Factorio save files by patching specific flags.
- Scans and patches
level.dat
files within a Factorio save. - Searches for patterns associated with disabled achievements (
cheat-will-disable
,editor
,command-ran
). - Dry-run mode for previewing changes without modifying files.
- Automatically creates backups before applying patches.
python factorio_achievements_reenabler.py /path/to/your/save.zip [--patch]
/path/to/your/save.zip
: Path to your Factorio save file (usually a.zip
file).--patch
: Apply the patch to the save file. If omitted, the script runs in dry-run mode.
Dry-run mode (default):
python factorio_achievements_reenabler.py ~/Factorio/saves/my_save.zip
Apply patch:
python factorio_achievements_reenabler.py ~/Factorio/saves/my_save.zip --patch
- Extraction: Extracts your save file to a temporary directory.
- Scanning: Searches for
level.dat
files containing flags that disable achievements. - Pattern Matching: Looks for specific byte patterns and outputs hex dumps for debugging.
- Patching: Modifies the necessary bytes to re-enable achievements (when
--patch
is used). - Backup & Repackaging: Backs up the original save and repackages the modified save.
- Cleanup: Removes temporary files and directories after completion.
- Automatic Backup: The script backs up your original save file with a
.bak
extension. - Dry-Run Mode: Preview changes without modifying any files by default.
- Recommendation: Manually back up your save files before running the script.
This project is licensed under the MIT License.
Feel free to customize and extend this script according to your needs.