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

Macro for controlling day/night/twilight.

I'm running a game that has lots of indoor/outdoor settings. Imagine a castle in the wilderness that the PCs will explore and loot. I've been looking at how to do outdoor lighting and it appears to me that using tokens that emit light on the dynamic lighting layer is the way to do this. I've seen excellent suggestions from the forums on how to add lights just outside doors and windows to create nice looking lighting effects. (Note: Global illumination won't work because I want indoor spaces to still be dark.) Here's the issue: To make that lighting look good you need lots of light-emitting tokens.  But what happens if the PCs decide to adventure at night or at twilight?   How can I control all of the lighting tokens with one macro?  Can I tag them somehow?  I have no idea how to do this and would love some advice, thanks.
You'd need to use the API (with a Pro subscription), or create multiple versions of the page: daylight, dusk/dawn, night.
Sure, it would make sense that this is possible with the API.   But how ? I don't see how different versions of the page would make sense either, sounds like 3x the work.
You can also just use this method for Moonlight. Just keep the Aura of the token as a Square, and choose to Emit Light with that said token so you can STILL keep the inside of a building dark. Itll be a bit more work for obtaining the use without an API I think. But you could be rigging it up if you knew they were gonna hit the area for night time. Perhaps even make some Premade "characters" that are the Invise Tokens as I describe in that link and it wouldnt take long at all. Just make sure you dont over lap the auras
There are at least two scripts that can change lighting on the fly via macros: Torch and Token Mod. Most of my macros date back to using Torch before there was a Token Mod so I still use that script.  The commands are simple, torch plus how far you want the light to emit, dim light, spread, who can see it, etc.  To extinguish a selected like you just use !snuff.  All of my maps are "daytime" maps which I then control the lighting on.  To simulate growing/lessening twilight at dawn or dusk, I have a character sheet with a transparent png with a black aura on it. I just keep copying it over to the map to make the map steadily get darker, or remove them to make the map slowly light back up.  Hope this helps.
Zak B. said: Sure, it would make sense that this is possible with the API.   But how ? I don't see how different versions of the page would make sense either, sounds like 3x the work. API: Using TokenMod, you can create a macro and set the IDs of the tokens you want to change.  So you would set out all the 'light' tokens, then create a macro that would include the IDs of all those tokens, and the settings for Day/Dusk/Dawn/Night lighting. You would need to manually get the IDs for all the tokens (by clicking on them, using @{selected|token_id}, then copying that into the macro. !token-mod {{ --set light_radius|40 light_dimradius|0 layer|walls --ids     -JRQ43K2KTXuuunwlYDk -JRQ43Jh9VHZJtKWESXa -[etc etc etc] }} Creating 3 copies of a page would be 3x the work, especially without the Transmogrifier tool as a Pro subscriber.  You'd have to create three identical copies of a page, and adjust the lighting tokens based on day/dawn/dusk/night settings, and move the players into the page that had the light settings you want them to see.  That just gives you the benefit of being able to do it during a game, by doing a lot of prep work to set it up.  Not ideal. There's no way for a macro to adjust the light settings of a token.
1599272712
Oosh
Sheet Author
API Scripter
Something that may or may not be useful: map pieces are also tokens. Maybe not very useful if your whole map is one piece, but you can quickly light a large area by setting the light on the actual map token.
Jarren K, Thanks very much.  That's very helpful.  I'll start tinkering.