Posted September 23, 2013
Greetings, fellow GOGers. I modified a batch file for managing saved games in Starflight (see the post at http://www.gog.com/forum/starflight/is_there_a_way_to_back_up_starflight_1_in_windows_7/post5). The original batch file was written by forum member Links. A big "thank you" to Links for providing the inspiration to do this file.
Here it is:
@echo off
REM Based on the Starflight 1 Save Manager
REM Written by Links on the GOG.com forums.
REM Starflt.bat file available at
REM http://www.gog.com/forum/starflight/is_there_a_way_to_back_up_starflight_1_in_windows_7/post5
if not exist .\SAVE\nul mkdir .\SAVE
if not exist .\START\nul goto makestart
:mainmenu
cls
echo ============
echo Wizardry 6
echo ============
echo.
echo 1. Resume the game
echo ---
echo 4. Save the current game state
echo 5. Restore a saved game
echo 6. Delete a saved game
echo ---
echo 9. Reset the game
echo ---
echo X. Exit
echo.
choice /c:14569x /n
if errorlevel 6 goto exit
if errorlevel 5 goto reset
if errorlevel 4 goto delsave
if errorlevel 3 goto ressave
if errorlevel 2 goto cursave
if errorlevel 1 goto resume
goto mainmenu
:makestart
mkdir .\START
copy .\*.DBS .\START
goto mainmenu
:resume
wroot.exe
goto mainmenu
:cursave
set savegame=
cls
echo.
echo SAVED GAMES:
echo.
dir .\SAVE\*.*
echo.
echo Which save number do you want to use to store the current game state?
echo.
echo [1...9, or X to abort]
choice /c:123456789x /n
if errorlevel 10 goto mainmenu
if errorlevel 9 set savegame=9
if errorlevel 9 goto dosave
if errorlevel 8 set savegame=8
if errorlevel 8 goto dosave
if errorlevel 7 set savegame=7
if errorlevel 7 goto dosave
if errorlevel 6 set savegame=6
if errorlevel 6 goto dosave
if errorlevel 5 set savegame=5
if errorlevel 5 goto dosave
if errorlevel 4 set savegame=4
if errorlevel 4 goto dosave
if errorlevel 3 set savegame=3
if errorlevel 3 goto dosave
if errorlevel 2 set savegame=2
if errorlevel 2 goto dosave
if errorlevel 1 set savegame=1
if errorlevel 1 goto dosave
if x%savegame%==x goto mainmenu
goto cursave
:dosaveover
echo.
echo Save number %savegame% already exists.
echo.
echo Do you want to overwrite it?
echo.
echo [Y]es or [N]o
choice /c:yn /n
if errorlevel 2 goto cursave
if errorlevel 1 goto dosave2
goto dosaveover
:dosave
if exist .\SAVE\saved%savegame%\savegame.dbs goto dosaveover
goto dosave2
:dosave2
echo.
if exist .\SAVE\saved%savegame%\savegame.dbs del .\SAVE\saved%savegame%\*.*
if not exist .\SAVE\saved%savegame%\nul mkdir .\SAVE\saved%savegame%
copy .\*.dbs .\SAVE\saved%savegame%
echo.
echo Current game state saved to game number %savegame%.
echo.
pause
set savegame=
goto mainmenu
:ressave
set savegame=
cls
echo.
echo SAVED GAMES:
echo.
dir .\SAVE\*.*
echo.
echo Which game do you want to restore?
echo.
echo [1...9, or X to abort]
choice /c:123456789x /n
if errorlevel 10 goto mainmenu
if errorlevel 9 set savegame=9
if errorlevel 9 goto dores
if errorlevel 8 set savegame=8
if errorlevel 8 goto dores
if errorlevel 7 set savegame=7
if errorlevel 7 goto dores
if errorlevel 6 set savegame=6
if errorlevel 6 goto dores
if errorlevel 5 set savegame=5
if errorlevel 5 goto dores
if errorlevel 4 set savegame=4
if errorlevel 4 goto dores
if errorlevel 3 set savegame=3
if errorlevel 3 goto dores
if errorlevel 2 set savegame=2
if errorlevel 2 goto dores
if errorlevel 1 set savegame=1
if errorlevel 1 goto dores
if x%savegame%==x goto mainmenu
:dores
if not exist .\SAVE\saved%savegame%\savegame.dbs goto resnosave
echo.
echo Are you sure you want to restore saved game number %savegame%?
echo (the current game state will be overwritten if you do)
echo.
echo [Y]es or [N]o
choice /c:yn /n
if errorlevel 2 goto ressave
if errorlevel 1 goto dores2
goto ressave
:dores2
echo.
copy .\SAVE\saved%savegame%\*.* .\
echo.
echo Save game number %savegame% restored.
echo.
pause
set savegame=
goto mainmenu
:resnosave
echo.
echo Save number %savegame% does not exist.
echo.
pause
goto ressave
:delsave
set savegame=
cls
echo.
echo SAVED GAMES:
echo.
dir .\SAVE\*.*
echo.
echo Which game do you want to delete?
echo.
echo [1...9, or X to abort]
choice /c:123456789x /n
if errorlevel 10 goto mainmenu
if errorlevel 9 set savegame=9
if errorlevel 9 goto dodel
if errorlevel 8 set savegame=8
if errorlevel 8 goto dodel
if errorlevel 7 set savegame=7
if errorlevel 7 goto dodel
if errorlevel 6 set savegame=6
if errorlevel 6 goto dodel
if errorlevel 5 set savegame=5
if errorlevel 5 goto dodel
if errorlevel 4 set savegame=4
if errorlevel 4 goto dodel
if errorlevel 3 set savegame=3
if errorlevel 3 goto dodel
if errorlevel 2 set savegame=2
if errorlevel 2 goto dodel
if errorlevel 1 set savegame=1
if errorlevel 1 goto dodel
if x%savegame%==x goto mainmenu
:dodel
if not exist .\SAVE\saved%savegame%\savegame.dbs goto delnosave
echo.
echo Are you sure you want to delete saved game number %savegame%?
echo.
echo [Y]es or [N]o
choice /c:yn /n
if errorlevel 2 goto delsave
if errorlevel 1 goto dodel2
goto delsave
:dodel2
echo.
del .\SAVE\saved%savegame%\*.*
rmdir .\SAVE\saved%savegame%
echo.
echo Save game number %savegame% deleted.
echo.
pause
set savegame=
goto mainmenu
:delnosave
echo.
echo Save number %savegame% does not exist
echo.
pause
goto delsave
:reset
cls
echo.
echo Are you sure you want to reset the game?
echo *ANY PROGRESS THAT HAS NOT BEEN BACKED UP WILL BE LOST*
echo (previously saved games will remain)
echo.
echo [Y]es or [N]o
choice /c:ny /n
if errorlevel 2 goto doreset
if errorlevel 1 goto mainmenu
goto mainmenu
:doreset
echo.
copy .\START\*.* .\
if exist .\savegame.dbs del .\savegame.dbs
echo.
echo Game reset.
echo.
pause
goto mainmenu
:exit
cls
echo.
echo Are you sure you want to exit?
echo.
echo [Y]es or [N]o
choice /c:ny /n
if errorlevel 2 goto end
if errorlevel 1 goto mainmenu
goto exit
:end
@echo on
Copy the file into your Wizardry 6 folder (I called it BANE.BAT) and edit the dosboxWizardry6_single.conf file to launch BANE.BAT instead of WROOT.EXE. The batch file will create a SAVE and START folder if none exists and then display the menu. There are 9 save game slots. Technically, the only files needed for a save backup are SAVEGAME.DBS and PCFILE.DBS, but it was easier to just copy *.DBS instead.
Because the reset game function is designed to remake a pristine copy of the game, it works best to do the initial run of the program in a fresh install of Wizardry 6. Please be sure to manually back up your current PCFILE.DBS and SAVEGAME.DBS files before running this in case I missed something. In my limited testing, everything seemed to work fine, but you know how self testing goes... =)
Hope you guys find this useful and thanks again Links for the inspiration.
Flynn
Here it is:
@echo off
REM Based on the Starflight 1 Save Manager
REM Written by Links on the GOG.com forums.
REM Starflt.bat file available at
REM http://www.gog.com/forum/starflight/is_there_a_way_to_back_up_starflight_1_in_windows_7/post5
if not exist .\SAVE\nul mkdir .\SAVE
if not exist .\START\nul goto makestart
:mainmenu
cls
echo ============
echo Wizardry 6
echo ============
echo.
echo 1. Resume the game
echo ---
echo 4. Save the current game state
echo 5. Restore a saved game
echo 6. Delete a saved game
echo ---
echo 9. Reset the game
echo ---
echo X. Exit
echo.
choice /c:14569x /n
if errorlevel 6 goto exit
if errorlevel 5 goto reset
if errorlevel 4 goto delsave
if errorlevel 3 goto ressave
if errorlevel 2 goto cursave
if errorlevel 1 goto resume
goto mainmenu
:makestart
mkdir .\START
copy .\*.DBS .\START
goto mainmenu
:resume
wroot.exe
goto mainmenu
:cursave
set savegame=
cls
echo.
echo SAVED GAMES:
echo.
dir .\SAVE\*.*
echo.
echo Which save number do you want to use to store the current game state?
echo.
echo [1...9, or X to abort]
choice /c:123456789x /n
if errorlevel 10 goto mainmenu
if errorlevel 9 set savegame=9
if errorlevel 9 goto dosave
if errorlevel 8 set savegame=8
if errorlevel 8 goto dosave
if errorlevel 7 set savegame=7
if errorlevel 7 goto dosave
if errorlevel 6 set savegame=6
if errorlevel 6 goto dosave
if errorlevel 5 set savegame=5
if errorlevel 5 goto dosave
if errorlevel 4 set savegame=4
if errorlevel 4 goto dosave
if errorlevel 3 set savegame=3
if errorlevel 3 goto dosave
if errorlevel 2 set savegame=2
if errorlevel 2 goto dosave
if errorlevel 1 set savegame=1
if errorlevel 1 goto dosave
if x%savegame%==x goto mainmenu
goto cursave
:dosaveover
echo.
echo Save number %savegame% already exists.
echo.
echo Do you want to overwrite it?
echo.
echo [Y]es or [N]o
choice /c:yn /n
if errorlevel 2 goto cursave
if errorlevel 1 goto dosave2
goto dosaveover
:dosave
if exist .\SAVE\saved%savegame%\savegame.dbs goto dosaveover
goto dosave2
:dosave2
echo.
if exist .\SAVE\saved%savegame%\savegame.dbs del .\SAVE\saved%savegame%\*.*
if not exist .\SAVE\saved%savegame%\nul mkdir .\SAVE\saved%savegame%
copy .\*.dbs .\SAVE\saved%savegame%
echo.
echo Current game state saved to game number %savegame%.
echo.
pause
set savegame=
goto mainmenu
:ressave
set savegame=
cls
echo.
echo SAVED GAMES:
echo.
dir .\SAVE\*.*
echo.
echo Which game do you want to restore?
echo.
echo [1...9, or X to abort]
choice /c:123456789x /n
if errorlevel 10 goto mainmenu
if errorlevel 9 set savegame=9
if errorlevel 9 goto dores
if errorlevel 8 set savegame=8
if errorlevel 8 goto dores
if errorlevel 7 set savegame=7
if errorlevel 7 goto dores
if errorlevel 6 set savegame=6
if errorlevel 6 goto dores
if errorlevel 5 set savegame=5
if errorlevel 5 goto dores
if errorlevel 4 set savegame=4
if errorlevel 4 goto dores
if errorlevel 3 set savegame=3
if errorlevel 3 goto dores
if errorlevel 2 set savegame=2
if errorlevel 2 goto dores
if errorlevel 1 set savegame=1
if errorlevel 1 goto dores
if x%savegame%==x goto mainmenu
:dores
if not exist .\SAVE\saved%savegame%\savegame.dbs goto resnosave
echo.
echo Are you sure you want to restore saved game number %savegame%?
echo (the current game state will be overwritten if you do)
echo.
echo [Y]es or [N]o
choice /c:yn /n
if errorlevel 2 goto ressave
if errorlevel 1 goto dores2
goto ressave
:dores2
echo.
copy .\SAVE\saved%savegame%\*.* .\
echo.
echo Save game number %savegame% restored.
echo.
pause
set savegame=
goto mainmenu
:resnosave
echo.
echo Save number %savegame% does not exist.
echo.
pause
goto ressave
:delsave
set savegame=
cls
echo.
echo SAVED GAMES:
echo.
dir .\SAVE\*.*
echo.
echo Which game do you want to delete?
echo.
echo [1...9, or X to abort]
choice /c:123456789x /n
if errorlevel 10 goto mainmenu
if errorlevel 9 set savegame=9
if errorlevel 9 goto dodel
if errorlevel 8 set savegame=8
if errorlevel 8 goto dodel
if errorlevel 7 set savegame=7
if errorlevel 7 goto dodel
if errorlevel 6 set savegame=6
if errorlevel 6 goto dodel
if errorlevel 5 set savegame=5
if errorlevel 5 goto dodel
if errorlevel 4 set savegame=4
if errorlevel 4 goto dodel
if errorlevel 3 set savegame=3
if errorlevel 3 goto dodel
if errorlevel 2 set savegame=2
if errorlevel 2 goto dodel
if errorlevel 1 set savegame=1
if errorlevel 1 goto dodel
if x%savegame%==x goto mainmenu
:dodel
if not exist .\SAVE\saved%savegame%\savegame.dbs goto delnosave
echo.
echo Are you sure you want to delete saved game number %savegame%?
echo.
echo [Y]es or [N]o
choice /c:yn /n
if errorlevel 2 goto delsave
if errorlevel 1 goto dodel2
goto delsave
:dodel2
echo.
del .\SAVE\saved%savegame%\*.*
rmdir .\SAVE\saved%savegame%
echo.
echo Save game number %savegame% deleted.
echo.
pause
set savegame=
goto mainmenu
:delnosave
echo.
echo Save number %savegame% does not exist
echo.
pause
goto delsave
:reset
cls
echo.
echo Are you sure you want to reset the game?
echo *ANY PROGRESS THAT HAS NOT BEEN BACKED UP WILL BE LOST*
echo (previously saved games will remain)
echo.
echo [Y]es or [N]o
choice /c:ny /n
if errorlevel 2 goto doreset
if errorlevel 1 goto mainmenu
goto mainmenu
:doreset
echo.
copy .\START\*.* .\
if exist .\savegame.dbs del .\savegame.dbs
echo.
echo Game reset.
echo.
pause
goto mainmenu
:exit
cls
echo.
echo Are you sure you want to exit?
echo.
echo [Y]es or [N]o
choice /c:ny /n
if errorlevel 2 goto end
if errorlevel 1 goto mainmenu
goto exit
:end
@echo on
Copy the file into your Wizardry 6 folder (I called it BANE.BAT) and edit the dosboxWizardry6_single.conf file to launch BANE.BAT instead of WROOT.EXE. The batch file will create a SAVE and START folder if none exists and then display the menu. There are 9 save game slots. Technically, the only files needed for a save backup are SAVEGAME.DBS and PCFILE.DBS, but it was easier to just copy *.DBS instead.
Because the reset game function is designed to remake a pristine copy of the game, it works best to do the initial run of the program in a fresh install of Wizardry 6. Please be sure to manually back up your current PCFILE.DBS and SAVEGAME.DBS files before running this in case I missed something. In my limited testing, everything seemed to work fine, but you know how self testing goes... =)
Hope you guys find this useful and thanks again Links for the inspiration.
Flynn
Post edited September 23, 2013 by FlynnArrowstarr