MetaPost comments and questions about the messageboards and other parts of EN World. If you have a problem, this is where to go. Moderator email addresses are posted here.
I've implemented a new code, with which you can perform a die roll. You can roll as many as 3 dice of 30 faces and as few as 1 die of 2 faces. Once you roll the dice it is stored in the post so you cannot roll again even if you edit the post or whatever.
How to use it:
[dice={dices}]{faces}[/dice]
Examples - replace ( and ) with [ and ] in the below examples:
(dice=2)10(/dice) (This will roll 2d10)
(dice=1)6(/dice) (This will roll 1d6)
Remember, the code works for a maximum of 3 dice, and only between 2-30 faces on each.
__________________
Last edited by Morrus; 5th March 2004 at 03:07 AM..
Edit: Hmm ... apparently only works once per post.
__________________ "The Soul of D&D?It's rolling a natural 20 when you're down to 3 hit points and the cleric's on the floor and you're staring that sunnavabitch bugbear right in his bloodshot eye and holding the line just long enough to let the wizard unleash a fireball at the guards who are on their way, because they're all that stands between you, the Foozle and Glory." - WizarDru
Last edited by Olgar Shiverstone; 5th March 2004 at 03:31 AM..
Is there any way of editing the code so that the greyspace doesn't stretch out? And if a user deletes the entire text of their post and then repeats the process, does it change the results? Any way of having a version with no image? Can you add modifiers?
Just three obvious questions, and I'll test out one right now:
[dice]
Makes online character generation, combat, and the like a little post-intensive.
Still, a very neat tool. Thumbs up!
__________________ "The Soul of D&D?It's rolling a natural 20 when you're down to 3 hit points and the cleric's on the floor and you're staring that sunnavabitch bugbear right in his bloodshot eye and holding the line just long enough to let the wizard unleash a fireball at the guards who are on their way, because they're all that stands between you, the Foozle and Glory." - WizarDru
Morrus, I wouldn't mind having a look at the random number generation code.
You can have a look at everything I used. Basically, it was a single page of instructions on code changes to make. I didn't understand it - just copied and pasted. I've attached the instructions here.
So if you change align="center" to align = left and add replace most of the bracketed dice stuff with "DiceL" could you have a dice left and a dice right command? And what about if you make a ShortDice without the image, and just put the number itself on the page?
Hell, I've got no idea what I'm saying, but that's doesn't look to hard to screw around with.
Last edited by Creamsteak; 5th March 2004 at 07:50 AM..
You can have a look at everything I used. Basically, it was a single page of instructions on code changes to make. I didn't understand it - just copied and pasted. I've attached the instructions here.
Suggestion: replace rand() in
Code:
$dicedetail['data'][] = rand(1,$faces);
with mt_rand(). rand() uses the default random number generator provided by the server, and this can have poor statistical properties especially on older systems.
1) Allow multiple rolls in a post;
2) Show different graphics depending on the die type (I don't mind limiting it to "real" dice instead of anything between 2 and 30 - it would require quite a few dice to be drawn, but I'm sure that could be done).
__________________ Story Hour
OMG! The SKY IS FALLING! --JoeGKushner
Myself, I plan to masturbate less -- der_kluge
I know that I've never really liked d20. I think it was designed by a bunch of hacks --- Monte Cook
I am sickened beyond belief. The half-orc wizard is obviously the best possible PC, and I only had to read 10 pages of the book to figure it out. D&D is dead to me! -- Mike Mearls
FWIW, I'm on the design team and I pretty much find WoW as fun and interesting as banging my head against a brick wall. -- Mike Mearls
you happen to say that 4E reminds you of the reasons you decided against a career as a special-Ed teacher--noted rpg author Darrin Drader
you wait patiently after casting your spell.. suddenly you feel strange. as if you are here but not here.
another voice enters your mind.
Hiya....
your find familiar spell has summoned a special form...one of true kindred with your spirit.
a pseudo dragon.
__________________ Story Hour
OMG! The SKY IS FALLING! --JoeGKushner
Myself, I plan to masturbate less -- der_kluge
I know that I've never really liked d20. I think it was designed by a bunch of hacks --- Monte Cook
I am sickened beyond belief. The half-orc wizard is obviously the best possible PC, and I only had to read 10 pages of the book to figure it out. D&D is dead to me! -- Mike Mearls
FWIW, I'm on the design team and I pretty much find WoW as fun and interesting as banging my head against a brick wall. -- Mike Mearls
you happen to say that 4E reminds you of the reasons you decided against a career as a special-Ed teacher--noted rpg author Darrin Drader