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

Adding "Sheet Settings"option to a sheet

1519725296
Andreas J.
Forum Champion
Sheet Author
Translator
I randomly stumbled upon the fact that many Official sheets like GUMSHOE have a "Sheet Settings" that enables quick settings changes on the sheet like,switches from PC/NPC mode, modify default values and more. Part of the trick seems to be that they are saved under "useroptions" in the .json file. Is it possible use this to universally modify how rolls are made on a sheet? Like toggle wild die on/off, gmroll on/off? Should I try to do this in some other way? Any pointers about how this works? The sheets I've looked at have so much code/options so I have a hard time wrapping my head around it, but I guess I'll eventually understand some of it. If possible a short example could be nice or directions to a simpler sheets that uses this. There isn't any documentation or mentioning of this anywhere I've seen, so I started an entry on the  CSS wizardry page if anyone more knowledgeable want to expand on it.
1519727681

Edited 1519727735
Natha
KS Backer
Sheet Author
API Scripter
>> Is it possible use this to universally modify how rolls are made on a sheet? Like toggle wild die on/off, gmroll on/off? Should I try to do this in some other way? Yes. But that means the sheet has a set of attributes, used by the rolls/roll templates, that handles that. So, it's a "per sheet" mechanic. What the settings in the sheet.json files do is set a default (or overiden) value to these kinds of attributes. So it's really tied to how's the sheet coded. For example (looking at the official 5E sheet and sheet.json), the sheet has a "npc" attribute, and this attribute sets how the sheet looks (PC full sheet or NPC statblock) and other mechanics. The relative sheet.json file has a setting so that any newly created character in the game, can be either an NPC (checked) or not (unchecked). "useroptions": [     {         "attribute": "npc",         "displayname": "NPC",         "displaytranslationkey": "npc-u",         "type": "checkbox",         "value": "1",         "description": "The NPC option sets new characters to default to the NPC card style sheet. Useful if the player characters have already been created and all new character sheets added to the game will likely represent none player characters.",         "descriptiontranslationkey": "npc-info"     }, It's not related to CSS though but to the HTML/sheet-workers of the sheet, in general. The only trouble with this system, is that you can't test it before submitting the modifier sheet.json (and html file) to the Roll20 github, and test after the merge (when the new version of the sheet is live on the production server).
1519728765
Jakob
Sheet Author
API Scripter
The only trouble with this system, is that you can't test it before submitting the modifier sheet.json (and html file) to the Roll20 github, and test after the merge (when the new version of the sheet is live on the production server). ... and that it's not documented at all and you have to piece together the information by looking at existing sheets.
1519735266
Natha
KS Backer
Sheet Author
API Scripter
Good point, Jakob.
1519742012
Kryx
Pro
Sheet Author
API Scripter
Natha said: The only trouble with this system, is that you can't test it before submitting the modifier sheet.json (and html file) to the Roll20 github, and test after the merge (when the new version of the sheet is live on the production server). It would be great if this could be solved. Until then I can't really provide these options to users.
1519755893
Finderski
Pro
Sheet Author
Compendium Curator
Kryx said: Natha said: The only trouble with this system, is that you can't test it before submitting the modifier sheet.json (and html file) to the Roll20 github, and test after the merge (when the new version of the sheet is live on the production server). It would be great if this could be solved. Until then I can't really provide these options to users. That's why I've been holding off for as long as I have, but...finally got tired of waiting, so most current merge for the Savage Worlds Tabbed sheet will have this later this week...I'll let you know how my first foray goes...
1519771093
Andreas J.
Forum Champion
Sheet Author
Translator
Okay, html/sheetworker mainly. I'll see what I can get figured out. Jakob said: ... and that it's not documented at all and you have to piece together the information by looking at existing sheets. Yeah it would indeed be nice to have even the flimsiest start of a documentation for this, elaborating on my two-sentence explanation on the  wiki .