Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Virtual Rolled Dice in Macro

I'm trying to create a macro that allows the player to select sneak attack and add the damage when appropriate. I am using the guidelines laid&nbsp;out here <a href="https://app.roll20.net/forum/post/3904787/ranged-" rel="nofollow">https://app.roll20.net/forum/post/3904787/ranged-</a>... The issue I run into is that I don't see all my dice being rolled such as the D20 and the sneak attack dice. BTW is there a way to exit the macro on a 1 rolled on the attack&nbsp;roll? Attack Roll 1d20cs&gt;@{weapon1critmin} +@{bab}[BAB] + @{weapon1stat}[Ability] +@{size}[size] +@{weapon1enh}[Weapon Enh] + ?{Flank (1=yes)|0}*2[Flank] +?{Additional Attack Bonus?|0}[Ad'l Atk Bon]&nbsp;&nbsp; Damage Roll 1d4 + @{weapon1damagestat}[Weapon Dmg Ability] +@{weapon1enh}[Weapon Enh] +[[?{Sneak Attack? |No, 0 |Yes, @{sneakattack_damage} }]] [Sneak Atk]? + {Additional Damage Bonus?|0}[Ad'l Dmg Bon]
1522266895
GiGs
Pro
Sheet Author
API Scripter
There's no way to have dice rolls be conditional without the API (plus subscribers only). If you're using the virtual 3d dice, they'll always appear.
But my problem is that they are NOT appearing.
1522299552

Edited 1522299584
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Are those the macros in their entirety? Cause they're missing either the slash command to roll (\roll) or inline roll brackets wrapping ([[ ... ]])
1522302541

Edited 1522302658
vÍnce
Pro
Sheet Author
You can get strange behavior when using a roll and an inline query within an inline roll.&nbsp; Could be a bug with 3d dice example; [[ 1d4 + ?{roll inline?|yes,[[1d20]]|no,1d20} ]] If you choose "yes", you will not see the 1d20 rolled.&nbsp; If you choose "no", you will see both a d4 and a d20 rolled. also, if I wrap the query within an inline roll, [[ 1d4 + [[?{roll inline?|yes,[[1d20]]|no,1d20}]] ]] neither "yes" or "no" will show a d20.&nbsp; ;-( With that knowledge, try changing your macros so that if you have a roll and are adding query with a roll, do not nest the query within an inline roll and/or do not include a nested inline within the query.&nbsp; Clear as mud? Your attack macro looks good unless one of the attributes it includes is an inline roll.&nbsp; I substituted "0" for each attribute as a test and the macro worked fine and I could see the d20.&nbsp; no issues.&nbsp;&nbsp;So not sure why your not seeing your d20 roll...&nbsp; You could probably check each attributes value in the attributes & abilities tab to see if any are inline rolls and if that's causing the issue.&nbsp; You could also try adding one piece of your macro at a time and see when you no longer see you roll. Attack Roll [[ 1d20cs&gt;@{weapon1critmin} +@{bab}[BAB] + @{weapon1stat}[Ability] +@{size}[size] +@{weapon1enh}[Weapon Enh] + ?{Flank (1=yes)|0}*2[Flank] +?{Additional Attack Bonus?|0}[Ad'l Atk Bon] ]] The damage macro places sneak attack within an inline roll (I'll remove that below) and I believe it had a typo with a misplaced "?" for the additional damage query (also fixed below) Damage Roll [[ 1d4 + @{weapon1damagestat}[Weapon Dmg Ability] +@{weapon1enh}[Weapon Enh] +?{Sneak Attack? |No, 0 |Yes, @{sneakattack_damage} } [Sneak Atk] + ? {Additional Damage Bonus?|0}[Ad'l Dmg Bon] ]] .
It looks like sometimes I see the D20 and sometimes not. Sometimes I see the die roll from the previous roll so that suddenly I have 3D20 on the screen.