.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   How to enable auto-save. (http://forum.shrapnelgames.com/showthread.php?t=32784)

alexti January 12th, 2007 09:29 PM

How to enable auto-save.
 
1 Attachment(s)
Dom3 always auto-saves the current turn (it consists of .trn and .2h files and fthrelnd file in savedgames/gamename directory). However, if nothing else is done those files will be overwritten at the next turn. To provide multiple-save capabilites (and not only that) Dom3 has preexec and postexec hooks (preexec is called before it processes the turn and postexec is called after it has processed the turn). There're multiple scripts and programs to manage save archive that have been posted over the time. I'll attach the one I'm using myself (it is somewhat sophisticated because I wanted to make sure MP I was hosting will be properly backed up). To enable it on Windows, one needs to add '--postexec domsave.bat' to Dom3 shortcut. Linux crowd surely doesn't need to be told obvious :>

To reload, choose the saved games from the archive (they're timestamped) and unzip it. This is a manual step.

Why I'm using zip to archive save games - it's more compact, besides Windows don't like large amount of small files. I also find Wiz interface more convenient [than explorer] for reloading.

HoneyBadger January 13th, 2007 04:12 AM

Re: How to enable auto-save.
 
There, see? Now everyone can get back to their lives...and thank you Alexti for making it so I couldn't understand it.

http://forum.shrapnelgames.com/image...es/biggrin.gif

Arralen January 13th, 2007 05:30 AM

Re: How to enable auto-save.
 
alextis, this is great - but you forgot to mention that Windoze users will have to get "Gawk for Windows" first ...
Gawk Main Page


And instead of using the command "zip", which will normally not work in Windoze either, you may replace zip by the command line version of 7-zip (which is available for both UNIX and Win).


Gandalf Parker January 13th, 2007 02:17 PM

Re: How to enable auto-save.
 
I like UnxUtils. A little more than gawk but not as intrusive as CygWin.
That way all of my linux scripts pretty much work without much change as if they were WinXP commands.

alexti January 13th, 2007 02:53 PM

Re: How to enable auto-save.
 
Good point, Arralen. I don't remember what exactly comes out of the box with Windows. But I remember that the simplest way to convert it into functioning OS is to install cygwin. Of course, you can pick and install utils one-by-one, but I'm too lazy for that http://forum.shrapnelgames.com/images/smilies/happy.gif

Hellboy January 15th, 2007 01:10 PM

Re: How to enable auto-save.
 
Forgive the unix ignorant question (I've used unix as well as cygwin a few years back, but I'm more than a little rusty), but I installed cygwin, added "--postexec domsave.bat" to the Dom3 shortcut and added the 3 files out of the attachment to the dom3 directory. The result is that on turn end Dom3 loses focus, but I see no error msg of any kind. Any thoughts?

Or, if it makes life easier, anyone care to point me at a more windows friendly save utility?

Thx,

Terrel

Gandalf Parker January 15th, 2007 05:24 PM

Re: How to enable auto-save.
 
The best answers depend on what windows you are using so for the following, Im considering it to be Windows XP.

The easiest windows friendly save is
open dominions3/savedgames
Ctrl-A
Ctrl-C
Ctrl-V

You can create a shortcut to that directory so that you have an icon to click on to get there.
----------------------------------------
The next easiest might be to make a save.bat in the dominions3 directory that has this line
xcopy /yes savedgames oldsaves /i

that will also copy all of the games to a backup
--------------------------------------------

Of course adding --preexec save.bat to your Dom3 icon will tell Dom3 to do the save thing every time it hosts any game.

Gandalf Parker January 15th, 2007 05:32 PM

Re: How to enable auto-save.
 
1 Attachment(s)
Hmmm I dont usually do this but try this.

See if the file I attached to this message works on your machine. Its for Windows XP, default path of dominions 3 (C:\program files\dominions3), and it uses an icon that I think is standard to WinXP. Put the file on your desktop or in your dom3 directory. Wherever you want.

Arrggghh I cant believe that I had to zip it to get it to attach. Its just a shortcut. Just one little desktop icon. It has no programs in it at all. http://forum.shrapnelgames.com/images/smilies/happy.gif

Edited: added a copyable link so people can pass the word.
http://www.dom3minions.com/docs/SavingSavedGames.zip

Gandalf Parker

alexti January 15th, 2007 10:04 PM

Re: How to enable auto-save.
 
Quote:

Terrel said:
Forgive the unix ignorant question (I've used unix as well as cygwin a few years back, but I'm more than a little rusty), but I installed cygwin, added "--postexec domsave.bat" to the Dom3 shortcut and added the 3 files out of the attachment to the dom3 directory. The result is that on turn end Dom3 loses focus, but I see no error msg of any kind. Any thoughts?

Try to run domsave.bat from outside of the game, from dominions directory (from command prompt). You should get some sensible message explaining the problem. One likely reason is that cygwin binaries are not in the path, so OS can't find them.


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

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