.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

Reply
 
Thread Tools Display Modes
  #1  
Old July 18th, 2008, 11:01 PM

das123 das123 is offline
Corporal
 
Join Date: Mar 2003
Location: Australia
Posts: 109
Thanks: 2
Thanked 20 Times in 11 Posts
das123 is on a distinguished road
Default Dom3Bak | Turn Autobackup UPDATED

--------------- 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



---------------------------------------------------------------

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.

---------------------------------------------------------------

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.
Attached Files
File Type: zip 626002-Dom3Bak_Setup.zip (5.04 MB, 526 views)
__________________
Want to auto back-up each turn?...Dom3Bak

Last edited by lch; August 25th, 2008 at 06:30 PM..
Reply With Quote
The Following 7 Users Say Thank You to das123 For This Useful Post:
  #2  
Old July 19th, 2008, 01:25 AM

Morrolan Morrolan is offline
Private
 
Join Date: Mar 2004
Location: Australia
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Morrolan is on a distinguished road
Default 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.
Reply With Quote
  #3  
Old July 19th, 2008, 01:48 AM

das123 das123 is offline
Corporal
 
Join Date: Mar 2003
Location: Australia
Posts: 109
Thanks: 2
Thanked 20 Times in 11 Posts
das123 is on a distinguished road
Default Dom3Bak Source Files

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.
Attached Files
File Type: zip 626047-Dom3Bak_Source.zip (8.2 KB, 279 views)
__________________
Want to auto back-up each turn?...Dom3Bak
Reply With Quote
The Following 3 Users Say Thank You to das123 For This Useful Post:
  #4  
Old July 19th, 2008, 11:14 AM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default 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.
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #5  
Old July 19th, 2008, 12:43 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default 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
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)

Last edited by Gandalf Parker; December 17th, 2008 at 11:35 AM..
Reply With Quote
  #6  
Old July 19th, 2008, 04:50 PM

das123 das123 is offline
Corporal
 
Join Date: Mar 2003
Location: Australia
Posts: 109
Thanks: 2
Thanked 20 Times in 11 Posts
das123 is on a distinguished road
Default Re: Automatic Turn Backup

Thanks Llamabeast

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.

I was going to look at it again today to try and see where it is failing.
__________________
Want to auto back-up each turn?...Dom3Bak
Reply With Quote
  #7  
Old July 19th, 2008, 08:34 PM

das123 das123 is offline
Corporal
 
Join Date: Mar 2003
Location: Australia
Posts: 109
Thanks: 2
Thanked 20 Times in 11 Posts
das123 is on a distinguished road
Default 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.
__________________
Want to auto back-up each turn?...Dom3Bak
Reply With Quote
  #8  
Old August 1st, 2008, 05:48 AM

das123 das123 is offline
Corporal
 
Join Date: Mar 2003
Location: Australia
Posts: 109
Thanks: 2
Thanked 20 Times in 11 Posts
das123 is on a distinguished road
Default 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.
__________________
Want to auto back-up each turn?...Dom3Bak
Reply With Quote
  #9  
Old August 30th, 2009, 04:16 AM

swapoer swapoer is offline
Private
 
Join Date: Jan 2008
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
swapoer is on a distinguished road
Default 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.
Reply With Quote
  #10  
Old August 30th, 2009, 12:28 PM
NTJedi's Avatar

NTJedi NTJedi is offline
General
 
Join Date: Jun 2003
Location: az
Posts: 3,069
Thanks: 41
Thanked 39 Times in 28 Posts
NTJedi is on a distinguished road
Default Re: Dom3Bak | Turn Autobackup UPDATED

das123 hasn't posted on the forums since March, he's unlikely to still be around..... possible, but unlikely.
__________________
There can be only one.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.