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

Roll Template Help

My rolltemplate isn't working. This is my html for the button &lt;th&gt;&lt;button type='roll' style="width:100px;" value='&{template:initiative} {{name= @{character_name} }} {{init= [[ {(@{Initiative-attribute} + @{Initiative-skill} + @{Initiative-mod})d10!sd}&gt;@{Initiative-diff} ]] }}'&gt;Template&lt;/button&gt;&lt;/th&gt; Here is my html for the template: &lt;rolltemplate &gt; &lt;br&gt; &lt;table&gt; &lt;tr&gt; &lt;th&gt;&lt;span&gt;{{name}}&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;&lt;span&gt;{{init}}&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/rolltemplate&gt; And here is my css: .sheet-rolltemplate-dicepool { background: url('<a href="http://mrgone.rocksolidshells.com/pdf/Borders/ChangelingBorder_NoLogo.jpg" rel="nofollow">http://mrgone.rocksolidshells.com/pdf/Borders/ChangelingBorder_NoLogo.jpg</a>') no-repeat; background-size: 179px; padding:10px; } table.sheet-rolltemp_initiative, .sheet-rolltemplate-initiative { background:white; background-size: 179px; height:230px; width:179px; } .sheet-rolltemplate-initiative th { color:black; } .sheet-rolltemplate-initiative .sheet-tcat { font-style: italic; } .sheet-rolltemplate-initiative .inlinerollresult { background-color: #ffffff; border: none; } And here is what I get: What did I do wrong?
1432264652

Edited 1432264677
Diana P
Pro
Sheet Author
Basically, you didn't give the roll template a name so it doesn't know to use it. try: &lt;rolltemplate class="sheet-rolltemplate-initiative"&gt; &lt;br&gt; &lt;table&gt; &lt;tr&gt; &lt;th&gt;&lt;span&gt;{{name}}&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;&lt;span&gt;{{init}}&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/rolltemplate&gt; I just added: class="sheet-rolltemplate-initiative" to tell it that that thing is a roll template class and its name is initiative.
1432265070

Edited 1432265147
Did a 'class="sheet-rolltemplate-initiative"' get stripped out of your rolltemplate tag by the forums? If not, and it isn't there in your HTML, you'll need to add it in order for the system to recognize the template. If that isn't the problem, I'd suggest minimizing points of failure and building from there: start with manually entering a static call to the table (e.g. "&{template:initiative} {{name=foo}} {{init=42}}"), then start building up the formula until it stops working. If you make it all the way up, try simplifying the formula in the charsheet and building up there until it stops working. Edit: D'oh; sniped.
manveti said: Did a 'class="sheet-rolltemplate-initiative"' get stripped out of your rolltemplate tag by the forums? If not, and it isn't there in your HTML, you'll need to add it in order for the system to recognize the template. Yes. Yes it did. It's still there in the sheet. I felt un-pleased with myself when Diana P. mention I was missing the class, as that seemed like a really simple mistake on my part. Then I saw that I hadn't left it out, and feel somewhat less un-pleased. I appreciate the input, however, Problem still unresolved.
1432296878
Finderski
Pro
Sheet Author
Compendium Curator
When I've run into this problem it has usually been because of something "wrong" in the HTML and/or the CSS. I use "wrong" because in the normal character sheet things seem to be a bit more lenient. It has been a while since I've run into this same problem and so can't recall specifically what I had been doing wrong. Sorry. In looking at your code, the only thing I could recommend would be to change the lines: .sheet-rolltemplate-initiative .sheet-tcat { .sheet-rolltemplate-initiative .inlinerollresult { to: .sheet-rolltemplate-initiative *.sheet-tcat { .sheet-rolltemplate-initiative *.inlinerollresult { I don't know why that should make a difference, but...that's the only thing I could think that might work.
1432307250
Diana P
Pro
Sheet Author
I have no idea either; when I cut and paste your code (with the template name) into a blank test campaign (and fill out some dummy values for the roll), it appears to work. I got: Nik Oxist <span title=" Rolling {(1 + 5 + 1)d10!sd}>1 = {(10 + 10+8+7+7+6+5+3+3)}" style="border: 2px solid rgb( 63 , 179 , 21 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em ; background-color: rgb( 255 , 255 , 255 )">9 in a white box as a result (I'm sure the number is wonky since I just gave it some random numbers for testing). I guess I would double check the rest of the html and make sure that there's no missing closing brackets or tags or anything; I've had them give weird errors before even though the sheet worked fine in other respects.
Okay, I got it to work. I'm not how, but I did. I used this html: &lt;rolltemplate class="sheet-rolltemplate-initiative"&gt; &lt;table class="sheet-initiative"&gt; &lt;tr&gt; &lt;th&gt;{{name}}&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;{{init}}&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;success(es) for initiative&lt;/th&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/rolltemplate&gt; ...and this css: .sheet-rolltemplate-initiative table { background: url('<a href="http://mrgone.rocksolidshells.com/pdf/Borders/ChangelingBorder_NoLogo.jpg" rel="nofollow">http://mrgone.rocksolidshells.com/pdf/Borders/ChangelingBorder_NoLogo.jpg</a>') no-repeat; background-size: 180px; width: 180px; height: 240px; } .sheet-rolltemplate-initiative th { font-family: 'BoydUncial'; color: #BD1606; padding: 2px; padding-left:20px; padding-right:20px; line-height: 1.4em; font-size: 1.3em; width: 100%; border-spacing: 0; text-shadow: 0px 0px 5px #E1B04A, 0px 0px 5px #E1B04A, 0px 0px 5px #E1B04A; } .sheet-rolltemplate-initiative .sheet-tcat { font-weight: bold; } .sheet-rolltemplate-initiative .inlinerollresult { display: inline-block; min-width: 1.5em; text-align: center; border: 2px solid transparent; background:transparent; } .sheet-rolltemplate-initiative .inlinerollresult.fullfail { border: 2px solid #B31515; } .sheet-rolltemplate-initiative .inlinerollresult.importantroll { border: 2px solid #4A57ED; } to get this: Which makes me happy. Thank you, everyone.
1432334835
Diana P
Pro
Sheet Author
:) I'm glad you got it to work.
1435360340

Edited 1435360361
Coal Powered Puppet
Pro
Sheet Author
...and now my font disappeared. FOr the whole sheet. I was using fontsaddict.com because it had the css coding and this above said code: But now it is being unhappy. And a big stupid head.
1435398323
Finderski
Pro
Sheet Author
Compendium Curator
When my fonts disappear, it's because the site hosting the font is unsecured while roll20 is being all secure and stuff... In Chrome, in the URL bar there may be a shield; click that and you should get a little pop-up with a button that says "Load unsafe scripts"—click that always solves my font problem.
That's what I did to get the fonts to show up in the first place (I found your thread on the matter and that's what got me using fonts). The annoying thing is that the shield still appears, but after loading 'unsafe scripts' the fonts still refuse to make an appearance. And because other fonts are not being so blocked (like the cyberpunk sheet) I am guessing it has to do with the site I am getting the font from. But thanks for input. Its nice to know the heavy hitters here are keeping an eye out.