Civ 4 pitboss turn watch (a modification of screes turn notifier)

the oob

Retired PTBS host
Joined
Nov 5, 2005
Messages
1,004
Location
Auckland, New Zealand
I've modified Screes handy email turn notifier so that it now generates an rss feed which allows players in a pitboss game to keep track of who's finished their turn. The program can be downloaded here (note: only the game host needs this program). The contents of the readme file are below:

Code:
Turn Watch v0.2 readme.txt
- - - - - - - - - - - - - - -

Instructions for the host:

1) Set up a web server. This is the trickiest part, but is unfortunately
 required, since the users will need to retrieve the file from it. 
I suggest using Apache (http://httpd.apache.org/), there should be 
documentation somewhere on that page... or somewhere on the internet :).

If you don't have a static IP address, I would also recommend using the 
no-ip client (www.no-ip.com/ or 
http://www.download.com/No-IP-DUC-Dynamic-Update-Client-/3000-2165_4-10375673.html) 
so that you will have a fixed DNS address rather than a varying IP 
address.

2) Once you have that set up, edit the settings.xml file that comes 
with this program, which will need to be kept in the same directory 
as the turn watch program. All you need to change is the rssSaveDir, 
which should be set to the root folder of your server or some 
subdirectory of that, and change the list of players, for which I've 
already put in a few examples. See my comments in the xml file for 
details on adding these. 

For instance, my value for rssSaveDir (which it's currently set to in 
your settings.xml file as well if you haven't changed it yet) is 
D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\outputFile2.xml

3) You should now check that this file can be viewed by someone else. 
Get a friend (or, failing that, some kind of sentient robot) who isn't 
at the same external IP address as you (ie. lives in another building) 
to open the file from their web browser. For myself this would be 
http://oob.no-ip.org:8081/outputFile1.xml

You should also check that you yourself can view it, for myself this 
would be http://oobutron:8081/outputFile1.xml (with oobutron being 
the name of my server).

4) You should now be able to run the program. First start pitboss, 
then start the program. 

5) Now you can view the feed with any rss viewer. This is explained 
below, but the host will need to enter their local address (so for 
me, that would be http://oobutron:8081/outputFile1.xml as mentioned 
before) rather than the external address. Once you have that going, 
you should send the address for the feed (with your external address) 
to the other players.

Instructions for players:

1) Add the feed to an rss viewer. There are many rss viewers out there 
so I'm not about to write instructions for each one (that and I need 
to pee) but here's how it's done in firefox, which (if you have a 
fairly recent version) comes with an rss viewer built in:

Click bookmarks --> manage bookmarks. This brings up the bookmarks 
manager, in there click file --> new live bookmark. Enter Civ 4 (or 
whatever you want) in name, and in feed location enter the feed 
address that the host gave you. You can leave description blank. 

You should then move that bookmark to your bookmarks toolbar folder, 
although this is optional.

2) You should now be able to see the feed. To see it in firefox, right 
click on the live bookmark, press 'reload live bookmark' (which will 
update it, as the current version of firefox doesn't regularly update 
the feed like many other rss viewers, hopefully they'll change this in 
a newer version), and then click on it, which should bring up a list 
of players.

Miscellaneous:

* Apparently IE7, which is currently in beta as I write this, also has 
an RSS viewer, however the beta of IE7 doesn't work for me so I'm 
unable to give instructions for this. Hopefully people at the 
civfanatics forum will contribute more information on RSS for those 
who don't use firefox (and I'm guessing there's an RSS plugin for IE6 
somewhere, hopefully someone there has a link) the link for the 
relevant thread is here:
http://forums.civfanatics.com/showthread.php?t=172459

* You can run this program with multiple instances of pitboss, however 
you will need to:

1) Have a seperate instance of Turn Watch for each instance of pitboss
2) Each instance of Turn Watch will need its own settings.xml file 
which needs to be set up appropriately for each game. In particular, 
each instance of turn watch needs to have its own seperate feed.
3) You will need to make sure you have each instance turned on in the 
right order, otherwise the feeds will get switched around. The easiest 
way to do this would be to turn on the first instance of pitboss, then 
its instance of turn watch, then the second instance of pitboss, 
then its instance of turn watch, and so forth.


- - - - - - - - -
Change log
- - - - - - - - -
v0.1: initial release
v0.2: fixed some bug where the program would sometimes crash at the 
end of the turn. I'm 95% sure I fixed it... it's hard to tell since
it isn't a regular problem.

If you do get this problem, please tell me about it on the Civfanatics
forum, on this thread: 
http://forums.civfanatics.com/showthread.php?t=172459

... also, please hold onto the error.log file it will generate if the 
error happens, so I can get it from you.

Here are a few screenshots:

turnwatch1.jpg
turnwatch2.jpg
turnwatch3.jpg


Here's a few things I could use from you guys:

1) A way to extract the clock text from pitboss (looking to you for this Scree :D, I'll PM you about this soon) so that I can add the time left on the clock to the feed.

2) A good RSS plugin for IE6 (try it out first, since I tried one but it didn't like my test feed).

3) Info on any problems with the program or suggestions on how to improve it.

If anyone wants the source I'll put it up.

Changes:
Updated to v0.2, fixed some bug where it was occassionally crashing at the end of the turn. See readme for details.
 
I like the idea of this.

After installing no less than 4 applications (Apache, .NET Framework 2.0, Windows Installer 3.0, and Windows Geniune Validator) it doesn't work for me. :( After I run it, nothing happens except "DW20.exe" appears in my process list for about 20 seconds using 100% CPU and then it goes away...

I am running on Windows Server 2003
 
OverloadUT said:
I like the idea of this.

After installing no less than 4 applications (Apache, .NET Framework 2.0, Windows Installer 3.0, and Windows Geniune Validator) it doesn't work for me. :( After I run it, nothing happens except "DW20.exe" appears in my process list for about 20 seconds using 100% CPU and then it goes away...

I am running on Windows Server 2003

I compiled it with Visual Studio 2005, and have only tested it on Windows XP, so I have no idea if it will work on Windows Server 2003. Have you got all the latest windows updates? Because it needs a fairly recent .NET framework update.

If anyone here has an older version of visual studio, I could give them the code so they can compile it on that, which would hopefully be more compatible.
 
wasweissich said:
Great Programm but running a web server? No thanks, maybe you could add ftp-upload.

Yeah I mostly made it for my own benefit so I'm unwilling to make any particularly large additions, such as ftp-upload, unless it's something I want, but it could be added. All my part of the program does when it comes down to it is create an xml file, so someone could modify the program or add a new program that uploads the file to users.

Bear in mind though that I made my part of the program such that it would be as easy as possible for the clients, since some or all of them are likely to be less technically proficient than whoever is running the pitboss server. Sending the file via ftp-upload may make it more difficult for them, unless you mean uploading the files to some free webserver on the net rather than directly to the users themselves (which would make it the same on their end other than the address for the RSS feed), which would be a good idea, I can't think of a good free webserver though. Google pages doesn't allow ftp uploads.

Anyway, I wholeheartedly encourage others to stand on my shoulders to add extra functionality, just as I have stood on Screes :)
 
wasweissich said:
Yes I mean to send the xml to a free ftp server like GMXhome, or the ftp server from my work ;)

Alright, well, I can't be bothered, but someone else is free to.

If someone wants to write the C# method that will upload a given file (or string that it creates a file with) I'll join it to the program, or I could just give them the code and they could do it.
 
I haven't tried it but here is a program that "sits in your system tray and uploads files and folders at a set interval". So you could tell Turn Watch to save the file somewhere, and then tell that program to periodically upload that file to the web server.

If anyone has any luck doing something like this I'll recommend that approach in the readme for Turn Watch.
 
the oob said:
I haven't tried it but here is a program that "sits in your system tray and uploads files and folders at a set interval". So you could tell Turn Watch to save the file somewhere, and then tell that program to periodically upload that file to the web server.

If anyone has any luck doing something like this I'll recommend that approach in the readme for Turn Watch.

Found something similar.. works great!
 
Back
Top Bottom