The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Dice Roller Hack [BBCode] Details »» | ||||||||||||||||||||||||||
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:
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:
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
|
Comments |
#122
|
||||
|
||||
Quote:
Quote:
I will correct it in the archive. |
#123
|
||||
|
||||
Corrected
|
#124
|
|||
|
|||
thanks cclaerhout!
Just an update on what I'm doing... Remember I spoke of installing this mod more than once to play different games? Well, I took cclaerhout's 2.0 xml file version of the script (the one WITHOUT the user interface), here in this post: https://vborg.vbsupport.ru/showpost....8&postcount=69 and replaced all instances of "dice" with "playcard". Then I installed it and it created a new game using [playcard] as the bbcode. (I also changed the maximum number of images from 30 to 52 in the xml file). I found a nice set of public domain card images to use here: http://www.greywyvern.com/webslavent?msg=183 I renamed them 1.png through 52.png. Then I had to change the playcard template to $points.png instead of $points.gif since the images are a different format. Then I used Eikin's drop down script to code a menu to choose how many cards to draw out of the deck. I'm also going to do the same thing with "alphadice"...that is, install a version of the game that rolls alphabet letters instead of numbers. The possibilities for games are endless. My forum is not an RPG. But users could do something like this....roll a dice (a number) and an alphabet dice (a letter)...then you have to make up that number of words beginning with that letter that pertain to the tv show (my forum is about a tv show). So, roll a 5 and a B...5 words that start with B about the tv show. We could play boggle with the alphabet or hold lotteries with numbers. Just lots of variations for games to come up with. My toolbar menu is attached (it would only show in the Games forum, using cclaerhout's array code). First there's the "dice" game, then "alphadice", then "playcard". This is just a mock-up...I'll try and get better images. Because each game (dice, alphadice and cards) has a set number of "faces" in my setup (my dice have 6 sides, there are 26 letters in the alphabet, and 52 cards in a deck) so my drop down menu only contains the number of rolls to make (or cards to draw). So long story short, I now have several games and combinations of games to play on my forum. The only thing I need is an adjustment to the card script that would allow only ONE instance of each card per thread (there can't be two aces of hearts in a game). So....[insert pleading voice here] can anyone help me to tweak the script for that game so only one instance of each card is drawn per thread? I am SO CLOSE to having a complete game feature for my members to use...just need that one final element. Anyone? |
#125
|
||||
|
||||
So does this work now?(Not RPG dice)
|
#126
|
|||
|
|||
As far as I know all the bugs are worked out.
Another question... Any idea how I use text instead of images for the results of the dice roll? I think someone mentioned they were doing this. I get as far as creating 1.txt, 2.txt, 3.txt etc. files but then I don't know how to modify the templates so it uses the text in those files instead of an image url. Any ideas? |
#127
|
|||
|
|||
I don't know if anyone needs this, but I believe we concluded that the number of dice faces could only go up to 100 (if you altered the code from the original 30 to 100). However, I think I just made mine able to go higher. Here's how:
In dice_process_data change this: Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult); Code:
preg_match_all("/\[dice=([1-5])\]([0-9]?[0-9]?[0-9])\[\/dice\]/",$post['message'],$diceresult); and then change this line further down to however fany faces you want (where my 999 is): Code:
if ($faces[$i] >= 2 && $faces[$i] <= 999) It seems to work on my board. Does that seem like correct code? |
#128
|
|||
|
|||
Yeah, that's it... I was only interested in taking it to 100 as that is the most my members needed and added the extra '?[0-9]' in another post for code change. and you *may* actually want to add another '?[0-9]' in there. If a person were to roll more than 1 die of 999 faces you'd probably need the extra integer placing... for the resulting points....
|
#129
|
|||
|
|||
Is the first post in a thread issue fixed and is the mod file for download finished? As in I don't need to feed through the thread here in order to make it work.
|
#130
|
|||
|
|||
it depends on if you want the basic one or the one with the fancy interface. For the basic use THIS ONE
you may still need to go in and change the 30 for the 'faces' to 100 or whatever it is you may need as well as adding the extra '?[0-9]' as described above in Emmy2's post; for the fancy interface one cclaerhaut made look at post #117 on page 8 of this thread. be sure to upload the dice images too |
#131
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|