Legendsmiths Posted June 3, 2005 Report Share Posted June 3, 2005 Sorry for the cross post, but I wanted to be sure that any PBEMers were aware of the resource. http://www.herogames.com/forums/showthread.php?p=740307#post740307 Quote Link to comment Share on other sites More sharing options...
Eosin Posted June 3, 2005 Report Share Posted June 3, 2005 Re: Pyton Dice Roll Email Filter What resource? Quote Link to comment Share on other sites More sharing options...
Legendsmiths Posted June 3, 2005 Author Report Share Posted June 3, 2005 Re: Pyton Dice Roll Email Filter Good point. I edited it and added the link. Sorry. Quote Link to comment Share on other sites More sharing options...
Guest Black Lotus Posted June 3, 2005 Report Share Posted June 3, 2005 Re: Pyton Dice Roll Email Filter I like it, although I know almost nothing about source code (or any code, ha ha) and the like. Still, I'd be willing to give it a go. Dice rollers are always good. Quote Link to comment Share on other sites More sharing options...
Legendsmiths Posted June 3, 2005 Author Report Share Posted June 3, 2005 Re: Pyton Dice Roll Email Filter You need access to a mail server (so you can add the script to your mail delivery processing) or have your account on a mailserver that: A) has python allows you to edit your procmailrc file Quote Link to comment Share on other sites More sharing options...
Guest Black Lotus Posted June 3, 2005 Report Share Posted June 3, 2005 Re: Pyton Dice Roll Email Filter I use Thunderbird, so it should work. Not sure if I know how to do the required modifications, though. Quote Link to comment Share on other sites More sharing options...
prestidigitator Posted June 4, 2005 Report Share Posted June 4, 2005 Re: Pyton Dice Roll Email Filter Interesting. I have been thinking for a while about writing a parser for a general die-rolling language. I have been lazy about figuring out the exact syntax, so I have been sitting on the project (along with so many others :sigh: ). Quote Link to comment Share on other sites More sharing options...
Dust Raven Posted June 4, 2005 Report Share Posted June 4, 2005 Re: Pyton Dice Roll Email Filter I don't do any PBEMing and such, so I'm not exactly what this resource is or that it does and how it is useful. Looks like a die roller of some kind, that's obvious, but how is it used? Quote Link to comment Share on other sites More sharing options...
Legendsmiths Posted June 4, 2005 Author Report Share Posted June 4, 2005 Re: Python Dice Roll Email Filter How it's used: So you are on a mailing list suchas CoolHeroPBEM@sweetdomain.com. This is where you conduct all your PBEM emailing. Now, normally any message goes to that list, on sweetdomain.com's server, and then gets parsed out to the individual members. This script gets inserted into that process, so that any dice roll expression gets evaluated before it is sent off. Typically on such a server you would have a mail aliases file that says something like: CoolHeroPBEM: "| /path/to/mailinglistmanager" You would change that to: CoolHeroPBEM: "| /path/to/rollerscript | /path/to/mailinglistmanager" Alternatively, if your mail is stored on server which allows personal procmail handling you should have a .procmailrc file in your home directory. If so, you could add this to the file: :0 fHw * ^Subject.*rollit | /path/to/rollerscript The drawback to the personal procmail solution is that only messages sent to you get parsed. But using the mailing list feature, everyone will see the roll as it's delivered. This isn't something you can just add to any email client (although that would be a pretty cool Thunderbird plug-in). This is a python script, that needs a python environment and either a list server or procmail to run. The general syntax is as follows (not case-sensitive): roll[text label,die expression] text label = any text string die expression = any combination of XdYz, (), +, -, *, / where X is a number of dice to roll, Y is the number of sides, and z represents a limited set of options 'Y' Side Symbols dF = Fudge Dice d%o = d100 open-ended high & low d%l = d100 open-ended low d%h = d100 open-ended high 'z' Options : = open-ended all dice total (e.g. Deadlands/HoE damage) ; = open-ended all dice total, but each open-ended die is -1 (e.g. used in Hackmaster for damage) @ = open-ended highest die (e.g. Deadlands/HoE skill test) B = calculate Body (e.g. Hero System) L = count sixes (e.g. Hero Luck) w = Savage Worlds 1d6 wild die (e.g. SW standard skill test) x = Savage Worlds 1d10 wild die (e.g. SW master skill test) You can put the roll function anywhere in your message and the result will be substituted. For verity, a log of the rolls as processed is attached to the end of the message. EXAMPLE FUNCTIONS: ro11[d20 attack,1d20] ro11[damage,(1d4+2)*5] ro11[fudge,4df] ro11[1d12,1d12] ro11[1d100,1d100] ro11[1d10000,1d10000] ro11[harp,1d%o] ro11[rmlow,1d%l] ro11[rmhi,1d%h] ro11[open total, 4d4:] ro11[open-1, 1d6;] ro11[open highest, 4d6@] ro11[hero,4d6b] ro11[luck,5d6l] ro11[savage normal,1d8w] ro11[savage master,1d4x] ACTUAL RESULTS: d20 attack (1d20): 16 damage ((1d4+2)*5): 25 fudge (4df): 1 1d12 (1d12): 8 1d100 (1d100): 10 1d10000 (1d10000): 1895 harp (1d%o): 18 rmlow (1d%l): 74 rmhi (1d%h): 17 open total ( 4d4:): 8 open-1 ( 1d6;): 4 open highest ( 4d6@): 5 hero (4d6b): 11 STUN, 3 BODY luck (5d6l): 0 savage normal (1d8w): 4 savage master (1d4x): 6 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.