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

Help with a macro for Grok?! game

Hey all, I'm putting together a Grok?! game and am trying to setup a macro so that the players can click a button for whichever of their three Attributes, set the number of dice they're rolling and select whether its with Advantage/Disadvantage or not. I have one query for total number of dice being rolled, and another for advantage/disadvantage, but i'm not sure how (or if i can) call the total dice query into the advantage/disavd query. Or maybe I'm doing this far too complex? Here's what I have so far, if they were making a physical roll: !?{Total dice?|1} !?{Advantage/Disadvantage?|Advantage,d@{selected|Physical}kh1|Normal,1d@{selected|Physical}|Disadvantage,d@{selected|Physical}kl1}} &{template:default} {{name=Physical}} {{Result=[[?{Advantage/Disadvantage?}]]}} My thought being they player will input the total dice they're rolling, all of which will be the same die type based on their attribute, then roll that number, either keeping the highest or lowest (or just rolling one if its a straight roll). Appreciate any guidance on how to do this correctly, or more simply than I'm trying now. Thanks!
Ah I ran into the same issue with toggling advantage/disadvantage on a mob combat macro in 5e! You are close but you are missing several factors. First, you when you query for advantage/disadvantage there should also be a normal options. Second, if you are rolling multiple dice at advantage/disadvantage you will need to multiply the total dice by 2. Third, because you don't want twice as many results after your "kh" or "kl" you need to have the total dice. That way if you have 4 total dice (1d6's for example) at advantage, the math would be (2*4)d6kh4. This will roll 8d6's and keep the highest 4.  NOTE: This is not true advantage but is statistically equivalent, to get true advantage in the above example you would need to roll 2d6kh1 four times, which is a little to complicated for myself, and might need to use an API to achieve a variable amount of loops  This option might help you get on the right track. it allows for rolling multiple dice, and can toggle between normal, advantage and disadvantage (Also I didn't test this macro personally so it may need tweaking, but it should at least help clarify ) &{template:default}{{name=Physical}}{{  [[(?{Total Dice|1}*?{Normal, at Advantage or Disadvantage|Normal,1)d @{selected|Physical} kh|Disadvantage,2)d @{selected|Physical} kl|Advantage,2)d @{selected|Physical} kh}?{Total Dice}]] }} Math wise, advantage would look like ({Total Dice} * 2)d{Physical}kh{Total Dice} NOTE: I don't play  Grok?! so I don't know what number "@{selected|Physical}" will grab, but if its something like 6,8,10,12 etc it should work. Now Querying between attributes will be much trickier. I would recommend looking into nesting macro's HERE  and if it helps you can look at how I had a similar issue resolved HERE
1668027528

Edited 1668027957
Thanks for the reply!  I'm not sure if it changes how this is coded at all, but in Grok advantage/disadv means rolling several dice, up to 5 IIRC, and then simply using the highest/lowest. edit: *That's why I query the number of dice they're rolling first.