Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 02 May 2017, 22:00
Tri@de's Avatar
[email protected] Tri@de is offline
 
Join Date: Sep 2003
Real name: David
Bbcode dice roller with image and customizable

I'd like to have a dice roller that can show images of dice face
i search also a customizable one
i explain:
if i write [ roll=xx] 2d6 [/ roll]
i want the output will show 2 images of customized dices.
if i write [ roll=yy] 2d6 [/ roll]
i want the output will show 2 images of other customized dices.

someone can do it?
Reply With Quote
  #2  
Old 03 May 2017, 00:30
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Yep...give me a couple of days, and I'll put something together for you.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #3  
Old 03 May 2017, 05:18
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Okay...here is a preliminary product for you to test.

Download the attached .ZIP file, and upload the contents of the "upload" folder to your forum's root...this contains a set of images for the standard six sided die.

Once you have the images uploaded, and the .XML file imported, your users can then use something like:

[roll=1]5d6[/roll]

in their posts. The above will display five 6-sided die images (from the default defined image set), randomly generated.

If you have any questions about the use of this product (such as how to add more sets of images), please feel free to ask. If you have any suggestions for improvement, please let me know.
Attached Files
File Type: zip MarkFL - Dice Roll v1.0.zip (18.9 KB, 4 views)
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #4  
Old 03 May 2017, 11:19
Tri@de's Avatar
[email protected] Tri@de is offline
 
Join Date: Sep 2003
Real name: David
Thank you SO MUCH!

--------------- Added 03 May 2017 at 11:37 ---------------

Originally Posted by MarkFL View Post

If you have any questions about the use of this product (such as how to add more sets of images), please feel free to ask. If you have any suggestions for improvement, please let me know.

Thank you i will write here all i have in my mind:
1)i'd like to use different dices for different games.
if il play monopoly i use regular 1d6
if i play Star wars Imperial assoult i use this type of dice:


So i have to discrimiate them using [ dice=swia] for imperial assault

2) i'd like to have also the way to use different dices as 1d4 1d8 1d20 1d100 and how much i want 3d8, 2d4 10d100

3) a way to not let the user change the roll he has done.

4) can sum the rolls example: [sroll]3d6 and have in output 6-3-1 tot= 10

5) can change the output from images to numbers

6) is it possible also to customize/create dices via admincp?

Last edited by [email protected]; 03 May 2017 at 12:00.
Reply With Quote
  #5  
Old 03 May 2017, 18:45
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by [email protected] View Post
1)i'd like to use different dices for different games.

2) i'd like to have also the way to use different dices as 1d4 1d8 1d20 1d100 and how much i want 3d8, 2d4 10d100
What you need to do if create/find or otherwise obtain sets of images that show each face of an individual die. For each set, the image file names need to begin with the same string of text and end with a number corresponding to the value of the face.

You may have noticed that the default set I include had the names:
  • dice-1.png
  • dice-2.png
  • dice-3.png
  • dice-4.png
  • dice-5.png
  • dice-6.png

In the product settings, I gave this set the identifier "1" by including the line:

1|dice-*.png

This means your users can use the following code:

[roll=1]5d6[/roll]

to get 5 six-sided dice randomly generated.

So, to use other sets, you need to upload the image set, with the files appropriately named, to the folder "images/dice" on your server, and then include the identifier string in your settings.

Originally Posted by [email protected] View Post
3) a way to not let the user change the roll he has done.
The only way I know to do that is to prevent your users from being able to edit their posts. I will add a setting that allows you to make this product active only in selected forums, and then for those forums, you will need to edit the forum permissions for each usergroup you don't want editing their posts.

Originally Posted by [email protected] View Post
4) can sum the rolls example: [sroll]3d6 and have in output 6-3-1 tot= 10
I can make that an option, and display the output in tabular format.

Originally Posted by [email protected] View Post
5) can change the output from images to numbers
Do you mean once the post has been made, you want the ability to change the post so that numbers are shown rather than the images?

I'll wait until we get all these issues sorted out before updating the product.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #6  
Old 03 May 2017, 19:32
Tri@de's Avatar
[email protected] Tri@de is offline
 
Join Date: Sep 2003
Real name: David
1) 2) Ok i understood!
3) ok. i use as it is. if i see modified post i'll ban!
4) yes as an option is the best way.
5) Not after but before

example:
if i type [noparse][niroll=1]3d6[/niroll][noparse] i will see 2/6/4 instead of thee images.

I renew my thanks to help me.
You made a great mod!

Last edited by [email protected]; 03 May 2017 at 19:41.
Reply With Quote
  #7  
Old 03 May 2017, 19:42
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by [email protected] View Post
...3) ok. i use as it is. if i see modified post i'll ban!
Depending on your settings, your users may be able to quickly edit their post without it showing it has been edited.

Originally Posted by [email protected] View Post
4) yes as an option is the best way.
Okay, I will add that.

Originally Posted by [email protected] View Post
5) Not after but before

example:
if i type [niroll=1]3d6[/niroll] i will see 2/6/4 instead of thee images.

I renew my thanks to help me.
That sounds like it would be almost the same as the "sroll" option, except without the sum. I will add that as an option as well.

I will also go ahead and add the option to select forums in which the product is active. Look for the update within the next 24 hours.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #8  
Old 03 May 2017, 19:57
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
You're way too nice Mark. :^)
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #9  
Old 04 May 2017, 03:03
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
I have attached the updated product .XML file...give that a go and let me know what you think.
Attached Files
File Type: xml product-markfldiceroll.xml (6.0 KB, 0 views)
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #10  
Old 04 May 2017, 04:49
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Here is a version that is more "tamper-proof"...when a user posts a dice roll, the text "Legitimate Dice Roll" will appear above the roll (you can change this text by editing the phrase "markfl_diceroll_legittext").

If a user tries to cheat and construct their own dice roll by entering the appropriate image/table BBCodes with that text above it, the text will be removed. If the post is edited, that text will also be removed.
Attached Files
File Type: xml product-markfldiceroll.xml (6.9 KB, 3 views)
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #11  
Old 04 May 2017, 08:57
Tri@de's Avatar
[email protected] Tri@de is offline
 
Join Date: Sep 2003
Real name: David
Tks i'll test it
Reply With Quote
  #12  
Old 07 May 2017, 07:26
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by [email protected] View Post
Tks i'll test it
I have published a more robust version of this product here:

Dice Roll

I have cited you as a co-author since this was your idea/request.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #13  
Old 07 May 2017, 08:22
Tri@de's Avatar
[email protected] Tri@de is offline
 
Join Date: Sep 2003
Real name: David
HAhahah thank you
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Miscellaneous Hacks Dice Roller [BBCode] DragonBlade vBulletin 4.x Add-ons 16 17 Oct 2015 15:09
Dice Roller Hack [BBCode] Eikinskjaldi vBulletin 3.5 Add-ons 198 12 Apr 2013 08:05
Using only BBCODE to have a dice roller - NO database changes Renmiri vBulletin 3.5 Add-ons 6 06 May 2007 04:13



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

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 21:43.

Layout Options | Width: Wide Color: