1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Civ4 PBEM Emailer

Discussion in 'Civ4 - Utility Programs' started by ruff_hi, Nov 3, 2007.

  1. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    Do you play Play By Email (PBEM) games? I do … slow but fun. I am playing in one game that has been running for over a year. The only downside to this is that I have to manually send the emails due to my ISP restrictions. The other week, I found that I could send emails via smtp using my gmail account. Thus, I set up this small utility.

    If your ISP restricts your access to smtp or requires a UserID and password to send email, then the Civ4 in-game emailer is a total waste of time and this utility is for you

    Once you have set up the utility with your PBEM games, then sending the save forward and sending out GPS emails is easy … really easy. Start the game, check the games you want to send emails for and click ‘Send’. The game will automatically create the emails, attach the latest save to the ‘save’ email and send it for you.

    The GPS email is critical as there is often games that stall during a ‘hunt the latest save’ period …”Do you have it?” “No, do you?”

    Get the installer for v2.2.0 here.

    WARNING: I strongly suggest that you copy or backup your 'Civ4PBEMEmailer_Data.xml' before moving to a new version of this program and(!) moving your data file to a new location. I just accidentally over-wrote my data file (glad I had a backup copy of it).



    New for v2.2.0
    It has been a while since I updated this so I am not 100% sure what has changed since v2.0.1 ... anyway, here goes ...
    • rearranged main screen (again)
    • moved generic settings (ie xml data location) from game xml file to registry
    • game prompts for data xml location if it cannot find it (or if the value in the registry is not set)
    • option to encrypt / mask email password - thx to Hawklord for suggestion and testing
      • WARNING: The encryption I added is some VB code that I found after spending about 10 minutes on google. As such, it won't be earth shatteringly good. I have spiced it up a little by adding some salt to the mixture (you can google that to find out what I mean). However, don't trust this encryption much - it will just make it a little bit harder for someone to hack your email.
    • added a animated gif that plays while emails are being sent
    • added the ability to send all players involved in a pbem game a 'nag' email (where the heck is the game??)
    • game installs to new location (C:\ProgFiles\RuffCutCode\PBEMEmailer)

    New for v2.0.1
    • bug fix for bug mentioned in post 79 of this thread

    New for v2.0.0
    • main screen tidy up
    • introduction of 'Quick Notes' - small messages that automatically get included in the outgoing 'SAVE' email - very useful for 1v1 games
    • game now warns about upgrading XML file and attempts to create backup of existing XML before upgrading it

    New for v1.8.1

    New for v1.8.0
    • wider main screen
    • more details about the game (name, save information, date of save)
    • auto select (checks games that you haven't forwarded)
    • hide confirmation (does not show the 'send this game' style dialog boxes)
    • auto suppression of GPS emails if you are only playing against 1 other human
    • ability to store the xml data file in any location
    • validates game directories
    • labels games as 'not started' if it cannot detect the directory or the directory is empty

    New for v1.7.2
    • generates a log file (same directory as the XML file) if you hold down the shift key when you start the application

    New for v1.7
    • program does not terminate after 'send' - it use to
    • 'refresh' button included to refresh the game status
    • 'Open' XML folder now opens the fold where the XML is stored - doesn't work very well for Vista due to the virtual storage and I am not going to put the time into fixing it
    • Can now export individual game settings to a text file
     
  2. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    Setting up the Utility
    Click on the ‘Edit Info’ button and the following screen will be presented to you. Click on 'Done' will get you back to the 'send email' screen.
    Spoiler screenshot :

    From this screen, you can:
    • edit the smtp
    • edit the outgoing email details (from address, ‘Save’ email body, GPS email body, NAG email body)
    • Civ4 PBEM games and players.
    • change some settings
    • relocate the xml data file

    smtp
    I have set up the details so that it will work with gmail once you have entered your gmail UserId (you must include the ‘@gmail.com’) as well as the gmail password (the usual one that grants you access to your gmail.com account).
    Spoiler screenshot :

    Don’t change the smtp address, the port or the SSL Enabled option – they work. If you don’t have a gmail account and your ISP allows you to sent smtp emails, then you could try it. I don’t so I haven’t tested it.

    Other people have managed to get this tool set up with other email account providers (see next post for a hotmail link)

    Outgoing Email
    This option allows you to change your ‘replyto’ email address. Unfortunately, this is only shown in the body of the email (see below). The actual email you send has your gmail account as the ‘from’ and ‘reply-to’ address. Note: gmail.com will also include the emails that you send in your ‘sent’ folder.

    You can also modify the body of the ‘save’ or ‘GPS’ emails. There are three key words that the utility will swap out for actual values, namely:
    • SAVENAME – replaces this with the name of the save
    • REPLYTO – replaces this with the reply to address given above
    • PBEMNAME - replaces this with the name of the game as provided to this tool
    • MESSAGE - replaces this with a short message that you can send each turn (Note: goes to everyone getting an email)
    • CRLF – inserts a new line
    Spoiler screenshot :

    Modify Game or Player
    This option allows you to add games or players, delete games or players or modify game / player information.
    Spoiler screenshot :

    With a game selected, you can:
    • add a game
    • add a player to the selected game
    • modify the game details (the path is the path to the save file – this is critical!)
    • delete the selected game (confirmation required)
    • archive the game
    • turn on the 'message' option for this game
    Spoiler screenshot :

    With a player selected, you can:
    • add a game
    • modify the player details (one player must have the ‘save’ option checked)
    • delete the selected player (confirmation required)

    Settings
    This option allows you to change some settings.
    Spoiler screenshot :

    • 'auto select' means that if the program detects that you haven't forwarded a save, it will auto select it for you (note, if you manually forward a save, this program will think that you haven't forwarded it)
    • 'Hide Confirmation' - all 'are you sure' style dialog boxes normally displayed when sending saves will be suppressed.

    Data Location
    This option allows you to change the location of the data file.
    Spoiler screenshot :

    • note that I have used short hand for the labels ('prog files') but the full path is shown if you hover over an option.
    • only valid paths are enabled
    • clicking 'ok' will close the program to allow the data file to be moved

    Quick Notes
    This new (for v2.0.0) feature allows you to include small messages in the outgoing 'SAVE' email. Very useful for 1v1 games.
    Spoiler screenshot :

    • add your own quick notes
    • delete the ones that you don't like (except the 4th one :D)

    Adlain at Realms Beyond put together this blow by blow list of instructions to set up the pbem emailer.

    Once it is all set up and running, you can send the next turn on its way with 1 or 2 clicks ...
    Spoiler screenshot :
     
  3. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    Important Points
    • Some firewalls (or similar) will restrict access to sending emails via smtp
    • Clicking ‘Send’ is only enabled if you check a PBEM game
    • Sending emails can take some time – please wait.
    • You will get a status update on the PBEMs after the utility has (attempted) to send the emails
    • The only way to close the utility is to click ‘Quit’
    • If you modify any of the items, then the ‘Save XML’ will be enabled and you can save the modifications for future use. If you click on Quit, the utility will prompt you to save the XML (if available).

    Known Issues
    • sending emails containing all of the selected games - caused by not initializing the email - fixed in v1.1
    • For windows 7, you might need to run it both as administrator, and in XP SP3 compatibility mode (or see here for instructions re security)

    Other Features
     
  4. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    This utility is now available.
     
  5. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    v1.1 fixed the issue of sending all of the PBEM games in the one huge email when multiple games were selected.
     
  6. Rupe

    Rupe Chieftain

    Joined:
    Jul 11, 2005
    Messages:
    78
    Location:
    North Carolina
    This will be such a good thing if it works. Cant wait to try it out. Now I just need to find someone to play with.
     
  7. themdg

    themdg Chieftain

    Joined:
    Dec 20, 2007
    Messages:
    20
    Great tool. We use a little website to transfer our PBEM files and to track where the file is. It also sends you a text message if so desired. :) It's not very secure at the moment, so I won't link here. But if anyone has a PBEM game and is interested, I can show you, or setup a tracker for you. It sure makes it easier.

    Matt
     
  8. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    I'm interested - can you PM me an example?
     
  9. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    Uploaded v1.2.0.1 that corrects a few very minor bugs and includes an indicator for any recent activity in your PBEM games (adds the date / time stamp to the PBEM name if the latest save is within the last 30 minutes). It makes finding the PBEM game that you want to forward easier to find.
     
  10. frankophile

    frankophile Chieftain

    Joined:
    Jan 10, 2006
    Messages:
    13
    Location:
    New Mexico, USA, GMT-7
    I've been using your little app for a while now and find it also works just fine for Civ 3 saves. The only thing I would like to see is the ability to edit the topic field. It always says Civ 4.
     
  11. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    Good point - it actually doesn't care what file it forward.

    I will open up the 'subject' for change in the next release. However, I have no idea when that will be.
     
  12. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    A new version is up following the CFC hack. I had to recreate the installer so it might install to a different directory under your 'my progs' directory. If you install this version and 'lose' your PBEM details, check in the old directory for the XML file.

    I couldn't free up the subject line as I use it to tell the two emails (save and GPS) apart. However, I've changed it from 'Civ4' to just plain 'Civ'.
     
  13. unkle

    unkle Chieftain

    Joined:
    Sep 5, 2006
    Messages:
    1,004
    Location:
    Paris
    Another happy customer just would like to say :thanx::hatsoff: for making his life so much easier...
     
  14. lazarillo

    lazarillo Chieftain

    Joined:
    Apr 12, 2008
    Messages:
    22
    is it safe to assume this only works for PCs, not macs?
     
  15. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    no idea - haven't tried it on a mac. I would assume not.
     
  16. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    Note: I've just moved to Vista only to find that it doesn't like writing files to the 'my prog' location - the location I was using to store stuff. Well, it appears that Vista writes this stuff to a different location ...

    After reading a few items on the web ...

    "The files in Program Files and your root C drive are not writiable by non-administrative programs because the files in these areas affect every user and the entire system. Allowing unpriviliged programs write access to these areas would allow them to overwrite/replace well-known programs or system-wide configuration data used by windows or well-known programs, which is unacceptable for a program that does not prompt. "

    Well - it works, but you will have to look for the XML data file under the user profilefolder ... for me, that is ...

    'C:\Users\<username>\AppData\Local\VirtualStore\Program Files\Civ4CustomAssets'
     
  17. bramirez

    bramirez Gardener

    Joined:
    Aug 12, 2008
    Messages:
    243
    Location:
    Lisboa
    I am getting an error message saying the limit time was exceeded. Any idea?
     
  18. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    9,013
    Location:
    an Aussie in Boston
    I usually get that when I am using a slow connection and / or sending a large save game file. If that happens, I just revert to sending it the old fashion way ... gmail.
     
  19. bramirez

    bramirez Gardener

    Joined:
    Aug 12, 2008
    Messages:
    243
    Location:
    Lisboa
    Well I am on turn 20 so size of file is not probable. But ok :D
     
  20. TentacleMayor

    TentacleMayor Chieftain

    Joined:
    Oct 14, 2008
    Messages:
    87
    sent to Shogu
     

Share This Page