|
|
|
|
|
January 4th, 2008, 08:07 PM
|
|
Major General
|
|
Join Date: Feb 2004
Location: Houston, Texas
Posts: 2,435
Thanks: 57
Thanked 662 Times in 142 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
my script is a batch file (for copying files around, launching dom, etc.) and an accompanying sendmail.exe which the bat invookes. How I have it set up is I just make a windows shortcut on my desktop for each game I'm playing and the shortcut is set to invoke the script passing in the args in for that game (game name, nation, etc). Get a turn notification, download the turn to my defauld download dir, click on the shortcut for that game and I'm good to go. I'm writing this from my phone, but when I attatch it tomorrow I'll post no brainer instructions so anybody can use it without needing a command prompt.
__________________
My guides to Mictlan, MA Atlantis, Eriu, Sauromatia, Marverni, HINNOM, LA Atlantis, Bandar, MA Ulm, Machaka, Helheim, Niefleheim, EA Caelum, MA Oceana, EA Ulm, EA Arco, MA Argatha, LA Pangaea, MA T'ien Ch'i, MA Abysia, EA Atlantis, EA Pangaea, Shinuyama, Communions, Vampires, and Thugs
Baalz good player pledge
|
January 4th, 2008, 08:13 PM
|
|
Major General
|
|
Join Date: Feb 2004
Location: Houston, Texas
Posts: 2,435
Thanks: 57
Thanked 662 Times in 142 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
oh yeah, you don't have to dl it to the game folder, just the same folder ( ie c:/downloads) every time.
__________________
My guides to Mictlan, MA Atlantis, Eriu, Sauromatia, Marverni, HINNOM, LA Atlantis, Bandar, MA Ulm, Machaka, Helheim, Niefleheim, EA Caelum, MA Oceana, EA Ulm, EA Arco, MA Argatha, LA Pangaea, MA T'ien Ch'i, MA Abysia, EA Atlantis, EA Pangaea, Shinuyama, Communions, Vampires, and Thugs
Baalz good player pledge
|
January 4th, 2008, 08:40 PM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
You're writing from a phone? Wow, I'm impressed. I hadn't quite internalised that that was really feasible yet. I sometimes feel like technology sneakily keeps on advancing when I turn my back.
|
January 4th, 2008, 08:45 PM
|
|
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
The tool contains all the elements that make up the work flow of hosting a PBEM game, that's right.
The tool can be and was indeed compiled into a windows exe file.
Yes, windows users can just click on it.
The most important issue the tool suffers from is the dependency on gmail. Which I wanted at the time to get rid off but didn't get to. Also since gmail has changed their protocol a few months ago the tool can't perform the actual mail d/l and u/l operations. The bright side of this is that gmail protocol was changed to standard IMAP which python supports easy enough so it shouldn't be difficult to fix.
|
January 4th, 2008, 09:00 PM
|
Corporal
|
|
Join Date: Jan 2004
Location: Wilmington, Delaware, USA
Posts: 191
Thanks: 1
Thanked 13 Times in 2 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
Quote:
llamabeast said:
For Mac: I know nothing.
|
Mac OS X is BSDish, so anything written in Perl will run just fine, and stand-alone Linux programs will either build as is, or just need a few changes for OS dependencies.
__________________
No plan survives contact with the enemy.
--Helmut von Moltke
Have too may pretender files to keep track of? Use catgod to view them.
|
January 4th, 2008, 09:20 PM
|
General
|
|
Join Date: Oct 2007
Location: Poland
Posts: 3,414
Thanks: 26
Thanked 73 Times in 49 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
Another option is to have all turns on llamaserver, every user would have a password. The small program would download it from there, put in the right place. And after you are done it would also upload turn file there. They are really small so it should be easy.
|
January 5th, 2008, 08:48 PM
|
|
Major General
|
|
Join Date: Feb 2004
Location: Houston, Texas
Posts: 2,435
Thanks: 57
Thanked 662 Times in 142 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
Ok, heres the script I was talking about. It includes a free lightweight sendemail.exe that I downloaded from here:
http://caspian.dotconf.net/menu/Software/SendEmail/
Its set up to send your turns to the llamaserver, though thats easy enough to change if you want to use it for a different PBEM game. It uses a free gmail account I set up for sending the mail, so no need to configure anything. New turns will still be sent to the email address you used to join the game (you wont get confirmation emails though, those are sent to the gmail account which sends the turns). The script assumes you download your turns into the same place every time, my example below is c:\downloads, but feel free to put it wherever you like and change that path as necessary.
Unzip the zip into wherever you like, my example assumes its put in c:\utils, but again put it wherever you want. Now, you need to collect the following information for the game youre playing:
(1) location of your download directory (ie c:\downloads)
(2) location of your dominions 3 directory (ie c:\program files\dominion3)
(3) the game name of your nation. This will be of the form <era>_<name>, so for example late_arcoscephale. If youre unsure what this name should be, just look at the .trn file you received.
(4) The game name. If youre unsure, just launch dominions and see what the game name is from the in-game list (its possible this is different than what the llamaserver game name is)
(5) The location sendEmail.exe is (ie c:\utils)
*note: if any of the directories in (1), (2), or (5) contain spaces you need to enclose them in quotes (ie c:\program files\dominion3)
Next, right click on your desktop and choose new -> shortcut. In the box, type in c:\utils\domturn.bat (or whatever place you extracted the zip) followed by (1), (2), (3), (4) and (5). For example, my shortcut for the sloth game Im in looks like this:
C:\utils\domturn.bat c:\downloads "c:\program files\dominions" late_arcoscephale sloth c:\utils
Name your shortcut to the game name to make it easy to keep track of, and if you feel like it you can even change the icon to be the dominions one through the properties menu.
Now all you need to do to take your turn is download your turn into your default download directory, doubleclick on the shortcut you created, take the turn and close dominions. Note the script does launch a DOS window, you can ignore it unless you dont want the turn youre taking to be emailed in which case just close it (hit the x in the top right) before you exit dominions (if youre running in full screen mode, just hit alt-tab to bring up the DOS window so you can close it).
Now that youve got it set up, its super easy to configure another game. Just copy the shortcut, right click, properties, and change the nation (ie late_arcoscephale) and game name (ie sloth). Thats it.
Notes:
The script moves your trn file from your downloads directory so that you wont have to overwrite it the next time you download your turn (this also helps if you happen to be playing the same nation in more than one game). It works fine if you rerun it without downloading a new turn, it simply uses your old turn file so you can update your orders, itll resend when youre done the same way as if it was a new turn.
To anyone looking into the script and wondering why I do an excessive amount of cding, its to resolve potential spaces in the path names, cd resolves things like ""c:\program files\dominions3"\savedgames\sloth" for you when you dont know how many quotes to expect.
Feel free to modify and/or repost this however you like.
__________________
My guides to Mictlan, MA Atlantis, Eriu, Sauromatia, Marverni, HINNOM, LA Atlantis, Bandar, MA Ulm, Machaka, Helheim, Niefleheim, EA Caelum, MA Oceana, EA Ulm, EA Arco, MA Argatha, LA Pangaea, MA T'ien Ch'i, MA Abysia, EA Atlantis, EA Pangaea, Shinuyama, Communions, Vampires, and Thugs
Baalz good player pledge
|
January 6th, 2008, 08:47 PM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
Not to curb the enthusiasm, but here is another worthwhile suggestion: Why not just have a web interface which offers a file upload? This is what I'd offer players on my servers, if for some inexplicable reason (firewall) they wouldn't be able to use the game network interface anymore.
Pro's:
- regardless of operating system, everybody has a web browser
- no binary needs to get executed by the players (security concern)
- instead of complicated POP/SMTP code, all it takes is overwriting the game files on the server (after checking)
- clients don't need to update their software, as all the code is on the server
Con's:
- no persistant storage of configuration (savegames location), although one could use cookies for that
- hmmm...
- makes the need to use email as transport medium for those PBEM games unnecessary?
|
January 6th, 2008, 09:14 PM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
The thought had crossed my mind. But basically that would be about as hard as using a webmail interface, and significantly more annoying than using something like Thunderbird or Outlook, so I don't really see that it would be an advantage.
Zeldor's idea of an app which simply directly connects to the server is reasonable, but how to do it (and do it securely) is completely out of my area of knowledge, and frankly isn't something I'm especially likely to do. Also I foresee firewall problems if I end up inside a university network again (the same issue applies to a web interface as well).
The ultimate thing I could do would make the LlamaServer pretend to be a dominions network server. But also very unlikely - the amount of work required would definitely not be justified by the return on time saved by users.
I'm really excited by Baalz's script - thanks Baalz! It sounds quite excellent - quite a significant timesaver. I'll take a look at it as soon as I get round to booting in Windows, and maybe it will inspire me to knock up something similar for Linux. We should also post in the MP forum so people actually find it.
|
January 6th, 2008, 11:12 PM
|
|
Major General
|
|
Join Date: Feb 2004
Location: Houston, Texas
Posts: 2,435
Thanks: 57
Thanked 662 Times in 142 Posts
|
|
Re: Community challenge: Automated PBEM e-mailing
Feel free to put it with the llamaserver instructions as it's set up as is to mail there.
__________________
My guides to Mictlan, MA Atlantis, Eriu, Sauromatia, Marverni, HINNOM, LA Atlantis, Bandar, MA Ulm, Machaka, Helheim, Niefleheim, EA Caelum, MA Oceana, EA Ulm, EA Arco, MA Argatha, LA Pangaea, MA T'ien Ch'i, MA Abysia, EA Atlantis, EA Pangaea, Shinuyama, Communions, Vampires, and Thugs
Baalz good player pledge
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|