.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 2: The Ascension Wars (http://forum.shrapnelgames.com/forumdisplay.php?f=55)
-   -   Request for auto backup of turn files (http://forum.shrapnelgames.com/showthread.php?t=21609)

Cainehill November 9th, 2004 12:35 AM

Request for auto backup of turn files

Seems to me that it would be very nice, and _very_ easy to implement, if the previous turn's turn file was backed up each turn.

The reason I say this is because when you connect with the server, the old turn file is wiped out, so you can't go back and verify things, especially if a commander / unit got wiped out.

This makes it difficult to verify bugs or to verify mistakes: if a battle goes catastrophically astray you can't look back to see what the command script was for dead commanders / squads.

For instance, a Pythium player recently reported 2 arch theurgs gatewaying to a fort that was being besieged, but the armies didn't arrive, the theurgs went into the fort all by their lonesome and were exterminated.

Maybe the armies were on a different couple of theurgs. Maybe they were on the ones he gatewayed, and actually did go poof. As things stand, it's impossible to really tell, unless a player was religiously backing up each turn file manually. This tends not to happen, because 99 point something percent of the time, there's no issues, so no one goes through the hassle.

But if a .brn (backup turn file) was deleted, and the current .trn file was renamed to .brn before the new turn file was sent by the server, then people could examine things that seemed weird and either determine why they happened, or determine that they might have a bug worth reporting.

(Technically, you'd want to check the current turn file against the previous turn file so files got deleted / renamed only when a new turn file was downloaded / generated, as opposed to each time a player connected to the server.)

I think this would go a long way toward helping players understand why things happened the way they did, and also sometimes help confirm a glitch or bug.

alexti November 9th, 2004 01:12 AM

Re: Request for auto backup of turn files
I do these backups in a very simple fashion: by running a script on Dom2 start (and on hosting too - for SP).

Here's the script: save_script.awk
<font class="small">Code:</font><hr /><pre>
timestamp_file = "Last-total-save-timestamp.txt";
t = systime();
stamp = strftime("%Y%m%d-%H%M%S",t);
stamp2 = strftime("%Y-%m-%d",t);
saveAll = 1;
if ((getline Last_stamp &lt; timestamp_file) &gt; 0)
if (stamp2 == Last_stamp)
saveAll = 0;

if (saveAll)
cmd = sprintf("zip -r save-all-%s * -i@save.lst",stamp);
print stamp2 &gt; timestamp_file;
cmd = sprintf("zip -r -t %s save-%s * -i@save.lst",Last_stamp,stamp);
</pre><hr />

You'd need to insert
gawk -f save_script.awk into your Dom2 startup

And you'll need save.lst:
<font class="small">Code:</font><hr /><pre>
</pre><hr />
That's the only Dom2-specific file.

Cainehill November 9th, 2004 01:21 AM

Re: Request for auto backup of turn files
Yep, and I could do any variety of shell scripts in linux or unix (as an exercise in pain, it could even be done with sed instead of awk), or even a batch file to manage it in Windoze for my gaming box. The problem is that most players aren't going to go to this effort, and with Windoze I think you'd actually need a separate batch file for each game.

And thus, imo, it would be well worthwhile for it to be embedded in the game, so that all players wound up having access to verifying the previous turn, even if they're the types that have to upload their files for other more experienced players to figure things out (as often happens).

alexti November 9th, 2004 02:02 AM

Re: Request for auto backup of turn files
Actually, I'm using this one in Windows. And considering the Dom2 crowd I won't be surprised if the most of the players already use their own scripts to backup turn files http://forum.shrapnelgames.com/images/smilies/wink.gif

If developers are to implement something about that I think enumerating turns would have more uses (and probably easier to program). For example:
<font class="small">Code:</font><hr /><pre>
</pre><hr />

Crash November 9th, 2004 02:26 AM

Re: Request for auto backup of turn files
I second this idea.

An autosave would keep me from having to restart the game just because of one turn's worth of bad breaks.

If you guys at Ilwinter can do this without too much trouble, I'd surely appreciate it. I'm not sure if I'm up to learning how to write code and stuff myself.

Thanks in advance.

RedRover November 9th, 2004 04:10 AM

Re: Request for auto backup of turn files
Definitely agree with Cainehill and Crash. IMO this is a really important feature for Dom3, and I'd like it in a Dom2 patch as well.

Huzurdaddi November 9th, 2004 05:33 AM

Re: Request for auto backup of turn files
I totally agree this would be a great addition to the game.

A number of posters submitted utilities to fill the gap until it is implemented in game the Last time this was requested.


MaxWilson March 14th, 2007 07:37 PM

Re: Request for auto backup of turn files
I agree that a backup would be great for debugging and information purposes (how much was that province I just lost worth?), but I think Dom3's no-saved-games strategy is important to its feel and I would understand if the developers were reluctant to back up ftherland, too, or otherwise enable easy "replays" because of a bad turn. I'm still learning the game and I'll occasionally back up my saved game files in order to either quickly test out a spell that I read about in the manual (which means playing several turns carelessly, mostly just hitting End Turn) or to experiment with different ways to deal with a bad position (effectively this becomes a scenario of its own--"General Mead has been sacked for incompetence and you are the new commander. What do you do?" Reminds me of John Ringo's military fiction, which sometimes starts with a huge military debacle to make the situation interesting for the hero). These are unusual scenarios, though, and I like the feel the no-saving gives to the game itself.

So far I play exclusively SP.

-Max Wilson

Gandalf Parker March 15th, 2007 10:50 AM

Re: Request for auto backup of turn files
There are backups. In a standard linux type of way.
The entire game is saved to a file every time you process a turn. Just setup how you want it saved.

There is also a switch called --preexec which you can use to save your your turn file to a backup just before each time it hosts. Some of the utilities written by players that was mentioned above make that simpler

If it was put into the game then it would have to include alot of file cleanup functions in the menu also. And it would duplicate a nice general feature the game already has.

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

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