![]() |
Dom3Bak | Turn Autobackup UPDATED
1 Attachment(s)
--------------- UPDATED 1 August 2008 ---------------
Completely new version (Version 0.90). Now with am easy to use GUI (Graphic User Interface) as shown in the screenshot below. The file is 5Mb. Dom3Bak is a Backup Utility that automatically takes a backup at the start of each turn that can easily be restored later. You can restore the game back to any turn. This was built so players could try replaying a situation over again to learn the ropes. I agree with the general consensus that if the game is too easy to restore it will change its character, but there are times, for example when you are learning a new race or want to try something specific, that having a restore option would be helpful. This is a Windows only application but the source files in the post below may run on other systems. This is still to be considered Beta because I'm the only tester at this stage. It works on my system but that doesn't mean it will work on yours. This is not a supported product etc so changes will only be made when time permits. Please feel free to use it as is. Usual disclaimer stuff here about I won't take responsibility for problems etc. --------------------------------------------------------------- Screenshot http://i295.photobucket.com/albums/m...bak_screen.gif --------------------------------------------------------------- Attachments The attachment to this post is a Windows installer of around 5Mb. It is self contained so you don't need Python or the extra Python modules for it to work. Just open the zip file and run the application. It will automatically install onto your computer and place a shortcut on your desktop. It will install into C:\Program Files\dominions3\Dom3Bak. My second post in this thread will also have an attachment which is just the source files. This is a zip file of about 10kb (heaps smaller). This is for those of you who have Python installed and want more manual control over its implementation, or for anyone who wants to fiddle about with the code. This uses a couple of non-standard Python modules such as PyWin32 so you will need to get those as well if you just install the source files. --------------------------------------------------------------- Using Dom3Bak To start using Dom3Bak, just run from the desktop or use the Start menu. The Dom3Bak window should open. Click 'Start' to start monitoring the savegame directory of Dominions. Open Dominions and start playing turns. As each turn is played Dom3Bak will back them up for you. Best to double check after you have saved a turn that the Dom3Bak is giving back meaningful information in its log window. --------------------------------------------------------------- Restoring Backups Make sure you are not currently playing the game in Dominions 3. From Dom3Bak, just choose the game from the dropdown list. This will display the list of turns for that game. Then select the turn you want to restore. If you have removed a game and want to completely restore it, choose the 'Game Setup' file first as this contains all the files. The turn backups only contain the turn files. Then click on 'Restore' to restore the turn. If you want to completely remove the game backup, use the 'Delete game and all turns' button. This will just remove the game you have selected in the game list. It is really very easy to use now. Hope you enjoy it. http://forum.shrapnelgames.com/images/smilies/happy.gif --------------------------------------------------------------- Acknowledgements It was informative to see how code situations were handled by both WraithLord and LolliPop so thank you. --------------------------------------------------------------- ---------------------ORIGINAL POST FOLLOWS------------------------ The other day I decided to try and learn Python programming language and usually when I start with something new I also like to have a specific project. Anyhow, to cut to the chase I decided that the target project would be to build a small backup utility for my single player Dominions games. I know that there is already a turn backup utility that has been built in Python a couple of years ago, but I think this one is a little different. At the moment, all my script does is: 1. Watches the savedgames directory for any changes in a .trn file. This file changes when the new turn is generated. 2. Creates a zip file named using the current time code (I want to change this to the current turn at some point) and places the .2h, .trn and ftherlnd files inside. The zip file is saved in a new directory. The configuration settings are just in a config text file so can easily be amended if the savegame folder is in a different location. The utility just keeps on backing up each turn as it is played and you're not even aware of it until you look in the backup directory. If you decide to replay a turn you need to close Dominions; open the zip file; extract the contents back into the savegame directory; restart Dominions and play the saved game. At the moment it does what I want it to do but I was wondering if anyone else would be interested in it as well. I've still got a heap of work I want to do with it as a project but as a rough and ready script it may help some of you. Down the track I want to make a user interface for it so that the backups can be restored more easily but I'm just taking baby steps with it as I learn the language. If there is interest I'll clean it up and make it available. http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Automatic Turn Backup
I'm interested. I didn't like the other backup utility. From what you describe I do that manually when I want to save a game at a vital point.
|
Dom3Bak Source Files
1 Attachment(s)
I Hijacked this post to place the source files for Dom3Bak if anyone would prefer to have the original Python code.
Please feel free to tweak it etc. Updated 1 August 2008. Source code for version 0.90 -------------ORIGINAL POST FOLLOWS------------------------ My script doesn't allow you save manually if that is what you mean. If the script is running the backup process is completely automatic. As you play each turn it saves the start of each turns information. So you can wind back to any turn in the game - but only to the start of the turn. For example, if you start a turn and then spend a lot of time scripting your troops etc. All that will be lost if you use the backup to start the turn again. Anyhow, I'll keep on mucking around with it and get it a bit cleaner. |
Re: Automatic Turn Backup
In case you didn't know, you can find what turn the game's on by running "dom3 --verify GameName" and then looking at the ftherlnd.chk file which gets created in the game's folder.
|
Re: Automatic Turn Backup
There is a desktop shortcut for windows that does it manually if you wanted manually.
http://www.dom3minions.com/utilities.htm |
Re: Automatic Turn Backup
Thanks Llamabeast http://forum.shrapnelgames.com/images/smilies/happy.gif
I had been looking at the files with a hex editor and noticed that the 13th and 14th byte pair also represent the turn but it was a pain trying to use it. Eventually I found the --verify line and have currently broken my version in my attempt to read the .chk version. Ahh, the joys of a new language when you have no idea what you're doing. http://forum.shrapnelgames.com/images/smilies/wink.gif I was going to look at it again today to try and see where it is failing. |
Re: Automatic Turn Backup
I've attached two sets of files. In my original post is an installer which intalls the script along with the required Python modules. This is the easiest way to install the backup. The hardest part of this method is navigating to C:\Program Files\dominions3\Dom3Bak and then double clicking Dom3Bak.exe.
In my second post are the source files. They consist of the Python script, a config file, and a read me file. It works for me but I'm making no promises. Please let me know how you go with it and if anyone makes any changes or has suggestions, please share them. |
Re: Automatic Turn Backup
MAJOR UPDATE!!!
I've updated the attachments and description in the first post to the latest version (version 0.90). This is very easy to install and to use (see the screen shot). It is a vast, vast improvement on the last version so please replace if you downloaded the last one. Please give me feedback so I can improve future versions. Hope you like it. http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Dom3Bak | Turn Autobackup UPDATED
Seem dont work with windows 7.It said :
ImportError: MemoryLoadLibrary failed loading wx\_core_.pyd And it seem to me the utility dont nedd the player to quit the game to restore the save file.Sometimes i just restore the save file and click "quit without saving" then load the game again. |
Re: Dom3Bak | Turn Autobackup UPDATED
das123 hasn't posted on the forums since March, he's unlikely to still be around..... possible, but unlikely.
|
All times are GMT -4. The time now is 10:48 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.