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/Default"

From Roll20 Wiki

Jump to: navigation, search
(transclude page)
 
m
Line 69: Line 69:
 
** [[Building Character Sheets/Roll Templates|Creating Roll Templates]]
 
** [[Building Character Sheets/Roll Templates|Creating Roll Templates]]
  
[[Category:Macros]]</noinclude>
+
[[Category:Macros]]
 +
[[Category:Roll Templates]]</noinclude>

Revision as of 17:33, 7 December 2021

Main Page: Roll Templates

Default Roll Template

The Default Roll Template is available in all Roll20. You don't have to even have a character sheet template selected for your game to use it.

To use the default template, you first call &{template:default}, then (optionally) define what will be shown in the header in a {{name= }}-section, after which you can create any number of "rows" by creating more {{ }}-sections.

Contents


Property Expected Value
name The name of the roll, shown in the header of the roll listing. (If not used in a roll, the header will appear at the top of the roll template as a purple bar with no text.)
(anything) You can have any number of rows with any name you want, making the template somewhat flexible. The "property" name will be bold.

The default template is special, and will list out whatever argument you give it in a table. It will put in the middle of the purple header anything you define in the {{name= }} section, and then with every subsequent {{ }} segment, it will alternate with white & gray background.

If a = is used in the {{ }} rows, the roll template will align the = in the middle, and all rows will have the = in the same spot. If any row have lots of more text/content on either side of the =, it will be pressed to the side of the template for all rolls.


Example:

&{template:default} {{name=Test Attack}} {{attack=[[1d20+3]]}} {{note= This is some note content}} {{Saving Throw= vs Will}}

Roll template default example2.JPG

Notice that the content of the roll template is pressed to the left side, due the text segment on the Note-row. If that segment is removed, the content of the remaining rows will be closer to the center.

Here is a fairly close example of the default template's HTML& CSS with it's dependent CSS classes. If you intend to make your own roll template, or want to start from the default template, the best idea is to start with the code from Jakob's Better Default Template.

Examples

Some more examples using the default roll template. These should give more examples on how they can be used.


Roll template rolls that has inline labels, which will make it easier to look at the roll breakdown(when you hover your mouse over the result).

&{template:default} {{name=Mage Bolt}} {{attack=[[1d20+3[int]+2[proficiency] ]]}} {{Damage= [[3d6[base dmg]+3[int mod]+1d8[Elder Wand bonus] force dmg]]}} {{DC [[14]] Will Save= The enemy must make the save, or take an extra [[1d8]] fire dmg. }}

You can have rolls on both sides of the =

&{template:default} {{name=Greatsword of the Nomads}} {{attack= has advantage, pick higher result}} {{[[1d20+4]]=[[1d20+4]]}} {{Damage= [[2d6+2]]}} {{If critical= Apply only if attack is critical}} {{Crit damage= deals [[2d6]] more on crit}} {{Special Crit= The Greatsword of the Nomads deals on crit an extra [[1d8]] radiant damage, and the defender needs to make a DC [[14]] Con save or gain a level of exhaustion}}

Several attacks at a time

&{template:default} {{name=Fist of Fury}} {{Attack1= [[1d20+5]]}} {{Damage1= [[1d6+3]]}} {{Attack2= [[1d20+5]]}} {{Damage2= [[1d6+3]]}} {{Offhand= [[1d20+4]]}} {{Damage1= [[1d4+3]]}}

Short Rest Macro

It asks you how many to spend & what hit dice to use, and displays how much was recovered as well as how many where spent(using the Reusing Rolls-trick).

&{template:default} {{name=Short Rest}} {{Recover=  You heal [[ [[?{How many hit dice do you spend?|1}]]?{What's your Hit dice?|d4|d6|d8|d10|d12} ]] hit points, having spent $[[0]] of their hit dice.}}

Related Pages