Civ4 PitBoss Email Turn Notifier v0.1...

scree

Chieftain
Joined
Jan 12, 2006
Messages
24
Update (3/3/06): I put the files on a permanent server... use the links below.

PitBoss Turn Notify v1.0 Released!! The links to the program and source is below as always (make sure v1.0 is written in the application title when you run it- you may have to clear your web cache to get the latest file).

Changes in v1.0:
  • Added multiple PitBoss profiles/settings for each PitBoss game. See "PitBoss Profiles" below for info on how this works.
  • Added support for multiple simultaneous PitBoss/PitBoss Notify instances. This means you can run multiple copies of PitBoss and PitBoss Turn Notifier on one machine, each with their own settings.
  • Added checking for active games (where everyone is online) before sending email. Kept a 5 minute floating time window before sending a Turn E-mail in case people get disconnected during an on-line game. (Thanks Mysterio10000 for this great suggestion)

Hey guys, since the PitBoss email notification doesn't work right now, I thought I'd write up a quick app that fires off an email when a PitBoss turn happens and share it with everyone. This way people know exactly when it's time to get on to the PitBoss server and play their next turn.

What's it for?

This is for PitBoss server admins who want their players to know when a turn is ready for them. Without this there is no real way to know it's time to play your turn without logging into Civ4 or asking the PitBoss admin.

How does it work?

- If you have PitBoss running, PbNotify looks for the PitBoss Window, and looks for the text in the window the specifies the turn, usually of the form:
Civ Game - 3980 BC
- When the turn text changes, PbNotify sends an email to all the players listed in the UI telling them there's a new turn available for the game. It's that simple.
- Security note: your smtp settings are automatically saved in the registry in clear text, under HKEY_CURRENT_USER\Software\Sellout Games\PitBoss Notify

How do I use it?

1. Simply run pbnotify.exe (see link below)
2. Input your smtp server settings (SSL support for Gmail and other auth included)
3. Put in the emails of all the players in the game separated by commas
4. Click "Start Checking".
5. This will start the communication with PitBoss and fire off an email to all the player emails notifying them of new turns.
(You can also click on Force Mail to send a mail immediately and test if your settings are correct.)

PitBoss Message of the Day Synchronization:
- This feature lets you add a timestamp or turnstamp to the MOTD, so when a player joins, the Chat Log shows who has played which turns. This is very handy for the admins to know who has already played their turns.
- You can also choose to save the PitBoss MOTD to the registry so you don't have to retype it when you restart PitBoss.

PitBoss/Turn Notify Profiles
- The PitBoss Turn Notify program now automatically generates profiles settings PER PitBoss game. So email addresses, MOTD, etc. are saved for each game individually.
- When Turn Notify is running but PitBoss is not, the settings in the Notify app are saved to a default profile.
- When a PitBoss game is loaded/created, if there are no settings saved for that profile, the Notify app will automatically copy settings from the default profile.
- Whenever you change settings while PitBoss is running, those settings will save only for THAT Pitboss game.
- The Notify app automatically changes profiles when a new PitBoss game is created or loaded.

Multiple PitBoss/Notify instances
With v1.0, you can now run multiple instances of PitBoss and the PitBoss Notify app. PitBoss Notify will automatically connect to any PitBoss instance that does not already have a Notify app linked with it.

Known Issues/Info:
- .NET Framework v1.1 is required to run this (see http://www.windowsupdate.com to get the .NET Framework Runtime)
- There have been issues sending mail in Windows 98, so I recommend using Win2K or above.

Here's a shot of the UI:


Here's a link to the .exe...
http://www.selloutstudios.com/civ4/pbnotify.zip
(Old version available: PbNotify v0.42)
http://www.selloutstudios.com/civ4/pbnotify042.zip

Here's a link to the full source code:
http://www.selloutstudios.com/civ4/PitBossTurnNotify.zip

If you have any questions, suggestions, bugs, feel free to email me at marek_gorecki@hotmail.com, or reply here.

Thanks, and hope you can use this!

~Scree
 
ahhh..now thats more like it. proper options for setting up to email out. nice!

i hope firaxis checks this out and includes your level of mail options, as they are needed.
 
Can we have a message window to allow a customised message as well to go out with the email :)
 
Update... v0.3 is out.

Changes:
  • Added custom Message support with variables for Game Name (%g) and Turn (%t).
  • Fixed SMTP settings for non-auth servers (thanks Miles for your help)
  • Added better error messaging for failed SMTP mails

As always, let me know if you have any questions/bugs/concerns.

Thanks!

~Scree
 
Just released v0.31, with a minor addition:

v0.31 Changes
  • Added 10 minute rolling time window. If a turn is played within 10 mins of the last turn, no email will be sent. This is to prevent email spam on very active PitBoss games. Once 10 minutes of inactivity elapses after a turn is made, the notification email is sent.

See my first post above for information on how to get the app.

Thanks!

~Scree
 
worked with it for some time last night. very nice.

my only suggestion would be to make the error return text somewhat more noticable for those first time users. it doesnt exactly stand out.

through in an address book to select users, hehehe, and its darn near complete.

anyways..very good work. works like a champ.
 
Another minor, but important version is out (v0.32):

Changes in v0.32
  • Fixed a race condition that could cause multiple emails to get sent out.
  • Started timer on startup now so you don't have to click the "start checking" button.

Thanks!

~Scree
 
scree said:
Another minor, but important version is out (v0.32):

Changes in v0.32
  • Fixed a race condition that could cause multiple emails to get sent out.
  • Started timer on startup now so you don't have to click the "start checking" button.

Thanks!

~Scree

Cool. Thanks for the continued updates!
 
Mysterio10000 said:
Cool. Thanks for the continued updates!

No problem! Thanks for trying it out, and let me know if you have any problems. I've been finding all this stuff from using it for a few days now.

I'm thinking about a quick address book-like UI, so maybe I'll throw that in soon.

Thanks,

~Scree
 
Scree,

First off, I want to thank you for developing the email notifier. It's a nice program.

Having said that, I have an enhancement suggestion.

Would it be possible to have the MOTD automatically insert the date and time, based on the system's setting? That would be a nice thing to have. Currently, in order to see who has logged in on what day, it is necessary to always change the MOTD to the current date. If that were done automatically, the world would be a better place. :)

Thanks,

Alanb
 
Scree this thing is awesome thanks man. Only thing I could suggest is to have a vertical email list instead of hoziontal.

cmonster
 
Hey Scree!

Great utility...thanks.

Did discover one small bug. The program was waiting in the 10 minute window and I hit the "Force Mail" button. I got the email ok but it was for the previous turn and I never did get the email for the new turn which prompted the 10 minute wait to start with. I'm not sure if this put the program into a bad state since it was still telling me the next send was at XX:YY and that was long past. I restarted the app just to play it safe.

I'd also recommend the admins get this topic stickied. Email notification is a huge plus for PitBoss games.

Bernout
 
cmonster said:
Scree this thing is awesome thanks man. Only thing I could suggest is to have a vertical email list instead of hoziontal.

Yeah, I'm working on a better address list.

Alan_Bernardo said:
Scree,
Would it be possible to have the MOTD automatically insert the date and time, based on the system's setting? That would be a nice thing to have. Currently, in order to see who has logged in on what day, it is necessary to always change the MOTD to the current date. If that were done automatically, the world would be a better place. :)

Actually, I think I could. That's a good idea. I'll mess with it tonight.

Bernout1 said:
Did discover one small bug. The program was waiting in the 10 minute window and I hit the "Force Mail" button. I got the email ok but it was for the previous turn and I never did get the email for the new turn which prompted the 10 minute wait to start with. I'm not sure if this put the program into a bad state since it was still telling me the next send was at XX:YY and that was long past. I restarted the app just to play it safe.

I'd also recommend the admins get this topic stickied. Email notification is a huge plus for PitBoss games.

Good bug. I think you're right, the force mail goes through a different path which clears the 10-minute timer and sends the old turn instead of the next one. I'll fix that up.

Thanks everyone for your comments and suggestions- I'll throw these in ASAP. :goodjob:

~Scree
 
Originally Posted by Alan_Bernardo
Scree,
Would it be possible to have the MOTD automatically insert the date and time, based on the system's setting? That would be a nice thing to have. Currently, in order to see who has logged in on what day, it is necessary to always change the MOTD to the current date. If that were done automatically, the world would be a better place.

That does sound a nice idea - i'm in two minds whether I prefer a turn year in there or the time. The turn year would at least allow you to identify players who are not doing turns.

Tals
 
That does sound a nice idea - i'm in two minds whether I prefer a turn year in there or the time. The turn year would at least allow you to identify players who are not doing turns.

Well, then, to have the best of both worlds, why not an option for either the turn time, the system's time, or both?

I do think that if I could only have one of these options, I'd take the turn time.

Even something like a message to the console, which says something along the lines of "Turn year 3000 BC has expired. The following players did not take a turn during this period: Smith, Jones." :)

Alanb
 
Version 0.4 is out!.... download it from the same links in the original post above. (Note: you may have to clear your web cache to get the latest version- it should say v0.4 in the PitBoss Notify Application title bar).

Changes in v0.4:
  • Added synchronization with the PitBoss MOTD (Message of the Day).. See below for details
  • Added support to Timestamp or Turnstamp (or both) your MOTD, so the admin can see who has done what turns (or not).
  • Added the option to save your PitBoss MOTD and restore it the next time you run PitBoss, so you don't have to retype it every time the program restarts.
  • Fixed general bugs, such as one in Force Mail.

As always, let me know if you find any issues. I'm still working on the cleaner player email address input.

Thanks,

~Scree
 
Top Bottom