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] Aziz, Light! An animated time-of-day switcher.

1753427216

Edited 1753427410
Orbotik
Pro
API Scripter
Aziz, Light! v1.0.0 GitHub to all my Roll20 scripts. This script allows you to quickly set and move the daylight brightness (using dynamic lighting) to different levels, making it easy to macro light levels and mimic time passing- go from afternoon to evening with ease, mimic waking up at dawn and the sun rising, step on the trap, maybe the lights go out! It's much easier now! Cmd Description !aziz light Returns the daylight brightness to the default 90%. !aziz eve Moves the daylight brightness to the minimum of 20%. !aziz dark Turns daylight to 0% (off). !aziz more Increases the daylight brightness by 5%. !aziz less  Decreases the daylight brightness by 5%. !aziz exactly [number] GM-only. Sets the daylight brightness to a specific percentage (5-100). Animate You can add an exclamation point  !  to the end of any of the commands to animate the brightness change. Add more exclamations to animate even faster (x10 is the fastest). The more exclamation points, the faster the change! By default 1 exclamation point is a 1% change every 2seconds,  and each subsequent exclamation divides the time. So 4 exclamation points would make a 1% increase every 1/2second  (2seconds / 4). Example !aziz light!!!! Want an instant change? Omit the exclamation point at the end entirely.
I install your mod and it crashed the sandbox because it said that the Version is not defined. Also I found that in your post above it says that the command word is !aziz light, but in the instructions in the coding is !azeez light, which one is?
1753459976
Orbotik
Pro
API Scripter
Fixed!
1753460766
timmaugh
Forum Champion
API Scripter
I so appreciate the reference. And I love that in using it, it's like I, myself, am yelling at Aziz. =D One thing I might suggest is to incorporate the API_Meta object from The Aaron in your scripts. It allows better error analysis by disambiguating line numbers where things broke. Even if your script isn't the cause, it can help narrow down the starting place to look if the error actually falls in a subsequent script in someone's game. Implementation is discussed in this post under the "For Scripters..." heading.