Page 1 of 1

Dice Tool updates

Posted: Wed Mar 31, 2010 4:52 pm
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.

Re: Dice Tool updates

Posted: Wed Mar 31, 2010 5:13 pm
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.

Re: Dice Tool updates

Posted: Wed Mar 31, 2010 5:24 pm
by vaultdweller

Re: Dice Tool updates

Posted: Wed Mar 31, 2010 5:49 pm
by jay
I didn't think so, I'll have to take a look when I get a chance.

Re: Dice Tool updates

Posted: Wed Mar 31, 2010 8:14 pm
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.

Re: Dice Tool updates

Posted: Wed Mar 31, 2010 9:57 pm
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?

Re: Dice Tool updates

Posted: Mon Apr 05, 2010 12:54 am
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!

Re: Dice Tool updates

Posted: Mon Apr 05, 2010 6:17 pm
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. :)

Re: Dice Tool updates

Posted: Mon Apr 05, 2010 7:24 pm
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).

Re: Dice Tool updates

Posted: Mon Apr 05, 2010 11:31 pm
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.

Re: Dice Tool updates

Posted: Mon Apr 05, 2010 11:48 pm
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.

Re: Dice Tool updates

Posted: Tue Apr 06, 2010 12:18 am
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?

Re: Dice Tool updates

Posted: Tue Apr 06, 2010 12:01 pm
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.

Re: Dice Tool updates

Posted: Tue Apr 06, 2010 3:55 pm
by Azhrei
Ah. :)

Thanks for the background...

Re: Dice Tool updates

Posted: Sat Aug 14, 2010 7:00 pm
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.