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

Personal tools

Difference between revisions of "HTML Entities"

From Roll20 Wiki

Jump to: navigation, search
(Coming Update: Nested Query Improvement)
m
Line 46: Line 46:
  
 
==Examples==
 
==Examples==
* [[Macro_Guide#Nesting]]
+
{{main|Roll Queries & Nesting}}
 
+
  
 
By using HTML entities to replace all <code>}</code> inside "Choose a Roll", it will now correctly process where the query ends.  
 
By using HTML entities to replace all <code>}</code> inside "Choose a Roll", it will now correctly process where the query ends.  

Revision as of 16:13, 30 November 2021

Main Page: Macro Guide

HTML Entities can be useful in creating macros, Building Character Sheets, and wiki editing.


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 for full list:

Character Replacement
| (pipe) &#124;
, &#44;
{ &lbrace;, &#123;
} &rbrace;, &#125;
& &amp;, &#38;
space &nbsp;, &#160;
= &#61;
_ &#95;
( &#40;
) &#41;
[ &lbrack;, &#91;
] &rbrack;, &#93;
< &lt;, &#60;
> &gt;, &#62;
`(backtick, grave accent) &#96;


Examples

Main Page: Roll Queries & Nesting

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;) }


Coming Update: Nested Query Improvement

Now on Dev Server: Roll Query Improvements! July 20th, 2021

In the near future, some, if not all, character substitutions might become redundant, when roll20 improves nested Roll Query handling in macros.

Now on the Dev Server(
Pro
info-users) for testing, improved roll query parsing!
Recently, an update to our character sheet code broke a workaround that some sheets were using to implement nested roll queries. Rather than fixing this workaround, we did a little extra work to properly support nested queries. Now, you should be able to nest roll queries inside of each other without needing to use any character codes.