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

Question about macros:

Hello everyone, I am sorry if this has been posted somewhere before, but I cannot find it anywhere. maybe it is something simple, maybe it is something impossible, but I still would like to ask.  I want to make a macro where I am dealing some damage 15d6, and I also add 4d6 sneak attack. The macro tells me both dmg instances separately, which is good because I want it that way, but is there a way to also display the sum of both rolls?  I want to use my macro always, and if I am able to sneak attack, then I just want to read the values on the same line.
1566555590
Ziechael
Forum Champion
Sheet Author
API Scripter
[[ [[15d6]][Base] + [[4d6]][Sneak] ]] will give you the overall damage output as a single value, hovering over the result will give you the two damage types as labeled but separate values. If you want to see individual dice you could drop the inline brackets around the actual rolls but the 'on hover' readout would be a bit more cluttered (but still labeled).
if you put your roll like this  /r 1d10[attack]+1d10[sneak] The output will look like this: rolling 1d10[attack]+1d10[sneak] ( 6 ) + ( 1 ) = 7
1566803879

Edited 1566804438
Thanks for the reply. But is there a way to put it in a macro such as this one:&nbsp; /me uses Eldritch blast for [[1d20+15]] and deals [[9d6]] damage, plus [[5d6]] sneak attack.? what I want to say is:&nbsp; uses Eldritch blast for [[1d20cs&gt;20+15]] and deals [[9d6]] damage, plus [[5d6]] sneak attack. (EB+SA dmg) Sometime ago, I made a macro for a barbarian with Power Attack. I made the macro so it asked me how much my PA was everytime, but I also made it so that it asked me once, and then it subtracted that value from the attack roll, and also multiplied it in the damage value. it also displayed how much PA I used like this:&nbsp; attacks for [[1d20cs&gt;18+10-?{modifier|0}]] with ?{modifier|0} power attack and deals [[2d4+7+?{modifier|0}*2]] damage,&nbsp; attacks for&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullcrit" title=" Rolling 1d20cs>18+10-5 = ( 19 )+10-5" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">24 &nbsp;with 5 power attack and deals&nbsp;<span class="inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 2d4+7+5*2 = ( 1 + 1 )+7+5*2" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(179, 21, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">19 &nbsp;damage,
Doctor Fishy said: Thanks for the reply. But is there a way to put it in a macro such as this one:&nbsp; /me uses Eldritch blast for [[1d20+15]] and deals [[9d6]] damage, plus [[5d6]] sneak attack.? what I want to say is:&nbsp; uses Eldritch blast for [[1d20cs&gt;20+15]] and deals [[9d6]] damage, plus [[5d6]] sneak attack. (EB+SA dmg) Sometime ago, I made a macro for a barbarian with Power Attack. I made the macro so it asked me how much my PA was everytime, but I also made it so that it asked me once, and then it subtracted that value from the attack roll, and also multiplied it in the damage value. it also displayed how much PA I used like this:&nbsp; attacks for [[1d20cs&gt;18+10-?{modifier|0}]] with ?{modifier|0} power attack and deals [[2d4+7+?{modifier|0}*2]] damage,&nbsp; attacks for&nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right fullcrit" title=" Rolling 1d20cs>18+10-5 = ( 19 )+10-5" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 63 , 179 , 21 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">24 &nbsp;with 5 power attack and deals&nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 2d4+7+5*2 = ( 1 + 1 )+7+5*2" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 179 , 21 , 21 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">19 &nbsp;damage, In the second instance you are using inputs. The software just fills in all of the inputs first, and once asked, fills in the same answer for repeated queries. Unfortunately, it does not do this with calculated values. You can do this using an API script, but not with the regular interface. This is not to say that one of the truly literate finnegellers out there have not found a way to twist space-time and do this. It is beyond mere mortals.
1567083993

Edited 1567084082
Then I hope some API wizards will come to my rescue. Or I would hope that a forum moderator would move my question to the API section so I don't flood the forum asking the same question in different 56 places.&nbsp;
1567088004
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Unless you are planning on upgrading to Pro, or are in a game created by a Pro user, an API solution would be of little value.
I am in a game made by someone with a pro account. But even if I upgrade my account to pro, I still don't know how to make it. How can I make the macro/script? Or is something that the web code does not allow yet? if so, I would appreciate its addition soon.&nbsp; I get that some people like doing math, but people make mistakes and I don't want to deal less damage because of bad math skills.&nbsp;
1567144784
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Making a script requires knowledge of javascript. I don't think what you are asking for is extremely difficult; it's just math and doesn't really even require interacting with the interface elements. You GM/creator of the game would need to be the one to install it though.