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

Rolling Multiple d20's at once? Macro help for 5e

Can someone make me a macro for this?  I'm trying to have a condensed roll for spells like scorching ray and animate objects attack to hit.  I would like to determine how many attacks are to be rolled with modifiers added and be seperate numbers?  I would like to not have to do math every time with the advanced roller on the left not adding the modifiers to each d20.
1567759749
GiGs
Pro
Sheet Author
API Scripter
Not everyone plays D&D, you'll need to explain how the rolls work before we can suggest a macro.
This is a simple macro that brings up just a normal box, you type in your modifier for the roll and it rolls 1d20.  /me rolls a [[ {1d20} +?{Modifier|} ]]
1567765890
GiGs
Pro
Sheet Author
API Scripter
okaaay, but how do animated objects and scorching rays work... By the way you don't need the curly brackets around the d20 there, that should just be  /me rolls a [[ 1d20 +?{Modifier|0} ]] If what you want is for someone to enter a number of attacks, and then that number of attacks to be rolled, that's not directly possible with a macro. Macros dont support carrying values over from one roll to the next, or any kind of conditional if/then syntax. What you can do is have a query that asks for number of rolls, then has a row in which every roll is added manually, but you'll need to investigate either html replacements or chat menus. This is not simple! For example, here's about the simplest version of a macro that asks for 1-3 attacks, rolls attack the right numbers, and gives a button to launch a damage macro &{template:default}{{name=some attacks}} {{Attack Rolls=?{How many| 1,[[1d20+?{modifier|0}]]| 2,[[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]]| 3,[[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]]} }} {{Damage Roll=[Scorching Ray](~Bilbo|Scorching-Ray-Damage) }} It also puts it in a reasonably pretty format on output. If you want more than 3 attacks, you need to a new row, and add an extra instance of [[1d20+?{modifier|0}]] on the new row, like so: &{template:default}{{name=some attacks}} {{Attack Rolls=?{How many| 1,[[1d20+?{modifier|0}]]| 2,[[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]]| 3,[[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]]| 4,[[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]] [[1d20+?{modifier|0}]] } }} {{Damage Roll=[Scorching Ray](~Bilbo|Scorching-Ray-Damage) }} The last part {{Damage Roll=[Scorching Ray](~Bilbo|Scorching-Ray-Damage) }} Assumes you have a character named Bilbo, and have created an ability on Bilbo called Scorching-Ray-Damage, for rolling one damage roll. You click that button as many times as you get hits, and count them up manually. If you have instead a universal macro, not a character ability, replace that with {{Damage Roll=[Scorching Ray]( !
# Scorching-Ray-Damage) }} If you are using a character can use an attribute value in place of asking for a modifier. In which case, replace the instances of  ?{modifier|0} with @{Bilbo|Attack-bonus} (replace Bilbo with character name, and Attack-bonus with whatever the attack attribute is called.)
1567766144
GiGs
Pro
Sheet Author
API Scripter
I mention a chat menu approach. That's much simpler: &{template:default}{{name=Scorching Ray}} {{[Attack](~Bilbo|Scorching-Ray-Attack) =[Damage](~Bilbo|Scorching-Ray-Damage) }} This would print a button for attacks and a button for damage. The player clicks the attack button once for each attack they make, and the damage roll once for each hit they score. It requires you to create extra abilities, one for attack, and one for damage, but it's worth it for the simplicity. Again, if they are universal macros, replace with &{template:default}{{name=Scorching Ray}} {{[Attack](!
#Scorching-Ray-Attack) =[Damage](!
#Scorching-Ray-Damage) }}
This is what I get when I click the scorching ray button which would roll 2d6 per hit.
1567845225

Edited 1567845294
GiGs
Pro
Sheet Author
API Scripter
What text does the Scorching-Ray-Damage ability or macro contain?
1568022879
GiGs
Pro
Sheet Author
API Scripter
I was asking for the text of the macro that is launched when you click the Scorching Ray button.
In a separate thread I just posted my Scorching Ray macros (cf.&nbsp; <a href="https://app.roll20.net/forum/post/7765419/scorching-ray-macros-dnd-5e" rel="nofollow">https://app.roll20.net/forum/post/7765419/scorching-ray-macros-dnd-5e</a> ), which might be useful for you directly, or at least to give you some ideas.&nbsp;