View Single Post
  #8  
Old November 21st, 2008, 06:10 AM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Any spectate or replay function for Dom3 games?

Quote:
Originally Posted by Gandalf Parker View Post
But what I had in mind was an exhibition game. I think that the IRC crowd could put together a game where the abuses would be few, and allow all of the eager learners lurking here to peek into their actions.
As I said, for blitzes it has become quite popular to spectate at others, and the players are usually okay with it as they play without any pretender passwords set anyway. The users namad and especially moderation quite often take a look over another one's shoulder.

I prepared a shell script a while ago which repackages my backups of games played on my server into that form where they are being renamed into folders carrying the turn number, and so on. So if the players are okay with it, I could prepare finished games for spectators. Here it is:

Code:
#!/bin/bash

for file in *-pre.tgz
do
  game=`echo $file | sed "s/-[0-9]*-pre.tgz$//g"`
  tar xzf $file
  title=`grep -oEm 1 "Dominions 3 Scores, [^<]*" $game/scores.html | sed "s/Dominions 3 Scores, //g"`
  if [ -z "$title" ]
  then
    title="$game turn 1"
  fi
  mv "$game" "$title"
done
It needs all the backups for that game in the current directory and the games to be hosted with the --scoredump switch. Here's how I create my backups, to be run in the "savedgames" folder:

Code:
tar czf "/home/dom3/dominions3/backups/"$GAME-$(date +%s)-pre.tgz $GAME
Using the backups from the --preexec commands has the added bonus that you can see the orders that the players gave, all the army movement arrows and so on. I could probably come up with a couple of more games to peek into by asking a crowd of players that frequently play on my server, if there's interest in that.
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote