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

How Do I Access Default Sheet Setting?

Have read this and think I understand the concepts of how to create and select default sheet settings:&nbsp; <a href="https://roll20.zendesk.com/hc/en-us/articles/360041542554-Default-Sheet-Settings" rel="nofollow">https://roll20.zendesk.com/hc/en-us/articles/360041542554-Default-Sheet-Settings</a> &nbsp; However, I can't figure out how I access those settings from within &nbsp;my character sheet HTML and/or Sheet Worker Scripts. For example, if I want a setting to toggle between a PC and an NPC "mode" and I include that as a DSS, how does my character sheet know which "mode" its in? Thanks!
1600297119
GiGs
Pro
Sheet Author
API Scripter
Default settings use attribute values. They are a way for a GM to set attribute values automatically, for all sheets, without having to do it individually. Every default setting you create must have a corresponding attribute on the character sheet. That gives you the way to toggle between pc and npc mode - you just alter the attribute value that controls this.
1600297473

Edited 1600297721
Andreas J.
Forum Champion
Sheet Author
Translator
You test them in the Sheet Sandbox: <a href="https://wiki.roll20.net/Building_Character_Sheets#Custom_Sheet_Sandbox" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Custom_Sheet_Sandbox</a> And the Community wiki version of that page is way better: <a href="https://wiki.roll20.net/Default_Sheet_Settings" rel="nofollow">https://wiki.roll20.net/Default_Sheet_Settings</a> When it comes to Character sheet creation, your best bet is to use the Community wiki documentation, starting from the main page: <a href="https://wiki.roll20.net/Building_Character_Sheets" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets</a> It's updated and expanded constantly by the several community mebers, and contains more info than the pale copy that exists on the help center. The help center is great for Roll20 usage documentation, but it's a different story with Character Sheet creation. If you wonder why the Help Center features code examples with my name on it, it's bc I wrote half that article, and have expanded it since it was coped from the wiki to the help center. omonubi said: For example, if I want a setting to toggle between a PC and an NPC "mode" and I include that as a DSS, how does my character sheet know which "mode" its in?Thanks! Take a look at the second example on the page: <a href="https://wiki.roll20.net/Default_Sheet_Settings#Star_Wars_D6_by_Andreas_J" rel="nofollow">https://wiki.roll20.net/Default_Sheet_Settings#Star_Wars_D6_by_Andreas_J</a>. The first default setting is for "sheet type", and is stored in the attribute "sheettype".
GiGs said: Default settings use attribute values. They are a way for a GM to set attribute values automatically, for all sheets, without having to do it individually. Every default setting you create must have a corresponding attribute on the character sheet. That gives you the way to toggle between pc and npc mode - you just alter the attribute value that controls this. Thanks, all. That's what I needed to know!