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
This post has been closed. You can still view previous posts, but you can't post any new replies.

GM-only Attributes and Abilities option

I am making a custom character sheet.  As the GM, I want to be able to control the visibility of certain sections <div>s.  As far as I can tell, the only way to do this is using CSS, specifically the :checked selector.  I have players with pathological curiosity (and I mean that in a light-hearted way) that will muck with things and learn more than they should.  So, I would like a way to hide the Attributes & Abilities tab from anyone not the GM -- so that even a player that controls the character cannot access the tab.
1506313432

Edited 1506313592
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi David. I've actually been thinking about this for a field I have planned on my sheet. The solution I've come up with (note this is just theory, and hasn't been tested) is that I'll put a text box in above where the field I want to be hidden is. I'll then program in (eventually, make this a setting on the sheet defaults in game settings) a passcode that must be entered in in order for the sheetworkers to check the hidden checkbox controlling the visibility of the hidden element. This is by no means a total solution for your suggestion, and if I had a spare vote I would indeed be using it here. This is the rough idea of what I'm thinking of: HTML <input type='text' name='attr_gm_passcode'> <input class='passcode-checkbox type='checkbox' name='attr_passcode_accepted' value='1' hidden='true'> <textarea class='passcode-field' name='attr_gm_only_settings></textarea> CSS .sheet-passcode-field{ display:none; } .sheet-passcode-checkbox:checked ~ .sheet-passcode-field{ display:block; } Sheetworker on('change:gm_passcode',(event)=>{ var setObj = {}; getAttrs(['gm_passcode'],(attr)=>{ if(attr.gm_passcode==='password'){ setObj.passcode_accepted = 1; }else{ setObj.passcod_accepted=0; } setAttrs(setObj,{silent:true}); } ) Again, I think this is a great suggestion. This is just a work-around so that you can get similar functionality immediately.
1506363278
Lithl
Pro
Sheet Author
API Scripter
Scott C. said: This is just a work-around so that you can get similar functionality immediately. I'll point out that players are capable of seeing the sheet workers in the VTT page's source, and would thereby be capable of reading the passcode you've put in. They could also modify the styles of the sheet locally to override your CSS hiding stuff. This isn't a good workaround at all. Instead, you can use the GM Notes section of the character. This is pretty much the purpose behind that field, after all. It's not part of the character sheet, but it is part of the character, and it's already restricted to GM view only.
1506365054
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Brian said: Scott C. said: This is just a work-around so that you can get similar functionality immediately. I'll point out that players are capable of seeing the sheet workers in the VTT page's source, and would thereby be capable of reading the passcode you've put in. They could also modify the styles of the sheet locally to override your CSS hiding stuff. This isn't a good workaround at all. Instead, you can use the GM Notes section of the character. This is pretty much the purpose behind that field, after all. It's not part of the character sheet, but it is part of the character, and it's already restricted to GM view only. Oh, agreed, and for the actual working one, it'd be a setting on the character sheet defaults so the passcode itself wouldn't be in the sheetworkers. Of course, there's no way around the manipulation of the css styling with this method, so the gm notes is of course still the best place for stuff you really don't want your characters to see.
Thanks for the suggestion! After 30 days, Suggestions and Ideas with fewer than 10 votes are closed and the votes are refunded to promote freshness. Your suggestion didn't build the right momentum this time, but feel free to submit it again! We find that the best suggestions describe the problem you are having, and the solution you want. You can learn more about the process of making suggestions on the Roll20 Wiki! More details can be found here .