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

Rolling with Emphasis - Highlighting number furthest from 10

1682355951

Edited 1682356008
Rich
Pro
Apologies if this has been asked before, did a search, but couldn't see anything. Our D&D group has decided to playtest rolling with emphasis, to see if we like it in our homebrew game. Essentially I'm trying to work out if it is possible to write a macro that will roll 2d20 and highlight the result that is furthest from 10. My macro knowledge is basic, and I've not been able to work this out - any help would be greatly appreciated. - Thanks.
1682359516
Gauss
Forum Champion
I am pretty sure there will be no way to do this without a Mod (API script). I'd ask the Mod (API Scripts) forum . 
1682366949
timmaugh
Forum Champion
API Scripter
This example requires ZeroFrame , APILogic , and MathOps : !&{template:default}{{name=Emphasized 2d20}}{{Roll 1=[[1d20]]}}{{Roll 2=[[1d20]]}}{{Furthest From 10={&if {&math abs($[[0]]-10)} > {&math abs($[[1]]-10)}}$[[0]]{&else}$[[1]]{&end}}}{&simple} Is that the sort of thing you were looking for?
That looks great, thank you so much - greatly appreciated!
1682451763
Kurt J.
Pro
API Scripter
I just added Roll with Emphasis to ScriptCards as a dice formula: 2d20e  It supports any number and type of dice, but will only return a single die result (ie, 4d20e will roll 4d20 and give you the 1 die furthest from 10). Currently this is on the dev github ( ScriptCards/ScriptCards_API at main · kjaegers/ScriptCards (github.com) )  but I've put in a pull request to update oneclick next week with this and other changes