Skip to content

Instantly share code, notes, and snippets.

@bripod
bripod / Chronos the Timekeeper
Last active July 12, 2016 07:05
A persistent time tracker and basic calendar system for roll20.net
/* Chronos Timekeeper: Calendar and Timekeeper Script for roll20.net
*
* !chronos returns elapsed time so far (needs updating)
* !chronos #y,#m,#d,#h,#n adds a number of years, months, days, hours, minutes (n) to clock.
* !chronos #y,#m,#d,#h,#n -xyz parameters: t for torch tracking, r for regular rest, h for bedrest
* !chronos 6:00am move timer to next occurrence of given hour (not implemented yet)
*
*/
state.bpd_chronos = state.bpd_chronos || {};
@bripod
bripod / mightyDeeds
Last active December 25, 2015 00:19
Mighty Deeds of Arms command for roll20
// Mighty Deeds of Arms for Dungeon Crawl Classics in roll20.net
// This script creates a command which will compute the Mighty Deed Die roll for a
// warrior's attack, and then use that value as a modifier for the attack and damage
// rolls, and output the computed roll to chat.
// The script assumes that 1) any character performing a mighty deed has an attribute called
// "DeedDie" whose max value is used to determine which die to roll for the mighty deed
// (i.e., 3 = 1d3, 4 = 1d4), and 2) ability modifiers are stored on the character sheets.
// I use STR, AGL, etc., but the script doesn't care what the attributes are called (although
// if they have commas in their names that will cause issues)
// The command format is as follows:
@bripod
bripod / torchTimeTracker
Last active July 26, 2018 11:37
For keeping track of diminishing fuel for light sources over time.
// Time and Torch Tracker
// roll20 API script for tracking time elapsed in rounds or turns, and tracking
// consumption of finite light sources
// The basics:
// The script assumes that any tokens on the current player page with the "All Players See Light"
// button checked is a light source that will gradually run out of fuel.
// As the fuel is reduced, the light will shrink and grow dim, and players will get a message
// when a light source goes from one stage to the next -- normal, dim, flickering, and about to go out.
// Chat commands are used to advance or reset the round counter, or to check how much time has passed.
// To set a token as a light source: