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 "Roll Templates"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "Roll Templates are a special facet of the Character Sheets system which provide additional layout and styling options for the dispay of roll results. ==Using Roll Templates==...")

Revision as of 05:21, 11 January 2015

Roll Templates are a special facet of the Character Sheets system which provide additional layout and styling options for the dispay of roll results.

Using Roll Templates

Using a roll template is very easy. Just include a special flag in your chat message which tells Roll20 that you want to use a Roll Template, and then provide all of the data that you want to include. Here's an example that uses the "default" template (which all games have access to, regardless of the game system or character sheet you are using):

&{template:default} Template:Rollname=Test Attack {{attack=1d20}} {{damage=2d6}}

The &{template:<template_name>} is the part that tells the system to use a Roll Template, and specifies the name of the template you want to use. Then you just provide all the data for the template in the format {{<propertyname>= <value>}}. The "propertyname" that you should use depends on the template -- the Character Sheet documentation should let you know what's available, and we've provided documentation on all of the built-in templates below. "Value" can be either text or an inline roll, including macros, abilities, etc. Note that if you use a macro or ability, it must be an inline roll, not a "/roll" command.

Here's an example that uses a "%{Character|attack}" ability:

&{template:default} Template:Rollname=Test With Ability {{attack= %{Character_Name|attack} }} Template:Damage=

Built-In Roll Templates

The following roll templates are built-in to Roll20 and can be used in any game.

Default

To use the default template, use "&{template:default}".

Property Expected Value
rollname The name of the roll, shown in the header of the roll listing
attack The attack roll
attackadvantage For systems that have advantage (such as 5E), the second attack roll. Will be shown next to the first attack roll.

Creating a Roll Template

If you are a Sheet Author, you can include as many roll templates as you want in your Character Sheet HTML and CSS. We'll let you know how below.

If you are a Mentor, you can create your own Roll Templates if you are using the "Custom" character sheet option with your game. Follow the instructions below.

Defining the Layout of the Roll Template

The first step in creating a Roll Template is defining the layout, including what properties you are going to make available to be filled in by player. Roll Templates are just HTML, and you have access to all the same HTML as any other part of a Character Sheet (including
and ). Here's an example of the layout of a Roll Table:
<table>
		<tr><th>{{rollname}}</th></tr>
		<tr><td><span class="tcat">Attack: </span>{{attack}} | {{attackadvantage}} vs AC</td></tr>
		{{#damage}}
			<tr>
				<td><span class="tcat">Damage: </span>{{damage}} <span class="tcat">Crit: </span>{{dmgcrit}}</td>
			</tr>
			<tr>
				<td><span class="tcat">Type: </span>{{dmgtype}}</td>
			</tr>
		{{/damage}}
		<tr>
			<td><span class="tcat">Effect: </span>{{atteffect}}</td>
		</tr>
	</table>