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

Default Template HTML code and CSS?

Hey guys I want to make my own Template but I like the Default template realy well, I just want to alter it and make it into my custom Template, can someone give me the Code so i can mess with it and crash my comp with the awesomness i will bring forth unto it?
I don't know about the default template, but all the others can be found at GitHub: <a href="https://github.com/Roll20/roll20-character-sheets" rel="nofollow">https://github.com/Roll20/roll20-character-sheets</a> Personally, I would recommend D&D 5e and D&D 3.5 as a good ones to emulate. The spacing and formatting is very nicely done.
yea i agree but the problem is I want the value=result on any of the lines.. basically if I want {{laughing=falls out of chair}} to be in the template I would have to have the default ... i am not sure what wording or code to put into the values so that I can put anything in the value=result ... dunno if I am explaining it right.. I am trying!
1433263820
Diana P
Pro
Sheet Author
The default template is essentially something like: &lt;rolltemplate class="sheet-rolltemplate-TestAllProps"&gt; &lt;table&gt; &lt;caption&gt;{{name}}&lt;/caption&gt; {{#allprops() attack}} &lt;tr&gt;&lt;td&gt;{{key}}&lt;/td&gt;&lt;td&gt;{{value}}&lt;/td&gt; {{/allprops() attack}} &lt;/table&gt; &lt;/rolltemplate&gt; it's the #allprops() helper that does the magic. You can combine it with other helpers as well if you want some stuff more structured: &lt;rolltemplate class="sheet-rolltemplate-TestCombinedRoll"&gt; &lt;table&gt; &lt;tr&gt;&lt;th colspan="2"&gt;{{name}}&lt;/th&gt;&lt;/tr&gt; &lt;!--header section--&gt; {{#subtags}}&lt;tr&gt;&lt;td class="subheader" colspan="2"&gt;{{subtags}}&lt;/td&gt;&lt;/tr&gt;{{/subtags}} {{#subtags2}}&lt;tr&gt;&lt;td class="subheader" colspan="2"&gt;{{subtags2}}&lt;/td&gt;&lt;/tr&gt;{{/subtags2}} &lt;tr class="arrow-container"&gt;&lt;td colspan="2"&gt;&lt;div class="arrow-right"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt; &lt;!--next is an allprops repeating section; everything following the () are the names of excluded keys--&gt; {{#allprops() notes subtags subtags2 compcheck failcheck succeedcheck check checkroll critroll fumbleroll name}} &lt;tr class="sheet-tr-repeating"&gt;&lt;td&gt;{{key}} &lt;/td&gt;&lt;td&gt;{{value}} &lt;/td&gt;&lt;/tr&gt; {{/allprops() notes subtags subtags2 compcheck failcheck succeedcheck check checkroll critroll fumbleroll name}} {{#compcheck}} &lt;!--comparison check to check for a roll-success (0 or 1)--&gt; &lt;tr class="sheet-tr-repeating"&gt;&lt;td colspan="2"&gt;{{compcheck}} {{#rollTotal() compcheck 1}} {{succeedcheck}} {{/rollTotal() compcheck 1}} {{#rollTotal() compcheck 0}} {{failcheck}} {{/rollTotal() compcheck 0}}&lt;/td&gt;&lt;/tr&gt; {{/compcheck}} {{#checkroll}} &lt;!--a roll which will flag crits and fumbles--&gt; &lt;tr class="sheet-tr-repeating"&gt;&lt;td colspan="2"&gt;{{check}} {{checkroll}} &lt;/td&gt;&lt;/tr&gt; &lt;tr class="sheet-tr-repeating"&gt;&lt;td colspan="2"&gt; {{#rollWasCrit() checkroll}} {{critroll}} {{/rollWasCrit() checkroll}} {{#rollWasFumble() checkroll}} {{fumbleroll}} {{/rollWasFumble() checkroll}} &lt;/td&gt;&lt;/tr&gt;{{/checkroll}} &lt;!--double wide notes section--&gt; {{#notes}}&lt;tr&gt;&lt;td colspan="2"&gt;&lt;span class="tcat"&gt;{{notes}}&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;{{/notes}} &lt;/table&gt; &lt;/rolltemplate&gt; But you need to call out what keys you want excluded or they will show up in both places. Mark, if you're referring to the 3.5 macros built into the 3.5 character sheet, then thank you for the compliment. :) I'm pretty happy with those.
Diana TY!! I am gonna try these.. do i need to make multiple lines? or just one and it will keep going untill I stop... like go=ther try=fail laugh=happy basically do i need to make multiple lines to account for multiple effects or just one will keep going till it finishes?... wait that is what the allprops is for right? still a nob at html.. now for the colors and form.... is there a CSS I can work with ? oh and BTW I love the Tab sheet you have and have altered it a bit.. you can come in and look at it anytime you want!
1433267589
Diana P
Pro
Sheet Author
The allprops() helper takes any pairs ({{foo = bar}} etc.) and lists them. Forever if you really want to keep typing that long.... :D As for the css... well, the TestCombinedRoll is a trimmed down version of my DnD35StdRoll; the CSS is basically identical but with the name changed and hm... you probably need to add a class="header" to the name row if you want it to be a solid color. So it should read: &lt;tr&gt;&lt;th class="header" colspan="2"&gt;{{name}}&lt;/th&gt;&lt;/tr&gt; &lt;!--header section--&gt; and if you don't like the arrow, remove the &lt;tr class="arrow-container"&gt;&lt;td colspan="2"&gt;&lt;div class="arrow-right"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt; line; that's what makes the arrow in the template. (the CSS below has a bunch of different arrows I use; all of the various ones that are in the different flags I use in the 3.5 templates.) My CSS is: (this one has the header color set to gray.) .sheet-rolltemplate-TestCombinedRoll table { width: 100%; padding: 2px; border: 1px solid; background-color: #ffffff; text-align: left; } .sheet-rolltemplate-TestCombinedRoll th { /*color: rgb(45, 126, 107);*/ padding-left: 5px; line-height: 1.6em; font-size: 1.2em; text-align: left; /*text-align: center;*/ } .sheet-rolltemplate-TestCombinedRoll .sheet-header{ background-color: gray; color: white; text-align: center; /*color: rgba(112,32,130,1);*/ } .sheet-rolltemplate-TestCombinedRoll .sheet-subheader { color: #000; font-size: 1em; font-style: italic; text-align: left; } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-right { border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 180px solid rgb(126, 45, 64); } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-left { border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-right: 180px solid rgb(126, 45, 64); } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-spell { border-top: 3px solid rgb(45, 64, 126); border-bottom: 3px solid rgb(45, 64, 126); border-left: 90px solid transparent; border-right: 90px solid transparent; } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-ability { border-top: 3px solid transparent; border-bottom: 3px solid rgb(204, 115, 51); border-left: 90px solid rgb(204, 115, 51); border-right: 90px solid rgb(204, 115, 51); } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-save { border-top: 3px solid rgb(153, 77, 153); border-bottom: 3px solid rgb(153, 77, 153); border-left: 90px solid rgb(153, 77, 153); border-right: 90px solid rgb(153, 77, 153); } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-skill { border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 90px solid rgb(64, 126, 45); border-right: 90px solid rgb(64, 126, 45); } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-skillcat { border-top: 3px solid transparent; border-bottom: 3px solid rgb(45, 126, 107); border-left: 90px solid transparent; border-right: 90px solid transparent; } .sheet-rolltemplate-TestCombinedRoll .sheet-arrow-initiative { border-top: 1px solid rgb(204, 153, 51); border-bottom: 1px solid rgb(204, 153, 51); border-left: 90px solid rgb(204, 153, 51); border-right: 90px solid rgb(204, 153, 51); } .sheet-rolltemplate-TestCombinedRoll .sheet-tcat { font-style: italic; } .sheet-rolltemplate-TestCombinedRoll td { padding-left: 5px; text-align: left; } .sheet-rolltemplate-TestCombinedRoll .sheet-tr-repeating:nth-child(even){ background-color:#eee; } .sheet-rolltemplate-TestCombinedRoll .inlinerollresult { background-color: transparent; border: none; } .sheet-rolltemplate-TestCombinedRoll .inlinerollresult.fullcrit { color: #3FB315; border: none; } .sheet-rolltemplate-TestCombinedRoll .inlinerollresult.fullfail { color: #B31515; border: none; } .sheet-rolltemplate-TestCombinedRoll .inlinerollresult.importantroll { color: #4A57ED; border: none; } The default template CSS.. hm. I think I found it once by poking though the page source code but I didn't save a copy of it anywhere; the part of it I used is in my CSS. (and I may hop in sometime later... I am still trying to get the tabbed sheet to where I want it before I replace the other one with it... maybe seeing another variant will help me figure out what I don't like about it... :D Thank you. Hope that helps.
ok another asking possability trying to get the Template to put it like this... Claw 17 CC 19 Damage 6 CD 20 Save DC 22 Fort
1433269193

Edited 1433269345
Diana P
Pro
Sheet Author
it's not centered 'cause no CSS but how about: &lt;rolltemplate class="sheet-rolltemplate-TestAllProps2"&gt; &lt;table&gt; &lt;h2&gt;{{name}}&lt;/h2&gt; {{#allprops()}} &lt;tr&gt;&lt;td&gt;{{key}}&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;{{value}}&lt;/td&gt;&lt;/tr&gt; {{/allprops()}} &lt;/table&gt; &lt;/rolltemplate&gt; Sample call: &{template:TestAllProps2} {{name=attack}} {{**Claw**=17 CC 19}} {{**Damage**=6 CD 20}} {{**Save DC**= 22 Fort}} Basically just but the key and value in the allprops() on separate lines. The ** in the macro is markup to bold the word(s) inbetween. Edit: or you could just call the original TestAllProps with: &{template:TestAllProps} {{name=attack}} {{**Claw**}}{{7 CC 19}} {{**Damage**}}{{6 CD 20}} {{**Save DC**}}{{ 22 Fort}} Just because you can put in a key and value doesn't mean you have to use *both*. :)
yea figgured out how to get them on the next line but not Centered, but a bit of play I can thanks guys for all yoru help