RPTools.net

Discussion and Support

Skip to content

It is currently Tue Oct 17, 2017 7:09 pm 






Reply to topic  [ 5 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: DiceTool Roll Syntax
PostPosted: Mon Aug 06, 2012 1:39 pm 
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.

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.
Attachment:
Simple Roll with Variable.png
Simple Roll with Variable.png [ 28.63 KiB | Viewed 1301 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:
Attachment:
Simple Roll with Variable - Breakdown.png
Simple Roll with Variable - Breakdown.png [ 29.51 KiB | Viewed 1301 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 :
Attachment:
Cumlative Roll with Value.png
Cumlative Roll with Value.png [ 29.95 KiB | Viewed 1301 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 :
Attachment:
Cumlative Roll with Value - Breakdown.png
Cumlative Roll with Value - Breakdown.png [ 29.82 KiB | Viewed 1301 times ]

_________________
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..


Last edited by jfrazierjr on Mon Aug 06, 2012 2:24 pm, edited 3 times in total.

Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: Re: DiceTool Syntax Roll Syntax
PostPosted: Mon Aug 06, 2012 1:40 pm 
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..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: Re: DiceTool Syntax Roll Syntax
PostPosted: Mon Aug 06, 2012 1:40 pm 
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..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: Re: DiceTool Syntax Roll Syntax
PostPosted: Mon Aug 06, 2012 1:41 pm 
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..


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5410
 Post subject: Re: DiceTool Syntax Roll Syntax
PostPosted: Mon Aug 06, 2012 1:41 pm 
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..


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 5 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman