The Warring States of NPF  

Go Back   The Warring States of NPF > Forum Info > Forum related stuff
User Name
Password
Mark Forums Read
FAQ Members List Calendar Search Today's Posts Join Chat

Reply
View First Unread View First Unread   Click to unhide all tags.Click to hide all tags.  
Thread Tools Display Modes
Unread 10-16-2013, 05:34 PM   #1
synkr0nized
synk-ism
 
synkr0nized's Avatar
 
Join Date: Nov 2003
Location: throughout the Wired
Posts: 6,854
synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law.
Send a message via ICQ to synkr0nized Send a message via AIM to synkr0nized Send a message via MSN to synkr0nized Send a message via Skype™ to synkr0nized
Default [Feature Addition] Dice Rolling in Posts

Do you run a forum-based RP that would benefit from having easy access to dice while posting? Do you want to be "that guy" and make dice-related jokes and rolls in your posts? Do you like scripts that do random stuff?!

NPF now is making use of a dice rolling mod put together by "tuxz0r" on the vBulletin forums back in 2006.

There are three bbcode additions that will roll dice in a post.

All roll commands use the following format:
XdY+N

X is the number of dice to use.
Y is the total sides of the die type being rolled.
N is used for modifiers (I guess, like, if you have a +1 to hit rolls, for example)

roll -- shows just the sum of what's rolled

rollv -- should show the result of each die as well as the total

rollo -- open rolls; author has example of "4d6b3" giving the best 3 rolls out of the four

When using these bbcodes, you can add a label to any roll with an = in the tag, such as
Code:
[roll=to hit]3d6[/roll]
.

After rolling, the output in the post will look something like this:

Quote:
roll: (2d10)[11]
rollv: (3d6)[3][6][6](15)

Things to Note
The opening/initial post of a thread WILL NOT correctly parse roll commands. This is why you don't see any examples in this post.

If you double-post and it gets auto-merged, rolls made in the auto-merged post WILL NOT work. The original author likely did not expect the auto-merge modification.

If you are EDITING A POST, you cannot add new rolls. The rolls are made server-side when the initial post/reply is created and stored in the database. This is by design, and prevents cheating.


As a result of the roll security above, when editing or quoting a post with rolls made in it, you will only see a placeholder for the roll in the format of [roll#]. The actual roll data is stored server-side in a separate column from the post content.


I hope you folks who run RPs and the like will be able to make use of this. Test it out. If you have any problems, feel free to post about them here or message me!
__________________

Find love.

Last edited by synkr0nized; 10-16-2013 at 06:00 PM.
synkr0nized is offline Add to synkr0nized's Reputation   Reply With Quote
Unread 10-16-2013, 05:47 PM   #2
Red Mage Black
Sent to the cornfield
 
Red Mage Black's Avatar
 
Join Date: Oct 2004
Location: Where the Sun isn't so warm.
Posts: 2,673
Red Mage Black is a splendid one to behold, except in the mornings. Red Mage Black is a splendid one to behold, except in the mornings. Red Mage Black is a splendid one to behold, except in the mornings.
Send a message via AIM to Red Mage Black Send a message via MSN to Red Mage Black Send a message via Skype™ to Red Mage Black
Default

This is just a test post by me. I'll be using the different roll codes for demonstration purposes:

Result only:
(2d6)[2]

For seeing the result of each die, plus the result:
(2d6)[1][2](3)

Open rolls:
(2d6)[3][5](8)

Edit: Not much difference between the second and third, I'll admit. Not sure what it means by 'open rolls'.
Secondary Note/Edit: When you edit after you've already rolled, the code will change to [roll#].

Last edited by Red Mage Black; 10-16-2013 at 05:51 PM.
Red Mage Black is offline Add to Red Mage Black's Reputation   Reply With Quote
Unread 10-16-2013, 05:51 PM   #3
synkr0nized
synk-ism
 
synkr0nized's Avatar
 
Join Date: Nov 2003
Location: throughout the Wired
Posts: 6,854
synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law.
Send a message via ICQ to synkr0nized Send a message via AIM to synkr0nized Send a message via MSN to synkr0nized Send a message via Skype™ to synkr0nized
Default Without adding options, it's the same as rollv.

Another for "open rolls", using the mod author's example of 4d6b3:
(4d6b3)[5][11][5][4](20)


I am not really clear what he intended, either, yet.
__________________

Find love.
synkr0nized is offline Add to synkr0nized's Reputation   Reply With Quote
Unread 10-16-2013, 05:55 PM   #4
Red Mage Black
Sent to the cornfield
 
Red Mage Black's Avatar
 
Join Date: Oct 2004
Location: Where the Sun isn't so warm.
Posts: 2,673
Red Mage Black is a splendid one to behold, except in the mornings. Red Mage Black is a splendid one to behold, except in the mornings. Red Mage Black is a splendid one to behold, except in the mornings.
Send a message via AIM to Red Mage Black Send a message via MSN to Red Mage Black Send a message via Skype™ to Red Mage Black
Default

I'll give it a shot using a different code and see if I can figure it out:

(6d10b4)[1][11][8][6][4][1](30)

Edit: I'm wondering where that 11 comes from, since it showed up in both of our rolls.
Red Mage Black is offline Add to Red Mage Black's Reputation   Reply With Quote
Unread 10-16-2013, 05:59 PM   #5
synkr0nized
synk-ism
 
synkr0nized's Avatar
 
Join Date: Nov 2003
Location: throughout the Wired
Posts: 6,854
synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law.
Send a message via ICQ to synkr0nized Send a message via AIM to synkr0nized Send a message via MSN to synkr0nized Send a message via Skype™ to synkr0nized
Default "Open" again, with a label

I had a 14 in one when I tested before using d10.

what is this - (4d10b2)[8][3][5][4](20)
__________________

Find love.
synkr0nized is offline Add to synkr0nized's Reputation   Reply With Quote
Unread 10-16-2013, 06:12 PM   #6
Red Mage Black
Sent to the cornfield
 
Red Mage Black's Avatar
 
Join Date: Oct 2004
Location: Where the Sun isn't so warm.
Posts: 2,673
Red Mage Black is a splendid one to behold, except in the mornings. Red Mage Black is a splendid one to behold, except in the mornings. Red Mage Black is a splendid one to behold, except in the mornings.
Send a message via AIM to Red Mage Black Send a message via MSN to Red Mage Black Send a message via Skype™ to Red Mage Black
Default

Labeling is good, but the open roll function looks bugged. It has the odd habit of adding in a number not associated to the dice being rolled, then includes it with the highest rolls. Might be better off ignoring the open roll tags and just settling with the first and second functions.

The link in the authors post where it explains the roller better is broken and has probably been broken for a while.

Note: I found a site that claims to have fixed the 'first post' issue, if you want to take a look at it, Synk.

Edit: Hm, maybe not? Looks like just downloading the forum mod requires registration.

Last edited by Red Mage Black; 10-16-2013 at 06:15 PM.
Red Mage Black is offline Add to Red Mage Black's Reputation   Reply With Quote
Unread 10-16-2013, 06:53 PM   #7
synkr0nized
synk-ism
 
synkr0nized's Avatar
 
Join Date: Nov 2003
Location: throughout the Wired
Posts: 6,854
synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law. synkr0nized isn't just above the law -- they are the law.
Send a message via ICQ to synkr0nized Send a message via AIM to synkr0nized Send a message via MSN to synkr0nized Send a message via Skype™ to synkr0nized
Default Yeah, that's not "keep the best three" by any means.

Quote:
Originally Posted by Red Mage Black View Post
Note: I found a site that claims to have fixed the 'first post' issue, if you want to take a look at it, Synk.

Edit: Hm, maybe not? Looks like just downloading the forum mod requires registration.

Yeah, I've already come across that one over at vBulletin's forums. It's for vBulletin 4x, and we're still using 3.8.5. Slight differences in the vBulletin backend (specifically how it calls and references templates to render threads and posts) prevents me from both just applying that version or copying the relevant code over, as it's not compatible with vBulletin 3, AFAIK currently.

It doesn't look like that author made any changes to tux0rz's "open roll" idea, anyway. In both cases, all that happens is that for any die that rolls the maximum value it can (i.e. a 6 for a d6, 10 for a d10, etc.) it gets rolled again and adds that value to the max. If it were to equal the max again, it would roll again and add that as well. So on a d10 that hit 10, it rolls again. If it was, say, 2, the sum for that die becomes 12; if it was 10 again, it would temporarily be 20 and roll a third time.

This is not what is described as the behavior, at least as far as I interpret what the original coder claims should happen. I don't know enough about tabletop mechanics to know if something like this is supposed to happen.

So perhaps it is best to ignore that command?
__________________

Find love.
synkr0nized is offline Add to synkr0nized's Reputation   Reply With Quote
Unread 10-16-2013, 07:31 PM   #8
Wizardcat
Dark-type?
 
Wizardcat's Avatar
 
Join Date: Nov 2006
Location: Somewhere.
Posts: 431
Wizardcat is a name known to all, except that guy. Wizardcat is a name known to all, except that guy.
Default

Quote:
Originally Posted by synkr0nized View Post
In both cases, all that happens is that for any die that rolls the maximum value it can (i.e. a 6 for a d6, 10 for a d10, etc.) it gets rolled again and adds that value to the max. If it were to equal the max again, it would roll again and add that as well. So on a d10 that hit 10, it rolls again. If it was, say, 2, the sum for that die becomes 12; if it was 10 again, it would temporarily be 20 and roll a third time.

This is not what is described as the behavior, at least as far as I interpret what the original coder claims should happen. I don't know enough about tabletop mechanics to know if something like this is supposed to happen.

So perhaps it is best to ignore that command?
That's how an open roll (also known as exploding dice) works, yes. It's not a 'best of' roll - they're two different things.

[roll0]
[roll1]

Edit: Huh. Previewing kills the rolls. Whoops.
__________________
The dogs of war are nothing compared to the cats.
Wizardcat is offline Add to Wizardcat's Reputation   Reply With Quote
Unread 10-16-2013, 07:32 PM   #9
Aldurin
Lakitu
 
Join Date: Feb 2010
Posts: 4,648
Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk. Aldurin is the 13th apostle of funk.
Default

Yeah, our forum isn't entirely optimized for dice rolling with the post-merge feature. But this does tempt me to run an actual D&D game on the forum.
Aldurin is offline Add to Aldurin's Reputation   Reply With Quote
Unread 10-16-2013, 07:40 PM   #10
Wizardcat
Dark-type?
 
Wizardcat's Avatar
 
Join Date: Nov 2006
Location: Somewhere.
Posts: 431
Wizardcat is a name known to all, except that guy. Wizardcat is a name known to all, except that guy.
Default

There's actually one already going, though it's done on the forum's chat and not the forum itself. http://edupad.ch/ShiftingSeasDnD3point5 is used for coordinating for it and the like, if interested.
__________________
The dogs of war are nothing compared to the cats.
Wizardcat is offline Add to Wizardcat's Reputation   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:01 AM.
The server time is now 08:01:28 AM.


Powered by: vBulletin Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.