DiceTool Roll Syntax

Thoughts, Help, Feature Requests

Moderators: dorpond, Azhrei, giliath

Post Reply
User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

DiceTool Roll Syntax

Post by jfrazierjr »

I have some plans to update DiceTool's existing syntax to meet some of my current needs as well as some features I have seen a few people here suggest( a long time ago...before MapTool got scripting support). Following this, I will discuss a few proposed changes to the UI as well as dice syntax.
IMPORTANT NOTE:
Current DiceTool code does not use the Parser used by MapTool, CharTool, and InitTool(it uses a Math library named JEP) so some of the existing Math functions may or may not work or may require different syntax. This will change once the code is ported to using the Parser library.
Basic Roll - Adding a Variable value:
DiceTool supports basic rolls, including the ability to reference one or more of 10 specific pre-defined variables.
Simple Roll with Variable.png
Simple Roll with Variable.png (28.63 KiB) Viewed 7049 times
The above is a very simple roll using a variable named "Con". On the bottom section of the screen, when you first open DiceTool, there be 10 variables(which you can rename as I have done here) which begin with the nameds var0 - var9. Each of these can take a simple numerical value in the cell below the name. If a named variable is referenced within a dice expression, it's value will be populated in the output. One issue with the above for some games is that you have to do the math to see what the actual ROLL result was prior to adding any values. Note that the Total column is empty(we will get to that later)

Basic Roll - Adding a Variable value WITH breakdown:
Simple Roll with Variable - Breakdown.png
Simple Roll with Variable - Breakdown.png (29.51 KiB) Viewed 7049 times
The above picture is the same logical roll, but uses a slightly different syntax to produce different results in the User Interface of DiceTool. Using the ":"(colon) operator, indicates to DiceTool that you would like to see the break down of each step, so now I know that my original d20 roll was an 8(first row) and the Con bonus(4) was added to this for a total of 12 as a final result.

Cumulative Rolls :
Cumlative Roll with Value.png
Cumlative Roll with Value.png (29.95 KiB) Viewed 7049 times
The next syntax introduces a concept of cumulative grouping dice rolls so that you can see the break down of each roll. This is done my using the square brackets with a dice expression PRECEDED by the number of times you wish to run the expression. In this case, the 3[d2]+5 means: roll three 2 sided dice and add 5, splitting the results over 3 lines.
Likewise, we could use the ":" operator to force the extra "addition" of the value 5 to be on a line by itself :
Cumlative Roll with Value - Breakdown.png
Cumlative Roll with Value - Breakdown.png (29.82 KiB) Viewed 7049 times
Last edited by jfrazierjr on Mon Aug 06, 2012 3:24 pm, edited 3 times in total.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: DiceTool Syntax Roll Syntax

Post by jfrazierjr »

Place Holder...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: DiceTool Syntax Roll Syntax

Post by jfrazierjr »

Place Holder...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: DiceTool Syntax Roll Syntax

Post by jfrazierjr »

Place Holder...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: DiceTool Syntax Roll Syntax

Post by jfrazierjr »

Place Holder...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Post Reply

Return to “DiceTool”