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

[Script] DryErase -- Updated to v0.1.5

1455089799

Edited 1455114625
The Aaron
Pro
API Scripter
DryErase v0.1.5 Update v0.1.5 &nbsp;-- Cleaned up config option buttons and added descriptions. (Thanks HoneyBadger !) Update v0.1.4 &nbsp;-- Fixed Copy/Paste error in checkInstall for updating configs. (Thanks HoneyBadger !) Update v0.1.3 -- DryErase will now handle drawings created while it wasn't running. &nbsp;This allows you to install it and process all the drawings created by non-gms in your game to date. &nbsp;It also means that if the API stops running between sessions all you need to do is start it up again to process any drawings created during the API downtime. Additionally, there is a new setting: Label Granted Player Drawings. &nbsp;With this setting toggled on, even granted players' drawings will receive a highlight on the GM layer with a label. &nbsp;You can safely delete the gm layer label in this case without it deleting the drawing. &nbsp;If this setting is on, the label will be retained when a drawing is marked as Allowed. Also, more readable button colors! Commands: !dry-erase -- accesses the help and configuration (shown above). &nbsp;Click Grant next to a player to allow them to draw freely. &nbsp;Click Revoke next to a player to remove their drawing privilege. &nbsp;No players are granted drawing privilege by default. Configuration Settings: Auto Delete -- Automatically delete drawings by players that have not been granted drawing permission. [Default: Off] With Report on, you will get a notice about the action taken: Auto Hide -- Automatically move to the GM Layer any drawings by players that have not been granted drawing permission. [Default: On] With Report on, you will get a menu for interacting with the drawing: Erase -- Removes the drawing. Allow -- Restores the drawing to the Objects Layer. Grant Player -- Grants player permission to make future drawings. Hidden drawings are labeled with the name of the player that drew them, as well as being highlighted in their current color: Moving either the drawing or the highlight to the Objects layer has the same effect as clicking Allow. Deleting either the drawing or the highlight has the same effect as clicking Erase. Report -- Notify the GM via a whisper when a player that has not been granted drawing permission makes a drawing. [Default: On] Label Granted Player Drawings -- Add a highlight with the name of the player to drawings made by granted players. [Default: Off] Previous Release Notes: <a href="https://app.roll20.net/forum/permalink/2852459/" rel="nofollow">https://app.roll20.net/forum/permalink/2852459/</a> Git: <a href="https://github.com/shdwjk/Roll20API/blob/master/Dr" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Dr</a>... Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1455110704

Edited 1455110728
Error... fresh copy & paste. Disabled all other scripts. /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^ TypeError: Cannot read property 'config' of undefined &nbsp; &nbsp; at Object.checkInstall (evalmachine.&lt;anonymous&gt;:1062:27) &nbsp; &nbsp; at Sandbox.&lt;anonymous&gt; (evalmachine.&lt;anonymous&gt;:1545:14) &nbsp; &nbsp; at eval (
1455111630
The Aaron
Pro
API Scripter
Update v0.1.4 -- Fixed Copy/Paste error in checkInstall for updating configs. (Thanks HoneyBadger !) Got to love those copy paste errors at 1 in the morning.. =D
1455112701

Edited 1455112821
Next update... can you right align the toggle buttons? It would make my OCD feel better, lol.
1455113201
The Aaron
Pro
API Scripter
I can! &nbsp;I keep meaning to write a better system for handling those, but haven't gotten around to it yet.
1455114640
The Aaron
Pro
API Scripter
Update v0.1.5 -- Cleaned up config option buttons and added descriptions. (Thanks HoneyBadger !) Better? &nbsp;=D
Looks great. :D
1455115123

Edited 1455115135
The Aaron
Pro
API Scripter
I should really adopt Stephen's toggle buttons... HE sure did a good job making those... =D
1455146041
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
The Aaron said: I should really adopt Stephen's toggle buttons... HE sure did a good job making those... =D I recommend this book:
1455149591
The Aaron
Pro
API Scripter
BWAHAHAHAHA&nbsp;
There is a strange request I would like, if thats okay. Right now I am trying to perform some mass combat for 5th Edition. Currently I use just the line tool to indicate which creature is attack whom etc etc. I had hoped to use this script to do two things, one, as a GM delete my drawings as well on a whim, two, maybe a mass delete all drawings? Because I have at least 100 Campaign tabs and alot of them had drawings on them &gt;_&gt;. I never did delete them in the end and the script asks me for choices on all of them. Effectively flooding my page.
1457093217
The Aaron
Pro
API Scripter
Yikes! &nbsp;I can see where that might cause a problem. So the request is for: 1) a command to delete all drawings on the object layer 2) better grouping if there are many pre existing drawings (maybe a blanket question per player with the total number of drawings and commands for all of them?) ?
The Aaron said: Yikes! &nbsp;I can see where that might cause a problem. So the request is for: 1) a command to delete all drawings on the object layer 2) better grouping if there are many pre existing drawings (maybe a blanket question per player with the total number of drawings and commands for all of them?) ? Far as I can tell. I cant dry erase the things done by a GM? Unless im blind. And tbh, a mass delete thing is good enough. :)
1457102617
The Aaron
Pro
API Scripter
Yeah, the assumption is that the GM is monitoring the player's use of the drawing tools. I'm working on rewriting my script deploy system (you need one when you have 57+ released scripts and 90+ in development!), so I don't want to deploy any changes to code right now. In the interim, you can use this little script to erase all drawings on the objects layer. &nbsp;Only the GM can run it: on('ready',function(){ &nbsp; &nbsp; "use strict"; &nbsp; &nbsp; on('chat:message',function(msg){ &nbsp; &nbsp; &nbsp; &nbsp; var content,token,damage; &nbsp; &nbsp; &nbsp; &nbsp; if('api' === msg.type && playerIsGM(msg.playerid) && msg.content.match(/^!delete-all-drawings/) ){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _.each(findObjs({ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type: 'path', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layer: 'objects' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }),function(p){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p.remove(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; }); }); Execute it with: !delete-all-drawings