Post by Belix on Dec 29, 2011 2:38:30 GMT -5
Hello,
I wrote a simple batch file script that creates automatic backups of my Sacred saved games and characters each time it is run. I read a few messages where players had characters or saves corrupted. In particular there seemed to be a nasty glitch in the current version with Gladiators, Seraphim and Daemon characters where the characters could become permanently 'stuck' and unable to pick up items or use combat arts no matter restarting the game, exporting the character etc. and the only solution was to restart the character.
There is a saying, "Data you have one copy of is data you don't care about." I've lost things over the years to faulty saves in other games, so as a general habit I like to take precautions. "Better safe than sorry!"
I thought perhaps someone out there somewhere without the knowledge to make such a thing themselves might like to use it, so I'm going to share it here.
It is very simple. When run, it checks in your 'save' folder in your Sacred installation to see if any .pak (save game) or .pax (exported characters) exist. If they do, they are copied into a "Backup" subfolder (which is created if it doesn't exist), and inside are nine Backup folders numbered 1 through 9. The most recent backup is put in 1; older backups are kept in order from newest to oldest between 2 to 9.
Once finished, it will start Sacred for you. You can change that behavior if you wish (see further below). This is done so that you can set your Sacred shortcut to the batch file and can be used to back up your characters every time you start the game with nothing more than a single extra key press on your part each time.
To use this, copy and paste the code into an empty text file and save it as a .bat file instead of .txt. Name it something meaningful to you, like "BackupAndPlay.bat" and then place the newly created file in your Sacred directory. If the file is not in the Sacred directory, it will inform you so.
To restore a backup, simply copy the files inside the backup of your choice (Backup1 being the latest) into the save folder. I strongly advise that you copy the existing saves/characters there first to a temporary location just in case you change your mind. If you don't, they will be overwritten by the backup you are restoring and could be permanently lost. Only overwrite your latest characters and saves if you are absolutely sure you won't want them again!
I hope that someone finds this useful. It works on Windows XP, Windows Vista and Windows 7.
p.s. If you don't want it to start Sacred for you, simply delete the @start Sacred.exe line at the very end. And if you don't want the backup routine to wait for you to press a key before it starts the game (or exits if you removed the line I just pointed out), just delete the line of code one line above the aforementioned one, which reads @pause
I wrote a simple batch file script that creates automatic backups of my Sacred saved games and characters each time it is run. I read a few messages where players had characters or saves corrupted. In particular there seemed to be a nasty glitch in the current version with Gladiators, Seraphim and Daemon characters where the characters could become permanently 'stuck' and unable to pick up items or use combat arts no matter restarting the game, exporting the character etc. and the only solution was to restart the character.
There is a saying, "Data you have one copy of is data you don't care about." I've lost things over the years to faulty saves in other games, so as a general habit I like to take precautions. "Better safe than sorry!"
I thought perhaps someone out there somewhere without the knowledge to make such a thing themselves might like to use it, so I'm going to share it here.
It is very simple. When run, it checks in your 'save' folder in your Sacred installation to see if any .pak (save game) or .pax (exported characters) exist. If they do, they are copied into a "Backup" subfolder (which is created if it doesn't exist), and inside are nine Backup folders numbered 1 through 9. The most recent backup is put in 1; older backups are kept in order from newest to oldest between 2 to 9.
Once finished, it will start Sacred for you. You can change that behavior if you wish (see further below). This is done so that you can set your Sacred shortcut to the batch file and can be used to back up your characters every time you start the game with nothing more than a single extra key press on your part each time.
@ECHO OFF
ECHO SACRED Automatic Character and Save Game Backup
ECHO ===============================================
IF NOT EXIST Sacred.exe CD ..
IF NOT EXIST Sacred.exe @ECHO Sacred not found, backup aborted.
IF NOT EXIST Sacred.exe @ECHO Please check that this file is located in your Sacred folder.
IF NOT EXIST Sacred.exe @PAUSE
IF NOT EXIST Sacred.exe @EXIT
IF NOT EXIST save\*.pax IF NOT EXIST save\*.pak @ECHO No saves or exported characters found.
IF NOT EXIST save\*.pax IF NOT EXIST save\*.pak @PAUSE
IF NOT EXIST save\*.pax IF NOT EXIST save\*.pak @START Sacred.exe
IF NOT EXIST save\*.pax IF NOT EXIST save\*.pak @EXIT
CD save
REM Checking backup folders....
IF NOT EXIST Backup MKDIR Backup
CD Backup
IF NOT EXIST Backup1 MKDIR Backup1
IF NOT EXIST Backup2 MKDIR Backup2
IF NOT EXIST Backup3 MKDIR Backup3
IF NOT EXIST Backup4 MKDIR Backup4
IF NOT EXIST Backup5 MKDIR Backup5
IF NOT EXIST Backup6 MKDIR Backup6
IF NOT EXIST Backup7 MKDIR Backup7
IF NOT EXIST Backup8 MKDIR Backup8
IF NOT EXIST Backup9 MKDIR Backup9
REM Moving redundant backups...
CD Backup9
IF EXIST *.pax del *.pax
IF EXIST *.pak del *.pak
CD ..
REN Backup9 Backup0
REN Backup8 Backup9
REN Backup7 Backup8
REN Backup6 Backup7
REN Backup5 Backup6
REN Backup4 Backup5
REN Backup3 Backup4
REN Backup2 Backup3
REN Backup1 Backup2
REN Backup0 Backup1
CD ..\..
ECHO Backing up your characters...
IF EXIST save\*.pax COPY save\*.pax save\Backup\Backup1
IF NOT EXIST save\*.pax @ECHO You have no exported characters.
ECHO Backing up your saved games...
IF EXIST save\*.pak COPY save\*.pak save\Backup\Backup1
IF NOT EXIST save\*.pak @ECHO You have no saved games.
ECHO Finished!
PAUSE
START Sacred.exe
EXIT
To use this, copy and paste the code into an empty text file and save it as a .bat file instead of .txt. Name it something meaningful to you, like "BackupAndPlay.bat" and then place the newly created file in your Sacred directory. If the file is not in the Sacred directory, it will inform you so.
To restore a backup, simply copy the files inside the backup of your choice (Backup1 being the latest) into the save folder. I strongly advise that you copy the existing saves/characters there first to a temporary location just in case you change your mind. If you don't, they will be overwritten by the backup you are restoring and could be permanently lost. Only overwrite your latest characters and saves if you are absolutely sure you won't want them again!
I hope that someone finds this useful. It works on Windows XP, Windows Vista and Windows 7.
p.s. If you don't want it to start Sacred for you, simply delete the @start Sacred.exe line at the very end. And if you don't want the backup routine to wait for you to press a key before it starts the game (or exits if you removed the line I just pointed out), just delete the line of code one line above the aforementioned one, which reads @pause