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

The default roll template

1536678201
Kraynic
Pro
Sheet Author
In case someone else like me was searching for this, there is a thread here that talks about it some, and gives some html for it.  No css was listed for it, so I did some digging. Html found in-game is slightly different than found in that thread.  I'm not sure if it makes much difference, but here is what I found in-game: <rolltemplate class="sheet-rolltemplate-TestAllProps"> <table> <caption>{{name}}</caption> {{#allprops() }} <tr><td>{{key}}</td><td>{{value}}</td> {{/allprops() }} </table> </rolltemplate> I searched around through the console and eventually found the css as well: .sheet-rolltemplate-default table { width:100%; background-color:white; border:1px solid rgba(112,32,130,1) } .sheet-rolltemplate-default caption { background-color:rgba(112,32,130,1); color:white; font-family:"Helvetica Neue",Helvetica,sans-serif; font-weight:300; font-size:1.1em; padding:5px } .sheet-rolltemplate-default td { padding:5px; line-height:1.4em; vertical-align:top } .sheet-rolltemplate-default td:first-child { font-weight:bold; text-align:right; min-width:50px; padding-right:10px } .sheet-rolltemplate-default tr:nth-child(even) { background-color:#eee } I'm mainly posting this so that anyone like me that is totally illiterate with html or css can find this info.  If you do nothing more than edit the RGBA color codes in the css and change the label from "default" to whatever name you want, you can have the basic template in various colors for use in your game by adding it onto the end of whatever character sheet you are using.  Last night (well after I should have been in bed) I created several copies of this for the sheet/game I am running and have different colors for attacks, parries, damage, skills, saves, and initiative. Hopefully someone will get some use out of this instead of just me.
1536678608
Kraynic
Pro
Sheet Author
I should probably also mention that this can be mixed with TheAaron's trick found in this post. Then you can do silly stuff like this:
1536680904
Andreas J.
Forum Champion
Sheet Author
Translator
Oooh damn this is good! This will help tremendously, now I might include some options for roll template to the sheets I work on. It would still be nice if Roll20 would make it possible to change the color of the default template, instead of us having to introduce these to the sheets. Something like  &{template:default- color } {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}}
1536699027
GiGs
Pro
Sheet Author
API Scripter
I think this is great too.  One thing I'm curious about with the default roll template is the weird spacing - the way the text is skewed to the right. Look at Initiative and Perception in the screenshots above, and how the left column is way wider than the right, but they aren't consistent. All the other entries, like attack, damage and parry, everything is way over to the right side of the display. It's really weird to me.
1536701164

Edited 1536701713
Kraynic
Pro
Sheet Author
It depends on if/where you put the "=" in your formula since that is (if I understand correctly) a column break in the table format. &{template:skills} {{name= **Testing Table Behavior**}} {{Test with much text=[[1d20]]}} {{[[1d20]]=Then putting the roll first}} I should have added what it looks like without the = in either line. If you put all your rolls before of after an = on each line in a macro, then all the rolls are lined up with text being filled in favoring the column divider.
1536704346
GiGs
Pro
Sheet Author
API Scripter
I understand the = is a column divider, i just find it weird how it decides the width of the columns, and how they always skew so far to the right.  The table is supposed to be 100% width, and there's no weird padding or margins i can see pushing things to the right. I know the left column is right-aligned, which is part of it, I'm not talking about that. I mean, just look at the Perception 4 line. That's two columns, but the width of the columns is set so weirdly so that the first column takes up something like 75% of the space, and there's no reason I can see that it should. Maybe this is just something inherent to tables autosizing the columns based on their contents, combined with the right aligning, I dont know. But I think if you're modifying the rolltemplate anyway, it would be a good idea to fix that.
1536704945
Kraynic
Pro
Sheet Author
G G said: Maybe this is just something inherent to tables autosizing the columns based on their contents, combined with the right aligning, I dont know. But I think if you're modifying the rolltemplate anyway, it would be a good idea to fix that. Yeah, I'm assuming it is balancing the columns based on the number of characters present in each.  As far as fixing it, it doesn't bother me.  If it did, I wouldn't know how to fix it anyway!  Eventually I may change my mind and decide to learn how, but for now I'm content with having the variety of colors and being able to put strange images in the headers.   After all, doing this kept me from having to learn to write one from scratch.
1536704984
vÍnce
Pro
Sheet Author
Thanks for pulling back the curtain a little on the default template.  Seems that sheet authors already create their own roll templates to match a sheet's style and function, so what would be the purpose of overriding the default template?  Or is this primarily for someone to change the look of a default template for themselves using stylus or similar extension?
1536705314
Kraynic
Pro
Sheet Author
If you know how to write these things, then I guess this isn't for you.  To quote from my original post: I'm mainly posting this so that anyone like me that is totally illiterate with html or css can find this info. I know nothing about writing either side of these things.  I know nothing about any of things and have been blundering around inside a character sheet editing it to do what I want.  The sheet I am using doesn't have a template, and while the default does all I need at this point, it is nice to be able to play with things and personalize them a little. I expect everyone with a "sheet author" tag probably has little need of this.  You are well beyond the crutch of needing existing work to edit that is simple enough to understand.
1536705335

Edited 1536705372
GiGs
Pro
Sheet Author
API Scripter
I guess its because a lot of people really dont know CSS very well, and this allows you to keep using a familiar roll template, and just tweak its colours for example. Despite my comments on the width issues, the default template works pretty decently and as the pictures above show, just changing the colour does make for quite an attractive output. You can use different colours for different things (like skills, spells, etc) and that's it - you dont have to worry about how to build a template's html and css from scratch.
1536705695
GiGs
Pro
Sheet Author
API Scripter
Andreas J. said: Oooh damn this is good! This will help tremendously, now I might include some options for roll template to the sheets I work on. It would still be nice if Roll20 would make it possible to change the color of the default template, instead of us having to introduce these to the sheets. Something like   &{template:default- color } {{name=Test Attack}} {{attack=[[1d20]]}} {{damage=[[2d6]]}} That would be a great feature, and such a simple syntax to implement it.
1536706822

Edited 1536706843
vÍnce
Pro
Sheet Author
Kraynic said: If you know how to write these things, then I guess this isn't for you.  To quote from my original post: I'm mainly posting this so that anyone like me that is totally illiterate with html or css can find this info.  Thanks Kraynic.  I totally missed that line.  I often override roll20's css using stylus, so I'm sure I'll be referring to this post to make further adjustments. 
1536728824
Jakob
Sheet Author
API Scripter
G G said: I understand the = is a column divider, i just find it weird how it decides the width of the columns, and how they always skew so far to the right.  The table is supposed to be 100% width, and there's no weird padding or margins i can see pushing things to the right. I know the left column is right-aligned, which is part of it, I'm not talking about that. I mean, just look at the Perception 4 line. That's two columns, but the width of the columns is set so weirdly so that the first column takes up something like 75% of the space, and there's no reason I can see that it should. Maybe this is just something inherent to tables autosizing the columns based on their contents, combined with the right aligning, I dont know. But I think if you're modifying the rolltemplate anyway, it would be a good idea to fix that. Tables are weird, and it's generally hard to predict how they will divide up columns,  and  they might divide things up differently depending on the browser you are using! I think the reason here is that "Perception" is a much longer string than "4", hence the first column gets the majority of space. I could share a version of this using different techniques with different rules for dividing up the columns (such as fixed-width or varying within certain bounds), plus a description field with no label in front, if anyone is interested.
1536729743
GiGs
Pro
Sheet Author
API Scripter
I'm definitely interested.
1536730705
Andreas J.
Forum Champion
Sheet Author
Translator
G G said: I'm definitely interested. Make it double!
1536735485
Jakob
Sheet Author
API Scripter
Okay, I'll post something later.
1536744498

Edited 1536751163
Andreas J.
Forum Champion
Sheet Author
Translator
I've now added a few basic colors(blue,red,green, black) variation of the default template for the sheet I maintain, html  &  css  for the interested or lazy.
1536754732

Edited 1536754905
Jakob
Sheet Author
API Scripter
Okay, I've done a thing on  Gist . This variant has the following advantages compared to the default roll template Support for title and subtitle (e.g. roll name and character name) Easy support for adding extra colors via {{color=foo}} (colors red and green included as a demonstration - colors need to be hardcoded into the CSS, it doesn't seem possible to color the title dynamically) Full-width description field at the bottom Customizable column widths There are 4 extra properties which will not be printed by allprops(): title, subtitle, color, and desc. The "customizable column widths" part probably needs more explanation. The column behavior is controlled by line 49. The current setting is grid-template-columns: auto auto; which lets the Browser figure out what width to assign to each column. But you can do other things grid-template-columns: 60% 40%; will fix the widths at the specified percentages. grid-template-columns: 120px 1fr; will fix the first column at 120px and give the rest to the second column. grid-template-columns: minmax(60px, auto) auto; will autosize the columns, but the first column will be at least 60px wide. ...and many more possibilities With regard to the rest of the code, I have added many comments to make it clear how to tweak certain aspects.
Thank you everyone for this.  Now I still dont actually understand any of it, but I do feel as it I am one step closer.
1536791454
GiGs
Pro
Sheet Author
API Scripter
This is a really great expansion of the default template, Jakob. Thanks. 
1536793545

Edited 1536814882
Kraynic
Pro
Sheet Author
Jakob said: Okay, I've done a thing on  Gist . This variant has the following advantages compared to the default roll template Neat!  I've gotten a copy of that to play with.  I had originally intended to edit an existing template.  I think the thread I linked in the OP mentioned the D&D 3.5 template in a positive light, so I grabbed it to look at.  With my current level of knowledge, I'm afraid my eyes glazed over fairly quickly looking at all the categories and options.  So I decided to track down the default to have something I was more capable of understanding.  Looks like I might be able to handle yours as well.  Thanks for putting that together! Edit:  Just thought I should add that I really like how that turned out, though my players may hate me for a while.  The template probably won't look the same 2 sessions in a row for a while.