Skip to content

๐ŸŽฎ Automatically sync your Satisfactory blueprints across all devices using OneDrive. Features bidirectional sync, version history, conflict resolution, and multi-device support. Runs every 10 minutes in the background with no window popups.

License

Notifications You must be signed in to change notification settings

dkmaker/Satisfactory-Sync-OneDrive

Repository files navigation

Satisfactory Blueprint Sync for OneDrive

PowerShell Windows Satisfactory License

Automated bidirectional synchronization of Satisfactory blueprints with OneDrive, featuring version history, conflict resolution, and multi-device support.

๐ŸŽฎ Game: Satisfactory by Coffee Stain Studios

Problem Solved

Satisfactory blueprints are not synchronized to Steam Cloud. This solution:

  • Bidirectional sync between local Satisfactory folder and OneDrive
  • Version history with up to 10 versions per file stored in backups
  • Conflict resolution by keeping the newest file based on timestamps
  • Multi-device support with file-centric tracking and global file state
  • Enhanced deletion handling with immediate OneDrive cleanup and cross-device propagation
  • Smart backup for all conflicts, overwrites, and deletions with comprehensive coverage
  • Companion file coordination - .sbp and .sbpcfg files handled together
  • Automatic OneDrive pinning to ensure files are always available offline

Features

  • Bidirectional Sync Modes:

    • Bidirectional (default): Syncs in both directions
    • LocalToCloud: Only pushes local changes to OneDrive
    • CloudToLocal: Only pulls OneDrive changes to local
  • Version History: Tracks up to 10 versions of each file with:

    • Hash, timestamp, size, and device information
    • Backup location for recovery
    • Action type (overwrite, deletion, conflict)
  • Intelligent Conflict Resolution:

    • Compares file timestamps when both changed
    • Backs up the losing version before overwrite
    • Preserves all file timestamps during copy operations
    • Clear conflict logging with backup tracking
  • OneDrive Integration:

    • Automatically pins folder for offline availability
    • Checks pin status before setting to minimize overhead
    • Optional flag to skip pinning if needed
  • Comprehensive Logging: Detailed sync operations log for troubleshooting

๐Ÿš€ Quick Start

Prerequisites

  • Windows 10/11
  • Windows PowerShell 5.1 (built into Windows 10/11)
  • OneDrive configured and running
  • Administrator privileges (for scheduled task installation)
  • Satisfactory installed

Installation

  1. Clone or download this repository

    git clone https://github.com/dkmaker/Satisfactory-Sync-OneDrive.git
    cd Satisfactory-Sync-OneDrive
  2. Run the installer as Administrator

    # Open Windows PowerShell as Administrator
    # Set execution policy for current process (if needed)
    Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
    
    # Run the installer
    .\Install-SyncScheduledTask.ps1
  3. That's it! The sync will run automatically:

    • At user logon
    • Every 10 minutes throughout the day
    • Logs available at %OneDrive%\Documents\Satisfactory\logs

File Structure

OneDrive\Documents\Satisfactory\
โ”œโ”€โ”€ metadata.json                   # Sync state and device tracking
โ”œโ”€โ”€ blueprints\                     # Synced blueprints
โ”‚   โ””โ”€โ”€ [Save Game Name]\           # Folder per save game
โ”‚       โ”œโ”€โ”€ Blueprint1.sbp          # Blueprint data
โ”‚       โ””โ”€โ”€ Blueprint1.sbpcfg       # Blueprint config
โ”œโ”€โ”€ blueprints_backup\               # Deleted file backups
โ”‚   โ””โ”€โ”€ [yyyyMMddHHmmss]\           # Timestamp folders
โ”‚       โ””โ”€โ”€ [Save Game Name]\       # Original structure preserved
โ””โ”€โ”€ logs\                           # Sync logs
    โ””โ”€โ”€ sync_[yyyyMMdd].log        # Daily log files

How It Works

  1. Source Locations:

    • Local: %LocalAppData%\FactoryGame\Saved\SaveGames\blueprints\
    • Cloud: %OneDrive%\Documents\Satisfactory\blueprints\
  2. Bidirectional Sync Process:

    • Scans both local and OneDrive folders
    • Compares files using SHA256 hashes
    • For conflicts (both changed): keeps newest based on LastWriteTime
    • Backs up older versions before overwriting
    • Preserves original file timestamps during all copy operations
  3. Version History:

    • Maintains up to 10 versions per file (configurable)
    • Each version includes hash, timestamp, device, and backup location
    • Older versions automatically pruned (FIFO)
  4. Enhanced Deletion Handling:

    • Detects deletions by comparing device's previous file list vs current scan
    • Immediately removes deleted files from OneDrive with backup
    • Handles companion files (.sbp/.sbpcfg) together during deletion
    • Cross-device deletion propagation ensures consistency
    • Supports file re-creation with same name (fresh lifecycle)
    • All backups stored in blueprints_backup/[timestamp]/ folders

Metadata Structure

{
  "version": "2.0",
  "lastUpdated": "2025-01-24T10:00:00Z",
  "files": {
    "First Factory/Blueprint1.sbp": {
      "fileId": "uuid-1234-5678-9abc",
      "globalStatus": "active",
      "deletedBy": null,
      "deletedTimestamp": null,
      "lastKnownHash": "SHA256...",
      "devices": {
        "DESKTOP-ABC123": {
          "status": "active",
          "hash": "SHA256...",
          "lastModified": "2025-01-24T10:00:00Z",
          "lastSeen": "2025-01-24T10:00:00Z"
        }
      },
      "versions": [
        {
          "hash": "SHA256...",
          "timestamp": "2025-01-24T10:00:00Z",
          "device": "DESKTOP-ABC123",
          "action": "create"
        }
      ]
    }
  },
  "devices": {
    "DESKTOP-ABC123": {
      "lastSync": "2025-01-24T10:00:00Z",
      "lastKnownFiles": {
        "First Factory/Blueprint1.sbp": "SHA256..."
      }
    }
  }
}

Management Commands

# View task status
Get-ScheduledTask -TaskName 'SatisfactoryBlueprintSync' | Get-ScheduledTaskInfo

# Run sync manually
Start-ScheduledTask -TaskName 'SatisfactoryBlueprintSync'

# Disable sync temporarily
Disable-ScheduledTask -TaskName 'SatisfactoryBlueprintSync'

# Re-enable sync
Enable-ScheduledTask -TaskName 'SatisfactoryBlueprintSync'

# Uninstall scheduled task
Unregister-ScheduledTask -TaskName 'SatisfactoryBlueprintSync' -Confirm:$false

Manual Sync

To run the sync manually without the scheduled task:

# Default bidirectional sync
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\SatisfactorySync\Sync-SatisfactoryBlueprints.ps1"

# Push only (local to cloud)
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\SatisfactorySync\Sync-SatisfactoryBlueprints.ps1" -SyncMode LocalToCloud

# Pull only (cloud to local)
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\SatisfactorySync\Sync-SatisfactoryBlueprints.ps1" -SyncMode CloudToLocal

# Skip OneDrive pinning
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\SatisfactorySync\Sync-SatisfactoryBlueprints.ps1" -SkipOneDrivePinning

# Custom version history limit (default is 10)
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\SatisfactorySync\Sync-SatisfactoryBlueprints.ps1" -MaxVersionHistory 20

# Or use the VBScript wrapper for silent execution
wscript.exe "C:\Scripts\SatisfactorySync\Sync-SatisfactoryBlueprints.vbs"

Troubleshooting

Sync not running

  1. Check task status: Get-ScheduledTask -TaskName 'SatisfactoryBlueprintSync'
  2. Review logs at: $env:OneDrive\Documents\Satisfactory\logs\
  3. Verify Windows PowerShell is available: powershell.exe -Command "Get-Host"

Files not syncing

  1. Check source folder exists: %LocalAppData%\FactoryGame\Saved\SaveGames\blueprints\
  2. Ensure OneDrive is running and syncing
  3. Review metadata.json for device entries
  4. Check file permissions on both source and destination

Deleted files reappearing

  • This is prevented by the metadata tracking system
  • Check metadata.json to ensure your device is properly registered
  • Files are moved to blueprints_backup with timestamps, not deleted

๐ŸŽฎ Game Information

๐Ÿ“ Notes

  • Blueprints require the Mark 1 Blueprint Designer to be unlocked in-game
  • Each blueprint consists of two files: .sbp (data) and .sbpcfg (config)
  • Save game folders are created automatically as needed
  • Empty folders are cleaned up automatically
  • The scheduled task uses Interactive logon with VBScript wrapper for completely silent execution

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Coffee Stain Studios for creating Satisfactory
  • The Satisfactory community for blueprint sharing inspiration
  • Microsoft for PowerShell and OneDrive integration

โš ๏ธ Disclaimer

This tool is not affiliated with, endorsed by, or connected to Coffee Stain Studios or Satisfactory. Satisfactory is a trademark of Coffee Stain Studios AB.

About

๐ŸŽฎ Automatically sync your Satisfactory blueprints across all devices using OneDrive. Features bidirectional sync, version history, conflict resolution, and multi-device support. Runs every 10 minutes in the background with no window popups.

Topics

Resources

License

Stars

Watchers

Forks