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 "Template:Code"

From Roll20 Wiki

Jump to: navigation, search
(change example)
(template fixed, more examples)
Line 3: Line 3:
 
''Ex.''
 
''Ex.''
  
{{code|/r 1d6+4}}, or words
+
any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}
  
<pre>{{code|r/ 1d6+4}}</pre>
+
<pre>any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}</pre>
  
 
''Ex2.''
 
''Ex2.''

Revision as of 20:20, 13 November 2020


Ex.

any words before /r 1d6+4, or words, /roll 1d6+4

any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}

Ex2.

{{roll=[[1d6+4]]}}

{{code|{{roll=[[1d6+4]]}}}}
[view] [edit] [history] [purge] Documentation icon Template documentation

Shorthand to more easily write code on the wiki. {{c}} is a shorter version.


Example 1.

any words before /r 1d6+4, or words, /roll 1d6+4

any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}

Example 2.

You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{title=@{character_name}}} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: Inline roll [[1d6+4]] would usually turn into a wiki link

You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{code|{{title=@{character_name}}}}} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: {{code|Inline roll [[1d6+4]] would usually turn into a wiki link }}


Example:

{{{1}}}