Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Colin on July 30, 2009, 09:52:06 PM

Title: Dice Roller
Post by: Colin on July 30, 2009, 09:52:06 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2032)

Author: Colin
Previous Authors: Robbo & Arantor


This mod allows users to roll dice. They can use the preview function to preview dice rolls to make sure they have it right for what they want, but once they press Post, the dice rolls are embedded in the post, meaning that the only way they can change is if the post is edited, but a warning is issued if that is attempted.

It starts from a [roll] tag, and outputs a [blockquote] tag (implemented just for the mod) - trying to use the blockquote tag outside of [roll] circumstances (such as quoting the post, or better, editing the post) generates a visible warning.

There are a variety of options you can have inside the roll tag:

[roll]1d6[/roll] - rolls 1 6-sided dice.
Might result in:
QuoteRolled 1d6 : 2, total 2

[roll]2d12+5[/roll] - roll 2 12-sided dice and add 5 to the result
Might result in:
QuoteRolled 2d12+5 : 6, 11 + 5, total 22

[roll]2d20^10[/roll] - roll 2 20-sided dice, re-rolling any result necessary so that the dice rolls are greater than 10.
QuoteRolled 2d20^10 : 3 8 10 3 17, 2 10 9 10 14, total 31

[roll]2d20v10[/roll] - roll 2 20-sided dice, re-rolling any result necessary so that the dice rolls are less than 10.
QuoteRolled 2d20v10 : 11 3, 3, total 6

[roll]2d20<10[/roll] - roll 2 20-sided dice, discarding any result where the roll was not less than 10.
QuoteRolled 2d20<10 : 4, 20, total 4

[roll]2d20>10[/roll] - roll 2 20-sided dice, discarding any result where the roll was not greater than 10.
QuoteRolled 2d20>10 : 9, 10

Normally it will add the word 'Rolled' in front - you can customise this. For example, a spell that does some serious damage in a game:
[roll]{Freezing} 1d10 {Fire} 1d20[/roll]
QuoteFreezing 1d10 : 1, total 1
Fire 1d20 : 2, total 2

You can also nest the requirements, with the proviso of stating the things as they are in order here.
[roll]{Uberdamage} 15d100+10^10v90<80>20[/roll] - 15 100-sided dice, adding 10 to the result, rerolling anything 10 or less, rerolling anything 90 or higher, and if after that, you have values 20 or less, or 80 or higher, they get dropped.
QuoteUberdamage 15d100+10^10v90<80>20 : 82, 7 61, 3 36, 59, 30, 86, 14, 42, 70, 22, 99 58, 100 73, 46, 93 1 91 42, 12 + 10, total 549

Lastly you can also have an iterator at the end:
[roll]2d6x3[/roll] - roll 2d6 3 times and display the results overall
QuoteRolled 2d6 : 6, 3, total 9
Rolled 2d6 : 1, 4, total 5
Rolled 2d6 : 1, 5, total 6


BBcode is not supported anywhere inside the [roll] tag.

Note I haven't provided a help file in the script, but generally this is going to be of limited use and for the forums it will be useful, they will likely want to explain it better to their users anyway.

(There is, as of 1.3, a button to click as well as RC2 support)

There are also limitations to prevent abuse; the most dice that can be used at once is 20, and the highest value of dice is 1000-sided.
Title: Re: Dice Roller
Post by: Joe N on July 31, 2009, 07:49:07 AM
Screenshot>
Title: Re: Dice Roller
Post by: Arantor on July 31, 2009, 08:00:10 AM
Though it looks virtually identical to the post above, I have added screenshots to the mod page for you, one showing the building of the [roll] tag, and one showing its output.
Title: Re: Dice Roller
Post by: Joe N on July 31, 2009, 08:09:59 AM
Quote from: Arantor on July 31, 2009, 08:00:10 AM
Though it looks virtually identical to the post above, I have added screenshots to the mod page for you, one showing the building of the [roll] tag, and one showing its output.

Thank You
Title: Re: Dice Roller
Post by: aaraon on August 04, 2009, 07:27:50 PM
I've tried to install this mod but it don't modify the "subs.php" file.
./Sources/Subs.php Fail

Someone else knows why?


Sorry for my english.
Title: Re: Dice Roller
Post by: Arantor on August 04, 2009, 07:37:26 PM
Is this 1.1 or 2.0?
Title: Re: Dice Roller
Post by: aaraon on August 04, 2009, 08:03:56 PM
Oh, sorry. My forum is the 1.10 version

Here the adress
http://www.falerpg.com.br/forum/
Title: Re: Dice Roller
Post by: Arantor on August 04, 2009, 09:24:08 PM
That's two reports from 1.1.10 I've had. I need to investigate this further. Will reply shortly.
Title: Re: Dice Roller
Post by: aaraon on August 05, 2009, 10:14:56 AM
Thanks, I will be waiting. :-)
Title: Re: Dice Roller
Post by: Arantor on August 06, 2009, 10:44:43 PM
Should be fixed now for 1.1.10.

Not bumping the version number, it's not a code change. It just changes how it finds where to insert something - users who've installed it successfully don't have to worry, but future users will be all good.
Title: Re: Dice Roller
Post by: aaraon on August 07, 2009, 10:36:54 AM
Sorry, same error mensage! :-(
Title: Re: Dice Roller
Post by: Arantor on August 07, 2009, 11:27:50 AM
Please can you attach your Subs.php file?
Title: Re: Dice Roller
Post by: aaraon on August 07, 2009, 06:58:44 PM
Here it is! I hope that helps  :D
Title: Re: Dice Roller
Post by: Arantor on August 09, 2009, 10:33:05 AM
Spectacular, I managed to break it entirely with my previous fix.

Reuploaded version - http://custom.simplemachines.org/mods/index.php?action=download;mod=2032;id=110583 - should install cleanly now on 1.1.
Title: Re: Dice Roller
Post by: aaraon on August 09, 2009, 06:28:36 PM
IT'S ALIVE!!! IT'S ALIVE!! err...  I mean... It's working fine! Thanks!





Sorry for the trouble!  O:)
Title: Re: Dice Roller
Post by: Arantor on August 09, 2009, 06:30:02 PM
No worries, my bad for not writing it nicely the first time :)
Title: Re: Dice Roller
Post by: aaraon on August 09, 2009, 06:51:38 PM
You can't imagine all problems and my forum is an magnetic for problems.

If you accept sugestions, a way to not edit the roll. My players are not reliable. :-P
Title: Re: Dice Roller
Post by: Arantor on August 09, 2009, 06:59:02 PM
Actually, the first release was stupid because I didn't check something in 1.1, the second I typo'd the install script, but this version works.

Re editing: The simplest solution is to remove the ability of players to edit their own posts.

I did look at doing it with a database, but I simply couldn't find a way that was still fast didn't require weeks of extra coding which I didn't (and still don't) have the time to put in. Maybe a later version though.
Title: Re: Dice Roller
Post by: aaraon on August 09, 2009, 08:41:08 PM
At this time this dice roller is perfect! I'm all praise!   ;D
The last thing I want is to belittle for all the work that you had!  :o I will continue accompanying your work. Now it is only the congratulations!  ;)
Title: Re: Dice Roller
Post by: Arantor on August 09, 2009, 08:46:38 PM
Good to hear :) Seriously though if you do come up with things you'd like to see I'll see what I can do about adding them here.
Title: Re: Dice Roller
Post by: oridyne on August 16, 2009, 01:31:52 PM
Quote from: Arantor on August 09, 2009, 08:46:38 PM
Good to hear :) Seriously though if you do come up with things you'd like to see I'll see what I can do about adding them here.

Really excellent mod thankyou.

Does the mod support rolling 4 dice and dropping the lowest value dice? If not is that possible to include? only this would be really useful for me..

Thanks again..
Title: Re: Dice Roller
Post by: Arantor on August 16, 2009, 01:52:48 PM
You can roll 4 dice with 4d6 for example, but dropping lowest is not yet supported. It is however on my todo list. No guarantee as to if/when that will materialise.
Title: Re: Dice Roller
Post by: oridyne on August 17, 2009, 02:19:07 PM
Thanks for the reply.

I will await a possible future update then..

Title: Re: Dice Roller
Post by: danielwmoore on September 01, 2009, 11:51:09 AM
I am using 2.0 RC1.2, and am experiencing problems with this mod.


It also does not pay any attention to the [ nobbc ] tag.  When I need to include an instruction page, it is impossible to make a post on giving instructions.  Even with the nobbc tag it still rolls the dice, and places blockquote tags, but does not blockquote the entry due to the nobbc tags.

Could you make this behave better with the nobbc tag?  It's the first BB Code I've encountered that does not behave with the nobbc tag.

Title: Re: Dice Roller
Post by: oridyne on September 01, 2009, 01:50:53 PM
Quote from: danielwmoore on September 01, 2009, 11:51:09 AM
I am using 2.0 RC1.2, and am experiencing problems with this mod.

It also does not pay any attention to the [ nobbc ] tag.  When I need to include an instruction page, it is impossible to make a post on giving instructions.  Even with the nobbc tag it still rolls the dice, and places blockquote tags, but does not blockquote the entry due to the nobbc tags.

Could you make this behave better with the nobbc tag?  It's the first BB Code I've encountered that does not behave with the nobbc tag.

I've found that:

[ nobbc ][roll]2d6x3[/roll] - roll 2d6 3 times and display the results overall[ /nobbc ]

will work whereas:

[ nobbc ]
[roll]2d6x3[/roll] - roll 2d6 3 times and display the results overall
[ /nobbc ]

will fail as you describe.
Title: Re: Dice Roller
Post by: danielwmoore on September 01, 2009, 01:58:11 PM
Thanks!  That's very helpful.  Not a perfect solution, but definitely workable.
Title: Re: Dice Roller
Post by: Arantor on September 01, 2009, 03:48:23 PM
It has to bypass the nobbc tag for a specific reason, unfortunately.

Normally a BBcode is stored as-is in the database, and converted to HTML at display. Which is fine - but for this that would mean re-rolling the dice every page view, which doesn't help matters.

Instead what I had to do was modify the tag in-situ and turn it into blockquote etc, so it can be stored in the database and never changed, which means it doesn't normally properly respect nobbc, because by the time nobbc is handled, the tag has already been deleted and replaced with [blockquote].

The solution posted above will work, and I need to update the mod's page anyway so I can add this useful tip in (thank you!). Unfortunately there isn't really a much better way of doing it :(
Title: Re: Dice Roller
Post by: danielwmoore on September 01, 2009, 06:11:49 PM
Totally understandable when you explain it that way. 

This won't be a problem.  I just use my programmer's text editor to highlight a line and insert the nobbc tags for me.  Much easier that way.  Instructions are done.

Perhaps a sample instruction page already marked up with BB Code could be helpful, included as a text file in the archive?  That way it's a simple copy, minor edit, and paste for admins.  Not necessary for me though, as I already have it.  Just a thought.

Thanks for this great mod. 
Title: Re: Dice Roller
Post by: Arantor on September 01, 2009, 06:20:05 PM
Well, I already have two I can use as a template: http://www.simplemachines.org/community/index.php?topic=327831.0 and http://custom.simplemachines.org/mods/index.php?mod=2032 both have a full guide to the code available.

I can make an edit to the above pages though to cover posting the topic into your forum, with nobbc attached into it.
Title: Re: Dice Roller
Post by: selmiak on September 04, 2009, 04:46:31 PM
@ danielwmoore:
I had no problems when using e.g.

[[img][/img]roll] [/img]roll]

as the empty image tags will disappear and just leave the roll tags standing there ;)


@Arantor:
My 1337haX0r uzerz managed to just write

[blockquote]Rolled 1d6 : 6, total 6[/blockquote]

:( ...is there any way to avoid this simple cheat.
maybe write CHEATING ATTEMPT when [blockquote] is used without the [roll] tag...

other than that... cool mod! :D

btw, I can translate the few words into german if you like this...
Title: Re: Dice Roller
Post by: Arantor on September 04, 2009, 05:39:58 PM
I need to revisit this code again in the not too distant future, actually.

It needs miscellaneous tidy-ups with respect to stupidity protection (as I learned the hard way a week or so ago)

I could prevent the user writing [blockquote] manually, sure enough. As a byproduct it'd also break if they tried to edit the post.

That said, I am debating rehashing it all once I get my current project done (which is a huge paid mod) so that all rolls are DB stored and cannot be edited by any means. Though that raises the game in terms of complexity, and would likely be a fair performance hit.

I did actually look at doing some stuff while building this one, around encrypting/decrypting the rolls but never got anything particularly satisfactory that wasn't trivial to emulate manually.
Title: Re: Dice Roller
Post by: Kyrna on September 08, 2009, 06:04:21 PM
This is the first mod I've installed that went in perfectly with no hitches at all. I'll definitely be keeping an eye out for updates - thanks so much for creating this mod!
Title: Re: Dice Roller
Post by: lhz on September 16, 2009, 06:13:07 PM
There is a way to limit the number of dices and sides, to prevent abuse?

Thanks.
Title: Re: Dice Roller
Post by: Arantor on September 16, 2009, 06:14:09 PM
No, that's on my to-do list.
Title: Re: Dice Roller
Post by: lhz on September 16, 2009, 08:36:50 PM
Ok, I'll wait then.

Thanks for the fast answer :D
Title: Re: Dice Roller
Post by: david090366 on September 19, 2009, 03:28:48 AM
Quote from: selmiak on September 04, 2009, 04:46:31 PM
@ danielwmoore:
I had no problems when using e.g.

[[img][/img]roll] [/img]roll]

as the empty image tags will disappear and just leave the roll tags standing there ;)


@Arantor:
My 1337haX0r uzerz managed to just write

[blockquote]Rolled 1d6 : 6, total 6[/blockquote]

:( ...is there any way to avoid this simple cheat.
maybe write CHEATING ATTEMPT when [blockquote] is used without the [roll] tag...

other than that... cool mod! :D

btw, I can translate the few words into german if you like this...

I use another dice mod on my forum that posts an image of a little purple d6 with the post. This serves to let me know if someone has just typed in the dice roll or if they actually used the die roller. Also, if they edit the post once the post is saved it will show the html code for the image.
Title: Re: Dice Roller
Post by: Arantor on September 19, 2009, 04:37:05 AM
Interesting idea, unfortunately ultimately defeatable - using a d6 image is not infallible, you can use img tags to replicate it. Plus this handles plenty more than just d6 (including but far from limited to d4, d8, d10, d12, d20)

I have an idea on defeating edited posts for the next version.
Title: Re: Dice Roller
Post by: Kyrna on September 19, 2009, 12:10:13 PM
Quote from: Arantor on September 19, 2009, 04:37:05 AM
Interesting idea, unfortunately ultimately defeatable - using a d6 image is not infallible, you can use img tags to replicate it. Plus this handles plenty more than just d6 (including but far from limited to d4, d8, d10, d12, d20)

I have an idea on defeating edited posts for the next version.
Any idea when the next version will be? My users are playing D&D in one part of my forum and while at the moment, they think it isn't possible to cheat, if someone figures out that it is, even if they themselves don't cheat, they might start to suspect anyone else's good roll was a cheat.
Title: Re: Dice Roller
Post by: Arantor on September 19, 2009, 12:12:01 PM
Unfortunately "when it's done". I have a lot of things going on and I haven't had time to sit and actually code the changes I have in mind. But what I do have will defeat anyone editing or posting the post - because it just won't look right.
Title: Re: Dice Roller
Post by: Arantor on September 24, 2009, 07:56:43 AM
Right, two new updates today.

1. Limits on the numbers and types of dice, just to curtail possible abuse.

2. As stated, rendering is pushed through the [blockquote] tag, but if you try and use that tag outside of dice rolls - it gives you a warning :)
Title: Re: Dice Roller
Post by: Kyrna on September 24, 2009, 08:50:32 AM
Quote from: Arantor on September 24, 2009, 07:56:43 AM
Right, two new updates today.

1. Limits on the numbers and types of dice, just to curtail possible abuse.

2. As stated, rendering is pushed through the [blockquote] tag, but if you try and use that tag outside of dice rolls - it gives you a warning :)
I will install the update as soon as I get home - thanks! :)
Title: Re: Dice Roller
Post by: Kyrna on September 24, 2009, 09:51:34 PM
The update works great! It'll take me awhile to get used to the way it makes the blockquotes look but but that's just me. :)
Title: Re: Dice Roller
Post by: Arantor on September 24, 2009, 09:57:41 PM
Well, you can change it to look how you want by editing the definition in Subs.php - in the <div style="..."> bit and it'll roll that look out to all of them next time.
Title: Re: Dice Roller
Post by: Kyrna on September 24, 2009, 10:20:18 PM
Quote from: Arantor on September 24, 2009, 09:57:41 PM
Well, you can change it to look how you want by editing the definition in Subs.php - in the <div style="..."> bit and it'll roll that look out to all of them next time.
I don't yet know php but if it still bothers me by the time I learn it (which is doubtful), I'll change it. :)

Honestly, I'm just thrilled with this mod. It has given me no trouble at all and has my users very happy!
Title: Re: Dice Roller
Post by: Arantor on September 24, 2009, 10:32:37 PM
It's not a huge deal to change - just let me know how you'd like it to look and I can talk you through the changes.
Title: Re: Dice Roller
Post by: Kyrna on September 24, 2009, 10:34:12 PM
Quote from: Arantor on September 24, 2009, 10:32:37 PM
It's not a huge deal to change - just let me know how you'd like it to look and I can talk you through the changes.
As soon as I get through my 1600 page study guide for my license - well, and the exam. :)
Title: Re: Dice Roller
Post by: Arantor on September 24, 2009, 10:36:51 PM
:o

Been too long since I took any exams, I've forgotten what it's like to study for one. Good luck :)
Title: Re: Dice Roller
Post by: hither on September 28, 2009, 12:41:08 AM
Great mod, it works great so far.

I have one important question though.

How do you style the output?

The rolled dice box seems to end up w/no style applied (or it's grabbing some kind of default form the browser maybe).

Code and quote are working fine but I can't find in the style.css how to style it?

It's a bit of a problem as I can barely see the rolls.
Title: Re: Dice Roller
Post by: Arantor on September 28, 2009, 03:13:19 AM
It isn't in style.css to style it, it's built into the changes applied to Subs.php, meaning you have to edit that.

Open Subs.php, look for this:
array(
'tag' => 'blockquote',
'before' => '<div style="font-size:x-small; background-color:#ffffff; margin:5px 20px; border:1px dashed black; filter:alpha(opacity=50); opacity:0.5;">',
'after' => '</div>',
),


Change the contents of the div's style attribute.
Title: Re: Dice Roller
Post by: hither on September 28, 2009, 03:16:43 AM
thanks mate!
Title: Re: Dice Roller
Post by: Kyrna on October 13, 2009, 09:20:59 PM
Here's a possible graphic for a post reply button. I discovered pretty quickly that I couldn't do a white d6 so I had to settle for a black one. Feel free to use it if you'd like but you may find someone with a better graphic. It wouldn't hurt my feelings. :)
Title: Re: Dice Roller
Post by: Arantor on October 31, 2009, 08:17:30 PM
I finally got round to adding this, though unfortunately I didn't use that image; once I added it into the backgrounds for the post box (especially on RC2) it just didn't look right.

But I'm pleased to say it has been added now into version 1.3 which also has RC2 compatibility :)
Title: Re: Dice Roller
Post by: Sabbi on December 08, 2009, 07:16:21 PM
Hi =D  First off, I loooove this mod, it's been wonderful to use so far besides one little thing.

Second is the one little thing. ^^;  For some reason, when someone uses the code in the quick reply box and then previews their post, it changes the [roll] tags to the [blockquote] tags instead of the roll tags in the post box. If the author doesn't think to check the tags in their post because they showed up alright in the preview... It awkwardly looks like they were trying to cheat.

Is this only happening on my forum? We're running 1.1.11 with the latest version of the mod available and I've gotten the error to happen repeatedly.

Thanks for the mod and your help Arantor~! <3 (It really is wonderful... My forum users are just silly about not doublechecking their tags.)
Title: Re: Dice Roller
Post by: Arantor on December 09, 2009, 05:46:09 AM
Hmm, I think that's down to how I implemented the anti-cheating mechanism.

I'm also not sure there's a nice way around it without either removing/watering down the anti-cheat, or massively re-engineering the post system. I'll play around with it though and see what I can come up with.
Title: Re: Dice Roller
Post by: mpaese on January 01, 2010, 10:25:27 PM
Hi, Arantor
I've loved your mod, because I need it a long time ago.
But I'm having just a little problem.
When I post something, with or without Dice Roll, admin or not admin, instead forum shows last post, it goes directly to the index page. Post is ok, but after posting, system is not working as it should be...
Do you have some idea what's going on?
Thanks for your time. ^^
And happy new year!
Title: Re: Dice Roller
Post by: Arantor on January 01, 2010, 10:28:17 PM
So if you uninstall the mod, does it work as it should do?

Is "return to this message after posting" ticked?
Title: Re: Dice Roller
Post by: mpaese on January 02, 2010, 12:19:00 PM
Quote from: Arantor on January 01, 2010, 10:28:17 PM
So if you uninstall the mod, does it work as it should do?

Is "return to this message after posting" ticked?
Ooooops...
Ok... I'm a loser... LOL.

Sorry to make you think about this... but my language didn't the 'return to this message' translated, and I've never thought about it... oh, gosh...

Thanks for your attention again. ^^
Title: Re: Dice Roller
Post by: Arantor on January 02, 2010, 12:32:05 PM
No worries - just worth checking whether it's an issue in the mod or not before I start any code tracking; I do some funky stuff in the post system to attempt to prevent cheating but occasionally it can mess up.
Title: Re: Dice Roller
Post by: THE BRA1N on January 23, 2010, 09:09:14 PM
Where do you edit the text color inside of the blockquote or whatever it is? Mine is nearly invisible no matter which background i change it to in the subs.php line.
Title: Re: Dice Roller
Post by: Arantor on January 23, 2010, 09:16:33 PM
The Subs.php line is the ONLY place where it is set. If it's not being updated, that would imply you're editing the wrong file, or you're doing something weird.

Can I see an example please?
Title: Re: Dice Roller
Post by: THE BRA1N on January 23, 2010, 09:24:20 PM
It's being updated, i just dont see where to change the color of the main text either in the Subs.php or index.css files. Right now it blends with the background too much.

Title: Re: Dice Roller
Post by: Arantor on January 23, 2010, 10:06:54 PM
You edit that one line, add a color: declaration to it.
Title: Re: Dice Roller
Post by: THE BRA1N on January 23, 2010, 11:47:23 PM
Quote from: Arantor on January 23, 2010, 10:06:54 PM
You edit that one line, add a color: declaration to it.

That worked like a charm! Thx.
Title: Re: Dice Roller
Post by: lordevil on January 30, 2010, 08:41:32 PM
Quote from: Arantor on September 28, 2009, 03:13:19 AM
It isn't in style.css to style it, it's built into the changes applied to Subs.php, meaning you have to edit that.

Open Subs.php, look for this:
array(
'tag' => 'blockquote',
'before' => '<div style="font-size:x-small; background-color:#ffffff; margin:5px 20px; border:1px dashed black; filter:alpha(opacity=50); opacity:0.5;">',
'after' => '</div>',
),


Change the contents of the div's style attribute.
Thank you, I have been looking for this for days. I didnt even know the mod had a link to this page. I thought that was just text :duh: Thanks a million!
Title: Re: Dice Roller
Post by: eolith on January 31, 2010, 01:37:57 PM
I had the color issue as well, grey on grey, so i changed the background to #780000, and it looks great.
Title: Re: Dice Roller
Post by: Succubus Evaligan on February 10, 2010, 05:35:32 AM
I like this mod. n_n
Title: Re: Dice Roller
Post by: Lordmiller on April 04, 2010, 11:57:20 AM
Having what appears to be a cross issue between this mod and TinyPortal Beta 5:


I had this mod already installed to 2.0 RC3, then installed TP Beta 5 everything works for both mods, except if I try to upload a file into the TP download manager I get this error after entering all the data and hitting the save/send button:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Die Roller Ap', '

', 'http://rpgfreelancers.org/smf/tp-downloads/icons/blan' at line 3
File: /home/celedor/public_html/smf/Sources/TPdlmanager.php
Line: 221

Any clue what the syntax it's referring to as being for use next to "die roller ap"?
Title: Re: Dice Roller
Post by: Arantor on April 04, 2010, 12:12:31 PM
That's nothing to do with this mod; there are no changes whatsoever in TPdlmanager.php on account of the last version I did I hadn't used TP at all. I'd be asking TP about it.
Title: Re: Dice Roller
Post by: Lordmiller on April 04, 2010, 12:37:28 PM
Only asked here due to the reference, your answer cuts many of the possible problems off the table. thanks.
Title: Re: Dice Roller
Post by: cubex on July 20, 2010, 05:27:55 AM
Thank you very much for this mod
Now I can play World of Darkness using Play-by-Post with my friends  ;D

I want to ask, how to delete the "Total" at the end of the result?

Thanks!
Title: Re: Dice Roller
Post by: Ryanteck on August 12, 2010, 08:20:18 AM
is there a way to stop it from rolling the same number more than once
Title: Re: Dice Roller
Post by: eolith on November 15, 2010, 02:36:22 PM
Any chance of getting this upgraded for RC4? It's a great mod our forum was about to use in a RP session.

Thanks!
Title: Re: Dice Roller
Post by: eolith on November 17, 2010, 02:47:35 AM
nevermind, it works if you just mod the install xml file to add ", 2.0 RC4" wherever you see "2.0 RC3". Worked like a charm.
Title: Re: Dice Roller
Post by: Sabbi on December 18, 2010, 08:39:51 PM
Quote from: Sabbi on December 08, 2009, 07:16:21 PMFor some reason, when someone uses the code in the quick reply box and then previews their post, it changes the [roll] tags to the [blockquote] tags instead of the roll tags in the post box. If the author doesn't think to check the tags in their post because they showed up alright in the preview... It awkwardly looks like they were trying to cheat.

Quote from: Arantor on December 09, 2009, 05:46:09 AM
Hmm, I think that's down to how I implemented the anti-cheating mechanism.

I'm also not sure there's a nice way around it without either removing/watering down the anti-cheat, or massively re-engineering the post system. I'll play around with it though and see what I can come up with.


Just wondering, has there been anything further to work around this issue?  Forgot to warn new members about it recently, which made me think of it.   :-[
Title: Re: Dice Roller
Post by: Ellion Cold on February 28, 2011, 02:59:35 PM
How can i put this on a 2.0RC5 forum?
Title: Re: Dice Roller
Post by: Paine on March 19, 2011, 09:48:46 AM
To install in 2.0 RC5 edit the package-info.xml file.
Replace:
<install for="2.0 RC2, 2.0 RC3">
With:
<install for="2.0 RC2, 2.0 RC3, 2.0 RC5">

Replace:
<uninstall for="2.0 RC2, 2.0 RC3">
With:
<uninstall for="2.0 RC2, 2.0 RC3, 2.0 RC5">
Title: Re: Dice Roller
Post by: Arantor on March 19, 2011, 10:48:14 AM
Or, you can save yourself the hassle and go to Admin > Packages > Browse Packages > Advanced and enter 2.0 RC3 in the box provided.
Title: Re: Dice Roller
Post by: MacTrom on July 07, 2011, 03:06:59 PM
I have it installed and working in 2.0. I'm new to MODS, so this was my first. After banging my head against the various ways to install I finally just made the version modification and FTPd it onto my server. Then after testing it, I modified the Subs to make the text/background look better.

Now if I can just get an improvement to add die together like Invisible Castle does:

1d10+1d6+1d4

Then I'd be ecstatic.

-Mac
Title: Re: Dice Roller
Post by: inusun on August 01, 2011, 02:45:01 AM
I created a new install file for the 2.0 version and added a reference in the package-info. If the author would be so kind as to add this information to the mod package. Everyone could easily install this mod into their 2.0 version of smf.
Title: Re: Dice Roller
Post by: MacTrom on August 01, 2011, 06:55:10 PM
Quote from: MacTrom on July 07, 2011, 03:06:59 PM

Now if I can just get an improvement to add die together like Invisible Castle does:

1d10+1d6+1d4

Then I'd be ecstatic.

-Mac

I figured out where the code was and did some splicing to make it accept mixed die rolls by adding in two additional configurations. Now rolling a d6 and d8 together and getting a total can be done by: 1d6&1d8. I can also subtract with 1d10#1d4 to get the difference between them. I presume that as long as I keep this just on my site, that there is no legal conflicts.

-Mac
Title: Re: Dice Roller
Post by: Michael Pfaff on October 03, 2011, 09:41:09 AM
Will this mod work on a 2.0.1 forum? I've got a new install for an RPG community (louisvillednd.com), and we'd like to do some dice rolling on there.

Would appreciate any feedback on how to get this installed.

Thanks!
Title: Re: Dice Roller
Post by: Prime32 on November 24, 2011, 08:13:05 AM
^ Works just fine by emulating 2.0 RC3 (click Advanced at the bottom-right of the Package Manager). If it works on 2.0 it should work on 2.0.1.


Anyway, when I installed this mod, a dozen users immediately began experimenting with it and found a way to fake a result:
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6

Which would result in
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll 1d6 : 3, total 3
I got around this by editing the mod so that the description was bold italic. Hence
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll
1d6 : 3, total 3
which makes it obvious.

Apart from that, it's possible to edit out the "Tampered!" image.
Title: Re: Dice Roller
Post by: Michael Pfaff on December 09, 2011, 10:16:06 PM
Quote from: Prime32 on November 24, 2011, 08:13:05 AM
^ Works just fine by emulating 2.0 RC3 (click Advanced at the bottom-right of the Package Manager). If it works on 2.0 it should work on 2.0.1.


Anyway, when I installed this mod, a dozen users immediately began experimenting with it and found a way to fake a result:
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6

Which would result in
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll 1d6 : 3, total 3
I got around this by editing the mod so that the description was bold italic. Hence
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll
1d6 : 3, total 3
which makes it obvious.

Apart from that, it's possible to edit out the "Tampered!" image.

Prime 32, where do I go to make this edit?
Title: Re: Dice Roller
Post by: Apllicmz on December 27, 2011, 01:13:13 AM
Nice mod
when Update dont forget portuguese


Title: Re: Dice Roller
Post by: Prime32 on December 27, 2011, 03:31:27 PM
Quote from: Michael Pfaff on December 09, 2011, 10:16:06 PM
Quote from: Prime32 on November 24, 2011, 08:13:05 AM
^ Works just fine by emulating 2.0 RC3 (click Advanced at the bottom-right of the Package Manager). If it works on 2.0 it should work on 2.0.1.


Anyway, when I installed this mod, a dozen users immediately began experimenting with it and found a way to fake a result:
[roll]{Attack Roll 1d20 : 20, total 20
Damage Roll} 1d6

Which would result in
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll 1d6 : 3, total 3
I got around this by editing the mod so that the description was bold italic. Hence
QuoteAttack Roll 1d20 : 20, total 20
Damage Roll
1d6 : 3, total 3
which makes it obvious.

Apart from that, it's possible to edit out the "Tampered!" image.

Prime 32, where do I go to make this edit?
common.xml inside the ZIP, this is the relevant line:
$output .= (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . ' : ';
So insert some formatting tags like so:
$output .= '[b][i]' . (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . '[/i][/b] : ';
Title: Re: Dice Roller
Post by: Cereus on January 14, 2012, 10:18:22 PM
Updated to 2.0.2 and added Portuguese Brazilian.

Hugs.
Title: Re: Dice Roller
Post by: Cereus on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.
Title: Re: Dice Roller
Post by: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?
Title: Re: Dice Roller
Post by: Michael Pfaff on January 14, 2012, 10:58:30 PM
Quote from: Prime32 on December 27, 2011, 03:31:27 PM
common.xml inside the ZIP, this is the relevant line:
$output .= (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . ' : ';
So insert some formatting tags like so:
$output .= '[b][i]' . (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . '[/i][/b] : ';

Thanks so much. So, I need to do this before I install, correct?

Is there any way to edit the output after install by modifying a subs file or something?
Title: Re: Dice Roller
Post by: Michael Pfaff on January 14, 2012, 11:04:47 PM
Quote from: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Nvm. I think I got it. In the Subs-Editor, "'after' => '[/roll]'," was missing.
Title: Re: Dice Roller
Post by: Michael Pfaff on January 14, 2012, 11:09:17 PM
Quote from: Michael Pfaff on January 14, 2012, 10:58:30 PM
Quote from: Prime32 on December 27, 2011, 03:31:27 PM
common.xml inside the ZIP, this is the relevant line:
$output .= (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . ' : ';
So insert some formatting tags like so:
$output .= '[b][i]' . (empty($thisdiceroll[2][$i]) ? $txt['dice_rolled'] : $thisdiceroll[2][$i] ) . ' ' . $qty_dice . 'd' . $type_dice . $thisdiceroll[5][$i] . $thisdiceroll[6][$i] . $thisdiceroll[7][$i] . $thisdiceroll[8][$i] . $thisdiceroll[9][$i] . '[/i][/b] : ';

Thanks so much. So, I need to do this before I install, correct?

Is there any way to edit the output after install by modifying a subs file or something?

Prima32, nvm my friend. I found it in Subs-Post. Thanks for all of your help!
Title: Re: Dice Roller
Post by: Xarcell on January 23, 2012, 11:07:49 AM
Here are some better images to use with it...
Title: Re: Dice Roller
Post by: Arantor on January 23, 2012, 12:16:21 PM
Yeah, sorry my original images sucked so bad.
Title: Re: Dice Roller
Post by: Xarcell on January 23, 2012, 03:41:55 PM
I have a suggestion for whoever is keeping up with this mod. Use class="diceroller" instead of style="font-size:x-small; background-color:#ffffff; margin:5px 20px; border:1px dashed black; filter:alpha(opacity=50); opacity:0.5;"

This way it will look better in custom theme, and no special effect in default theme. If the admin wishes to style it, he/she can simply add it to the index.css.

Thanks.
Title: Re: Dice Roller
Post by: Michael Pfaff on March 27, 2012, 09:19:55 AM
Quote from: Xarcell on January 23, 2012, 11:07:49 AM
Here are some better images to use with it...

With 2.0, should these be saved in the theme image folder or default?
Title: Re: Dice Roller
Post by: Mv.c9 on April 17, 2012, 06:56:46 AM
I have a 2.0.2 version, but when I install the latest version i get the following error:

$txt['dice_rolled'] = 'Rolled'; $txt['dice_not_valid'] = 'is not a valid dice string!'; $txt['dice_invalid_both'] = '(cannot be both greater than %d and less than %d)'; $txt['dice_invalid_lower'] = '(cannot roll greater than %d on a %d sided die)'; $txt['dice_total'] = 'total'; $txt['dice_cheater'] = 'This dice roll has been tampered with!'; $txt['bbc_code_roll'] = 'Dice roll';

At the top of all my pages. Am I doing something wrong?
Title: Re: Dice Roller
Post by: TheListener on April 21, 2012, 02:16:25 PM
Quote from: Mv.c9 on April 17, 2012, 06:56:46 AM
I have a 2.0.2 version, but when I install the latest version i get the following error:

$txt['dice_rolled'] = 'Rolled'; $txt['dice_not_valid'] = 'is not a valid dice string!'; $txt['dice_invalid_both'] = '(cannot be both greater than %d and less than %d)'; $txt['dice_invalid_lower'] = '(cannot roll greater than %d on a %d sided die)'; $txt['dice_total'] = 'total'; $txt['dice_cheater'] = 'This dice roll has been tampered with!'; $txt['bbc_code_roll'] = 'Dice roll';

At the top of all my pages. Am I doing something wrong?

I have locked your similar topic on the 2.0 board.

Any errors on install?
Title: Dice Roller updated to 2.0.2 + PT-BR
Post by: Cereus on April 21, 2012, 10:07:36 PM
Quote from: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Yeah, for sure! I'll try to solve it.

Done! ASAIC!!

sigh... .sigh...

Tags

Dice Roller traduzido para português (pt-br).
Dice Roller translated to portuguese.
Title: Re: Dice Roller updated to 2.0.2 + PT-BR
Post by: Mv.c9 on April 23, 2012, 01:33:36 PM
Quote from: Arkhan Holycross on April 21, 2012, 10:07:36 PM
Quote from: Michael Pfaff on January 14, 2012, 10:57:39 PM
Quote from: Arkhan Holycross on January 14, 2012, 10:47:50 PM
I'm double posting because I found an error in my repack. I forgot to add the command to "install portuguese".

Hugs.

Arkhan, thanks for the update to 2.0.2. One error I noticed (and maybe something messed up with my install because I uninstalled the old dice roller and reinstalled), but when I click on the dice roller graphic in the new post, instead of popping up [roll][/roll] in the text field, it just does [roll].

Was this intentional? And, how can I adjust the code to make it do [roll] and [/roll] when someone clicks on the graphic?

Yeah, for sure! I'll try to solve it.

Done! ASAIC!!

sigh... .sigh...

Tags

Dice Roller traduzido para português (pt-br).
Dice Roller translated to portuguese.

Thanks, but I still get this at the top of my theme;

Quote$txt['dice_rolled'] = 'Rolled'; $txt['dice_not_valid'] = 'is not a valid dice string!'; $txt['dice_invalid_both'] = '(cannot be both greater than %d and less than %d)'; $txt['dice_invalid_lower'] = '(cannot roll greater than %d on a %d sided die)'; $txt['dice_total'] = 'total'; $txt['dice_cheater'] = 'This dice roll has been tampered with!'; $txt['bbc_code_roll'] = 'Dice roll';

any ideas where is it coming from?
This is the forum: http://forums.bloodlinesantitribu.com//index.php
Title: Re: Dice Roller
Post by: Cereus on April 23, 2012, 11:42:44 PM
What happens in default theme?
Title: Re: Dice Roller
Post by: Wesley. on September 02, 2012, 02:49:11 AM
Thanks a lot, Arkhan! Your update made it usable for my version! :laugh: :laugh:
Title: Re: Dice Roller
Post by: pakri on September 12, 2012, 06:50:55 PM
Modificacion para el español latino

Adjustment to Spanish Latino
Title: Re: Dice Roller
Post by: jamccloud on November 30, 2012, 02:24:53 PM
Many thanks to the community for keeping this mod alive.  I have a question on functionality.  I plan on using this for the nWoD game system.  Is it possible to do the following:

1) remove the "total" from the output?
2) re-roll any result equal to or higher than 8, 9, or 10?
3) count the number of results higher than 7 and output them as "Successes: x"?
Title: Re: Dice Roller
Post by: Colin on December 27, 2012, 12:02:50 AM
Updated for SMF 2.0.3
Title: Re: Dice Roller
Post by: Guim on January 02, 2013, 05:09:23 AM
Hola, soy español y me cuesta bastante escribir en inglés así que lo escribiré en español y luego intentaré traducirlo a medias, pero si hay algún hablante de español por favor, que me responda y si puede ser que corrija mis faltas al traducir.

Bueno, en mi foro existe esta herramienta de lanzar los dados (el roll) y me gustaría saber si tiene más funciones. En realidad solo busco una función, la de poder "banear" números para que no salgan, es decir yo lanzo un Roll de 6 y no quiero que me salgan ni el 4 ni el 5. No me refiero a que no salgan mayores de 4, sino que no salgan 2 en concreto ya que si saliera un 6 sí que me interesaría.
Muchas gracias por vuestra atención y espero respuestas lo antes posible.

Translation:
In my foro exists this mod to launch the dices (roll) and I will like to know if it has more functions. In reality I only search one function, I want to ban numbers in the dices. Namely, for exemple if I launch a Roll of 6 and I don't want the numbers 4 and 5 in the result. I don't mean any result necessary so that the dice rolls will greater than 4, because if it will leaves a 6 I need it.
Thank you very much for your attention.
Title: Re: Dice Roller
Post by: Cereus on April 21, 2013, 05:19:52 PM
Quote from: Guim on January 02, 2013, 05:09:23 AM
Hola, soy español y me cuesta bastante escribir en inglés así que lo escribiré en español y luego intentaré traducirlo a medias, pero si hay algún hablante de español por favor, que me responda y si puede ser que corrija mis faltas al traducir.

Bueno, en mi foro existe esta herramienta de lanzar los dados (el roll) y me gustaría saber si tiene más funciones. En realidad solo busco una función, la de poder "banear" números para que no salgan, es decir yo lanzo un Roll de 6 y no quiero que me salgan ni el 4 ni el 5. No me refiero a que no salgan mayores de 4, sino que no salgan 2 en concreto ya que si saliera un 6 sí que me interesaría.
Muchas gracias por vuestra atención y espero respuestas lo antes posible.

Translation:
In my foro exists this mod to launch the dices (roll) and I will like to know if it has more functions. In reality I only search one function, I want to ban numbers in the dices. Namely, for exemple if I launch a Roll of 6 and I don't want the numbers 4 and 5 in the result. I don't mean any result necessary so that the dice rolls will greater than 4, because if it will leaves a 6 I need it.
Thank you very much for your attention.

Todas las funciones son DiceRoller página mod. Voy a preparar otro paquete con la traducción al español, si hay errores en la traducción que me haga saber después.

Pues bien, existe una función específica para bloquear un número. La forma de configurarlo para sus nuevos números y bloqueo de desplazamiento toda la serie limitándolos a aparecer.

Ejemplo: si quieres coger el 4 y 5, pero aún desea que aparezca 6, 1, 2 y 3, debe definir los dos primeros con los nuevos números antes de rodar y limitar su aparición.

Por lo tanto, en lugar de 4 y 5, se define lo que son en el libro 1 y 2, moviendo todos los otros números. Y genera el comando para salir si algo menor que 2 para desplazarse repetir hasta que salga un número mayor.

Solución rápida y fácil.

___________________
I've changed the old icon to a new, and I have a new icon to the alert of post edit too. ;)

It's for 2.0.x!!
Enjoy it!
Title: Re: Dice Roller
Post by: Arantor on April 21, 2013, 06:05:00 PM
/me hereby gives permission for derivative works of his mod to be created and distributed ;)
Title: Re: Dice Roller
Post by: Colin on April 21, 2013, 11:53:55 PM
Fantastic, thanks.
Title: Re: Dice Roller
Post by: Larathiel on April 28, 2013, 12:23:21 AM
Just tried out this mod on a brand new 2.0.4 installation and I'm noticing a critical problem: Every time I click the Preview button, ALL of the die rolls in my post are re-randomized.

Since my hope is to use this for a Pathfinder RPG Play-by-Post, I need for there to be some way to permanently fix die rolls so that they cannot be changed even if a post is previewed multiple times, canceled and restarted, or even edited to add or remove additional rolls. Even beyond cheat prevention, keeping the rolls static is necessary so that the person authoring a post (whether GM or player) can first make their rolls, preview the outcomes, and then narrate the resolution properly. If a failed attack or successful diplomacy check is suddenly reversed because the numbers changed when the user previews to ensure the formatting is OK, they'd have to scrap and rewrite their post. That's just not feasible.

Furthermore, the current output doesn't sum multiple rolls within a single roll statement. In instances where you need to roll extra damage dice (i.e. flaming weapons, sneak attacks, etc.) having the additional die rolls appear on subsequent lines is rather problematic. As GameMaster, it's not uncommon to need a half-dozen or more rolls at a time (i.e. Perception or Sense Motive checks for each character and NPC when a new room or encounter is entered).

If need be, I could probably record a short video demonstrating the desired behavior, but here are a few examples showing both usage and desired output...
Note: On the forums I'm linking to, users cannot modify the color of text. Out-of-Character text is always blue, and die rolls are always green. Given some of the prior discussion, locking down colors would be one way to verify that roll results were not forged.

Examples
Multiple Die Rolls in the same attack: http://paizo.com/campaigns/WardovesRumbleInTheJungle/gameplay&page=200#9963 (http://paizo.com/campaigns/WardovesRumbleInTheJungle/gameplay&page=200#9963)
Multiple NPCs attacking in the same post: http://paizo.com/campaigns/WardovesRumbleInTheJungle/gameplay&page=200#9968 (http://paizo.com/campaigns/WardovesRumbleInTheJungle/gameplay&page=200#9968)
Die Roll Syntax and Preview: http://wiki.worldsunknown.com/images/archive/e/e6/20130428040221%21Screenshot.png (http://wiki.worldsunknown.com/images/archive/e/e6/20130428040221%21Screenshot.png)

Now I'm not saying the implementation on Paizo is perfect, in fact there are a few things it can't do such as dropping lowest from a set, taking the better of two rolls, or any other such logic-based conditions. One improvement I personally would desire would be the ability to label individual bonuses so that they appear in the actual roll instead of having to manually note them in the out of character text.

Example:
Current Syntax: [ooc]Longbow [dice]1d20+10 + 1 + 1d6 [/dice] point blank shot, mythic surge [/ooc]
Current Output: Longbow 1d20 + 10 + 1 + 1d6 ⇒ (13) + 10 + 1 + (4) = 28 point blank shot, mythic surge
Desired Syntax: [roll="Longbow"]1d20+10 + 1 {point blank shot} + 1d6 {mythic surge}[/roll]
Desired Output: Longbow 1d20 + 10 + 1 + 1d6 ⇒ (13) + 10 + 1 point blank shot + 4 mythic surge

Is there any chance of someone being willing/able to implement such changes in either this mod or perhaps a fork of it? I realize it might be asking a lot (particularly for the persistent die rolls), but it could benefit quite a few folks by the looks of it.
Title: Re: Dice Roller
Post by: Arantor on April 28, 2013, 12:26:49 AM
QuoteJust tried out this mod on a brand new 2.0.4 installation and I'm noticing a critical problem: Every time I click the Preview button, ALL of the die rolls in my post are re-randomized.

That's *entirely* deliberate. That way users can preview the code as being correct in terms of formatting but it means they can't roll and reroll and reroll until they get numbers they like. I did it the way I did it for plenty of good reasons.

Once the post is saved, they can't then edit it without it looking suspicious.

I'm sorry that I decided performance and not hurting the server with (many) more database calls was more important than your users just having to make two posts instead of one.

This is one mod I wish I had never bothered to spend the time writing because of all the people that used it, I think I'm pretty much the only person actually satisfied by it doing what I made it to do :(
Title: Re: Dice Roller
Post by: Larathiel on April 28, 2013, 12:32:03 AM
Arantor: Could it be that you're seeing different behavior than I am? From what I'm seeing, the current implementation does allow someone to reroll to their heart's content — everytime I click preview all of the rolls are re-rolled. Are you saying it's different on the SMF install on which you developed and tested it?

Edit: Sorry to hear that this mod has been a hassle. I've only just come back to SMF after 4 years of using another site for my RPGs, and whether it's this or another mod, I'm just trying to find one that does what I need. Should I create a brand new mod request instead of proposing such features in this one?
Title: Re: Dice Roller
Post by: Arantor on April 28, 2013, 12:54:42 AM
No, I'm saying that is *exactly* how I wrote it, and with extremely good reason. Performance aside, there is no good way in SMF to do what you are asking without the user having some way to taint it. I spent hours on this the first time around.

The data is not stored or saved anywhere until the post is saved, but that's brcause the only way to do itis to get into messing around with one-time codes which gets expensive to handle in the database, which is why I deliberately opted for the route I did.

You can ask, but unless you're paying, no-one will bother because everyone wants something different and that's that.
Title: Re: Dice Roller
Post by: RustyBarnacle on April 28, 2013, 12:57:13 AM
I'm quite happy with this mod as is.  Sorry it's been a hassle.  :(
Title: Re: Dice Roller
Post by: Larathiel on April 28, 2013, 01:27:27 AM
Quote from: Arantor on April 28, 2013, 12:54:42 AM...there is no good way in SMF to do what you are asking without the user having some way to taint it.

Gotcha. I know it was quite a hurdle for Paizo to implement this on their site and perhaps that's part of the reason their proprietary forums are just so painfully slow. :-\

Quote from: Arantor on April 28, 2013, 12:54:42 AMYou can ask, but unless you're paying, no-one will bother because everyone wants something different and that's that.

I'm by no means well-off, but whether it's paying a friend for leather-work, an artist for a character portrait, or a coder for a useful app, I'm a firm believer in compensating others for their time. I have no idea what the going rates are for coding projects such as this, but perhaps that would be the best way of going about it. My apologies if I struck a raw nerve about this mod — you've been more than helpful in the other threads I've posted in today and for that I'm grateful.

In the meantime, forummatrix.org suggests that FUD and MyBB are other forum packages matching the feature sets that I need. I'll shelve my progress on SMF for now, and if I turn up empty-handed there as well then I'll put together a requirements document and see who bites. Take care.
Title: Re: Dice Roller
Post by: david090366 on June 04, 2013, 02:30:44 AM
I have used this mod on a play by post forum for some time, and it performs quite well. And yes, we play Pathfinder and D&D 3.5, and several other d20 games there.  You don't need to see what your die roll is before you post. All you have to do is simply state what you are trying to do and put your die roll at the end of it. The GM then comes along later and determines whether or not it was a successful attempt. The only person who has to make two posts, on my forum, is the GM during combat for the monsters' turns. State which creature is attacking which character and make their rolls in that post then a second post to say who got hit. Arantor, do not despair that you created this mod. Some of us are very thankful for it and quite happy with it the way it is.

There are two things you can do to easily reduce the possibility of cheating ( or catch cheaters) with this mod if you don't want to stop regular members from being able to edit their posts.

1) Make sure posts show the last edit time. That way you can see people who are routinely editing posts with dice rolls in them.

2) It is possible with SMF to send all deleted posts to another area of the forum. Turn this on and send them to a board only admins and mods can see. That way you can see if people are deleting posts with die rolls.
Title: Re: Dice Roller
Post by: Larathiel on June 04, 2013, 02:53:08 AM
David: Every GM and group run their game a different way. After about 14,000 PbP posts I think I've got a pretty good idea of what works well for a narrative-heavy game like mine.

In any event, I've moved development from SMF to MyBB and hired someone willing to code exactly what I need for a rather reasonable fee. With a bit of creativity, we've made it cheat-proof without incurring the expensive database operations Arantor rightfully warned me about.
Title: Re: Dice Roller
Post by: loogie on June 10, 2013, 04:40:57 PM
First.. great work

Second... I'm new to php.. so i've skipped several steps.. but I've modified your script to support fudge dice.. right now it just captures #df in the roll and returns the results (with icons as the result values)...

for those who don't know, a fudge roll is 4 rolls of a six sided die, with 2 +1 face, 2 -1 faces, and 2 blank faces. add up the totals.

This is just a prelim. since i probably won't need the other dice rolls, i'll probably remove them, and i might add a bit more formatting so i can add a title, a mod, and some text for the mod... (pretty much gut your die roller, just keep the "this roll was faked" bit.

I've never tried an smf mod before, so it's interesting to work with... if anyone wants to see my code, i can send it over... i'll probably try to change the details so it can be seen as a separate mod than yours entirely.
Title: Re: Dice Roller
Post by: Colin on July 13, 2013, 10:33:56 PM
Welcome to SMF Loogie,

I am glad that you were able to modify the mod to fit your liking. Unfortunately it will be hard to submit the mod to the mod site if it has any taken code from this one. You are absolutely welcome to, but make sure that it is all your own code :).

Best!
Title: Re: Dice Roller
Post by: hither on December 18, 2013, 08:22:07 PM
This mod is what brought me back to SMF.

My forum is so small that everything else is much of a muchness, but SMF having a reliable in-line dice roller is effing fantastic!
Title: Re: Dice Roller
Post by: Colin on December 18, 2013, 09:38:57 PM
Wahoo! Welcome back. Cheers to Arantor who developed the mod.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 12:38:09 PM
I have a mod for your script:

Search for:

function dicemod($string) {
    global $txt;
    $output = '[blockquote]';


After the $output line put:

    $string[1] = preg_replace( "/\s*/", "", $string[1] );


This handles miscellaneous spaces being put into the string.

Before - if you put in "1 d 8 + 5" it would say it is an invalid dice string.

After - it just does the die roll.

Title: Re: Dice Roller
Post by: Arantor on July 26, 2014, 12:43:35 PM
Thanks but considering the support for other things, I can't add this. From the examples:

[roll]{Uberdamage} 15d100+10^10v90<80>20[/roll]

This would be adversely affected by the suggested change.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 01:32:18 PM
Er.....I just tried it and it worked without any problems.

The only thing that mod does is to remove any whitespace.


Rolled 5d8+3*5 : 8, 12, 8, 13, 7 + 3, total 51


Uberdamage 15d100+10^10v90<80>20 : 92 98 8 95 35, 69, 92 96 72, 45, 59, 16, 40, 45, 100 57, 57, 8 31, 51, 2 58, 13, 77 + 10, total 706

Title: Re: Dice Roller
Post by: markem on July 26, 2014, 01:35:10 PM
I just finished a new MOD.  I added in the star(*) mod.  What the star mod does is to globally add/subtract from the dice roll AFTER everything else is done.  If you would like to see the mod I can post it.
Title: Re: Dice Roller
Post by: Arantor on July 26, 2014, 01:38:00 PM
Except there's whitespace between the } and the start of the diceroll itself, yes?

*shrug* I'm not maintaining this mod any longer, it's been years since I originally wrote it so I don't really remember how it works any more, you'd have to ask the current maintainer if they were interested in adding it.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 01:41:34 PM
Here is: "{uberdamage}                         15                       d             100          +          10            ^      10         v     90       <            80       >    20"

Hmmmmm......  I got:

'{uberdamage}            15           d      100     +     10      ^   10    v  90   <      80   >  20' is not a valid dice string!

This means that there is somewhere else I need to look because everything from the 15 on should have had the whitespace removed.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 01:44:25 PM
Since I have your attention - a quick (offtopic) question - why does SMF knock you completely out of the posting area if you put in a new post?  Can I make it stop doing that easily?  (I run a new board)  TIA!
Title: Re: Dice Roller
Post by: Arantor on July 26, 2014, 01:53:29 PM
QuoteThis means that there is somewhere else I need to look because everything from the 15 on should have had the whitespace removed.

Everyone loves regular expressions.

You might have had more luck simply using str_replace with an array of ("\t", " ") being replaced to "" but that's always a bit iffy too given SMF's preparser if you want to start playing with things like \n as well because they have special meaning in SMF and get preparsed out into something else.

As for your other question, that's covered in the wiki, forget exactly where.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 02:02:57 PM
The "\s" covers any type of whitespace so it would grab spaces, tabs, newlines, linefeeds, and all other items between 00 and 32 as well as 128+ characters that are whitespace as well.  That's why I used it.  The fault doesn't line in the usage of the preg_replace() function.  I have put in some code to dump out the $thisdiceroll variable so I know what is going where.  The thing is - with the {uberdamage} the dicemod function doesn't go into the same area as before.  With {uberdamage} at the front the count returned zero.  Still looking.....
Title: Re: Dice Roller
Post by: Arantor on July 26, 2014, 02:12:36 PM
Yes, I know what it does. (Amongst other things, I am a Zend Certified Engineer as well as a former SMF core developer. I do know what \s in a regex means. I also know the difference between using single and double quotes in this context means, and it's more surprising than you might think. Single quotes recommended for regex work with metacharacters.) Except it doesn't work the way you think it does. The * will match empty strings too and the greedy preferences will mean it won't work the way it does, and will only replace some of them. \s+ would probably be recommended because if nothing else the PCRE engine has to do less backtracking in that situation.

It also will NOT be touching most characters above 128 since that's where all extended UTF-8 characters are and you generally need to be passing the u parameter to it for that in the first place to be binary safe bearing in mind that most installations are ISO-8859-1 (or maybe -2 but usually -1) which means almost everything after 128 has a direct meaning, especially 160 which is a non breaking space in ISO encoding.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 02:17:46 PM
Yes - and I found out what was wrong with the script.

The preg_replace should really be:

    $string[1] = preg_replace( "/\s*|&nbsp;/", "", $string[1] );

I did a hex dump and was like "Say what?" on the resultant hex string.  SMF puts in &nbsp;.  But the {uberdamage} still doesn't have a problem with there not being a space after the trailing brace.

Example:

String[0] = [roll]{uberdamage}                         15                       d             100          +          10            ^      10         v     90       <            80       >    20[/roll]

String[1] = {uberdamage}15d100+10^10v90<80>20

String[0] = 5b726f6c6c5d7b7562657264616d6167657d266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20203135266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b202064266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b2020313030266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b202b266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b203130266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b205e266e6273703b20266e6273703b20266e6273703b203130266e6273703b20266e6273703b20266e6273703b20266e6273703b202076266e6273703b20266e6273703b20203930266e6273703b20266e6273703b20266e6273703b2020266c743b266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b20266e6273703b203830266e6273703b20266e6273703b20266e6273703b20202667743b266e6273703b20266e6273703b2032305b2f726f6c6c5d

String[1] = 7b7562657264616d6167657d3135643130302b31305e3130763930266c743b38302667743b3230

Count = 1

uberdamage 15d100+10^10v90<80>20 : thisdiceroll[0][0] = {uberdamage}15d100+10^10v90<80>20

thisdiceroll[1][0] = {uberdamage}

thisdiceroll[2][0] = uberdamage

thisdiceroll[3][0] = 15

thisdiceroll[4][0] = 100

thisdiceroll[5][0] = +10

thisdiceroll[6][0] = ^10

thisdiceroll[7][0] = v90

thisdiceroll[8][0] = <80

thisdiceroll[9][0] = >20

thisdiceroll[10][0] =

thisdiceroll[11][0] =

thisdiceroll[12][0] =

44, 19, 31, 56, 7 63, 91 3 30, 100 26, 49, 77, 37, 57, 67, 69, 10 25, 14 + 10, total 641

So now the mod works for all occurances - unless you know of another one that might not work?  :-)
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 02:21:29 PM
Yes - you are right.  I probably should have used the one or more and not the zero or more.  :-)
Title: Re: Dice Roller
Post by: Arantor on July 26, 2014, 02:23:17 PM
Ah, I see, I wasn't sure quite where inside parsing this would occur in which case the &nbsp is indeed inserted by SMF to preserve spacing. It's one of the more interesting parts of SMF. I'd assumed this was prior to that part of preparsecode though (in which case there are still situations where * won't match everything)

In fact your example is the *very* one I was alluding to. There's now no space after Uberdamage in the output.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 02:26:16 PM
Correct - but it still worked.  You did see the last line did you not?  Also, it would be easy (if the space were needed) to re-insert it after the brace.
Title: Re: Dice Roller
Post by: Arantor on July 26, 2014, 02:28:14 PM
*shrug* It's literally been 5 years since I looked at the code and I feel like I shouldn't have said anything anyway.
Title: Re: Dice Roller
Post by: markem on July 26, 2014, 02:33:21 PM
You must have a different version than what I have.  After looking through the code in Subs-Post.php - there is no test of uberdamage or anything else in braces.  My version is 2.0.8.

Btw : Why not?  If you hadn't said anything I would not have thought to look for the &nbsp; in the string.  Ya know - so thanks!  :-)
Title: Re: Dice Roller
Post by: Teh Lizzeh on October 13, 2014, 10:38:53 PM
In version 2.0.9 the mod changes from [roll] to [blockquote] whenever a roll is previewed, this did not happen before. I realise that 2.0.9 is so new and that it hasn't been modified to fit that version yet but I was wondering if there's either an easy fix or if the mod will be updated soon?
Title: Re: Dice Roller
Post by: Colin on October 14, 2014, 01:50:42 AM
Yep, I'll look into this.
Title: Re: Dice Roller
Post by: Teh Lizzeh on October 14, 2014, 11:25:51 PM
Thank you!
Title: Re: Dice Roller
Post by: Arantor on October 16, 2014, 12:41:24 PM
Quotethe mod changes from [roll] to [blockquote] whenever a roll is previewed, this did not happen before.

This *always* happened. This was always absolutely intentional and has done this for the last five years ever since it was written as an anti-tamper mechanism.
Title: Re: Dice Roller
Post by: Colin on October 16, 2014, 08:55:15 PM
Actually it didn't. Give it a try on 2.0.8.
Title: Re: Dice Roller
Post by: Arantor on October 17, 2014, 12:03:29 AM
The whole point of the change is to prevent tampering. That includes limiting previewing the dice rolls to know what you're going to have - so they get changed during the preparse step around this, specifically so that you can't just keep 'rerolling' until you get results you happen to like.
Title: Re: Dice Roller
Post by: Colin on October 17, 2014, 05:06:06 AM
I think we are talking about the same thing however there was as functionality change from 2.0.8 - 2.0.9

Assuming you write the following while composing a post

[roll]1d6[/roll]

Selecting preview in an SMF 2.0.8 instance would generate the dice roll results in the preview and leave the bbc code untampered in the text area. Note that when you click post, however, it will evaluate the roll again.

However, in an SMF 2.0.9 instance it will generate the dice roll results in the preview, but update the textarea value with the [blockquote].... tag.
Title: Re: Dice Roller
Post by: Arantor on October 17, 2014, 10:30:52 AM
QuoteSelecting preview in an SMF 2.0.8 instance would generate the dice roll results in the preview and leave the bbc code untampered in the text area. Note that when you click post, however, it will evaluate the roll again.

Yes, this much I know, because that's how I wrote it originally for just that reason: so that you can't keep rerolling until you get a result you like. And so that you can't edit afterwards. But that you could preview a post to check formatting.

QuoteHowever, in an SMF 2.0.9 instance it will generate the dice roll results in the preview, but update the textarea value with the [blockquote].... tag.

There is actually no reason for this to be occurring since none of the things that changed in 2.0.9 should have changed this, bearing in mind that I have discussed a number of aspects of it with the devs while it was being developed, but I can't say I'm that surprised.
Title: Re: Dice Roller
Post by: Teh Lizzeh on October 19, 2014, 12:26:42 AM
In the quick reply preview it would originally change the coding which I am fully aware of, in the full reply, though, it wouldn't until I upgraded to 2.0.9. I'm not sure how much the upgrade actually has to do with this change, though, since that's absolutely not my area of expertise. I'm just hoping there's a way to figure out why it's doing that right now and for it to stop doing that.
Title: Re: Dice Roller
Post by: jack_1985 on March 13, 2015, 05:34:04 AM
Quote from: Colin on October 17, 2014, 05:06:06 AM
Selecting preview in an SMF 2.0.8 instance would generate the dice roll results in the preview and leave the bbc code untampered in the text area. Note that when you click post, however, it will evaluate the roll again.

However, in an SMF 2.0.9 instance it will generate the dice roll results in the preview, but update the textarea value with the [blockquote].... tag.
I stumbled upon the same problem. In my case it had something to do with an error in the file "Subs-Editor", strangely enough. One of the $txt variables in that file generated an undefined error, and for some reason that made my dice previews change into blockquotes...
Title: Re: Dice Roller
Post by: jack_1985 on April 15, 2015, 04:34:30 AM
Quote from: Teh Lizzeh on October 13, 2014, 10:38:53 PM
In version 2.0.9 the mod changes from [roll] to [blockquote] whenever a roll is previewed, this did not happen before. I realise that 2.0.9 is so new and that it hasn't been modified to fit that version yet but I was wondering if there's either an easy fix or if the mod will be updated soon?

It believe this change from 2.0.8 to 2.0.9 in the file Post.php causes the problem:

Find:

if (isset($_REQUEST['preview']))
return Post();


Replace With:
   if (isset($_REQUEST['preview']))
{
checkSession();
return Post();
}


I changed this back and the dice previewing worked again.
Title: Re: Dice Roller
Post by: margarett on April 15, 2015, 07:19:04 AM
Do note that this is a security fix. While arguably hard to exploit, it's still a security fix.
Not saying that you should revert it, you just need to be aware of it ;)
Title: Re: Dice Roller
Post by: Goss on August 15, 2015, 12:34:14 PM
Is it possible to rename the blockquote tag?  Blockquote is already a standard formatting tool for my community, so I can't have it generating that anti-cheating warning.
Title: Re: Dice Roller
Post by: DizzySaxophone on November 12, 2015, 02:45:48 PM
I've had this mod installed on my forum for a long time. It recently stopped showing up. No button to click in the message box, and putting in the code doesn't work either. We were using 2.0.9 and it wasn't working so I went ahead and updated us to 2.0.11

Seeing as we're a tabletop rpg board it is a bit important. I thought about uninstalling the mod and reinstalling but it gave me all kinds of warning first so decided not to. Any ideas?
Title: Re: Dice Roller
Post by: DizzySaxophone on November 12, 2015, 07:58:55 PM
I didn't have the option to edit my previous post, but I wanted to go ahead and let you know I figured it out. When we updated the coding didn't come through, but I just went through and edited the files myself and it works. Thanks!
Title: Re: Dice Roller
Post by: mickie on May 04, 2017, 05:12:16 AM
I installed this Mod
It functions fine.
But the images are not exporting to the proper locations so the BBC button for dice has a broken image icon
I know that I can just FTP the image in.
The reason I am asking for help is that I want to edit the colors on the roller and give the edited zip file to people.
(With all proper credits intact of course. ) Along with custom themes. So that the dice roller display can actually be read.
I am currently creating themes for SMF 2.0.11
Thanks in advance
Title: Re: Dice Roller
Post by: florence000 on May 05, 2017, 09:47:27 AM
I have the same or similar problem to DizzySaxophone. I cannot see the message box button...what to do?
Title: Re: Dice Roller
Post by: mickie on May 05, 2017, 06:51:26 PM
Problem solved. I missed a checkbox to add it to the other themes. I was just clicking through too fast  ::)
Title: Re: Dice Roller
Post by: Colin on May 05, 2017, 08:07:28 PM
Quote from: mickie on May 05, 2017, 06:51:26 PM
Problem solved. I missed a checkbox to add it to the other themes. I was just clicking through too fast  ::)

:)
Title: Re: Dice Roller
Post by: BShaftoe on May 08, 2017, 07:03:52 AM
Is this mod going to be updated for 2.1?
Title: Re: Dice Roller
Post by: OtterlyAdorable on May 15, 2017, 04:15:13 PM
Hey!  This is an awesome tool!!  Thank you SO much for your work on it!

Are there any plans to add a "keep/drop lowest-___ rolls"?  (e.g. roll 4d6 and drop the lowest roll, or 10d6 and keep the top 6)
Title: Re: Dice Roller
Post by: Colin on May 23, 2017, 12:37:59 AM
Quote from: BShaftoe on May 08, 2017, 07:03:52 AM
Is this mod going to be updated for 2.1?

Sure, once we get 2.1 out :)
Title: Re: Dice Roller
Post by: Colin on May 23, 2017, 12:39:13 AM
Quote from: OtterlyAdorable on May 15, 2017, 04:15:13 PM
Hey!  This is an awesome tool!!  Thank you SO much for your work on it!

Are there any plans to add a "keep/drop lowest-___ rolls"?  (e.g. roll 4d6 and drop the lowest roll, or 10d6 and keep the top 6)

Hmm, there wasn't, but that sounds interesting. Perhaps something to add to the wishlist. I'll open a GitHub repo and we can add some features to track.
Title: Re: Dice Roller
Post by: Colin on May 23, 2017, 12:40:58 AM
Track away

https://github.com/colinschoen/SMF-Dice-Roller
Title: Re: Dice Roller
Post by: OtterlyAdorable on June 12, 2017, 03:58:09 PM
Hey, thanks for your response and sorry that I only just saw this...

How do I add a request?  I'm not super familiar with how GitHub works.
Title: Re: Dice Roller
Post by: Colin on June 12, 2017, 06:18:23 PM
Have a look here:

https://help.github.com/articles/creating-an-issue/
Title: Re: Dice Roller
Post by: OtterlyAdorable on June 13, 2017, 08:24:27 AM
Awesome, thanks so much!!
Title: Re: Dice Roller
Post by: mickie on July 04, 2017, 02:32:14 PM
I tried to install this on a friends forum
their forum is listed as

SMF 2.0.13 | SMF © 2016, Simple Machines
SimplePortal 2.3.6 © 2008-2014, SimplePortal XHTML RSS

I got the following response

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
I know it's not corrupt because it worked on my sandbox which is

SMF 2.0.11 | SMF © 2015

So I am guessing it is not compatible?
Is there something I can do to make it so?
Title: Re: Dice Roller
Post by: truecrimson on September 03, 2017, 11:42:06 AM
Hello,
I love this mod and used it for years.  However during an upgrade or reinstall it got lost, and I couldn't get it to reinstall.  Some of the chmod settings my host uses were preventing it from installing, and I let it go for a long time.

I just decided to try to manually install it and everything wen well except for one thing.  None of the smileys show up above the text box when making a new post, only the broken link image.  If one puts in smiley code manually then in the post one gets a broken link image and then the smiley code.

Any idea where I went wrong and how I can fix it?

Running 2.0.14

Thanks
Title: Re: Dice Roller
Post by: OtterlyAdorable on December 26, 2017, 07:28:20 AM
Quote from: Colin on May 23, 2017, 12:39:13 AMI'll open a GitHub repo and we can add some features to track.

Still planning on looking into the wishlist items?
Title: Re: Dice Roller
Post by: Throndir on August 14, 2021, 09:04:54 PM
I updated this mod for 2.1 RC4. Would be nice if the mod author to take a look at update the one on the mod site!


[attachment removed per smf mod licenses when no license is present ~ Shadav]
Title: Re: Dice Roller
Post by: shadav on August 14, 2021, 11:27:45 PM
Quote from: Throndir on August 14, 2021, 09:04:54 PM
I updated this mod for 2.1 RC4. Would be nice if the mod author to take a look at update the one on the mod site!


  • Changed images to PNG and resized to 16x16 for dice image.
  • Uses integrate_bbc_buttons, integrate_bbc_codes, integrate_preparsecode for better mod compatibility.
  • Kept modification.xml for the dicemod callback function, was unsure if there's a better way with the new hooks.

[attachment removed per smf mod licenses when no license is present ~ Shadav]

Please do not upload the mod or an edited version of the mod without the mod creators permission. While this is an old mod and was approved before mods had to have license, it thusly falls under smf's standard mod license and redistributions are not allowed.
You can contact the mod author if they are interested in your version or if they wish to update their mod to include a license that would allow redistributing it.

you can however post instructions on the changes that you made to get the mod to work