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

I need help with making a variable macro

I wish to make a macro and don't know how to write/ implement it. I want the macro to have the following effect: [spellname] /roll 1d8 + [additional effect name] roll 1d20 if >4 roll 1d4 if <17 roll 1d6 I'm really new to this and apologize if the question seems redundant or bothers anyone but I googled how to do macros for roll 20 but can't figure out how to make the type of macro I want to work. Please help anyone.
1503799774
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unfortunately this is beyond the ability of the base roll20 dice roller. If you (or the creator of your game) had a pro subscription, you could use the recursive tables script to do this via some nested rollable tables.
Scott C. said: Unfortunately this is beyond the ability of the base roll20 dice roller. If you (or the creator of your game) had a pro subscription, you could use the recursive tables script to do this via some nested rollable tables. That's unfortunate :( well I guess I'll just have to do the rolls manually then and maybe I'll look into getting a pro sub seeing as I am quite active in my friend's current campaign also thank you for answering, I really appreciate your help :D
1503802707
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I should have been more clear, the script requires that the creator of the game have the pro subscription. If you are just a player, you won't get much benefit from being a pro subscriber (plus could still give you some benefit)
1503855567

Edited 1503855637
Silvyre
Forum Champion
roll 1d20 if >4 roll 1d4 if <17 roll 1d6 Did you mean: if the d20 roll is less than four, roll 1d4; otherwise, roll 1d6? If so, you can accomplish that using this macro: /r 1d[[4 + 2 * 1d20>4]]
1503857913
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nice Silvyre.
1504904253

Edited 1504904312
Silvyre said: roll 1d20 if >4 roll 1d4 if <17 roll 1d6 Did you mean: if the d20 roll is less than four, roll 1d4; otherwise, roll 1d6? If so, you can accomplish that using this macro: /r 1d[[4 + 2 * 1d20>4]] No, I meant if the roll is equal to or less than 4 roll 1d4 or is equal to or greater than 17 then roll 1d6
so what is the output if the roll is a 5-16? I have accomplished something similar to this by creating 2 macros, the first is the roll, then the second prompts for the value of the first roll to output 2nd roll value.
Joshua D. said: so what is the output if the roll is a 5-16? I have accomplished something similar to this by creating 2 macros, the first is the roll, then the second prompts for the value of the first roll to output 2nd roll value. If the roll is 5~16 there is simply no additional effect.
1505266285

Edited 1505266827
Silvyre
Forum Champion
Jonathan D. said: if the roll is equal to or less than 4 roll 1d4 or is equal to or greater than 17 then roll 1d6 If the roll is 5~16 there is simply no additional effect. You could create a Rollable Table for this. Otherwise, try one of these macros: /r 1d[[ abs(ceil(ceil(1d20>17f<4 * 4.1) * 1.1)) ]] Additional damage: [[ 1d[[abs(-4 + {5,5,5,5,17,17,17,17,17,17}<[[1d20]])]] ]]
Silvyre said: Jonathan D. said: if the roll is equal to or less than 4 roll 1d4 or is equal to or greater than 17 then roll 1d6 If the roll is 5~16 there is simply no additional effect. You could create a Rollable Table for this. Otherwise, try one of these macros: /r 1d[[ abs(ceil(ceil(1d20>17f<4 * 4.1) * 1.1)) ]] Additional damage: [[ 1d[[abs(-4 + {5,5,5,5,17,17,17,17,17,17}<[[1d20]])]] ]] WOW!!! Thanks very much this actually works the way I needed it to, I tip my hat off to you sir! :D
1506298615
Silvyre
Forum Champion
Cheers!