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

This Month's Specials

Air Command 3.0- Save $12.00
War Plan Pacific- Save $7.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old November 4th, 2006, 04:10 AM

Lollipop Lollipop is offline
Private
 
Join Date: Sep 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Lollipop is on a distinguished road
Default Re: Automatic backup of turn files

Quote:
PDF said:
Many thanks Lolly (can I call you that ? ) !
By way of an exception, cause you was brave enough to try my script

Quote:
Only small problem is that if Dom3 runs in fullscreen mode it's automatically minimized when executing the script... I suppose it's a Windowze thingie
Yes, it is. I doubt there's a way around


Quote:
Would it be easy to not only backup the last turn but also make a file history, I mean having subdirs with each turn's saves ? I know the game doesn't pass the turn numbers, so the utility should assume the player uses it by turn 1..
Just an idea, but it'll be cool
The script already does it, kind of. I was in a hurry when posting cause my boss was approaching and I wasn't supposed to work on a dom3 script.

1) create a 'archivedgames' directory in your dom3 directory.

2) modify the dom3 link to:
dom3.exe --scoredump --preexec 'python dom3backup.py -f 1'

The script parses scores.html to get the turn number (assumes turn 1, if not found) and creates a zipfile (name-Turn<turnnumber>.zip) every '-f <n>' turns (in archivedgames, optionally use the -d arg), with '-f 1' every turn.

You can limit the number of zip-files kept with '-m <n>', default is to keep all.

I hope this isn't too confusing.

Caveat: I haven't tested it under xp. The pyhton-doc says, that you need zlib (prob. not present) only, when deflating, so I used a simple store mechanism. But who knows..

Thanks for testing

Pia

Edit: Gnu zlib for XP is here. Change the line:

zipFile = ZipFile(zipName,'w')

to:
zipFile = ZipFile(zipName,'w',ZIP_DEFLATED)

Compression ratio is 1:10, not bad.
Reply With Quote
 

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 03:57 AM.


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