Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Dice Roller [BBCode] Details »
Dice Roller [BBCode]
Mod Version: 1.00, by DragonBlade (Member) DragonBlade is offline
Developer Last Online: Oct 2013 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (3 votes - 4.33 average) Installs: 35
Released: 24 Jun 2010 Last Update: Never Downloads: 219
Not Supported DB Changes Uses Plugins Additional Files  

Original:
http://www.vbulletin.org/forum/showthread.php?t=113972
http://www.vbulletin.org/forum/showp...&postcount=167

With tuxz0r's permission, I have ported his version of his dice roll mod for vb 4.0. This also fixes the first post issue.

Shameless copy paste from tuxz0r's post:
This mod uses the standard AdX+B notation where

A = the number of dice to roll (1 if not present)
X = the number of faces on the dice
B = represents a modifier, usually a + or - but also a divides or multiply.

I also need it to do certain things like, only show the sum/result of the roll or show all the die results and the sum of the roll. I also wanted the ability to do open rolls, e.g. if you roll 6, six sided die, you keep rerolling any dice that come up a 6.

So, basically, I have concocted three different bbcodes in one product:
[roll]1d4[/roll] - for rolling and showing only the results or sum
[rollv]1d4[/rollv] - for rolling and seeing the result of each dice as well as the sum
[rollo]1d4[/rollo] - for open rolls

Each of these takes and optional label for the roll, to be included in the tag after the '=' sign, e.g. [roll=to hit]4d6[/roll] and so forth. It is, however, optional as the actual notation for the roll is displayed before the results in the final posting.

So, for example, you can enter rolls like the following:

[roll]4d6[/roll] to get the sum of 4 six sided die.
[roll]d%[/roll] for a percentage roll (same as 1d100)
[roll]4d6b3[/roll] to roll 4 six sided dice and only sum the "best" three results

Installation:
1. Upload class_dice.php into vb's includes folder.
1. Import product-dice.xml.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	diceroll.jpg
Views:	1140
Size:	36.5 KB
ID:	118792  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Dice Roller Hack [BBCode] Eikinskjaldi vBulletin 3.5 Add-ons 198 12 Apr 2013 08:05
Module CMPS: Dice Roller Zachariah vBulletin 3.5 Add-ons 15 01 Sep 2007 08:50
Using only BBCODE to have a dice roller - NO database changes Renmiri vBulletin 3.5 Add-ons 6 06 May 2007 04:13

Comments
  #2  
Old 24 Jun 2010, 12:31
sulasno sulasno is offline
 
Join Date: Feb 2010
tagged and thanks

what can I do with this Mod ?
Reply With Quote
  #3  
Old 24 Jun 2010, 13:49
thunder28 thunder28 is offline
 
Join Date: Sep 2007
Its fine for roleplaying sites:-)

if is possible i can see the results for each dice?
I roll 3d10 the output is: 3,6,9, = 18

thx for this mod.
Reply With Quote
  #4  
Old 24 Jun 2010, 18:58
Daryn Daryn is offline
 
Join Date: Nov 2008
I seem to have found a small bug. If you add another roll to an existing post it will not do the roll but only shows the bbcode. You can do multiple rolls in one post, but you can't seem to add additional rolls to an existing one.

It also doesn't seem to work if I forget to add a roll into a post I made and then edit the post and add the roll.

Also, there is no way for me to explain how to use the bbcode on the forum because the Code, HTML, do not show the code, but instead show [roll0,1,2,3,4] depending on how many rolls are in that post.

Last edited by Daryn; 24 Jun 2010 at 22:41.
Reply With Quote
  #5  
Old 25 Jun 2010, 00:19
DragonBlade's Avatar
DragonBlade DragonBlade is offline
 
Join Date: May 2006
Originally Posted by thunder28 View Post
Its fine for roleplaying sites:-)

if is possible i can see the results for each dice?
I roll 3d10 the output is: 3,6,9, = 18

thx for this mod.
Yes, use [rollv]1d4[/rollv]

Originally Posted by Daryn View Post
I seem to have found a small bug. If you add another roll to an existing post it will not do the roll but only shows the bbcode. You can do multiple rolls in one post, but you can't seem to add additional rolls to an existing one.

It also doesn't seem to work if I forget to add a roll into a post I made and then edit the post and add the roll.

Also, there is no way for me to explain how to use the bbcode on the forum because the Code, HTML, do not show the code, but instead show [roll0,1,2,3,4] depending on how many rolls are in that post.
I believe the previous mod never supported adding in edited rolls and the bbcode parses, ignoring other bbcodes like noparse. I could change this later but for now, I just wanted to port this over for vb4.0
__________________
Anime Arcadia - Anime, Video Games, & Music Forums
Reply With Quote
  #6  
Old 25 Jun 2010, 03:43
Daryn Daryn is offline
 
Join Date: Nov 2008
Originally Posted by DragonBlade View Post
Yes, use [rollv]1d4[/rollv]



I believe the previous mod never supported adding in edited rolls and the bbcode parses, ignoring other bbcodes like noparse. I could change this later but for now, I just wanted to port this over for vb4.0
Oh I totally appreciate the port. I just thought that I would post what I ran across in my tests.
Reply With Quote
  #7  
Old 28 Jul 2010, 20:20
Scathefire Scathefire is offline
 
Join Date: Oct 2006
I like this.

Would it be difficult to adjust for 3.8.x? I've not moved to the 4 series yet.
Reply With Quote
  #8  
Old 20 Aug 2010, 02:38
Willy T Willy T is offline
 
Join Date: Nov 2009
I'm having a bit of issue with the dice, namely the 2d6b1, as it always rolls a "0"

it SHOULD be rolling 2 6-sided dice, and picking the better of the two results...

if you can assist with a fix or tell me what I am doing wrong, I would greatly appreciate it.
Reply With Quote
  #9  
Old 20 Sep 2010, 07:53
Kodai Okuda Kodai Okuda is offline
 
Join Date: Sep 2010
This hack does not work in vB 4.0.6.

I've tried the original code by Eikinskjaldi and it doesn't work either.

Not that that's surprising considering it was for vB 3.4/3.5.

My question is, does anyone have an updated version of this particular dice roller that will work in version 4.0.6/4.0.7

I ask because the current versions are far too buggy to be useful and I really need a dice roller for my free online RPG system.

Thanks in advance.
Reply With Quote
  #10  
Old 12 Feb 2011, 23:28
Eq4bits Eq4bits is offline
 
Join Date: May 2006
*installed*
works fine in 4.08
yeah I need to upgrade but haven't had the time to =S
Reply With Quote
  #11  
Old 06 May 2011, 09:44
Mv.c9 Mv.c9 is offline
 
Join Date: Aug 2010
does it work for 4.1.3 ?
Reply With Quote
  #12  
Old 22 May 2011, 13:09
MissSavitri MissSavitri is offline
 
Join Date: May 2011
I have 4.1.3 and every time I use any of the above codes, it comes back with an error.
For instance, I copy and pasted the above and when I posted it on my forums, it came out with the following:


[roll0] - for rolling and showing only the results or sum
[roll1] - for rolling and seeing the result of each dice as well as the sum
[roll2] - for open rolls

So, for example, you can enter rolls like the following:

[roll4] to get the sum of 4 six sided die.
[roll5] for a percentage roll (same as 1d100)
[roll6] to roll 4 six sided dice and only sum the "best" three results
Reply With Quote
  #13  
Old 27 Jun 2011, 03:33
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Works perfectly on my vB4.1.4 board, no errors
Reply With Quote
  #14  
Old 06 Aug 2011, 01:31
LuMiS! LuMiS! is offline
 
Join Date: Dec 2008
Works fine for me in 4.1.5 ...
Reply With Quote
  #15  
Old 12 Apr 2015, 20:33
Lemrith's Avatar
Lemrith Lemrith is offline
 
Join Date: Jul 2011
still works damn fine in 4.2.2pl4

just a side question - how to get [rollv] to show the induvidial dices without the sum?
__________________
www.lemrith.net
Die Stadt deiner Träume
(german Roleplay Forums)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 12:48.

Layout Options | Width: Wide Color: