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

I'm Having Trouble Understanding Macros

I understand that if I put [[d20]] in the attributes tab that it rolls a d20, but I want to get deeper and understand the why. Why does it have be written they way it does, and what do those symbols mean? What computer langue is macro, so I can look it up and learn it on Youtube or Khan Academy hopefully.
1584996980
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The language is proprietary to Roll20. You won't find it anywhere else. There are some guides to it here and here , as well as some formatting that can be done with Roll Templates as defined by your character sheet of choice. (Don't bother reading the "Creating a Roll Template") section on that last link, unless you are planning on designing a character sheet.)
1584997293
GiGs
Pro
Sheet Author
API Scripter
Normally you can make rolls like this /roll 1d20 But sometimes you want to write something like Gandalf reaches into his hat and throws 1d6 fireworks and have that d6 be rolled. You cant use /roll syntax there, so the inline roll  syntax was introduced. If you put double square brackets around something, [[ ]], it will treat it as a roll and can be used inline  (i.e. on the middle of other text). So you can use Gandalf reaches into his hat and throws [[1d6]] fireworks and when that appears in chat, the roll will be made and it will be printed as Gandalf reaches into his hat and throws 3 fireworks (or whatever). Naturally there are other ways to use it, but that's why it was introduced.
Thank you.