![]() |
Diceroller
Diceroller by PointSingularity, originally written for 2d4.org Version 1.002 This feature adds the functionality to post dice rolls. The rolls are associated with posts but cannot be edited even if the post can. No longer supported. WARNING!! It has been brought to my attention that a bug causes a MySQL error when using the pm system! To fix this, edit the plugin that's connected to the postbit display complete hook and add at the very top: Code:
if (!empty($post['postid'])) { Code:
} CHANGELOG 1.002 *Moved the dice roller itself into a more discreet area. Now works well with either postbit or postbit_legacy! *Added user option in the user cp for appearance (forum default, full, compatibility mode). Appearance can be enforced in the settings, disabling the user cp options and overriding any personal settings already set. *Added settings variable for main width. *Changed the font-size in a few places to make it look a bit more discreet. *Made the separate rolls lists collapsable. *Removed the nevershowfulllist function since it was completely pointless due to the newly collapsable lists. *Fixed bug that would claim description title was too long even if it wasn't when certain characters were entered. *Design fixes and reorganizing. The border now looks like the rest of the postbit's. *Added "roll" button. *Added code for clearing up memory after database queries. *Dice are now sorted by result (rolls are still sorted by id). *Connected to template hooks to further simplify the installation process. *Moved all of diceroller.php into the main plugin. 1.001 *Fixed counter error when dice list is in tooltip mode. *Added complete vBulletin Language/Phrase support. *Added low-profile mode. This will display entries as plain text, which is excellent if you want an uber-lite look or want better browser support since this turns off the java features. *Sorting sorted out. ;p Lists now sort with the newest entry on top in vertical lists and the newest at the end in horizontal (tooltips and low-profile mode). *Reorganized data and simplified installation process. --Notes: If upgrading, remove everything except the database and reinstall, following the new installation process. UPGRADE INSTRUCTIONS From v1.001 Upgrade within vBulletin using the new product-diceroller.xml. Be sure to check "allow overwrite" or upgrade won't work. Then upload the roll.gif image into the /buttons directory. Finally revert your template changes you made for the last version (they are no longer needed) and delete diceroller.php (it's not needed anymore either). From v1.0 Do NOT upgrade from v1.0. Instead delete the old templates, uninstall the plugins, etc. manually! You can keep the database if you'd like as that has not been changed. Version 1.001 comes with a proper installer and is upgradable. INSTALLATION INSTRUCTIONS 1. Upload and put roll.gif to your theme's "button" folder on the webserver (or make your own button ;) ). 2. Import the product file product-diceroller.xml. DONE! CHANGE SETTINGS: There's no addition to the admin cp, instead you can edit the settings by adjusting the values in the plugin called "Diceroller Settings". Be careful though! ALSO IMPORTANT: Be sure to have plugins enabled in vBulletin or this won't work. KNOWN ISSUES v1.002 *Quote-box gets dropped down, leaving the title where it should be, if the dice roller is in the way. |
What is the purpose of this?
|
Quote:
Quote:
|
Quote:
Quote:
EDIT: I'll see about making a better install tomorrow that includes the css and extra templates. It'll also include a slight fix (when using tooltip-view for the separate dice the numbers for each value is the number of the current die in the current post rather than the current roll). |
v1.002 will use template hooks (not sure if I can fit everything into the hooks but I'm trying ;) ) so installation/uninstallation/upgrade will be EVEN EASIER!
I'm also working on making it work better for regular postbit templates. |
hi I'm not sure what it's supposed to do. What happens when you roll the dice? And will it work for 3.7?
|
Quote:
For example, in a play-by-post game I'm supposed to attack a vicious lizardman with my longsword. I make 1d8+3 damage and therefor use the diceroller to roll 1d8. The game master can then verify that I've my damage score is valid. I'm not sure if it will work with 3.7 as it's written for 3.6.8. However I'd be happy if anyone would test it with that version and give me feedback on this. |
Ah I see, sounds pretty swell. Thanks for explaining ^_^. I'll consult my staff, cos we have a battle roleplaying forum on my site, if it's something they'd like to see I'll install and test it.
|
v1.002 is up!
It's still in beta, but I've done some quick tests in IE 7, Firefox 3 and Safari (think it's the latest version) and it seems to run at least. Unless there are any special requests I think I'm done with adding features and will focus on cleaning up the code and fix any bugs. So expect some minor changes in 1.003. |
This works fine in 3.7, but you'll need to add the security token, to all the inputs, i did this very easy.
whatever, i have problems with my PM's Now, i got a database error while viewing my recived.. This is the error: HTML Code:
Database error in vBulletin 3.7.0: |
I have added a note regarding the issue and will have it fixed asap. I'll see about adding those security tokens as well. Oh and there will be quite a few other improvements in the next update as well.
EDIT Nevermind, I had left the "improved" code too effed up. Pardon the French. I haven't been working on it for a while due to that I've reinstalled my webserver from scratch (on which I run my test installation that I develope on). This means I won't be able to fix this due to that I simply haven't got the time anymore (well, for now anyways. never say never). Instead I'm posting a manual fix you will have to apply to get it working properly. I'm sorry to do this but I'll also have to discontinue the support for this product. I will still answer any questions and try to help as time allows me, but can't promise anything. Quote:
|
Thank you so much, with this i can make it work!. if you want to, i can post the places in the templates where the security tokken must be placed, so anyone can run this in Vb3.7!!!
¿In what plugin i must add the improvement? Thank you very much |
Quote:
Quote:
The plugin is simply called "Diceroller". I'm attaching a picture as well. |
So, is this compatible with 3.7.3? Or is there a security token issue?
|
I just confirmed this. This mod does NOT work with 3.7.xx. It caused a Security Token error when rolling the dice.
It is too bad. Ths mod looked promising. Can this be fixed? Additional Suggested Features:
|
Quote:
Quote:
My spare-time is very limited at the moment, and that's why I made this unsupported. But I'll put those things (even the admin options if you really want them) on my to-do list for when I get the time. What I won't do however is charge anyone money for it. ;) |
Quote:
(1) Follow PntSingularity's concise instructions at the top to install the product (2) Apply the minor code change to the postbit display hook (3) Apply the security token code changes as per this thread: https://vborg.vbsupport.ru/showthread.php?t=177013 Now I'm brand new to administering a vBulletin (only been doing it for a few weeks), and I could work all of this out easily, so you should breeze through it PGAmerica. :) PntSingularity: I want to commend you for this mod. It's excellent and works seamlessly for the gamers on the PbP subforum of my forums. In my opinion, this is honestly the best dice roller for vBulletin that I've seen and in the day since I've added, I've had rave reviews from my members, all of whom I've directed back to this thread and yourself, since you deserve all due praise for your work. Whilst a minor point only, at some point if you ever have time (and granted you only stated above that your free time is practically zilch), if you could add a modifier to the roller? I'm no coder... hell I barely even know what I'm doing with administering my forum at times! So that when someone clicks on Roll, the page displays: Description: Dice: xx d: xx m: xx (ie. +5) It's a minor point and something I wish I could work out myself... but like I said I'm very new to this. :o |
Thanks. :)
Regarding the modifier. I've actually already implemented modifiers into 1.003. I just haven't gotten around to actually finishing that version due to lack of time (I just started a course at a university). I've also been working on another version of the dice roller (the one I'm using on my site) which supports rolls such as "1d6+3*(5-2)*2d8-1d5" in one click! However this is far from perfected and I never really wrote that version for the general public, which means it lacks in customizability both for the user and admin. Another thing that I improved with this other version is that the separate dice are stored in a single column rather than on separate rows in their on table within the MySQL database, which should improve performance if the database gets very large. So, I might attempt to perfect the improved version I run on my site while implementing the customizability from this version and at the same time adding the extra features requested. Though this WILL take time. I've got to read The Nicomachean Ethics this weekend and it's 300+ pages... :eek: Btw, it's funny that my mod seems to get so much more attention now that I have less time to work with it... Quote:
|
Quote:
Quote:
Any help would be appreciated. |
Nevermind, I figured it out.
Edit the "roll_addform" template and add Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> Code:
<form action="editpost.php?do=rolldice&p=$drthispost" method="post"> |
As long as we are requesting features for the next version (and I understand that you have very little time):
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Well, if I do implement the feature to roll an entire string you could always enter something like "1d20*2+1d20*3+1d20+5+1d20-3", or do you mean adding the same multiplier to each roll? I can't see many reasons for this but the latter wouldn't be very hard to implement whether I implement string rolling or stick with single rolls. The only problem is that with the string system the modifier would affect all rolls within the string. It seems most of your ideas revolve around not using the string roll system. Perhaps single rolls with modifiers is a better idea. Perhaps I'll add the optional ability to roll using a string syntax at a later time since it would need extensive work to work along with all these specifications. Quote:
Quote:
Quote:
I'll put these things on my to do list. But as I've said my time is very limited atm. I'll see if I have time to take a peek into it this weekend, but I have no idea when I'll be done with the list. |
Quote:
Quote:
Quote:
They would have top roll individually anyway (at least for the attack roll) as that roll is not one that can be added to more dice. Quote:
Quote:
Quote:
Quote:
|
The additions in relation to the modifier and other changes sound great. Whenever you get the time to get a later version up would be wonderful, and I'm sure greatly appreciated by less able folks in the scripting/coding realm (such as myself!).
Quote:
Quote:
Seriously though, your work is fabulous and whenever you are willing and able to get an updated one done would be brilliant. But work and school come first... and the Nicomachean Ethics is no light read, particularly doing it in one weekend. |
I'm interested in the latest version of this mod (which includes the modifiers, etc.).
Any ETA on when it'll be available ? Thanks in advance for any information. |
Quote:
But I'll make sure to post any updates here. |
I appreciate you watching this thread. So many times I see threads ignored and it really irritates me
|
Quote:
|
You might want to re-post this (with the "Security Token" addition) in the the 3.7 mods just to make it clear it is available for them as well. This is the best dice roller I have ever seen on this site.
|
Hello, im really needing this plugin to work, but after installing everything when i click to add the roll dice i get the message "sorry this can't be processed as a security token couldn't be found" well something like that (my forum is in spanish), so there's any way to fix that?
btw my version is 3.7.3 |
Is it at all possible to get an updated version of this excellent diceroller for vb4? This is seriously the best vB diceroller I've ever found... but as I needed to update my forums, I was hoping to get an updated version of this at some point.. Pretty pls?
|
I have to second that request, I hope you're alive somewhere! No other dice roller compares in awesomness!
|
I'll add a request that this dice roller get ported to vb4x.
It appears to be the best dice roller I've come across as of yet (and I've come across quite a few). I'm looking for one for my online RPG. If you can spare the time to port it to 4x that would be great. :) |
I've installed this on vb 3.8.6. I've added the security token and the fix for PM's.
No errors ... but I can't get the roll.gif button to display on showthread. Any ideas? |
Love to chat with anyone that has this working.
|
Quote:
duh |
Has anyone tried this on 4.x?
|
All times are GMT. The time now is 06:28 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|