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

Attack macro without "Selected"?

Greetings, I've just started playing around with macros for my DND 5E OGL character. I can get templates and text to work but not referencing an ability modifier. If I put the "selected" part of the macro in it works, but I get an error because I haven't selected anything. Is there a way to just roll dice + ability modifier + whatever else I choose without needing to select a token first? What's weird is that my spell casting ability in the attributes sheet references @{charisma_mod} but that doesn't work in my macro. Pared down macro for your perusal, once I get the attribute reference working on one roll I'll add it in elsewhere: Attack: [[d20+@{strength_mod}]] | [[d20]] Damage: [[2d6ro<2+1d8]] | [[2d6ro<2 +2d8]] Error message: TypeError: Cannot read property 'substring' of undefined Also, does anyone know how to reference the proficiency mod? I can't see it in the list of attributes. Do I need to make it myself? Thanks in advance, -D-
If the macro is on the character sheet, it should work without selected. Otherwise you need to use @{character_name|strength_mod}
Ok, thanks for the help I did some fiddling and got it to work now :) The macro went from this: [[d20+@{strength_mod}]] To this: [[d20+[[@{Yuro|PB}]]+[[@{Yuro|strength_mod}]]]] This is all nice and neat now and the mouseover shows: d20 outcome + Proficiency Bonus + Str mod as 3 digits without any messy calculations. 
1487548237
Andrew C
Marketplace Creator
You can also label them so you know what you are looking at.  At the end of any {} or [[ ]] you can insert [Label] and it will appear in the mouse-over for the Inline Roll.