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 me with a Macro that Rolls (variable number of) d4s and ignores 4s

1512138045
MattBx8
Pro
Marketplace Creator
Sheet Author
Hello Everyone, I’m running a game of My Life with Master using the Rankin and Bass “Rudolph the Red Nosed Reindeer” setting. Standard roll in My Life with Master are a number of d4s, with all 4s treated as zero. My current standard roll macro is: /roll ?{Number of Dice}d4cf4 but I’d like a macro that ignores all 4s. I know I could just have a 0 to 3 die roll but there’s something about seeing a 4 rolled to know that your roll is screwed by it. Any help appreciated! /Matt
I have looked in Roll20 and I am not seeing any way to force a 4 to become a 0 when rolled.
1512141622
The Aaron
Pro
API Scripter
Using a Rollable Table with values: 0 [4] 3 2 1 each at weight 1 will give the right total and should show the 4 label as well.
I'm not sure how to do it in 1 macro, but you could have several macros with /roll 1d4%4. Alternatively, I just made this, and since you're pro, you could use it. Macro is of form !ModulaDice ?{Num} ?{type}: on("ready", function() { on("chat:message", function (msg) { if (msg.type === "api" && msg.content.split(' ')[0] === "!ModulaDice") { ModulaSum(msg); } }); function ModulaSum(msg) { var numberOfDice = parseInt(msg.content.split(' ')[1]); var diceType = parseInt(msg.content.split(' ')[2]); var diceString = "/roll "; if(numberOfDice && diceType) { for(var i =0; i < numberOfDice; i++) { diceString = diceString.concat("1d" + diceType + "%" + diceType + "+"); } sendChat(msg.who, diceString); } } });