Skip to content

Instantly share code, notes, and snippets.

🐉
Coding, coding, coding...

Aaron C. Meadows shdwjk

🐉
Coding, coding, coding...
  • Indianapolis, IN
View GitHub Profile
@shdwjk
shdwjk / MonsterManager.js
Created May 11, 2020
Fixed Chris S. MonsterManager
View MonsterManager.js
// Monster Management Script
// Usage: !monster import // This will read the "Monster Import" handout, and import it in to roll20.
// See monster-import.txt for example formatting. The regular expressions that power this system should
// be capable of parsing most monster entries from the SRD, as well as the Monster Manual(s).
// Let me know if you find a monster that fails to parse properly!
// !monster generate (MonsterName) // Select 1 or more monsters, then run this command. All selected tokens
// will be linked to the applicable monster's sheet, and have their health bar (bar1) populated with a randomly
// rolled min/max hitpoint value, derived from the monster's HD. Bar2 will be filled with notes relevant to the monster
// (If using my TokeNotes script), and bar3 will be populated with the monster's AC.
// !monster clear-all // Removes all automatically generated monsters.
@shdwjk
shdwjk / summonWithIds.js
Created Mar 22, 2020
King's Summon with Last Created ID/IDs
View summonWithIds.js
/*
This is an improved Summoning API that was built upon.
Original author: Brandon W.
Original here: https://app.roll20.net/forum/post/466778/scipt-auto-create-a-token#post-466778
Special thanks to Brian for helping me with some of the script.
I hope this serves others well, do not hesistate to contact me regarding bugs or improvements.
-GM King
@shdwjk
shdwjk / gmnote.js
Last active Jan 20, 2019 — forked from keithcurtis1/gmnote.js
This pulls the GM notes from a token on Roll20 and whispers them to the chat
View gmnote.js
on('ready',()=>{
const blockElements = [
'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', 'pre', 'address',
'blockquote', 'dl', 'div', 'fieldset', 'form', 'hr', 'noscript', 'table','br'
];
const rStart=new RegExp(`<\\s*(?:${blockElements.join('|')})\\b[^>]*>`,'ig');
const rEnd=new RegExp(`<\\s*\\/\\s*(?:${blockElements.join('|')})\\b[^>]*>`,'ig');
const getLines = (str) =>
@shdwjk
shdwjk / TempHP.js
Created Jan 11, 2019
AssureTempHPMarkers
View TempHP.js
/* global TokenMod, ChatSetAttr */
on('ready', () => {
// Configuration parameters
const HPBarNum = 3;
const TempHPMarker = 'chained-heart';
const DeadMarker = 'dead';
const TempHPAttributeName = 'temp_hp';
/////////////////////////////////////////////
@shdwjk
shdwjk / auraHealth.js
Created Mar 31, 2018
DXWarlock's HealthColors Script -- with TokenMod Support
View auraHealth.js
/* global createObj TokenMod spawnFxWithDefinition getObj state playerIsGM sendChat _ findObjs log on*/
/*
My Profile link: https://app.roll20.net/users/262130/dxwarlock
GIT link: https://github.com/dxwarlock/Roll20/blob/master/Public/HeathColors
Roll20Link: https://app.roll20.net/forum/post/4630083/script-aura-slash-tint-healthcolor
*/
/*jshint bitwise: false*/
var HealthColors = HealthColors || (function () {
'use strict';
var version = '1.5.1',
View Kirsty Calendar, Aaron wind
/*
Calendar for Mundana
Created by Kirsty (https://app.roll20.net/users/1165285/kirsty)
and sabotaged to an extreme extent by dancodan, also cramed in some swedish here and there..
Many thanks to Aaron (https://app.roll20.net/users/104025/the-aaron) for his NoteLog script, parts of which I "borrowed"
API Commands:
!cal (as Player) - Shows world, date, time, moon, weather and counted days
!cal (as GM) - Same as player but includes options to advance the date/time, alter the weather, add a note or view the settings menu.
!calSet (GM only) - Allows the GM to change the world, date, time display, show/hide days until full moon, adjust day counter or set the start date
Red Colour: #7E2D40
View Perlin.js
// Ported from: https://github.com/josephg/noisejs
/*
Perlin.seed(134123);
let v1 = Perlin.perlin2(0.5,0.5);
*/
/*
* A speed-improved perlin and simplex noise algorithms for 2D.
*
* Based on example code by Stefan Gustavson (stegu@itn.liu.se).
@shdwjk
shdwjk / normalizePageScale
Last active Nov 3, 2017
Normalize Page Scale. !nps for the current page or !nps-all for all pages.
View normalizePageScale
on('ready',function(){
"use strict";
var scgm=(msg)=>{
sendChat('NPS',`/w gm <div style=" margin-left: -40px; border: 1px solid #ccc; border-radius: .5em; padding: .1em .5em; background-color: #eee; font-size: 10px; font-weight: bold; "> ${msg} </div> `);
},
scaleGraphic = function(scale){
return function(graphic){
graphic.set({
left: graphic.get('left')*scale,
top: graphic.get('top')*scale,
@shdwjk
shdwjk / Hidden.js
Created Sep 20, 2016
Manveti's HiddenRolls script with a -q or --quiet option to suppress output to the player
View Hidden.js
var HiddenRolls = HiddenRolls || {
COMMANDS: ["!hideroll", "!hiderolls", "!hidetotal", "!hidetotals", "!hideall", "!help"],
write: function(s, who, style, from){
if (who){
who = "/w " + who.split(" ", 1)[0] + " ";
}
sendChat(from, who + s.replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br>"));
},
@shdwjk
shdwjk / NormalizePageSize.js
Created Aug 27, 2016
NormalizePageSize -- !nps by gm to adjust scale of all tactical maps to 5ft.
View NormalizePageSize.js
on('ready',function(){
"use strict";
var scgm=(msg)=>{
sendChat('NPS',`/w gm <div style=" margin-left: -40px; border: 1px solid #ccc; border-radius: .5em; padding: .1em .5em; background-color: #eee; font-size: 10px; font-weight: bold; "> ${msg} </div> `);
},
scaleGraphic = function(scale){
return function(graphic){
graphic.set({
left: graphic.get('left')*scale,
top: graphic.get('top')*scale,
You can’t perform that action at this time.