Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Dice Roll Details »»
Dice Roll
Version: 2.0, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.2.x Rating:
Released: 05-06-2017 Last Update: Never Installs: 8
DB Changes Uses Plugins
Additional Files Translations  
No support by the author.

This product is in response to the request posted by Tri@de here:

Bbcode dice roller with image and customizable

Overview:

This product is designed to allow your users to roll virtual dice in their posts. Included are two sets of dice face image sets, one for the standard six-faced regular hexahedral (cube) dice, and one for regular dodecahedral (12-sided) dice.



A numeric roll is also allowed, where the number of dice and faces can be specified, and the dice are shown in a tabular format as numbers rather than as images.

Upon installation, a custom BBCode ([DICE][/DICE]) is added for displaying the dice face images. THis way CSS can be added via a class selector, and there will be no interference with your default [img]https://vborg.vbsupport.ru/[/img] tags.

Images:

In the product settings, in the setting labeled "Dice Set Indentifiers" you can give each image set a unique identifier, which is used within the [ROLL=X][/ROLL] tags, where "X" is the identifier of the set to be used. Using this setting, you can specifiy an indetifier for any image set you upload to be used as dice faces. These sets need to be uploaded to your "images/dice" folder. There is a setting that allows you to add your own custom CSS to the images.

In its simplest form, a user may enter something like [ROLL=1]5[/ROLL] to get five randomaly generated dice faces from set "1". If the user wishes to only use, for example the first 4 faces, then they would enter [ROLL=1]5d4[/ROLL]. If the number entered for the number of faces to be used is greater than the total number of faces you specify in the settings, or less than 1, then this will be set to that maximum value.

For example, if a user enters [ROLL=1]5[/ROLL], then their post will look something like:



Numbers:

Your users can also use numeric sets with as many faces as desired using the tags [NROLL][/NROLL], and these dice will simply be shown as numbers within a table. For example, if a user wishes to roll six 17-faced dice, then they would enter [NROLL]6d17[/ROLL].

In all cases, the sum of the faces is shown and if the number of dice specified is not greater than zero, no replacement will be carried out.

For example, if a user enters [NROLL]5d50[/NROLL], then their post might look something like:



Tamper Resistance:

When dice are rolled, above the output will be the text "Legitimate Dice Roll" (which you can alter via the phrase for that text). If a user edits their post for any reason, then this phrase will be replaced by another phrase which states "Illegitimate Dice Roll!"



If they have removed the legitimate phrase, then nothing will appear there. If they try to manually construct a dice roll using the appropriate BBCodes, and have added the legit phrase themselves, it will be replaced with the illegit phrase. So, unless a dice roll has the legit phrase above it, you know it could have been tampered with by the OP. If an admin/mod edits a user's post, then the legit phrase will remain intact. You may also specify users by usergroup who are allowed to edit their own posts with the legit phrase left intact.

Active Forums:

In the product settings, you can designate forums where this product is active as you will likely wish to restrict the dice rolls to your gaming area(s) only.

Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product alters the structure of your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new product.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  1. Download and extract the attached .zip file.
  2. Upload the contents of the "upload" folder to your forum's root directory.
  3. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  4. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  5. Click "Import."
  6. You MUST enable the product in the settings before it will function.
  7. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Dice Roll v2.0.zip (64.0 KB, 24 views)

Screenshots

File Type: jpg markfl_diceroll_acp.jpg (69.2 KB, 0 views)
File Type: png markfl_diceroll_images.png (41.9 KB, 0 views)
File Type: png markfl_diceroll_post01.png (52.9 KB, 0 views)
File Type: png markfl_diceroll_post02.png (53.4 KB, 0 views)
File Type: png markfl_diceroll_post03.png (49.6 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Reply


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. The time now is 07:10 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03693 seconds
  • Memory Usage 2,237KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (6)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete