Written by Mithrandir
Friday, 05 February 2010 12:39
Tool to automatically make backups of your quest-files everytime you save in queditor.
I made a tool that easily makes backups of your .qst-files everytime when you save your quest in the editor. Therefore you have to download the ZIP-File and unzip it in your Darkstone Install-Folder (where the Darkstone.exe and the QuestEdit.exe are). There should be a JAR-File and a CMD-File. From now on always start the CMD-File (it will launch the QuestEditor as a seperate Process), never the EXE-File itself. By default the Backups will be saved in the Folder ./QUEST/BAK.
An Example: You are developing a quest called "MyQuest" - so the Quest-Editor stores the data in the file MyQuest.qst. Now using this tool everytime you hit the save-button any change is recognized and a backup of your file is made in the Backup-Folder. The latest Backup has the same name as the Quest-File and the older Backups hava a number on the end. So if you'd like to store five Backups of your quest the Backup-Folder will list following:
MyQuest.qst (newest/actual file)
MyQuest.qst.1 (newest backup)
MyQuest.qst.2 (next oldest backup)
MyQuest.qst.3 (next oldest backup)
MyQuest.qst.4 (next oldest backup)
MyQuest.qst.5 (oldest backup)
There will pop up a Command-Shell when you start the Tool - NEVER close this Shell. It'll be closed automatically when the Quest-Editor is closed. On this Shell you can see every time Backup-Copy that is made a line like following:
"File has been modified!"
Requirements for this Tool
You must have installed a JRE (Java Runtime Environment) - get it here. To test if you've already installed Java simply open a Command-Shell and type in "java". If the Command is not known there is no Java installed on your PC.
Customizing the CMD-File
You can customize the CMD-File by altering the Commandline-Arguments:
-dir="./quest" (if you want to scan more directories: -dir="./quest|./anotherdirectory")
In this folder your quest-files are stored
-backupdir="./quest/bak" (if you have more than one source-directory you'll also need another backup-directory: -backupdir="./quest/bak|./anotherbackupdirectory")
In this folder your backups will be stored
-extension=".qst" (if you want to store other filetypes as well: -extension=".qst|.mtf|.txt" or all files: -extension="*")
All files of this type will be backuped (and no other files)
The Tool checks for changes/alterings (ist this the right word) every 2000 millis (that is two seconds, maybe you can set this higher)
There will be five backups of each file (you can change this to any number you want)
This is the Executable of the QuestEditor (it shouldn't be altered because it has to be in the Darkstone-Directory)
This version is tested by myself but you should make make backups of all your files before using it (don't get angry if something works wrong). I would appreciate any feedback, of course.