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

CharSetAttr or API script to Modify Sheet Settings (Pathfnder Community Sheet)

Is it possible to update the settings area of a sheet with CharSetAttr? In particular the Roll Configuration (NPC / PC / Stats Rolls) I want to set them all to "Public Rolls" on every single sheet. If it can't be done with CharSetAttr can it be done by using a modified copy of my movement speed update code:   findObjs({type:'attribute',name:'movement-speed'}).forEach((a) => {     const speed = parseInt(getAttrByName(a.get('characterid'), 'speed-modified')) || 30;     a.set('current', speed / 5);   }); What would the attribute names be for the 3 roll configuration options? How can I update EVERY SINGLE sheet to use Public Rolls?
1527275982
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You could use chat setattr for it. The Pathfinder companion script also has a dedicated command for doing it
1527276293

Edited 1527276393
MyRoll20Stuffs
API Scripter
Can you share the exact syntax to set ALL sheets to have Public Rolls for all 3 (PC / NPC / Stats Rolls) I'm not familiar with the variable names or required CharSetAttr syntax so I have no idea how to go about doing this. EDIT: Nevermind I found out the variable names by mousing over the drop down boxes.
I'm having issues figuring out what to set the variables "PC-whisper", "NPC-whisper" and "STATS-whisper" TO - When I select a character and output @{selected|PC-whisper} to chat all I get is blank whitespace. What do I set the variables to in my script or when using CharSetAttr to get them all set to "Public Rolls"?
Turns out it's "/w gm" for Whisper Rolls and " " blank whitespace for Public Rolls..
What rolls fall under the purview of "STATS-whisper" rolls? I'm using an API script to initialize "PC-whisper" and "NPC-whisper" to empty strings instead of "/w gm" but the "STATS-whisper" variable isn't on the sheet at all and when I open settings it's set to "Whisper Rolls" on the sheet even though the sheet doesn't even have the variable.
1527279629

Edited 1527279647
vÍnce
Pro
Sheet Author
STATS-whisper is used for the PC and NPC Defense stats chat menu.  It also only uses "/w gm" for Whisper Rolls and " " blank whitespace for Public Rolls..