A safe and comprehensive save game editor for OpenXCom Extended, specifically designed for the X-Com Files mod. This tool allows you to modify various aspects of your save games including money, research progress, soldier stats, base facilities, production queues, and inventory.
ALWAYS backup your save files before using this tool! While the editor includes built-in backup functionality, it's recommended to manually backup your saves as well.
- The tool creates automatic backups before saving changes
- All modifications are validated before writing to disk
- You can preview changes before committing them
- An undo feature allows you to reset changes before saving
- View current funds (current month and previous month)
- Set funds to any desired amount
- Add or subtract funds from current balance
- View all active research projects with progress
- Instantly complete individual or all research projects
- See research progress as percentages
- Edit individual soldier statistics
- Set all soldiers to maximum stats (100 or custom value)
- Modify individual stats (TU, Health, Bravery, Reactions, etc.)
- View soldier details including rank, missions, and kills
- View facilities currently under construction
- Instantly complete facility construction
- Complete all facilities or individual buildings
- Shows construction time remaining
- View active manufacturing/production items
- Instantly complete production of items
- Handle both regular and infinite production queues
- Shows production progress and assigned engineers
- Browse base inventories with item quantities
- Edit item quantities (add, remove, or set to specific amounts)
- Search for items across all bases
- View formatted item names (removes STR_ prefixes)
- Automatic timestamped backups before saving
- List and restore from previous backups
- Manual backup creation
- Backup restoration with confirmation
- Python 3.8 or higher
- Virtual environment (recommended)
- Clone or download this project
git clone <repository-url>
cd openxcomeditor
- Create and activate virtual environment
python -m venv venv
# On Linux/Mac:
source venv/bin/activate
# On Windows:
venv\\Scripts\\activate
- Install dependencies
pip install -r requirements.txt
- Place your save file in the project directory (or note its full path)
- Run the editor
# From the project directory
python -m src.xcom_save_editor
- Follow the interactive prompts:
- Select your save file (
.sav
files) - Choose from the main menu options
- Make your desired changes
- Review changes before saving
- The tool will create a backup automatically
- Select your save file (
The editor provides an intuitive menu-driven interface:
π Show Status - View current game state overview
π° Edit Money/Funds - Modify current funds
π¬ Manage Research - Complete research projects
π€ Edit Soldiers/Agents - Modify soldier statistics
ποΈ Manage Facilities - Complete facility construction
βοΈ Manage Production - Complete manufacturing items
π¦ Edit Inventory - Modify base item storage
ποΈ Backup Management - Create/restore backups
πΎ Save Changes - Commit modifications to file
βΊ Reset All Changes - Undo all pending modifications
β Exit - Exit with unsaved changes check
OpenXCom Extended save files (.sav
) are YAML format with two documents:
- Header: Contains save metadata (name, version, mods, etc.)
- Game Data: Contains the actual game state
The editor preserves this structure and only modifies the game data portion.
- Backups are created before any save operation
- Backups are timestamped (format:
SaveName_YYYYMMDD_HHMMSS.bak
) - Stored in a
backups/
subdirectory next to your save file
- All changes are validated before writing to disk
- Basic structure and data type validation
- Reasonable value range checking
- Error prevention for invalid modifications
- Preview changes before committing
- Reset/undo functionality discards all pending changes
- Confirmation prompts for destructive operations
- Automatic detection of multiple bases
- Base selection prompts when needed
- Proper handling of base-specific data (facilities, production, inventory)
This tool is specifically designed for:
- OpenXCom Extended save files
- X-Com Files mod (version 3.8 tested)
- YAML format save files (
.sav
extension)
It may work with other OpenXCom Extended mods, but X-Com Files is the primary target.
"No .sav files found"
- Ensure your save file has a
.sav
extension - Check that you're in the correct directory
- Use the "Browse for file" option to navigate to your save
"Save validation failed"
- The save file may be corrupted
- Try restoring from a backup
- Check if the file is a valid OpenXCom Extended save
"Error loading save file"
- Ensure the file is a valid YAML format
- Check that the file isn't currently open in another program
- Verify the file isn't corrupted
If you encounter issues:
- Check that your save file is from OpenXCom Extended
- Ensure you're using the X-Com Files mod (or compatible mod)
- Try creating a test save and editing that first
- Check file permissions if you get access errors
openxcomeditor/
βββ src/xcom_save_editor/
β βββ __init__.py # Package initialization
β βββ __main__.py # Main entry point
β βββ cli.py # Command line interface
β βββ editor.py # Main editor controller
β βββ game_editors/ # Individual feature managers
β β βββ __init__.py
β β βββ base_manager.py # Common base functionality
β β βββ money_manager.py # Money/funds editing
β β βββ research_manager.py # Research management
β β βββ soldier_manager.py # Soldier stats editing
β β βββ facility_manager.py # Base facility management
β β βββ production_manager.py # Manufacturing management
β β βββ inventory_manager.py # Inventory editing
β βββ utils/ # Utilities
β βββ __init__.py
β βββ file_ops.py # File operations and backup
β βββ validator.py # Save file validation
βββ tests/ # Test files
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ SaveGame.sav # Example save file
# Install test dependencies
pip install pytest
# Run tests
pytest tests/
This project is provided as-is for educational and personal use. Always backup your saves before using any save editing tool.
This tool modifies game save files. While every effort has been made to ensure safety and data integrity:
- Always backup your saves before editing
- Test changes on backup saves first
- The tool is designed for X-Com Files mod specifically
- Compatibility with other mods is not guaranteed
- Use at your own risk
Happy X-Com commanding! π½πΈ