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 Macro for consecutive queries.

I'll preface this by saying that i am a complete Noob when it comes to macros. I know some basic stuff but that's it. I'm running a game of CAIN by Tom Bloom which isn't available on roll20 and thought of making some Macros to make my player's lives easier. Here's the parameters i'm working with: Ask for dificulty. If Normal, count the number of rolls 4 or higher onthe d6. If Hard, coun the number of rolls equal to 6 on the d6. Then query the amount of dice rolled. it goes from 0d to 9d. Where nd is the number of d6 and 0d means two d6 dropping the highest roll. Then it queries risk. If risky, roll a separate d6. If regular it doesn't roll anything. there'sno success or failure in the risk, just the raw value. I tried many things but ultimatley decided to ask ChatGPT for some help and it gave me two options. In botth cases it queries me everything but it doesn't roll. I'm having it be in template so it looks better as well. OPTION 1 &{template:default}  {{name=Action Roll}} {{Difficulty=**?{Difficulty|Normal|Hard}**}} {{Dice= [[    ( ?{Number of Dice|0d,0|1d,1|2d,2|3d,3|4d,4|5d,5|6d,6|7d,7|8d,8|9d,9} )d6   +   ( 2d6kl1 * (1 - floor(?{Number of Dice}/1)) ) ]] }} {{Successes= [[    {      (       [[         (?{Number of Dice}d6 + 2d6kl1 * (1 - floor(?{Number of Dice}/1)))       ]] >= 4     ) * ( ?{Difficulty}=Normal )     +     (       [[         (?{Number of Dice}d6 + 2d6kl1 * (1 - floor(?{Number of Dice}/1)))       ]] = 6     ) * ( ?{Difficulty}=Hard )   } ]] }} {{Risky Roll= [[ 1d6 * ( ?{Risky?|No,0|Yes,1} ) ]] }} OPTION 2 &{template:default}  {{name=Action Roll}} {{Difficulty=**?{Difficulty|Normal|Hard}**}} {{Dice Rolled= [[    ( ?{Number of Dice|0d,0|1d,1|2d,2|3d,3|4d,4|5d,5|6d,6|7d,7|8d,8|9d,9} )d6   +   ( 2d6kl1 * (1 - floor(?{Number of Dice}/1)) ) ]] }} {{Successes= [[    (     ( ?{Number of Dice}d6>3 ) +     ( 2d6kl1>3 * (1 - floor(?{Number of Dice}/1)) )   ) * ( ?{Difficulty}=Normal )   +   (     ( ?{Number of Dice}d6cs6cf5 ) +     ( 2d6kl1cs6cf5 * (1 - floor(?{Number of Dice}/1)) )   ) * ( ?{Difficulty}=Hard ) ]] }} {{Risky Roll= [[ 1d6 * ?{Risky?|No,0|Yes,1} ]] }}
1763842799
Gauss
Forum Champion
Hi Morpheus,  First let me say, I wouldn't even bother with ChatGPT on this. Roll20 is too niche for it to know what is going on here.  Second, let me see if I understand what you need.  You need a variable "difficulty" (4 or 6). You also need a variable number of dice? Also, 0d is 2d6kl1.  So I am seeing:  0d6 = 2d6kl1>?{Difficulty|Normal,4|Hard,6} 1d6 = 1 d6>?{Difficulty|Normal,4|Hard,6} 2d6 = 2 d6>?{Difficulty|Normal,4|Hard,6} 3d6 = 3 d6>?{Difficulty|Normal,4|Hard,6} and so on up to 9d6.  Then you have the Risky Roll tacked on, that is the simplest thing.  Have I missed anything?
Nop, nothing else. You got variable difficulty, variable dice pool and risk, which is a standalone thing.
1763844828

Edited 1763845074
Gauss
Forum Champion
Here you go:  &{template:default} {{name=Action Roll}} {{Dice=[[?{Number of Dice|0d,2d6kl1|1d,1d6|2d,2d6|3d,3d6|4d,4d6|5d,5d6|6d,6d6|7d,7d6|8d,8d6|9d,9d6}>?{Difficulty?|Normal,4|Hard,6}]]}} {{Risky Roll=[[?{Risky?|No,0|Yes,1}d6]]}} If you want it to report the Difficulty at the start of the template like the ChatGPT version then either it needs an extra query (not recommended) or we can leverage a Rollable Table to provide that. But to create it you need GM permissions in your game or the GM needs to help with it.  Do you have GM permissions in your game?  If your GM needs to do it it should only take a couple minutes. 
THANK YOU SO MUCH! I just tested it and it is working wonderfully. I really appreciate you taking the time to help me figure it out. I was going insane trying to understand how to fit everything together.
1763865737
Gauss
Forum Champion
Did you want the difficulty stated at the start of the template?