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

Character Sheet with Custom Dice

Hello dear Sheet Authors, I lately started to develop a custom character sheet for an rpg that needs special dice with special faces. So I started to look for options how to do that and wanted to present my voyage and current solution to you, to see if my conclusions are correct and if my solution is maybe useful to other authors or could be improved somehow. My first attempt was with custom tables. While it serves the needs to show nice images, every user would have to set them up manually as I cannot deliver them with the character sheet and the results cannot be counted, as far as I can tell. My second attempt was build upon an API-Script, like the famous eed! or HeroQuest Dice. That worked much better and I could count results and could at least deliver the solution by providing the API Script to users. But still they would have set it up all by themselves and need a pro subscription for it. So I did dig deeper. My current solution is build upon the CSS feature of counters. Basically, I do construct dice rolls for dice with the right count of faces but all dice as a single roll. For me those are always d6, but EotE or others could use d8 and d12 with this system as well. So my roll looks like this:  "&{template:specialdice} {{name=@{character_name}}} {{specialdie1=[[d6]]}} {{specialdie2=[[d6]]}} {{specialdie3=[[d6]]}} ...." This way, the rolltemplate gets all the dice separated and can evaluate every single one of them. My rolltemplate then looks like this: <rolltemplate class="sheet-rolltemplate-specialdice"> <div class="sheet-rtcard"> {{#specialdie1}} {{#rollTotal() die1 1}}<span class="specialdie face1"></span>{{/rollTotal() specialdie1 1}} {{#rollBetween() die1 2 4}}<span class="specialdie face2"></span>{{/rollBetween() specialdie1 2 4}} {{#rollBetween() die1 5 6}}<span class="specialdie face3"></span>{{/rollBetween() specialdie1 5 6}} {{/specialdie1}} ....     </div> </rolltemplate> Of course, again, I have to list every possible rolled die here separately, but for the game I want to support, I only need 16 dice max, so that is ok-ish. So by tweaking the rollTotal and rollBetween calls, I can decide what every face should count for. I could list six different faces or just two or three different. To be fair, if I would need just two or three different faces, like in the sample above, I could go just with crit/fail states and adjust the values in the roll itself by d6cs6cf1 etc, but this way is more flexible, as I can have more different faces (which I need on another special die ;-). So the class definitions of the span now have encoded what face they should display. Lets move on to the css then: .sheet-rolltemplate-specialdice .sheet-specialdie.sheet-face1 { display:inline-block; width: 36px; height: 36px; counter-increment: face1; background: url(....) top left; background-size: 36px 36px; } .sheet-rolltemplate-specialdice .sheet-specialdie.sheet-face2 { display:inline-block; width: 36px; height: 36px; counter-increment: face2; background: url(....) top left; background-size: 36px 36px; } .sheet-rolltemplate-specialdice .sheet-specialdie.sheet-face3 { display:inline-block; width: 36px; height: 36px; counter-increment: face3; background: url(....) top left; background-size: 36px 36px; } Every die-face combination gets its own entry. With background:url(..)  I can adjust how the result should be displayed, if I want that and with counter-increment: face1 etc. I can count how many times a certain result is rolled. If there are faces with more then one result, it could also be counted like: counter-increment: despair +2 failure +1;. So again, very flexible. To show the results in a convenient way, I use this part in the css: .sheet-rolltemplate-specialdice .sheet-rtcard { counter-reset: face1 face2 face3; } .sheet-rolltemplate-specialdice .sheet-rtcard::after { content: "Results face1: " counter(face1) " face2: " counter(face1) " face3: " counter(face1); } Start of the roll template display resets all counters, at the end of the sheet, the counter(..) can output the "value" of the die. So what do you think of that solution for special dice, that can be delivered just with a custom character sheet?
1587225637
GiGs
Pro
Sheet Author
API Scripter
You have found the best way to handle this that works for free users, using CSS. It's a pain to set up, but it works and can be very nice looking. Your use of counter-increment is clever, I'll have to explore that myself.
1587361015
vÍnce
Pro
Sheet Author
Nice work.  This how the dice pool's roll template is handled on the Forbidden Lands sheet. (original roll template/sheetworker was done by  Wes )  I'm not sure if it can be improved upon.
Nice! Thanks for putting so much work in!