Back to vBulletin 3.5 Add-ons

Dice Roller Hack [BBCode]
Mod Version: 1.00, by Eikinskjaldi

This modification is in the archives.
vB Version: 3.5.4 Rating: (3 votes - 4.67 average) Installs: 51
Released: 25 Apr 2006 Last Update: 31 May 2006 Downloads: 637
Not Supported DB Changes Uses Plugins Template Edits Additional Files  

Dice Roller Hack [BBCode]
RPG Dice is currently a updated version

Spoiler (click to open)


RPG DICE
Version 2.0

>Credits :
-Dice Roll (original script) by Rigel Kentaurus
-Ported to vB 3.5 by Eikinskjaldi
-RPG version developped by Cédric Claerhout
-Thanks to Emmy2 for her help

>What does this hack do ?
It gives your forum a RPG Dice system.

>Is it hard to install ?
No at all !
-Download a set of dice (red or blue at the moment) then upload the images to ./images/dice in your main forum directory,
you will need to create the dice folder.
-Go into ACP and upload the XML through the product manager.
-Go to vBulletin options (admincp) and configure RPG Dice.

>Is there any bug ?
Unfortunately yes. Just one. The user interface dice buttons doen't work with wysiwyg editor. Solution : tell your members to click on the A/A button in the top right corner of the editor.

>Functionalities :
-(nice )user interface to throw the dice integrated both in classic editor and quickreply
-admincp configuration to choose usergroupid and forumid
-type of dice : D4, D6, D8, D10, D12 and D20
-Dice pictures in PNG format
-installation only requires one xml file thanks to vB product import system
Attached Images
File Type: png capture01.png (29.4 KB, 201 views)
File Type: png capture02.png (37.1 KB, 208 views)
File Type: png capture03.png (5.6 KB, 135 views)
File Type: png capture04.png (13.3 KB, 160 views)
File Type: png capture05.png (43.3 KB, 148 views)
File Type: png capture06.png (34.5 KB, 84 views)
Attached Files
File Type: zip red dice set.zip (592.5 KB, 83 views)
File Type: zip blue dice set.zip (647.0 KB, 79 views)
File Type: zip RPG Dice PSD for designers.zip (93.4 KB, 53 views)
File Type: zip RPG Dice Install.zip (4.3 KB, 130 views)

Close

Another updated version

Spoiler (click to open)


This hack is very similar to something I had done in phpMyChat and wanted to implement on my vBulletin boards to help the Play-by-Post gaming forums. However, I didn't really have a need for displaying cute dice images or limiting myself on the number of rolls or faces. Plus, the dice roller I'm using in my chat 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][/roll]
- for rolling and showing only the results or sum
[rollv][/rollv] - for rolling and seeing the result of each dice as well as the sum
[rollo][/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

I took the current XML file on this hack, made some big changes, adapted my Perl dice roller class to PHP and I've put together a product to allow dice rolling in this fashion. See the attachment.

If you want to see a better description and see some results you can view http://slithytoves.sytes.net/%7Edavid/forums/showthread.php?p=6422#post6422. I don't want to hijack this thread either, so if I need to provide this product via a new thread, someone just let me know. It seemed related enough that I figured I'd add it here first.

There is an INSTALL file in the zip attachment which gives an explanation of the included files and how to install them. If anyone has any questions, just shoot me a PM or I'll check this thread for thoughts.

This is installed and working on vBulletin 3.5.4 on my forums.
Attached Files
File Type: zip product-dice.zip (4.6 KB, 165 views)

Close


Note: Updated package includes only the correct XML.

This hack is a port of: Dice Roll for vB3 and permissions was given to port by the following statement.

Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in http://www.vbulletin.org at least, there is no
need to pm me asking for permission.
This hack rolls a Graphic based dice roll in your post and features multiple dice rolls per post. The images are fully editable by those who know how and I must agree that I very much think they need an overhaul, so go for it.

The basic bbcode format is:
[dice=X]Y[/dice]

X - The number of dice to roll, This cannot be larger then 5 currently, this may change later with demand.
Y - The number of sides on the dice.

so [dice=1]6[/dice] Roll's 1, 6 sided dice.

The only limit that I have noticed so far is that dice will not apear correctly when rolled from the create thread editor. I am unsure as to why this is still and am working on this issue. However aside from this it is working as need be. This hack is mainly useful to Game websites that require dice rollers for gambling or roleplaying games. It can add an element of fun to a forum and is adapatable to most dice require situations.

If enough demand is displayed I will work on removing the 5 roll limit or making it larger. The current maximum sides one can roll is 30.

If you enjoy this hack or have it installed, then please click the install button so that you can remain informed when updates occur.

As the original author said, You do not need to ask permission to update or do anything to this hack and can redistribute it if you feel you have made a great contribution to it.

If someone does make new dice images and wishes to have them as part of the package then either post here or PM me and I will get them in there with full rights going to the sender for the images.

Updates:
  • 04/29/06
    • Added new dice images which where provided by Rukbat.

This hack was requested from: index.php?t=97775

-Eikinskjaldi-

Original Screenshots:
&d=1078098688
&d=1078098702

Download

This modification is archived and cannot be downloaded.

Similar Mods

Module CMPS: Dice Roller vBulletin 3.5 Add-ons
Using only BBCODE to have a dice roller - NO database changes vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024