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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Rolling multiple identically modified dice

1376084511
Bill K.
Pro
Sheet Author
Perhaps this option already exists, but I have been unable to find it if so.  What I am looking to do is roll X (d20+Y).  For instance, if 6 goblins surround a fighter, each has a +3 bonus to hit, I want to set up a macro, tell it to roll 6 dice, each at +3, and get 6 rolls of (1d20+3).  Right now, this only seems to be possible when doing a target-number check, such as: /roll {3d20+3}>10.  But players have different defenses, which change, and the macro doesn't auto-add the 3 (or whatever in), so it's not actually more useful than just rolling 3d20 and adding the number in your head.  And /roll 3d20+3 just rolls 3 20 siders, adds them, then adds 3 to the final result.  I guess I'm just looking to see each result in the list modified, and not really caring about the final summation. Anyways: if the ability to roll a number of modified dice, and see the result of each, exists, I'd be quite thankful if somebody pointed it out to me.  If not, it seems like a piece of syntax which might be useful to many people.
1376096812
Gauss
Forum Champion
You are correct, there is not currently a way to do this directly. However, there is a kinda sorta way to do what you want but it is not ideal by any stretch of the imagination.  If #macro = 1d20+3 then you can do the following:  /r {[[#macro]], [[#macro]], [[#macro]]}>10 will roll all 3 and total them up individually before checking for successes (ignore the success statemnt).  Alternately, you can do this:  Set a macro name that is has a unique first letter (no other macros with that first letter) macro name: #z macro body: [[1d20+3]] In the chat type the following (keystrokes are denoted by " " marks) #z "enter" "space" #z "enter" "space" #z "enter" "space" "enter"  It will roll the macro 3 times in inline form.  Again, not quite what you are looking for but it may still speed things along for you. If you need any help let me know.  - Gauss
+1 on the suggestion that this type of thing be added; the workaround is a bit clunky for me, especially when the modifier may change round to round.
There's an option to add a query to macro rolls. You could use [[1d20+?{Modifiers|0}]] and it would pop up each time you run the macro. Though I don't believe the default value option is live yet. +? triggers the roll query {Modifiers is the description that pops up on the box. It can be anything you want almost. |0} is the default value. You can set this to anything you want as well. Even if it isn't live yet, you can still put it in there and the description will just be Modifiers|0: instead of Modifiers:
1376142220
Bill K.
Pro
Sheet Author
Yeah, unfortunately the example was just an example.  The real goal is to combine the script of Gauss with the queries of HoneyBadger, so that a new script need not be written for every combatant (ie: ideally querry a die size, modifier, and number of rolls once, then have all the rolls pop out in a line.  Ideally).  Looks like, for now, it's either type the roll out once and just hit 'up' to roll over and over again, like I do now, or play around with scripting and see if I can rig something that way.  Thanks all for the suggestions, in any case. Of course, on second thought: macros can't accept variables like functions, or store variables, or run for loops, can they?  I'm pretty sure that's what the API is needed for, but it not...
Yeah, that is what the api is for.