Civ4 PBEM Emailer

Are you going to add a poke feature? We need that for PBEM4.
Yes - I was just thinking about that. Basically, I was going to add the ability to send a 'nag' or 'who has the save?' email to all players involved in the game to help identify where the save is.

This isn't a trivial change as I have to add a 3rd type of email including the associated xml stuff so that the user can change the body of the email, enhance usage of current screens, a button, the code to auto upgrade the xml of your existing games, etc. I guess I'll do it when I get a free morning or afternoon when I'm not watching the IT Crowd or (shock / horror) working.
 
Hi! This should be a great program, but I have a couple of problem points with this program, as me and a group of friends are trying to get a game going.

First of all, the close button doesn't actually work, it seems to simply open the last opened window instead, I have to click the 'quit the application' button.

Next up, I set up a test game to try the program out before setting it all up. Thankfully, I used my old emails to test. I got this:
Attached is the latest save for the above Civ4 PBEM.



Please do not reply to this address. Use '<snip>'.

This email sent via Civ4PBEMEmailer by Ruff_Hi.
Further details available at: http://forums.civfanatics.com/showthread.php?t=249788
Civ4PBEMEmailer_Data.xml Civ4PBEMEmailer_Data.xml
2K Download

Anyway, firstly the xml file it sent contained my email address and password in plaintext, which is... somewhat of an issue for me :3

Secondly, I couldn't actually get it working with the game. I went into edit mode, edit game/player, added the game, set the path to the save, added all the players, applied everything as well, updated all the values, and saw the gmae there on the screen. Pressed 'refresh the screen' and it just vanishes. No games there, nothing there in edit game/player. Just nothing!

Any idea what I'm doing wrong? I can't think of anything off the top of my head, though.
 
Thanks for the feedback.
First of all, the close button doesn't actually work, it seems to simply open the last opened window instead, I have to click the 'quit the application' button.
When you say the 'close button' - do you mean the 'x' on the top right. I hate that sucker as it kills the screen without actually closing the application. The quit button has code to see if the xml file needs saving etc. I usually disable the 'x'.
Anyway, firstly the xml file it sent contained my email address and password in plaintext, which is... somewhat of an issue for me :3
The program doesn't care what file it attaches. It just grabs the file with the newest date in the directory specified as the 'save' directory and attaches that. I would assume that you said the 'save' directory was the directory where you put the xml file. I am sure that I have mentioned that in the past.

Q: Should I enhance the program to limit the sorts of files it attaches? I know that some Civ3 people use this application so I would have to include the ability to recognize those file types.
Secondly, I couldn't actually get it working with the game. I went into edit mode, edit game/player, added the game, set the path to the save, added all the players, applied everything as well, updated all the values, and saw the gmae there on the screen. Pressed 'refresh the screen' and it just vanishes. No games there, nothing there in edit game/player. Just nothing!

Any idea what I'm doing wrong? I can't think of anything off the top of my head, though.
That sounds strange. It appears that you did all the right things. The only thing I can suggest is that you 'save' the xml file before refreshing the screen. When the program starts on a brand new install, it starts with a dummy game loaded up - did you see that? If you didn't (and my memory is not faulty), then something is wrong.

There is a debug feature in the program - hold down the shift key when you start the application. This will create a log file of what it thinks it is doing.
 
Are you going to add a poke feature? We need that for PBEM4.

Darrell
New 'nag' feature is available but I would like it tested - any volunteers?
 
The only thing I can suggest is that you 'save' the xml file before refreshing the screen.

Thanks for the reply, that seems to have worked now :)
So then, its now a matter of recieving the next save, copying it into the pbem folder, then would the emailer recognise the new save created and have that ready to send on when I load it up after taking my turn? If so, that's great.

Side note, does anyone know what exe I have to make the save games 'open with'? I have the steam version which doesn't seem to have made any file associations, I tried setting them to open just with the beyondthesword.exe but that's apparently not the right one.

Either way, thanks :)
 
So then, its now a matter of recieving the next save, copying it into the pbem folder, then would the emailer recognise the new save created and have that ready to send on when I load it up after taking my turn? If so, that's great.
You get your turn, play it and the game creates the save that should be sent to the next player. Providing you have told the pbememailer where that save will be located (it is under saves/pbem/<name of game>), then the pbememailer will automatically see that a new save is available and sent it on after you select it and click 'send'. You can set the pbememailer up to auto select it too.
 
Hi again. Just loaded it up today and it crashes at the splash screen:

Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: civ4pbem_emailer.exe
Problem Signature 02: 2.0.1.0
Problem Signature 03: 4c84fb9e
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4bebe8e2
Problem Signature 07: 349e
Problem Signature 08: 119
Problem Signature 09: System.IO.DirectoryNotFound
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 2057

I don't think I've done anything huge to the system. Windows update, but that's about it, nothing that would affect this I don't think. Can provide more info if needed!
 
hold down shift when you start the app - that produces a log file. Email me the log file and I can see where it is crashing
Spoiler :
ruff dot hi at gmail dot com
 
Update to say a huge thanks for Ruff for troubleshooting my problem! As usual in these cases, the problem was with me. I'd made a couple of test folders to put game saves in to try and figure out how the program worked, and the PBEM tool put one of its important files in the folder. So when I just deleted the folder because I didn't need it anymore, the emailer tried to find the file and promptly crashed.

The fix was to open the Civ4PBEMEmailer_Init.xml and edit that to look in a different location for the Civ4PBEMEmailer_Data.xml (Which I had to undelete to save me some work!)

Hope this helps anyone else with this problem, and thanks again for helping me through it Ruff!
 
Hi looks good but....
Doesn't work at all for me

log says


15-Mar-2011 20:03:06: ReadXMLDataFile-01: start
15-Mar-2011 20:03:06: ReadXMLDataFile-03: done
15-Mar-2011 20:03:06: CreateInitFile-01: start

Then I get windows is looking for etc.

Does this wprk on Windows7?
 
Hi looks good but....
Doesn't work at all for me

log says


15-Mar-2011 20:03:06: ReadXMLDataFile-01: start
15-Mar-2011 20:03:06: ReadXMLDataFile-03: done
15-Mar-2011 20:03:06: CreateInitFile-01: start

Then I get windows is looking for etc.

Does this wprk on Windows7?
Yes - see below.
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
The issue as I understand it is that my program wants to update / create a data file where the exe is located and Windows vista (and later) hates that. You have two options - run as admin / XP compatibility mode as stipulated above or hand edit the 'Civ4PBEMEmailer_Init.xml' file to tell my program where you want to store the data file.
 
Yes - see below.

The issue as I understand it is that my program wants to update / create a data file where the exe is located and Windows vista (and later) hates that. You have two options - run as admin / XP compatibility mode as stipulated above or hand edit the 'Civ4PBEMEmailer_Init.xml' file to tell my program where you want to store the data file.

Derrrr
I can only see an exe and 3 icons? where should I be looking for xml?

@ Para What do I do with the .net function I suppose it is. Build a Web page to run it?

I have admin rights but not sure about the xp compatable bit.

This new security on till you turn it off is a nightmare. I might go back 3 windows versions just for the peace.
 
That was advice for ruff_hi... he needs to call that function from his code to get the correct path to write to rather than save in the application's executable folder.
 
I'm missing something here.

I have a window installer file that creates a compiled exe file so I can't get at anything without the original code. Been here before with apps built by people who have left and had to rebuild them.

Is this a .Net app? Been a while since I played with that sort of thing but the files look familiar.
:old: These new fangled computer languages, what was wrong with basic?
 
It's called VB.NET now ;) Although I still remember when BASIC had line numbers :lol:

I'm not advising you to do anything Hawky (although you could probably change the XML as ruff_hi said). I'm suggesting a way for ruff_hi to change the code to make it Win7 compatible (maybe).
 
Can't see the xml, where is it? Do I need visual studio to see the code?
I thought the msi file was compiled.
 
Do a search for Civ4PBEMEmailer_Init.xml - that's what the ruffster mentioned (I don't use it so I'm not so familiar with it).

MSI is the installer program - yeah that is compiled.

EDIT: XML files are just text you can edit them in notepad.
 
This is where I am getting confused.

1. The download is an MSI file (compiled) nothing I can do with that.
2. On running it I get an exe file (also compiled) with 3 icon files. Nothing I can do with that.
3. The xml file does not exist on my machine (just searched the entire C drive), so I guess it's not in civ 4.

Where is it? in the code that builds the application? It's nowhere I can find.

The instructions don't make any sense. It's about now where I start thinking "Is it worth it?" but some people have it working so it must be me being fick. :huh:
 
Top Bottom