Dice Roller

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Scam Warning
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Dice Roller

Post by Ger »

zorni wrote: Mon Nov 06, 2017 3:14 pm Pen & Paper RPGs have values for many talents. Let's say, physical strength. 5, for example, is like a child, 12 is a normal man and over 15 is a warrior.
If the player wants to apply a talent, he has to take a sample with a D20. The game master can modify this depending on how difficult the task is.
For example, the warrior wants to lift a 75kg stone. It's no easy task, so the master modifies this specimen by 3: the physical force is 15, the Modification 3, so the Warrior has to make the specimen 3 more difficult, that's a 12, so he rolls a D20 and succeeds in rolling a 1-12. If he's above that, he won't make it through rehearsal.
I see. Is that only about + and -, or also multiplications, divisions and other stuff?
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
RiTz21
Registered User
Posts: 213
Joined: Tue May 31, 2005 5:20 pm

Re: Dice Roller

Post by RiTz21 »

Ger wrote: Mon Nov 06, 2017 2:59 pm ...so I extracted these basic requirements:
  1. Be able to put some BBcode specifying the number of dice and how many sides each dice has
  2. Showing and protecting the result
  3. Allow only dice rolls belonging to the post, unless you're quoting someone else
  4. Prevent edits and such
Yep, that's about it for a basic implementation.

It needs to allow for things like:
[ROLL]2d4+5[/ROLL]
[ROLL=Morck Cures Dregs]2d8+3[/ROLL]

If a bit more advanced, it would allow a special Dice (which is like 90% of rolls in a PbP) and a more complex parsing:
1d20+4;1d6+4+2d6
Used like this (an attack action also requires a damage result in case the attack succeeds):
[ROLLATK=Aragorn Sneak Attack on Orc #1]1d20+4;1d6+4+2d6[/ROLLATK]
With a result of:
Aragorn Sneak Attack on Orc #1
.....Attack: 14+4 → 18
.....Damage: 3+4+6 → 13


(I used dots because I can't use white-spaces or a tab in a forum post - but "...." is a tab!)

You can (obviously) use the Standard Dice notation for the rolls - there might even be existing libraries that provide functions for that - like on GitHub

In any case, if you wish to go forward, I can help out in testing or other questions you might have (dice related!)
THANKS!!

RiTz21

P.S. [ROLL] would be a much better tag than DICE! (and not break my old forum which has lots of outdated [DICE] all over the place... )
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Dice Roller

Post by Ger »

RiTz21 wrote: Mon Nov 06, 2017 3:36 pm If a bit more advanced, it would allow a special Dice (which is like 90% of rolls in a PbP) and a more complex parsing:
1d20+4;1d6+4+2d6
Used like this (an attack action also requires a damage result in case the attack succeeds):
[ROLLATK=Aragorn Sneak Attack on Orc #1]1d20+4;1d6+4+2d6[/ROLLATK]
With a result of:
Aragorn Sneak Attack on Orc #1
.....Attack: 14+4 → 18
.....Damage: 3+4+6 → 13
Isn't this just basically 2 rolls?
You can (obviously) use the Standard Dice notation for the rolls -
Wow :shock:
I do some board games like these, never realised there were so many options :lol:
P.S. [ROLL] would be a much better tag than DICE! (and not break my old forum which has lots of outdated [DICE] all over the place... )
I can imagine I would support both and simply create some kind of settings page that allows for selecting one of them... Not sure yet. I will probably end up supporting the most common usage.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
RiTz21
Registered User
Posts: 213
Joined: Tue May 31, 2005 5:20 pm

Re: Dice Roller

Post by RiTz21 »

Ger wrote: Mon Nov 06, 2017 3:56 pm Isn't this just basically 2 rolls?
Yes, but it would have the advantage (for 90% of rolls) of every player using the same template for rolls... that would be sweet (hence the extra tag [ROLLATK] to denote the attack action. Note that ALL version of Dungeons & Dragons + many many d20 derivatives have attacks that are a sequence of two rolls. Of course, [ROLL] has to be working first before adding the secondary [ROLLATK]!
Ger wrote: Mon Nov 06, 2017 3:56 pm I can imagine I would support both and simply create some kind of settings page that allows for selecting one of them... Not sure yet. I will probably end up supporting the most common usage.
If you keep [DICE], I just hope it will work with the many [DICE]0[/DICE] let over on my forum from the days of DiceMod!

RiTz21
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Dice Roller

Post by zorni »

If I'm able to share "my" dice ext with you, you'll be able to re-import the old [dice] rolls, to the new ext.

We paid special attention to that, because we didn't want to destroy 88000 rolls, we had in the past :)
User avatar
RiTz21
Registered User
Posts: 213
Joined: Tue May 31, 2005 5:20 pm

Re: Dice Roller

Post by RiTz21 »

zorni wrote: Mon Nov 06, 2017 4:53 pm If I'm able to share "my" dice ext with you, you'll be able to re-import the old [dice] rolls, to the new ext.

We paid special attention to that, because we didn't want to destroy 88000 rolls, we had in the past :)
Thanks!!
I'm ok though - I already upgraded to 3.2.1 and the old DiceMod tables are all deleted... the only thing left are the lost [DICE] tags in the PbP forums. I *could* restored they from an old backup, but it's not worth the effort (they are not really needed... My worry is more that they could cause issues with a new dice extension that uses [DICE] for the bbcod, as opposed to [ROLL])

RiTz21
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Dice Roller

Post by zorni »

In this case they shouldn't. BBcodes only will ne reparsed, if the posting will be edited and saved.
User avatar
RiTz21
Registered User
Posts: 213
Joined: Tue May 31, 2005 5:20 pm

Re: Dice Roller

Post by RiTz21 »

zorni wrote: Mon Nov 06, 2017 5:06 pm In this case they shouldn't. BBcodes only will ne reparsed, if the posting will be edited and saved.
Is there a way to 're-parse' the bbcodes?
I ask because I had MANY bbcodes not working after upgrading to 3.2.1 from 3.0.14 ... and although I finally fixed all of them (reference), I noticed that they are not parsed.

RiTz21
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Dice Roller

Post by zorni »

The Support Tool Kit has an option for reparsing BBCodes.
https://github.com/AlexSheer/phpBB3.2-STK
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Dice Roller

Post by Ger »

RiTz21 wrote: Mon Nov 06, 2017 5:18 pm
zorni wrote: Mon Nov 06, 2017 5:06 pm In this case they shouldn't. BBcodes only will ne reparsed, if the posting will be edited and saved.
Is there a way to 're-parse' the bbcodes?
I ask because I had MANY bbcodes not working after upgrading to 3.2.1 from 3.0.14 ... and although I finally fixed all of them (reference), I noticed that they are not parsed.

RiTz21
Yes, that is possible through the CLI interface. I'm on the phone now, but search for "phpbbcli reparse bbcode", that should point you in the right direction.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Dice Roller

Post by zorni »

So "my" Ext is open source. How should we handle that, ger? I'm not sure if it's the best idea just to post a public DL link, cause as I said before, there's no documentation or support.
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Dice Roller

Post by Ger »

zorni wrote: Mon Nov 06, 2017 6:01 pm So "my" Ext is open source. How should we handle that, ger? I'm not sure if it's the best idea just to post a public DL link, cause as I said before, there's no documentation or support.
Well, usually I just put everything on Github, but I understand you don't want that.

Is it OK I PM you my email address so you can send me a private download link? I won't just be throwing it online, just use it for inspiration to create my own extension.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Dice Roller

Post by zorni »

So I talked with my team and we will provide a public download. So everybody can do whatever he/she want's with it.

Here you go. http://www.dsaforum.de/app.php/dlext/?v ... &df_id=220

Have fun!
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Dice Roller

Post by 3Di »

zorni wrote: Tue Nov 07, 2017 8:04 am So I talked with my team and we will provide a public download. So everybody can do whatever he/she want's with it.

Here you go. http://www.dsaforum.de/app.php/dlext/?v ... &df_id=220

Have fun!
Just out of curiosity, since we (me and javiexin) ported the Dicemod for 3.1 and I do have the version for 3.2 already in my pipeline I was curious to compare the 2 logics, under a developer's point of view ..but:

your D/L doesn't work here. :) Could it be a question of permissions?

Thx.
Last edited by 3Di on Tue Nov 07, 2017 8:39 am, edited 1 time in total.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: Dice Roller

Post by zorni »

Could you test again pls? I changed a setting
Post Reply

Return to “Extension Requests”