Skip to content

Instantly share code, notes, and snippets.

on('ready', () => {
const tokenDefaults = {
exclude: ["_id", "_pageid", "left", "top", "imgsrc", "width", "height", "layer", "sides"],
areFalse: ["aura1_square", "aura2_square", "emits_bright_light", "emits_low_light", "fliph", "flipv", "has_bright_light_vision", "has_directional_bright_light", "has_directional_dim_light", "has_limit_field_of_night_vision", "has_limit_field_of_vision", "has_night_vision", "isdrawing", "light_hassight", "light_otherplayers", "lockMovement", "show_tooltip", "showname", "showplayers_aura1", "showplayers_aura2", "showplayers_bar1", "showplayers_bar2", "showplayers_bar3", "showplayers_name"],
areTrue: ["playersedit_aura1", "playersedit_aura2", "playersedit_bar1", "playersedit_bar2", "playersedit_bar3", "playersedit_name"],
areNull: ["bar_location", "compact_bar", "night_vision_effect", "night_vision_tint"],
areEmpty: ["_cardid", "adv_fow_view_distance", "aura1_radius", "aura2_radius", "bar1_link", "bar1_max", "bar1_value", "bar2_link",
/*jshint esversion: 9 */
// OPen and Blind Checks for the 5th Edition OGL by Roll20
// Create a token action macro called "OpenChecks" with the action "!OpenChecks"
// Create a token action macro called "BlindChecks" with the action "!BlindChecks"
// Give all your players access to both.
const OpenBlindChecks = (() => {
const buildTable = (values) => {
let getMod = (g) => {
return g ? g.mod : -5;
/*jshint esversion: 9 */
// OPen and Blind Checks for the 5th Edition OGL by Roll20
// Create a token action macro called "OpenChecks" with the action "!OpenChecks"
// Create a token action macro called "BlindChecks" with the action "!BlindChecks"
// Give all your players access to both.
const OpenBlindChecks = (() => {
const buildTable = (values) => {
let getMod = (g) => {
return g ? g.mod : -5;
<style> .phb#p1:after { display:none; } .phb#p2 {counter-reset: phb-page-numbers 0;} </style>

@BaldarSilveraxe
BaldarSilveraxe / SpeechBalloon
Last active December 14, 2020 22:10
Roll20 SpeechBalloon
var SpeechBalloon = SpeechBalloon || (function(){
'use strict';
var version = 0.1,
schemaVersion = 0.4,
defaultShowLength = 4, // seconds
msPerSec = 1000, // for conversions.. no magic numbers!
checkStepRate = 1000, //ms = 1 second
checkInterval = false,
var markdown = markdown || (() => {
const version = '1.0.9';
const lastUpdate = 1578236090;
const checkInstall = () => {
log('-=> markdown v'+version+' <=- ['+(new Date(lastUpdate*1000))+']');
};
var markdownDocumentation = markdownDocumentation || (() => {
const version = '1.0.3';
const lastUpdate = 1578236090;
var documentationCSS = '[css]<br>'
+ 'bg {<br>'
+ "padding: 10px; background: AliceBlue; background-image: url('https://i.imgur.com/i9vmkzO.png');<br>"
+ '}<br>'
+ '<br>'
+ 'h1 {<br>'
var markdownNotesBio = markdownNotesBio || (() => {
const version = '1.0.1';
const lastUpdate = 1578078196;
const schemaVersion = 1.0;
const CONFIG = {
apiStart: '<!-- API_markdown -->',
apiEnd: '<!-- API_markdown_end -->'
};
@BaldarSilveraxe
BaldarSilveraxe / Critical_Fumble_Tables
Created November 27, 2013 10:57
Roll20 API fumble and crit tables
//FumbleTables
roll20API.processAPI_FGM = function() {
var fumble = new Array();
fumble[0] = "Fumbler’s movements put them off balance. They take a -1 penalty to \
their armor class for the next round.";
fumble[1] = "Fumbler’s movements put them severely off balance. They lose Dexterity \
and Shield bonuses to AC for the next round. If losing these bonuses does not \
reduce the fumbler’s AC by -2 (or more), then they still must take a -2 penalty.";
fumble[2] = "Fumbler trips, and falls prone. They lose Dexterity and Shield bonuses \
to AC for the current round and the next round. If losing these bonuses does not \
@BaldarSilveraxe
BaldarSilveraxe / Geomorphic
Last active November 6, 2019 18:19
Roll 20 API Random Dungeon Generator with Dynamic Lighting
var mapName = "GeomorphicMap";
var lineColor = "#00ff00";
var lineSize = 5;
var geomorphicMapId;
var geomorphicMapWidth;
var geomorphicMapHeight;
var geomorphicTilesArray = new Array();
var mapTilesArray = [];
var isError = false;
var errorType = "None.";