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

[Question] DL Dark script: quick delete of darkness

In the script, is there a way to delete the magical darkness (the object and the gridded DL) with a single command or toggle? I can certainly do that work manually, but it would be nice to be able to essentially toggle a given darkness token on or off, or delete both token and DL with a single click.
1611427005
David M.
Pro
API Scripter
Thanks for the input, Jay. Something like that would probably require me to write to the State object, which I have had in the back of my mind for that script anyway. I would also like to add in something that automatically moves the DL grid when the corresponding graphic token is moved. Just haven't had a chunk of time to look into it fully, yet, to see how to reference drawing objects in the State, etc.  Hopefully it's something that I can address sooner than later. 
David M. said: Thanks for the input, Jay. Something like that would probably require me to write to the State object, which I have had in the back of my mind for that script anyway. I would also like to add in something that automatically moves the DL grid when the corresponding graphic token is moved. Just haven't had a chunk of time to look into it fully, yet, to see how to reference drawing objects in the State, etc.  Hopefully it's something that I can address sooner than later.  Cool, thanks for the quick response, David. It's a great script. I have some creatures with magical darkness abilities lined up for my party next session! :)
1611434377

Edited 1611434433
David M.
Pro
API Scripter
Groovy. I often use the DL Dark script in conjunction with my !Spawn script to "summon" the spell effect token prior to creating the darkness. See example here for a cloudkill (click image for animated gif). Easiest method though is just to spawn it directly over the caster (--offset|0,0 or omitted) and move the token into position, then create the darkness. If you want to get fancy, you can even spawn a rollable table token that has multiple AoE spell graphics as items (keeps it all in one place, and uses a single character sheet), then have !Spawn set the side and size. The AoE spell character sheet could have an ability to create darkness via DLDark if it is applicable to the spell. The old spawn thread is closed for inactivity, but Thread 2 can be found here , if you're interested. Current version is 0.12, but 0.11 is the latest in one-click. If you already use something else like King's Summon script, that would work, too, minus the rollable table token part.
David M. said: Groovy. I often use the DL Dark script in conjunction with my !Spawn script to "summon" the spell effect token prior to creating the darkness. See example here for a cloudkill (click image for animated gif). Easiest method though is just to spawn it directly over the caster (--offset|0,0 or omitted) and move the token into position, then create the darkness. If you want to get fancy, you can even spawn a rollable table token that has multiple AoE spell graphics as items (keeps it all in one place, and uses a single character sheet), then have !Spawn set the side and size. The AoE spell character sheet could have an ability to create darkness via DLDark if it is applicable to the spell. The old spawn thread is closed for inactivity, but Thread 2 can be found here , if you're interested. Current version is 0.12, but 0.11 is the latest in one-click. If you already use something else like King's Summon script, that would work, too, minus the rollable table token part. Oh, very neat! I must admit I haven't checked out the spawn or summon scripts yet. Currently, I just have a 15 ft. darkness token linked to a character sheet (with plans to create a couple more at different sizes), which I can drop onto a map. But that rollable table spawning would be very handy, and worth the front-loaded work if I could get it going.
1611443451
David M.
Pro
API Scripter
There are some examples of the rollable table token spawning method on the script thread, and Nick O touches on it in his youtube video highlighting the script (around the 10 min mark) here . The most important quirk is that the artwork has to exist in your personal art library, as the api does not have access to marketplace items. His video describes this, too, and how to add marketplace art into your library. His spell summoning example uses the optional --target command, which needs two extra clicks but allows the spell to be placed on a target token. Just a matter of preference and the particular application.
1611776749
David M.
Pro
API Scripter
Jay, v0.3 of the script now supports linked movement and deletion. Moving the token causes the darkness to follow. Deleting the token auto-deletes the darkness. Deleting the darkness leaves the source token, however. There are also options to de-link the token & darkness by token/page/campaign. Check out Thread 2 of the script here for details. Scroll up to the first post for the source code. v0.3 is currently available for manual install only to allow for testing before adding to the one-click.
David M. said: Jay, v0.3 of the script now supports linked movement and deletion. Moving the token causes the darkness to follow. Deleting the token auto-deletes the darkness. Deleting the darkness leaves the source token, however. There are also options to de-link the token & darkness by token/page/campaign. Check out Thread 2 of the script here for details. Scroll up to the first post for the source code. v0.3 is currently available for manual install only to allow for testing before adding to the one-click. Awesome, can't wait to test this out!
1611840161
David M.
Pro
API Scripter
Thanks, Jay. It's my first time doing anything with the Roll20 "state" object (which allows the token/DLpath links to persist between game sessions) so anything you can do to try to break it would be helpful feedback! Post any feedback you have to the new script thread, if you don't mind :). If it checks out, I can update the one-click with v0.3.