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 .
×

Torch timer and token marker for Shadowdark

1784613774

Edited 1784641207
Zapflod
Elite
Moderator : Please update thread title to "[SCRIPT] Shadowdark Real-Time Torch Timer" Torch timer and token marker for Shadowdark A lightweight API script for Roll20 designed for Shadowdark RPG . It automates the 60-minute real-time torch mechanic using native Dynamic Lighting and token status markers. Features: Sets 15/16 ft Dynamic Light and attaches the " Torch"  status marker to the selected token (please note that I'm using the Token Marker Set "Easy to Read Token Markers", so the script will work without this, but no marker will be created) Runs a background 60-minute real-time countdown. Provides chat warnings at 30 min, 10 min, and 5 min remaining. Automatically extinguishes the light, removes the token marker, and plunges the map into total darkness when time runs out. Chat Commands: !torch  — Lights a torch on the currently selected token and starts a 60-minute countdown. !torch start [minutes]  — Starts a timer for a specific duration in minutes (e.g., 30 min for a partial torch). !torch stop  — Extinguishes the light, removes the marker, and resets the timer immediately. !torch time  — Displays the remaining time in chat without interrupting the timer. Code
1784701485

Edited 1784720550
Zapflod
Elite
Let me know what you think, any feedback is appreciated as this is my first API Script