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

Brief Macro help!

Hello!  I just have a small macro i need to tweak and I'm not sure how to do it.  How would I go about altering the macro: [[?{numdice}d10>8sd!]] Successes +[[?{enhancement|0}]] Enhancements I want it to grant 2 successes whenever a 10 is rolled
1686977975

Edited 1686981847
GiGs
Pro
Sheet Author
API Scripter
Roll20 isnt designed for lookup-table like results or conditional effects. You can do this (sort of), but it isn't pretty (as long as you don't need to show anything different happening on 1). Complication: what is that explode modifier doing there? Roll20 supports the failure moder, where if dice are below a target you subtract 1. This gives dice giving a range of -1, 0, and 1. You want 0, 1, and 2 - so you if you add 1/die you get to the 0, 1, 2 range. Here it is using /roll syntax: /roll {?{numdice}d10!!}>10f<7 +?{numdice} +?{enhancement|0} [Enhancements] With inline roll syntax it would probably look like [[{?{numdice}d10!!}>10f<7 +?{numdice}]] +[[?{enhancement|0}]] Enhancements Note I have used double explode syntax here - this means you never get any extra dice. You might want single ! instead, but that won't work out correctly because the numdice won't be correct when your dice explode. It won't give the correct result if any dice explode.
Thanks for the help.  I am trying to get rid of the Explode actually.  They changed how dice worked on the system.  Instead of exploding, 10s just count for double so that means I have to change the macro alas.
1687000323
GiGs
Pro
Sheet Author
API Scripter
In that case, just remove the !! from my copy. It will work.
Thanks a ton.  Hey while I'm tinkering, I don't suppose you know a way for me to use macro to show the results of the individual dice in chat?
1687051342
GiGs
Pro
Sheet Author
API Scripter
There's an unspupported technique the community called Reusing Rolls that might do what you want. How do you want the output to appear?
1687059281

Edited 1687059405
Honestly if I could just get like each roll result in little boxes on one line and then a second line that appears with the total successes and the the enhancement that would be great.
1687060743
GiGs
Pro
Sheet Author
API Scripter
To have total control of the appearance (putting each die in a box) would require a Pro subscription, and a custom script. The more I think about what you want, the more I realise you can't actually do it without a script, unless you prepare every single possible number of dice with a dropdown and probably get to grips with html replacements (since I think it will require a query nested inside another query). Does anyone know how this can be done? Remember you can always see the dice rolled by hovering your mouse over the total.
If the dice aren't in a box, that's okay.  Just the numbers would be fine too. Yep, hovering over the total is how we're managing it so far, but it does mean we're hovering over pretty much every roll which can be a pain.  It'd be nice if the results just showed in chat.
1687100435
GiGs
Pro
Sheet Author
API Scripter
It's the numbers I'm referring to, sorry I wasn't clear there. The only way to show the numbers in that macro is to use the /roll syntax instead of inline rolls. That's pretty ugly.
Fair enough!  Thanks for the help in any case.  This definitely works for the main issue I had.