GM-only Attributes and Abilities option

Score + 1
1506273580
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.
Pro
API Scripter
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
Brian
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.
Pro
API Scripter
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.