Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2017, 07:00 PM
Tri@de's Avatar
Tri@de Tri@de is offline
 
Join Date: Sep 2003
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin 4 Request - 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 05-02-2017, 09:30 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep...give me a couple of days, and I'll put something together for you.
Reply With Quote
  #3  
Old 05-03-2017, 02:18 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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, 6 views)
Reply With Quote
Благодарность от:
KevinL
  #4  
Old 05-03-2017, 08:19 AM
Tri@de's Avatar
Tri@de Tri@de is offline
 
Join Date: Sep 2003
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you SO MUCH!

--------------- Added [DATE]1493807827[/DATE] at [TIME]1493807827[/TIME] ---------------

Quote:
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?
Reply With Quote
  #5  
Old 05-03-2017, 03:45 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tri@de 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.

Quote:
Originally Posted by Tri@de 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.

Quote:
Originally Posted by Tri@de 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.

Quote:
Originally Posted by Tri@de 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.
Reply With Quote
  #6  
Old 05-03-2017, 04:32 PM
Tri@de's Avatar
Tri@de Tri@de is offline
 
Join Date: Sep 2003
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Благодарность от:
MarkFL
  #7  
Old 05-03-2017, 04:42 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tri@de 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.

Quote:
Originally Posted by Tri@de View Post
4) yes as an option is the best way.
Okay, I will add that.

Quote:
Originally Posted by Tri@de 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.
Reply With Quote
  #8  
Old 05-03-2017, 04:57 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're way too nice Mark. :^)
Reply With Quote
Благодарность от:
MarkFL
  #9  
Old 05-04-2017, 12:03 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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, 2 views)
Reply With Quote
  #10  
Old 05-04-2017, 01:49 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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, 5 views)
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 10:53 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.05175 seconds
  • Memory Usage 2,303KB
  • Queries Executed 14 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete