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

[Help] Roll Templates Question for Character Sheets

1453975439
Finderski
Plus
Sheet Author
Compendium Curator
Is it possible to override the styling of &{template:default}? And let me clarify...I don't want to rely upon installing a plugin for the browser... I would like to use that template (for some of it's flexibility such as creating any number of options I want to display), but would like to modify the style to match my character sheet more closely. If that is not possible, is it possible to create a roll template with the same sort of flexibility of being able to create whatever row/roll labels I want?
1453977929
Gen Kitty
Forum Champion
Yes, you can create your own custom roll templates for use with your custom character sheet, read up on Roll Templates for more details.
1453985616
Finderski
Plus
Sheet Author
Compendium Curator
GenKitty said: Yes, you can create your own custom roll templates for use with your custom character sheet, read up on Roll Templates for more details. Yep, I'm already aware of that and have created roll templates for the Savage Worlds (Tabbed) character sheet.  The functionality I like about the default template is the ability to create things on the fly, like {{Mook 1 Attack = 1d6!}}.  With the roll template page above, it appears I have to define every single "field" before hand, thus losing the flexibility of the default template.  So, that's why I was wondering if there is a way to modify the styling of the default template.   Or is there a way to create a roll template that would allow me to create new fields like {{Jayce's Mace Attack=1d10!}} without having to code something called Jayce's Mace Attack in the roll template before hand?
1453989119
Wes
Pro
Sheet Author
GV. I think what you are looking for in a template is the {allprops}. I can't remember the syntax properly off the top of my head, I believe it is documented in the wiki.
Or just embed powercards into the character sheet. :)
1453997198

Edited 1453997431
Diana P
Pro
Sheet Author
You definitely want the {allprops}.&nbsp; The most basic form would be: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {{#allprops() name}} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td&gt;{{key}} &lt;/td&gt;&lt;td&gt;{{value}} &lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{/allprops() name}} edit: I think the keyword name is naturally excluded, but I just explicitly exclude it so I know I have it covered. In the 3.5 sheet my code for the template which uses it has: &lt;!--beginning parts of roll template here--&gt; {{#allprops() notes subtags subtags2 compcheck failcheck succeedcheck check checkroll critroll fumbleroll initflag skillcatflag skillflag saveflag abilityflag spellflag pcflag npcflag basicflag 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 initflag skillcatflag skillflag saveflag abilityflag spellflag pcflag npcflag basicflag name}} &lt;!--more parts of the roll template down here--&gt; since you need to tell it to exclude any keywords which are used as keys for other parts of the template. It's on the wiki here: <a href="https://wiki.roll20.net/Roll_Templates#Special_Hel" rel="nofollow">https://wiki.roll20.net/Roll_Templates#Special_Hel</a>... Hope that helps.
1453998122
Finderski
Plus
Sheet Author
Compendium Curator
Diana P said: You definitely want the {allprops}.&nbsp; The most basic form would be: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {{#allprops() name}} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td&gt;{{key}} &lt;/td&gt;&lt;td&gt;{{value}} &lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{/allprops() name}} edit: I think the keyword name is naturally excluded, but I just explicitly exclude it so I know I have it covered. In the 3.5 sheet my code for the template which uses it has: &lt;!--beginning parts of roll template here--&gt; {{#allprops() notes subtags subtags2 compcheck failcheck succeedcheck check checkroll critroll fumbleroll initflag skillcatflag skillflag saveflag abilityflag spellflag pcflag npcflag basicflag 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 initflag skillcatflag skillflag saveflag abilityflag spellflag pcflag npcflag basicflag name}} &lt;!--more parts of the roll template down here--&gt; since you need to tell it to exclude any keywords which are used as keys for other parts of the template. It's on the wiki here: <a href="https://wiki.roll20.net/Roll_Templates#Special_Hel" rel="nofollow">https://wiki.roll20.net/Roll_Templates#Special_Hel</a>... Hope that helps. So, potentially stupid question alert... in the actual roll, how do I call that field? I see "name" and the example on the wiki uses "attack", so I feel like I have to call it something like {{name=&lt;something&gt;}} or {{attack=&lt;something}}.
1453999043

Edited 1453999082
chris b.
Pro
Sheet Author
API Scripter
To remove some of the extraneous items from the example of allprops() in the wiki: if you just have this, then you are done: all you need is allprops(), {{key}} and {{value}} which are for generic rows then you can do&nbsp; &{mytemplate}{{foo=3}}{{bar=4}}{{fukakta=7}} &lt;table&gt; {{#allprops() }} &lt;tr&gt;&lt;td&gt;{{key}}&lt;/td&gt;&lt;td&gt;{{value}}&lt;/td&gt;&lt;/tr&gt; {{/allprops() }} &lt;/table&gt;
1453999124
Wes
Pro
Sheet Author
The system takes whatever you type and places it into those fields, even if you haven't made a template key/value. Your above example will work like this. It places Mook 1 Attack in the key field and 1d6! In the value field. {{Mook 1 Attack = 1d6!}}
1454005836

Edited 1454010281
Diana P
Pro
Sheet Author
G V. said: ... in the actual roll, how do I call that field? I see "name" and the example on the wiki uses "attack", so I feel like I have to call it something like {{name=&lt;something&gt;}} or {{attack=&lt;something}}. The allprops helper basically says: if an input doesn't have a keyword explicitly defined, then find the equal sign.&nbsp; Put the stuff to the left of the equal sign in the first column and the stuff to the right of the equal sign in the second column. Edit: where "name" is and "attack" in the wiki, those keywords are being excluded; it will *not* use those words in the columns.&nbsp; Same with the big list of word in my 3.5 example.&nbsp; That is so it does not get duplicated if you set up your template with multiple sections.&nbsp; I believe name is naturally excluded (it goes in the header instead).&nbsp; If not, my base example code with "name" in the call excludes it explicitly so I can use it in the header. when you call it, it can be anything: &{template:testtemplate}} {{name=TEST}} {{foo=bar}} {{cast time = 3 secs}} {{alpha = not omega}} {{this = that}} would output something like: &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TEST foo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bar cast time 3 secs alpha &nbsp; &nbsp; &nbsp; not omega this &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; that where TEST is in what ever colors you have defined your header/name to have.
1454006080

Edited 1454006119
Finderski
Plus
Sheet Author
Compendium Curator
Awesome! Thanks everyone.&nbsp;
1454006570
Diana P
Pro
Sheet Author
Basic test code (plug and play):&nbsp; (and I edited my comment above a bit to make it clearer) &lt;rolltemplate class="sheet-rolltemplate-testtemplate"&gt; &nbsp;&nbsp; &nbsp;&lt;table&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;th class="header-basic"&gt;{{name}}&lt;/th&gt;&lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {{#allprops() name}} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;tr&gt;&lt;td&gt;{{key}} &lt;/td&gt;&lt;td&gt;{{value}} &lt;/td&gt;&lt;/tr&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{/allprops() name}} &lt;/table&gt; &lt;/rolltemplate&gt; css: .sheet-rolltemplate-testtemplate table { &nbsp;&nbsp; &nbsp;width: 100%; &nbsp;&nbsp; &nbsp;padding: 2px; &nbsp;&nbsp; &nbsp;border: 1px solid; &nbsp;&nbsp; &nbsp;background-color: #ffffff; &nbsp;&nbsp; &nbsp;text-align: left; } &nbsp;.sheet-rolltemplate-testtemplate th { &nbsp;&nbsp;&nbsp; /*color: rgb(45, 126, 107);*/ &nbsp;&nbsp; &nbsp;padding-left: 5px; &nbsp;&nbsp; &nbsp;line-height: 1.6em; &nbsp;&nbsp; &nbsp;font-size: 1.2em; &nbsp;&nbsp; &nbsp;text-align: left; &nbsp;&nbsp;&nbsp; /*text-align: center;*/ &nbsp;&nbsp;&nbsp; background-color: gray; &nbsp;&nbsp;&nbsp; color: white;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; } &nbsp;.sheet-rolltemplate-testtemplate td { &nbsp;&nbsp; &nbsp;padding-left: 5px; &nbsp;&nbsp; &nbsp;text-align: left; } &nbsp;.sheet-rolltemplate-testtemplate .sheet-tr-repeating:nth-child(even){ &nbsp;&nbsp; &nbsp;background-color:#eee; } &nbsp;.sheet-rolltemplate-testtemplate .inlinerollresult { &nbsp;&nbsp; &nbsp;background-color: transparent; &nbsp;&nbsp; &nbsp;border: none; } &nbsp;.sheet-rolltemplate-testtemplate .inlinerollresult.fullcrit { &nbsp;&nbsp; &nbsp;color: #3FB315; &nbsp;&nbsp; &nbsp;border: none; } &nbsp;.sheet-rolltemplate-testtemplate .inlinerollresult.fullfail { &nbsp;&nbsp; &nbsp;color: #B31515; &nbsp;&nbsp; &nbsp;border: none; } &nbsp;.sheet-rolltemplate-testtemplate .inlinerollresult.importantroll { &nbsp;&nbsp; &nbsp;color: #4A57ED; &nbsp;&nbsp; &nbsp;border: none; }
1454009992
chris b.
Pro
Sheet Author
API Scripter
Diana P said: {{this = that}} My friend just got his Philosophy PHD last year and if you asked him what it was about he'd say "oh this and that" but in truth it really was on how this does not equal that.&nbsp;
1454010441
Diana P
Pro
Sheet Author
chris b. said: My friend just got his Philosophy PHD last year and if you asked him what it was about he'd say "oh this and that" but in truth it really was on how this does not equal that.&nbsp; *grin* I'm an engineer: this does equal that but only for a certain subset of this and that under a certain set of assumptions.