Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

5e OGL Roll Templates

1471408573
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Is there a resource for details on the roll templates for the OGL sheet? From  this post , I know what the format is, but there are several oddities about the formats that Ed S. posted. He said that this: @{CHARACTERNAME|wtype}&{template:atk} {{mod=}} {{rname=)}} {{rnamec=CRIT}} {{r1=}} @{CHARACTERNAME|rtype}cs>20 + BONUSES]]]}} {{range=}} {{desc=}} is the atk template format.  What is pulled in by @{CHARACTERNAME|rtype} though? Scott
1471409046

Edited 1471409136
The OGL by Roll20 sheet's wiki page contains a lot of useful information on the sheet's Attributes. Unfortunately, at this time, there does not currently exist much in terms of specific documentation covering special properties used by the OGL by Roll20 Roll Templates. I've learned most of what I know about the Roll Templates used by this sheet by fiddling around with the outputs of the sheet's roll buttons alongside referencing the Roll Template source code within the sheet's HTML as well as the Roll Templates Wiki page . Scott C. said: What is pulled in by @{CHARACTERNAME|rtype} though? This Attribute is associated with the 'Roll Queries' dropdown ( General Options ). Check out line 234 if you're interested in the specifics.
1471450233
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks for the info Silvyre. Guess I'll be diving into the html code a little then. I know practically nothing about the 5e sheets, but I just got into a 5e game, so it's time to learn.
1471563034

Edited 1475091525
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
EDIT: added the set of NPC templates. These can be used by anyone, they just have slightly different formatting. Thanks to tox for pointing these out to me. EDIT2: The info contained in this post is now available on the wiki as well:&nbsp;<a href="https://wiki.roll20.net/5e_OGL_Roll_Templates" rel="nofollow">https://wiki.roll20.net/5e_OGL_Roll_Templates</a>. Since there doesn't seem to be much info around about the 5e OGL templates. Here's what I've figured out from logging the chat input via the API to see just what was being passed with a variety of options. First of all there are 5 templates; atkdmg, atk, dmg, simple, and spell. The details for each: atkdmg&nbsp; (I'll explain the parts of this one in the atk and dmg templates themselves): &{template:atkdmg} {{mod=+8}} {{rname=rname}} {{r1=r1}} {{always=1}} {{r2=r2}} {{attack=0}} {{range=range}} {{damage=1}} {{dmg1flag=1}} {{dmg1=dmg1}} {{dmg1type=dmg1type}} {{damage=1}} {{dmg2flag=1}} {{dmg2=dmg2}} {{dmg2type=dmg2type }} {{crit1=$[[6]]}} {{crit2=$[[7]]}} {{save=1}} {{saveattr=saveattr}} {{savedesc=savedesc}} {{savedc=savedc}} {{desc=desc}} ammo=Fists {{charname=charname}} simple (as with atkdmg, the parts will be explained below): &{template:simple} {{rname=rname}} {{mod=mod}} {{r1=r1}} {{always=1}} {{r2=r2}} {{charname=charname}} atk: &{template:atk} {{mod=mod}} {{rname=rname}} {{rnamec=rname}} {{r1=r1}} {{always=1}} {{r2=r2}} {{range=range}} {{desc=desc}} ammo=Fists {{charname=charname}} {{mod=}}: what goes in the mod field {{rname= }}: what goes in the name field on a standard roll. Apparently does not work in custom atk template macros. {{rnamec=}}: what goes in the name field on a critical roll. Apparently does not work in custom atk template macros. {{r1=inline roll}}: the first roll {{always/advantage/disadvantage/normal=1}}: formats for always rolling advantage/disadvantage, greying out the lower roll, greying out the higher roll, only rolling once respectively {{r2=inline roll}}: the second roll. Not displayed if normal is selected in the previous field. {{range=}}: attacks range {{desc=}}: attack description/text ammo=: not an actual roll template field, is used by the companion API for ammo tracking {{charname=}}: adds the character’s name to the roll dmg: &{template:dmg} {{rname=rname}} {{attack=0}} {{range=range}} {{damage=1}} {{dmg1flag=1}} {{dmg1=dmg1}} {{dmg1type=dmg1type }} {{damage=1}} {{dmg2flag=1}} {{dmg2=dmg2}} {{dmg2type=dmg2type }} {{save=1}} {{saveattr=saveattr}} {{savedesc=savedesc}} {{savedc=savedc}} {{desc=desc}} {{charname=charname}} {{rname= }}: what goes in the name field on a standard roll. Does not actually get displayed unless the attack toggle is off. {{attack=}}: toggles formatting for merging with an attack rolled without damage, has no effect in the atkdmg template {{range=}}: attack’s range {{damage=}}: no apparent effect {{dmg1flag/dmg2flag=}}: no apparent effect {{dmg1/dmg2=inline roll}}: damage roll {{dmg1type/dmg2type=}}: the type of the corresponding damage {{save=}}: Toggles the save DC area to be displayed/hidden. {{saveattr=}}: What save the target needs to attempt {{savedesc=}}: What happens on a save {{savedc=inline roll}}: the DC of the save {{desc=text}}: attack description/text {{charname=}}: adds the character’s name to the roll spell: &{template:spell} {{level=Level }} {{name=name}} {{castingtime=castingtime}} {{range=range}} {{target=target}}{{v=1}} {{s=1}} {{m=1}} {{material=material}} {{duration=duration}} {{description=description}} {{athigherlevels=athigherlevels}} 0 {{concentration=1}} {{charname=charname}} {{target=}}: populates the target field {{v/s/m=}}: toggles showing/hiding V, S, M(and the specific material component)&nbsp; {{concentration=}}: toggles show/hide of “concentration” in duration npcaction: &{template:npcaction} {{name=NAME}} {{rname=RNAME}} {{description=DESCRIPTION}} {{charname=CHARNAME}} npcatk: &{template:npcatk} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{name=NAME}} {{rname=RNAME}} {{rnamec=RNAMEC}} {{r1=R1 [[1d20]]}} {{always=1}} {{r2=R2 [[1d20]]}} {{description=DESCRIPTION}}&nbsp;{{charname=CHARNAME}} npcdmg: &{template:npcdmg} {{damage=1}} {{dmg1flag=1}} {{dmg1=DMG1 [[1D6]]}} {{dmg1type=DMG1TYPE}} {{dmg2flag=1}}&nbsp;{{dmg2=DMG2&nbsp;[[1D6]]}} {{dmg2type=DMG2TYPE}} desc: &{template:desc} {{desc=DESCRIPTION}} General notes: Anything that says it toggles something off/on means that if you put anything after the "=" that feature is turned on, if there is nothing after the "=", then it is off. The atk and npcatk template formats ability command buttons in all of their fields&nbsp;so that they look more like regular text rather than the default large pink buttons. I haven't used the associated script, so some of the non-reactive fields may require that in order to have an effect. The atk and atkdmg macros generated by the sheet utilize @{rtype} in place of {{always/normal/advantage/disadvantage=1}} {{r2=[[1d20 as seen in my OP. This attribute would allow you to link whether a second d20 is rolled or not to what the settings of your sheet are. Post up any edits, errors you notice. Hopefully this helps some people out.
1471754920

Edited 1471754945
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I have also made a simple chat menu to easily access saving throws, ability checks, skills, and tool proficiency for those times when you just don't want to have your character sheet open. /w charName &{template:atk} {{desc=**Saving Throws** [Strength](~charName|strength_save) **|** [Dexterity](~charName|dexterity_save) **|** [Constitution](~charName|constitution_save) [Intelligence](~charName|intelligence_save) **|** [Wisdom](~charName|wisdom_save) **|** [Charisma](~charName|charisma_save) **-----------------------------------------------** **Ability Checks** [Strength](~charName|strength) **|** [Dexterity](~charName|dexterity) **|** [Constitution](~charName|constitution) [Intelligence](~charName|intelligence) **|** [Wisdom](~charName|wisdom) **|** [Charisma](~charName|charisma) **-----------------------------------------------** **Physical Skills** [Acrobatics](~charName|acrobatics) **|** [Athletics](~charName|athletics) **|** [Steath](~charName|stealth) **Social Skills** [Persuasion](~charName|persuasion) **|** [Deception](~charName|deception) **|** [Insight](~charName|insight) [Intimidation](~charName|intimidation) **Senses** [Investigation](~charName|investigation) **|** [Perception](~charName|perception) **Knowledge** [Arcana](~charName|arcana) **|** [History](~charName|history) **|** [Medicine](~charName|medicine) [Nature](~charName|nature) **|** [Religion](~charName|religion) **Miscellaneous** [Survival](~charName|survival) **|** [Animal Handling](~charName|animal_handling) [Performance](~charName|performance) **|** [Sleight of Hand](~charName|sleight_of_hand) **-----------------------------------------------** **Tools** [Tinker's Tools](~charName|repeating_tool_$0_tool) }}
Thank you for delving into this. I only quickly glanced at it back then. I don't use this sheet in my regular game so I didn't get too deep. I plan on using the OGL sheet in the future though so I will save this post for reference. &nbsp;Thanks again.
Scott C. Thank you for the macro, I've made a few slight tweeks to your code here: replaced "charName" with "selected"; only first line whisper needs to be changed Updated the Tool Name with dynamic value /w MaverickOrig &{template:atk} {{desc=**Saving Throws** [Strength](~Selected|strength_save) **|** [Dexterity](~Selected|dexterity_save) **|** [Constitution](~Selected|constitution_save) [Intelligence](~Selected|intelligence_save) **|** [Wisdom](~Selected|wisdom_save) **|** [Charisma](~Selected|charisma_save) **-----------------------------------------------** **Ability Checks** [Strength](~Selected|strength) **|** [Dexterity](~Selected|dexterity) **|** [Constitution](~Selected|constitution) [Intelligence](~Selected|intelligence) **|** [Wisdom](~Selected|wisdom) **|** [Charisma](~Selected|charisma) **-----------------------------------------------** **Physical Skills** [Acrobatics](~Selected|acrobatics) **|** [Athletics](~Selected|athletics) **|** [Steath](~Selected|stealth) **Social Skills** [Persuasion](~Selected|persuasion) **|** [Deception](~Selected|deception) **|** [Insight](~Selected|insight) [Intimidation](~Selected|intimidation) **Senses** [Investigation](~Selected|investigation) **|** [Perception](~Selected|perception) **Knowledge** [Arcana](~Selected|arcana) **|** [History](~Selected|history) **|** [Medicine](~Selected|medicine) [Nature](~Selected|nature) **|** [Religion](~Selected|religion) **Miscellaneous** [Survival](~Selected|survival) **|** [Animal Handling](~Selected|animal_handling) [Performance](~Selected|performance) **|** [Sleight of Hand](~Selected|sleight_of_hand) **-----------------------------------------------** **Tools** [@{Selected|repeating_tool_$0_toolname}](~Selected|repeating_tool_$0_tool) }}
1473027144

Edited 1473886134
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nice Maverick
1473462888
Cosmic
Sheet Author
Thumbs up, that's a pretty cool script for the SRD5 Sheet !
1473463809
Cosmic
Sheet Author
...and technically you could add other items, such as background, eye colour, hair colour, experience, inspiration, level ??
Alexander said: ...and technically you could add other items, such as background, eye colour, hair colour, experience, inspiration, level ?? Sure; check out: Directly Referencing Attributes
1473464453
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Well, that's kinda not the point of the menu, but you could certainly make an informative macro using the info I've dug up in the posts above to format it using the ogl roll templates.
1473465217
Cosmic
Sheet Author
Okay I hate to take this away from the OP. I managed to configure the Macro, and here is the output and my input. So for example; I just chose speed Thanks guys for the help, its getting quite late here in the UK and I've spent an hour longer on this than I should have tonight. Cheers for the help Scott.
1473468612
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heh, np. Not really taking away from the OP. The whole point of the thread is to figure out cool ways to do things using the resources of the sheet. It looks like you're trying to do an ability command button for an attribute. The ability command button looks for an ability (something you'd call with %{...}). The macro I posted above and that Maverick showed using the selected keyword is for making a simple clickable menu to easily roll your ability checks, saving throws, skills, and tools. If you just want to have the character's speed displayed, just put @{selected|speed} wherever you want it to appear.
1473506764

Edited 1473506825
Cosmic
Sheet Author
Is there a way to show other values: Name Current XP Level Inspiration (They don't seem to be abilities just text input as in an HTML form) So far I have &{template:npcaction} {{rname=NAME}} {{name=DESCRIPTION}} {{description= **Name:**&nbsp; **Passive Perception: **&nbsp; **GP:** @{selected|gp}&nbsp; **Speed:** @{selected|speed}&nbsp; **AC:** @{selected|ac}
1473510049

Edited 1473510152
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, everything is an attribute. Other than character name (which is always the same, regardless of sheet) and repeating field attributes, you can find all of the attributes on your attributes and abilities tab of the roll20 character sheet. &{template:npcaction} {{rname=NAME}} {{name=DESCRIPTION}} {{description= **Name:**&nbsp;@{selected|character_name} **Passive Perception: @{selected|passive_wisdom}**&nbsp; **GP:** @{selected|gp}&nbsp; **Speed:** @{selected|speed}&nbsp; **AC:** @{selected|ac} **Current XP:** @{selected|experience} **Level:** @{selected|level} **Inspiration:** @{selected|inspiration} //This one will display "on" or "off" only. Also this appears to be another hidden attribute }}
This control panel is pretty cool! &nbsp;Thanks. &nbsp; Is there an alias for the whisper by chance to automatically whisper to the player who is invoking it? &nbsp;Would save having to have a macro for each player. &nbsp;Something like /w me.
Michael M. said: Is there an alias for the whisper by chance to automatically whisper to the player who is invoking it? &nbsp;Would save having to have a macro for each player. &nbsp;Something like /w me. You could use /w "@{character_name}"
1473885932

Edited 1473886049
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Could add the selected keyword on to what Silvyre put up. That would be /w "@{selected|character_name}". You could also replace the selected with target so that it would ask for a target every time. Although, you may want to have a separate one for each player (e.g. put it in the abilities tab of each player's character(s))if your players use lots of tools, since the buttons don't play well with repeating sections that are absent.
Hi Silvyre, Scott, both of those work fine for me. &nbsp;Will test them out. &nbsp;Thank you.
I used this in a game on the weekend and it was a hit. &nbsp;Players liked the fact they didn't have to switch tabs to access their character to roll. &nbsp; One request was to add the characters spells to the control panel print out. &nbsp;I had a look at the character sheet but I couldn't figure out how to do this and not sure where to start to add the selected characters spells to the output. &nbsp;Any pointers from the PROs here? &nbsp;Thanks.
1474891562

Edited 1474895759
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Glad it worked so well michael. I'd make a separate "spellbook" macro. This will definitely need to be custom for each player. You'll use the same ability command button syntax to reference the spells. It does get a little tricky as all spells are repeating sections, but take a look at the sheets wiki entry on&nbsp; dynamically referencing repeating sections for the naming conventions. EDIT: Now that I'm on my computer, something like this: &{template:atk} {{desc=**Cantrips** [@{repeating_spell-cantrip_$0_spellname}](~Charname|repeating_spell-cantrip_$0_spell) | [@{repeating_spell-cantrip_$1_spellname}](~Charname|repeating_spell-cantrip_$1_spell)}} Adding on extra levels as spellcasters level up. If you can figure out the naming convention for things like the prepared checkbox or the casting time field, you could add that info into the button output so that it would be outputted right to the template whether it is prepared or not. Charname could also be replaced with selected/target of course. And if you do decide for some reason not to make these be character abilities, but global macros instead, you'd need to add selected/target/specific charname onto all the repeating section calls as well.
1474960900

Edited 1474961247
Thanks, Scott. &nbsp;Got it working. &nbsp;One question, do I need to list variables individually or is there a way to recursively&nbsp;check for the spells? &nbsp;For example instead of having one entry $0 per spell something that says "keep printing until spell list ends" (while type statement)? /w "@{selected|character_name}" &{template:atk} {{desc=**Cantrips** [@{Selected|repeating_spell-cantrip_$0_spellname}](~Selected|repeating_spell-cantrip_$0_spell) | [@{Selected|repeating_spell-cantrip_$1_spellname}](~Selected|repeating_spell-cantrip_$1_spell) | [@{Selected|repeating_spell-cantrip_$2_spellname}](~Selected|repeating_spell-cantrip_$2_spell) ** 1st Level ** [@{Selected|repeating_spell-1_$0_spellname}](~Selected|repeating_spell-1_$0_spell) | [@{Selected|repeating_spell-1_$1_spellname}](~Selected|repeating_spell-cantrip_$1_spell) | [@{Selected|repeating_spell-1_$2_spellname}](~Selected|repeating_spell-1_$2_spell) }} Also is it possible to put error checking of some type in? &nbsp;For example, this character has no third level spells so is it possible to print nothing?
Michael M. said: is there a way to recursively&nbsp;check for the spells? &nbsp;For example instead of having one entry $0 per spell something that says "keep printing until spell list ends" (while type statement)? An API script could [re]construct this macro in such a manner (e.g. when prompted by a chat command). Michael M. said: this character has no third level spells so is it possible to print nothing? Unfortunately, no. Here's a related Suggestion to introduce such behaviour: Macro-friendly parsing of unfound Attributes and Abilities
Thanks Silvyre.
1475091833

Edited 1475091862
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Michael M. said: Thanks, Scott. &nbsp;Got it working. &nbsp;One question, do I need to list variables individually or is there a way to recursively&nbsp;check for the spells? &nbsp;For example instead of having one entry $0 per spell something that says "keep printing until spell list ends" (while type statement)? /w "@{selected|character_name}" &{template:atk} {{desc=**Cantrips** [@{Selected|repeating_spell-cantrip_$0_spellname}](~Selected|repeating_spell-cantrip_$0_spell) | [@{Selected|repeating_spell-cantrip_$1_spellname}](~Selected|repeating_spell-cantrip_$1_spell) | [@{Selected|repeating_spell-cantrip_$2_spellname}](~Selected|repeating_spell-cantrip_$2_spell) ** 1st Level ** [@{Selected|repeating_spell-1_$0_spellname}](~Selected|repeating_spell-1_$0_spell) | [@{Selected|repeating_spell-1_$1_spellname}](~Selected|repeating_spell-cantrip_$1_spell) | [@{Selected|repeating_spell-1_$2_spellname}](~Selected|repeating_spell-1_$2_spell) }} Also is it possible to put error checking of some type in? &nbsp;For example, this character has no third level spells so is it possible to print nothing? As Silvyre said, not possible short of the API at the moment. This is why I said you'd want this as an ability in a character sheet rather than a global macro so that only the spells that that character has would be entered into the macro. And unrelated, but the info about the roll templates is now available in the wiki:&nbsp;<a href="https://wiki.roll20.net/5e_OGL_Roll_Templates" rel="nofollow">https://wiki.roll20.net/5e_OGL_Roll_Templates</a>
I basically explaiend how it works to each character and told them that if they wanted it feel free to maintain an individual macro as you suggested. &nbsp;Dont want as part of the original "Character Control Panel".