Automated Save Game Backup
Intro
If you have like me run into a save game corruption issue - you've most likely experienced the horro of losing hours of progress by having to start the game all over again.
No longer.
This is just a Quick guide on how to set up a powershell script that does 2 things:
- Runs the game.
- remains active while the game is running - periodically backing up the save file to a specified location.
The script will exit after the game closes automatically.
The Script
<#
Dragon's Dogma Save Backup Script v 1.0
Author: Monkinsane
#>
# Set Paths
$SAVE = "H:\Games\Steam\userdata\29035150\367500\remote\DDDA.sav"
$PROCESSNAME = "ddda"
$GAMEEXE = "E:\SteamLibrary\steamapps\common\DDDA\DDDA.exe"
$GAMEPATH = "E:\SteamLibrary\steamapps\common\DDDA"
[int]$SAVEINCREMENT = 600
[int]$COUNT = 0
# Launch Game
Start-Process -FilePath "$GAMEEXE" -WorkingDirectory "$GAMEPATH"
Start-Sleep -Seconds 5
Do {
# Check if game is still running
$PROCESS = (Get-Process -Name $PROCESSNAME -ErrorAction SilentlyContinue)
# Set Backup Location & Filename
$FILEDATESTAMP = (Get-Date -Format "yyyy-MM-dd_HH-mm")
$BACKUP = "J:\SaveBackups\Dragons Dogma\DDDA-$FILEDATESTAMP.sav"
# Backup Save
Write-Output " "
Write-Output "Backing up Save..."
Write-Output " "
Copy-Item $SAVE -Destination $BACKUP
if ($PROCESS -ne $null) {
do {
$PROCESS = (Get-Process -Name $PROCESSNAME -ErrorAction SilentlyContinue)
sleep 1
$COUNT = $COUNT + 1
} while (($PROCESS -ne $null) -and ($COUNT -ne $SAVEINCREMENT))
[int]$COUNT = 0
}
} while ($PROCESS -ne $null)
Exit 0
Instructions for Script
- Open Powershell ISE (Search on Start) and paste script into new file.
- Set $SAVE variable to Save file location.
- Set $GAMEEXE to Game EXE path & $GAMEPATH to Root folder of game installation.
- Set $SAVEINCREMENT to how often you would like it to backup your saves (in seconds - 600 for 10 minutes - for example)
- Create Folder where u want saves backed up.
- Set $BACKUP to path created above - keep the \DDDA-$FILEDATESTAMP.sav though.
- Save script and run it to launch game as well as backup saves.
Conclusion
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.