Dice Tool updates

Thoughts, Help, Feature Requests

Moderators: dorpond, Azhrei, giliath

Post Reply
vaultdweller
Kobold
Posts: 6
Joined: Sat Sep 12, 2009 11:32 am

Dice Tool updates

Post by vaultdweller »

Is this tool ever going to be updated, or is it officially abandoned?

I understand that MapTools has support for things like brutal dice, exploding dice, and other capabilities when parsing dice expressions. It would be nice if that functionality made its way over to Dice Tool.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Dice Tool updates

Post by jay »

While it isn't necessarily abandoned, it isn't being actively worked on either. Map Tool uses the parser that dice tool uses for die rolls. I'm not sure if there are any MT only extensions. However, if the modifications to MT die rolling that you are talking about are from macros, then they will never show up in dice tool.

vaultdweller
Kobold
Posts: 6
Joined: Sat Sep 12, 2009 11:32 am

Re: Dice Tool updates

Post by vaultdweller »


User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Dice Tool updates

Post by jay »

I didn't think so, I'll have to take a look when I get a chance.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dice Tool updates

Post by Azhrei »

vaultdweller wrote:I guess those are macros?
Nope. If they were the category for the wiki page (look at the bottom) would be "Macros" and it's not. (Although it only has MapTool and not DiceTool. Likely because the wiki site is primarily about and for MapTool...)

Those are built-in to the parser.

vaultdweller
Kobold
Posts: 6
Joined: Sat Sep 12, 2009 11:32 am

Re: Dice Tool updates

Post by vaultdweller »

Azhrei wrote:Those are built-in to the parser.
Ok... so they're built into the parser, and MapTool and DiceTool use the same parser, then why do they work in MapTool but not in DiceTool?

jmurrayufo
Cave Troll
Posts: 38
Joined: Mon Apr 27, 2009 5:04 pm

Re: Dice Tool updates

Post by jmurrayufo »

I'm curious about this too. There are times when I'd love to just have a nice dedicated dice program, and MapTools has a lot of nice dice features that the dice application lacks... Confusion abounds!

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dice Tool updates

Post by Azhrei »

Hmm, good question. :) My initial guess would be that the configuration for those tools (like DiceTool) still uses an older version of the parser-lib JAR file. But I don't use DiceTool so I haven't looked into it. Hold on...

Yep, that's it. The rplib that's in the latest DiceTool zip is 1.0.b62 and the one shipped with MapTool is 1.0.b119! :roll:

Until I get this corrected, if you want to try the newer library and see if it works, unpack the DiceTool zip file, then copy the one from MapTool's lib directory on top of the one in the DiceTool lib directory. Note that I said, "on top of". That means copying rplib-1.0.b119.jar to rplib-1.0.b62.jar. Yes, that will overwrite the existing one. And yes, the version number in the filename is now wrong -- big deal. ;)

There are no dependencies listed in the JAR file so that should work. Later in the week I'll see about updating the Web Start launch configuration, but I won't be uploading a new zip of DiceTool to the main web site as I'm not a maintainer of that project and I don't want to step on anyone's toes. :)

vaultdweller
Kobold
Posts: 6
Joined: Sat Sep 12, 2009 11:32 am

Re: Dice Tool updates

Post by vaultdweller »

Swapping the library doesn't seem to work for me - the application doesn't load.

After poking around a bit in the rplib library with Eclipse, I'm not seeing anything that looks like an expression parser, so I'm not sure that this particular outdated library is the culprit.

Without going into too much exploration of the source trees*, it looks to me like MapTool references libraries for parsing dice expressions, and those libraries are based on code that's built in to DiceTool. I don't think MapTool uses the same parser as DiceTool, I think that MapTool's parser was just based on DiceTool. Of course, I could be totally wrong.**

Either way, though, thanks for taking a look. In lieu of stepping on the maintainer's toes, could you perhaps poke the maintainer about it? ;)


*because I am not a Java developer and have only a basic knowledge of the language
**See last point

{Edit}
As a side-note, I don't use Web Start, as I compile my own tweaked version of DiceTool (to add extra rows to the CustomRollPanel and extra variables to the VariablePanel).

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dice Tool updates

Post by Azhrei »

Yep, you're right. I just looked into the DiceTool zip more closely and it uses rplib, but not parser and it's the second one that handles the MapTool macro language and, I assume, the dice rolling.

I don't see any library of DiceTool that is replaceable that would get you the same dice rolling stuff that's in MapTool.

Sorry. I thought they were using the same library.

vaultdweller
Kobold
Posts: 6
Joined: Sat Sep 12, 2009 11:32 am

Re: Dice Tool updates

Post by vaultdweller »

Unfortunate.

If I had the time I'd look into rewriting DiceTool to use the Parser library (hooray for open source!), but between a full-time job, part-time university, playing in one D&D campaign and developing & DM'ing another campaign :shock: ... probably not gonna happen.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dice Tool updates

Post by Azhrei »

Probably for the best. The MapTool parser is a real hack in a lot of ways. ;) Although the functions that implement the dice rolling could probably be pulled out without too much trouble, the question remains of how tough it might be to add to DiceTool. I don't really know much about DT -- perhaps a little JavaScript could suffice?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Dice Tool updates

Post by jay »

The parser lib is what handles one line of the MT macro language minus the stuff in the square brackets. It does arithmetic, function parsing, boolean values. The dice lib handles parsing and executing the dice rolls. It is placed on top of the parser and replaces the die rolling formats with function calls. It also defines all of the die roll functions. For example 1d6 is converted into roll(1, 6) and then sent to the parser. This part of the macro language is fairly well defined, but it wasn't made to be a full programming language. It was made to be something used on a command line in chat. All the other macro language support like if and looping was added afterwords as requested by the community. So it really isn't that coherent of a design, but a bunch of patches added around the parser and dicelib.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dice Tool updates

Post by Azhrei »

Ah. :)

Thanks for the background...

train850
Kobold
Posts: 12
Joined: Fri Aug 13, 2010 10:06 pm

Re: Dice Tool updates

Post by train850 »

I used the parser for 3.5e dnd as a basis for the universal roller I scripted. Details are here http://forums.rptools.net/viewtopic.php?f=5&t=2396


I can show you the finished product if you want, basically its so simple youll laugh at it.

Post Reply

Return to “DiceTool”