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

Macro buttons not working? Please help

August 31 (4 years ago)

Edited August 31 (4 years ago)

One of my Savage Worlds macros only works when pressing the red circled button in the character sheet.

It should be outputting something like this. The full rolls and then how many success there were 

But from the Macro Bar or the Roll Button in the character sheet it only outputs text like this: /roll floor({1d4!!+1d4!!+ 0 + 0-2}/4)  Which doesn't roll the compounding exploding dice or give me the final result.


I don't know enough about Macros or how Roll20 works to understand why this error keeps happening. All my other Macros appear to be functioning just fine.

August 31 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

Maybe it works if you remove the [[ ]] surrounding the 0 and 1d6 you have.

It kinda seems like by having those extra brackets there, you force the roll to become an inline roll and it only processes what's inside the [[ ]] and pretends the rest is text.

August 31 (4 years ago)

Edited August 31 (4 years ago)

I tried removing those brackets, no noticeable change. Still the same outputs for Character Sheet Button and Macro Bar e.g. /roll floor({1d4!!+1d4!!+ 0 + 0-0}/4)
Its not rolling the Strength and Weapon dice

August 31 (4 years ago)
Kraynic
Pro
Sheet Author

To make things easier for people to test, post the actual text of your macro code rather than a screenshot.  I don't really want to type that out.  You can select code from the little style wand in the upper left corner of the post editor.

One thing that looks off to me is the starting curly bracket in floor({ and the closing curly bracket at Toughness}}.  If I am tracking the pairs right, the second curly bracket after Toughness is what closes that starting one by floor.  I'm not seeing what purpose they serve, so it might be good to remove that pair to see if that makes a difference.

August 31 (4 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Could you post the text please? I'd be happy to look at this, but don't want to have to squint and type from scratch. ;)

August 31 (4 years ago)
Oosh
Sheet Author
API Scripter

Try removing the whole " /roll" bit and typing it in again as /r, making sure there's nothing before the /

A leading space shouldn't break the roll command, unless you're calling the macro from somewhere else or it's not actually a blank space. Either way, it doesn't look like the /roll is being parsed at all, if you have a problem with braces you should be getting a math error rather than a string.


As Kraynic said, actual code is always helpful.

September 01 (4 years ago)

Full text of the Macro

 /roll floor({ 1d?{Strength die type |4}!!+1d?{Weapon die type |4}!!+ ?{Critical?| No, [[0]] |Yes,[[1d6!!]] } + ?{Damage Modifier |0}-?{Toughness}}/4)

tried like Oosh suggested, replacing /roll with /r, it appears to have worked? I still don't know what caused this though?

September 01 (4 years ago)
Oosh
Sheet Author
API Scripter

It looked like you had a blank space before the / in that screenshot. This will break / commands when run from macro buttons. I'm not sure why they still work from the "test" button - there's a few oddities with macros giving different results between the "test" button and called from chat or the macro bar.

There's no difference between /roll and /r, I was just saving your keyboard from a few unnecessary strikes :)


The leading space is still there in the code you pasted, by the way (I'm assuming that's the original)