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

GM Section checkbox that hides / reveals chr sheet sections?

Hi, Is it possible to put a button in the GM section of the BIO/INFO tab of a sheet that would cause sections of a character sheet to be visible / hidden?
1586641086

Edited 1586641395
Or can there be an input text field in the character sheet with only responds to a specific string. When that string (password) is entered, a value changes from 0 to 1, causing the hidden sheet sections to be revealed. I've already used this code for radio buttons that reveal ALL or only part of the sheet. <input type="radio" class="sheet-switch" name="attr_section" value="all" checked>All   <input type="radio" class="sheet-switch" name="attr_section" value="personal">Personal Data   What I'm looking for is a way to make sure that the ALL check still hides the bits we want to hide, except when that string is entered as mentioned above.
1586642012
GiGs
Pro
Sheet Author
API Scripter
It is (theoretically) possible to put links in a bio or gm notes section, but last time i tried they were a bit bugged out and roll20 hasnt replied to the bug report. But you could embed a script command (like chatSetAttr to set the value of a hidden attribute to 0 or 1), and use that attribute to hide the section. Likewise, you can have an input on the character sheet. If you want the functionality of the all button and the password input, you are best off using a third attribute as well: this one is hidden, but it has the class and value that is used to check whether stuff should be hidden and displayed.  then you use a sheet worker to respond to changes in the _section attribute and the password input, and set the hidden input's value based on their values. It can check the password matches the phrase. This has the advantage that players cant check the html for the password. Though if you plan to add the sheet to the github repo, there's no way to hide the password string (you could have a way to enter a new password, so it's only valid on a per campaign basis which would solve that problem).  This is an interesting question!
1586642714

Edited 1586643327
Thanks for the ideas GiGs. Unfortunately I'm no dev, so I have no idea how to go about implementing them. However I can copy / paste and analyze Is there any kind of guide to these things specifically I could poke around in to see if I can figure it out? I know there's docs, but I find them quite hard to comprehend. Also, I've heard of sheet workers, but don't know how to make / use them. edit nevermind. I found your pages on sheet workers. Trying that now.