I know that a tool tip (expanded or something like that) can show you what the individual dice results were of a roll like "2d+2". But is there a way to see this within a macro? I need to be able to see what each die rolled, not just the total.
I know I could break about the "2d" into "okay, roll 1 d6, get the result, then roll a second 1 and do the same" but this seems clunky. If that's the route I need to go, so be it, but was wondering if there's some other way I'm overlooking.
breaking up a dice roll in a macro
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Re: breaking up a dice roll in a macro
I wrote this awhile ago: http://forums.rptools.net/viewtopic.php ... 87#p241200
rollDice(numDice,sides): result
<!-- hidden return with tooltip in variable dice.tooltip -->
rollDice(numDice,sides): result
<!-- hidden return with tooltip in variable dice.tooltip -->
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- jfrazierjr
- Deity
- Posts: 5176
- Joined: Tue Sep 11, 2007 7:31 pm
Re: breaking up a dice roll in a macro
Is the new parser Craig wrote in the current version? I had asked him to expand the way roll expressions returned from the parser. ie, instead of a string returning an array(or map or whatever.. I don't remember the details). I had had asked this for my plan of writing Dicetool and needed such a breakdown... of course, I assumed it would not be needed in MT, but MT could just pull out the first element or keyed name(ie, the one with "just the total") only while DiceTool needed each dice to show.
However, there is no reason why a "roll" macro could not be told to return the array so that calling macro could then format as needed.
However, there is no reason why a "roll" macro could not be told to return the array so that calling macro could then format as needed.
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..
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..