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

Adding a changing modifier to variable dice rolls

Not really sure how to title this, so it might be a little confusing. I've tried searching around for an answer to this question and haven't found anything, so if this question has been answered before and someone could point me in the right direction it would be greatly appreciated. I'm trying to make a macro that will roll Xd8, and I want to add the previously defined X multiplied by some modifier to the roll. For example, if I were to want to roll 2d8, the macro would roll 2d8+(2*modifier). The only help I've seen relating to this topic has to do with Roll20 API stuff, and I don't have access to API work since I don't have Pro. Is there some other way of doing this in the macro without needing API support?
1606189477

Edited 1606189507
vÍnce
Pro
Sheet Author
[[ [[?{Number of dice|1}d8]] + [[?{Number of dice|1}]][mod] ]]
Will that use the same number automatically, or would I have to input both times? I've seen stuff like that but I don't really know how it works.
Sareth6425 said: Will that use the same number automatically, or would I have to input both times? I've seen stuff like that but I don't really know how it works. Macros that use repeated queries will always re-use the outputs from the first time the query is called, so you can actually simplify repeating macros a bit. (In this example you can remove two characters.) [[ [[?{Number of dice|1}d8]] + [[?{Number of dice}]][mod] ]] Here's a link to another post where I've illustrated an example:&nbsp; <a href="https://app.roll20.net/forum/post/9174202/fun-macros-for-non-api-users-such-as-myself/?pageforid=9186299#post-9186299" rel="nofollow">https://app.roll20.net/forum/post/9174202/fun-macros-for-non-api-users-such-as-myself/?pageforid=9186299#post-9186299</a> .&nbsp; You can see that the second time the macro is called it doesn't list out all the options, or in the final example I show how that you can use a false API call (by putting an ! before the first query) to separate out the query from the macro itself.
I see, I wasn't aware queries worked that way. Thanks, now I can finally finish this thing!