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

Help with a really basic 5e Attack role macro

Really simply, I'd like to make a macro that rolls 1d20+proficiency+dexmod I've done research and found the call @{pb} and @{dexterity_mod} but these don't work in a macro and always return. "TypeError: Cannot read property 'substring' of undefined" in the chat
I've also tried [[@{pb}]] in chat the same way you can do [[1d20]] in chat to execute the macro but that doesn't work either, what am I missing?
1586372633
GiGs
Pro
Sheet Author
API Scripter
The are two different methods of automating chat rolls: Macros, and Abilities. Abilities are on a character sheet, in the Attributes and Abilities tab. You should be able to make your macro work from there with /roll 1d20+@{pb}+@{dexterity_mod} Macros are different. They are in the right sidebar of roll20, and since they aren't connected to a character, you have to supply a character name for them to work. If your character is called Frodo, you would do this /roll 1d20+@{Frodo|pb}+@{Frodo|dexterity_mod} you can also use selected  in place of a character name, and then if you have a token selected it will use the character's stats linked to that token. /roll 1d20+@{selected|pb}+@{selected|dexterity_mod} Does this solve your problem or do you still need help? I think if these aren't working,  there's something wrong with your attributes. You need to check they contain numbers.
GiGs said: The are two different methods of automating chat rolls: Macros, and Abilities. Abilities are on a character sheet, in the Attributes and Abilities tab. You should be able to make your macro work from there with /roll 1d20+@{pb}+@{dexterity_mod} Macros are different. They are in the right sidebar of roll20, and since they aren't connected to a character, you have to supply a character name for them to work. If your character is called Frodo, you would do this /roll 1d20+@{Frodo|pb}+@{Frodo|dexterity_mod} you can also use selected  in place of a character name, and then if you have a token selected it will use the character's stats linked to that token. /roll 1d20+@{selected|pb}+@{selected|dexterity_mod} Does this solve your problem or do you still need help? I think if these aren't working,  there's something wrong with your attributes. You need to check they contain numbers. This works beautifully, I thought if i had a token selected and tried to call @{pb} it would work, but including the specific character in the macro makes so much more sense.Thank you so much!
1586373560
GiGs
Pro
Sheet Author
API Scripter
You're welcome :)
GiGs said: You're welcome :) For something like deflecting missles which is  1d10 + your Dexterity modifier + your monk level. is there a variable to call your characters level?
1586377114
GiGs
Pro
Sheet Author
API Scripter
I'm not familiar with the sheet you're using, but I'm sure there is an attribute that contains your level. It might just be @{level}.