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

Reply
 
Thread Tools
Dice Roller Hack [BBCode] Details »»
Dice Roller Hack [BBCode]
Version: 1.00, by Eikinskjaldi Eikinskjaldi is offline
Developer Last Online: Jul 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-24-2006 Last Update: 05-29-2006 Installs: 51
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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

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.

Quote:
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 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: https://vborg.vbsupport.ru/showthread.php?t=97775

-Eikinskjaldi-

Original Screenshots:
https://vborg.vbsupport.ru/attachmen...3&d=1078098688
https://vborg.vbsupport.ru/attachmen...4&d=1078098702

Show Your Support

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

Comments
  #162  
Old 06-25-2006, 02:05 AM
Campbell Campbell is offline
 
Join Date: Oct 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, I think I have part of the problem then.

You say above that you did not use RPG dice, but the cclaerhout dice were packaged with RPG Dice in post 117. I believe this is part of my confusion.

What exactly did you install and in what order? If it's working for you it should for me; but the frenetic nature of this thread is confusing.

I have since removed those test threads. But would welcome your input or testing if you wished.

Best,
A
Reply With Quote
  #163  
Old 06-25-2006, 02:17 AM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the xml file I use (attached) BUT before installing you'll have to uninstall the other AND open the xml file and change the ***_post and ***_thread in the 'Alter Table' parts at the beginning to have the *'s reflect the prefix all your vb tables have.
  • This one is set for up to 9 dice and up to 100 faces,
    it DOES work when starting a thread.
    You do have to actually type the
    Code:
    [dice=#]**[/dice]
    substituting number of dice for '#' and number of faces for '**'.
    Be sure when you import the xml file (after substituting the *'s for table prefixes) that you check the 'allow overwrite' radio button/checkbox

Have been using this on my forum since 4/24 and none of my members have had any problems with just typing the code in... of course I have them trained to be happy with what I give them ;p~
Reply With Quote
  #164  
Old 06-25-2006, 02:24 AM
Campbell Campbell is offline
 
Join Date: Oct 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Understood.

Thank you for your assistance. Any solution that makes my users type code is not a solution for my users. I was attracted to the system because of the interface and display, not just the function alone.

I appreciate your time and effort Eq. You've been kind. I will move my request to the paid forum and work with my existing contractor as well. When I have the solution that's best, I'll share it as open source with the community as I'd suppose the majority of our community owners with games could use this and have it both be functional and pretty.

Best,
A
Reply With Quote
  #165  
Old 06-25-2006, 02:29 AM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no problem
perhaps one of the others can help here that use the RPG one.
the RPG one didn't fit with what 'we' needed to do.. as we use multiple faces and *usually* only 1 die at a time. I'd love a nifty little button to use, but it's beyond my capabilities and pocket book as the site is a free one. My members and I were just thrilled to have *any* dice hack that actually worked for 3.5.4
Reply With Quote
  #166  
Old 06-25-2006, 02:36 AM
Campbell Campbell is offline
 
Join Date: Oct 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Totally with you Eq.

We're free at this time as well (hell we're not open yet) but if I'm ever going to go fee based I need the tools and need to spend the cash. I'll do what I can to get this done and share it off.
Reply With Quote
  #167  
Old 06-25-2006, 06:05 AM
soravok soravok is offline
 
Join Date: Dec 2005
Location: Vancouver, BC, Canada
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eq4bits
no problem
perhaps one of the others can help here that use the RPG one.
the RPG one didn't fit with what 'we' needed to do.. as we use multiple faces and *usually* only 1 die at a time. I'd love a nifty little button to use, but it's beyond my capabilities and pocket book as the site is a free one. My members and I were just thrilled to have *any* dice hack that actually worked for 3.5.4

Same here Eq, much love to you for saving me from being lynched by my members. :banana: :banana: :banana:

Did you see what I posted about marking posts that are edited "fixed" and having the dice rolls from preview to preview be different everytime?
Reply With Quote
  #168  
Old 06-28-2006, 11:19 PM
tuxz0r's Avatar
tuxz0r tuxz0r is offline
 
Join Date: Jun 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 my forum thread about this enhancement. 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.
Reply With Quote
  #169  
Old 08-03-2006, 09:05 PM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay anyone upgraded to the now available vB 3.6 gold that just became available? will this work with 3.6?
Reply With Quote
  #170  
Old 08-04-2006, 07:46 PM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont see why it shouldnt, vB3.6 isnt to far off from vB3.5, if anything they'd be simple bugs.
Reply With Quote
  #171  
Old 09-12-2006, 10:40 AM
ocitalia ocitalia is offline
 
Join Date: Aug 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i add a button in postbid for ONLY [dice=2]6[/dice] ?
Reply With Quote
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 04:15 PM.


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.04728 seconds
  • Memory Usage 2,325KB
  • Queries Executed 27 (?)
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)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete