Character Vault
Any Concept / Any System
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools


From Roll20 Wiki

Jump to: navigation, search

Main Page: Macro Guide

This is Tips and tricks on formatting how messages in the q Text Chat appear.



You can use common Markdown to format you text, and to even create hyperlinks in text shown in the chat.

If you hyperlink to to a i Compendium page, it will open up inside Roll20 when clicked.

Tips & Examples:


Markdown is available to let you bold, italic, bold-italic, create a hyperlinks, or include even an image in your macros and text as they appear in the q Text Chat. You can use basic Markdown syntax in your text chat messages. We don't support the entire breadth of everything Markdown can do (like headers), but rather just basic formatting. Here's a quick rundown:

Format Syntax
Italicize Text *text to italicize*
Bold Text **text to bold**
Bold & Italicize Text ***text to bold & italicize***
Code ```Code```
Link to URL [Google](, [Dodge](
Image [Roll20 Logo](

Alternative to adding the markdown into the macros, you can sometimes add the markdown to your Character Attributes, so you can have a universal macro, and make individual adjustment to to how you want each output to look like.


/em his **@{bob|height}** tall, and can be described as: @{bob|description}.

Note on Code: The extra backtick at the start of the code snippet is required due to the backtick character also being the character used to escape commands.

Note on Images: Including an image is just putting in a link to an image. If the link ends in .png, .jpg, .jpeg, or .gif, we will automatically insert an image tag in addition to linking to the source image.

You can use the Markdown formatting in general messages, whispers (/w), descriptions (/desc), and emotes (/em). You can also include Markdown formatting in the values you pass to Roll Templates and it should work fine. For example:
 {{attack= [[1d20]] vs **AC**}}

HTML replacement

Main Page: HTML Entities

When creating some complicated macros, usually involving nesting, you will need to use HTML entities in parts of the code to trick the Roll20 system to make it behave like you want, or some advanced tricks won't work.

Here are some HTML Entities that are commonly useful to escape when creating advanced Roll20 macros. See HTML Entities or special character for more:

Character Replacement
| (pipe) |
, ,
{ {, {
} }, }
& &, &
space  ,  
= =
_ _
( (
) )
[ [, [
] ], ]
< &lt;, &#60;
> &gt;, &#62;
`(backtick, grave accent) &#96;
*(asterisk) &#42;
"(doublequote) &#34;
! &#33;


Here is a macro that will not work, because the "Choose a Roll"-query thinks it stops at the first } it encounters, which is on the second row:

?{Choose a Roll|
  STR,/roll 1d20 + 3 + (?{Modifier})|
  DEX,/roll 1d20 + 2 + (?{Modifier})|
  CON,/roll 1d20 + 1 + (?{Modifier})}

Fixed version:

By using HTML entities to replace all } inside "Choose a Roll", it will now correctly process where the query ends.

?{Choose a Roll|
  STR,/roll 1d20 + 3 + (?{Modifier&#125;) |
  DEX,/roll 1d20 + 2 + (?{Modifier&#125;) |
  CON,/roll 1d20 + 1 + (?{Modifier&#125;) }

If you want to change the ?{Modifier}-query to have a default value like ?{Modifier|0}, you will need to replace the |, so the query won't mistakenly think it's the closing | for that option.

?{Choose a Roll|
  STR,/roll 1d20 + 3 + (?{Modifier&#124;0&#125;) |
  DEX,/roll 1d20 + 2 + (?{Modifier&#124;0&#125;) |
  CON,/roll 1d20 + 1 + (?{Modifier&#124;0&#125;) }

Advanced Nesting example:

Here you can make choices, where each choice might have suboptions to choose between, which in turn might have their own suboptions.

?{Name of Query|
   Option 1, ?{value1&#124;
      Option 1A&#44; ?{value1A&amp;#124;
         Option 1A1&amp;#44; value1A1 &amp;#124;
         Option 1A2&amp;#44; value1A2
      &amp;#125; &#124;
      Option 1B&#44; ?{value1B&amp;#124;
         Option 1B1&amp;#44; value1B1 &amp;#124;
         Option 1B2&amp;#44; value1B2 &amp;#124;
         Option 1B3&amp;#44; value1B3
   &#125; |
   Option 2, ?{value2&#124;value2&#125; 

The descision tree goes:


See Advanced Usage for Roll Queries for more examples.



Various ways to use or show images in macros or the chat.


You can have hyperlinks in chat messages, linking to character sheets, handouts, i Compendium, as well as pages outside

You can also create links to roll other macros, see Chat Menus for more examples




You can use Stylus to change how things look for you, without affecting others. Here are some of the tricks: