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

Basic maths macro?

I've been using roll20 a while now but have yet to really delve into the world of macros. I use them for simple stuff like links to other pages or dice rolls with attack modifiers. A full attack on an NPC of mine might look like this: /gmroll 1d20+15 /gmroll 1d20+10 /gmroll 1d20+15 Whilst this was fine at lower levels, we're now at level 12 and NPC's are starting to put out 5 or more attacks. The more serious issue for me was we did a mass battle yesterday using the D&D miniatures handbook rules, and a unit of 10 spearmen had 10 attacks. It just spammed the chat box, so we ended up just using /roll 10d20 and adding BAB on manually. What I want to know is, is there way to do say, 10 dice rolls, NOT add them together, but add a fixed amount to each dice. I tried things like /gmroll 1d20+4, 1d20+4 with various , ; : but it doesn't work. I've seen some of the insane macro's you guys come up with so I'm fairly certain this is possible! It's just beyond my simple understanding. Thanks! [Advanced apologies if this is answered somewhere else in the forums :S]
1429783300

Edited 1429783417
Pat S.
Forum Champion
Sheet Author
try /w gm [[1d20+15]],[[1d20+10]],[[1d20+15]] it does the same as the shown /gmroll but all in an inline manner so it just shows the result until you hover over the result. When you hover over it it will show all the rolls in a pop up display. <a href="https://wiki.roll20.net/Macros" rel="nofollow">https://wiki.roll20.net/Macros</a> has some basic info on macros
This is perfect! Thank you so much!
1429784845
Pat S.
Forum Champion
Sheet Author
You are welcomed and if you need any more help feel free to post.
1429787065
Ziechael
Forum Champion
Sheet Author
API Scripter
Here is another great resource for you, the dice reference . Of particular interest is the successes rolls. You could use these to check number of hits of large numbers of attack all at once: /r {20d20+15}&gt;25 should give you the number of successful rolls made using the given criteria against a target number (armour class for example). You could also inline it [[{20d20+15}&gt;25]] to just get the number of successful attacks rather than a chat filling readout.
You can also find some specific macro examples over at <a href="https://wiki.roll20.net/Macros_-_Pathfinder_Exampl" rel="nofollow">https://wiki.roll20.net/Macros_-_Pathfinder_Exampl</a>... (technically Pathfinder, but the examples are more about concept than game rules)