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 .
Advertisement Create a free account

Macro to display result of highest die rolled

Hey everyone, I'm currently busy preparing a campaign of the rather less known rpg system Pokéthulhu. As I was preparing the macros for my players, I unfortunately encountered a problem that I don't manage to solve on my own. I've already consulted the wiki, but I didn't find anything. Help would be appreciated. To attack someone in this system, one rolls several d12 and deals damage equal to the highest d12 equal or less a specific target number. I know how to get the number of d12s which scored equal or less the target number, but I have no idea how to get the actual result of one of these dice via a macro. I know how to get the highest single roll of a number of dice, too. Unfortunately, I have no idea how to combine these two methods. The workaround I’m using at the moment is to hover over the chat window with my cursor. Therefore I can see the exact numbers of all the dice rolled. Still, it would be quiet more elegant if the macro could report the result of the highest die to the chat window immediately. It would be really nice if someone could help me solve my problem without the usage of an API script as I’m currently not a pro subscriber. Thanks in advance!

Edited 1487810903
Unfortunately without an API script, it is impossible to do multiple calculations like you require with a single calculation.

Edited 1487812608
Franky H.
Forum Champion
Could do /r ?{how many dice rolled}d12kh1>?{target} this will roll xd12, keep the highest 1, and compare it to the target use /r and it will also display the number the highest dice rolled. 

Edited 1487812671
Sheet Author
Compendium Curator
I may be misunderstanding, but you could do something like this: /r 4d12sdkh1>7 That says to roll 4 12-sided dice, sort them highest to lowest, keep the highest one and seek for success if the roll is greater than 7.  The output looks like this: I realize it's not as elegant, but it does allow you to quickly see what the next highest die was... Edit: Ninja'd by Franky... :)
Thank you for your quick replies! Yes, sorting the dice could be a solution. It may not be the option that I hoped for, but it is way more elegant than my current solution. I had already feared that it wouldn't be possible to implement my wishes without the API. Thank you.

Edited 1487860622
Forum Champion
Here's a way to get what you want without the API: <a href="" rel="nofollow"></a> /em rolls ?{d|1|2|3}d vs. Ability ?{A|1|2|3|4|5|6|7|8|9|10|11|12}: /r {[[ d12cs?{A}cf&gt;[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]], [[ (?{d}/4)d12cs?{A}cf&gt;[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]], [[ (?{d}/6)d12cs?{A}cf&gt;[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]]}kh1 Uses some brute-force modulo trickery I wrote about here .
Thank you!