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

How do I call the +ATK attribute without an inline roll (5e OGL)?

1530332458

Edited 1530334758
I want to make a macro that references the character's total attack bonus, but the only way I can figure out how to do it is by making an inline role in the form of [[@{strength_mod} + @{pb}]]. Unfortunately, this outputs the number in a large font with a yellow glow behind it when I post my macro. I don't want that. I just want to be able to add some numbers without having them be output as a die roll. Is that so hard? I've poured through the documentation and can't find any way to simply reference the total attack modifier: a value that is staring me straight in my face in every single basic weapon macro on the character sheet.  An example of what I am trying to do:   The default template for the 5e ogl sheet uses a little grey number indicating your attack bonus whenever you use an attack. I essentially want that. It's clearly possible to add two numbers and output a number that is not an inline roll, or to just call the attribute itself, but I have no idea how they did it. 
1530339083
The Aaron
Pro
API Scripter
They did it with a Roll Template on the character sheet using CSS. There isn’t a way that I know of to show the result of a roll as a raw number. Maybe someone else knows a trick for it?   I have a vague recollection that an unmatched [[ might show as just a number... [[ [[@{strength_mod} + @{pb}]] See if that works?
The Aaron said: They did it with a Roll Template on the character sheet using CSS. There isn’t a way that I know of to show the result of a roll as a raw number. Maybe someone else knows a trick for it?   I have a vague recollection that an unmatched [[ might show as just a number... [[ [[@{strength_mod} + @{pb}]] See if that works? Hmm, that is very interesting. That does output a single number, but of course, those braces are still visible. I did manage to work this one out though. The attribute to call is @{repeating_attack_$X_atkbonus} where X is the attack number (starting with 0) in the list of attacks you have in your Attacks & Spellcasting box. The level 1 Barb I am testing this on has a +6 to ATK and the output is "+6", no quotes. It's exactly what I was looking for.  The attributes associated with that attack box are all really weird and not really documented anywhere, so it's kind of guess-and-check. I was also able to find @{selected|repeating_attack_$X_dmgtype} which returns the damage type of whatever weapon/spell you are referencing. 
1530392047
The Aaron
Pro
API Scripter
Nice!