This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I addded : | |
// - Faerie Fire option | |
// - Light color option | |
// - Radiant consumption option (Aasimar) | |
let applyChanges = false; | |
new Dialog({ | |
title: `Token Vision Configuration`, | |
content: ` | |
<form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//A macro for the Foundry virtual tabletop that lets a user configure their token's vision and lighting setting. Has a dependency on About Time by Tim Posney. | |
if (canvas.tokens.controlled.length === 0) | |
ui.notifications.error("Please select a token"); | |
if (game.modules.get("about-time").active != true) | |
ui.notifications.error("About Time isn't loaded"); | |
let namedfields = (...fields) => { | |
return (...arr) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (const tkn of canvas.tokens.controlled) { | |
const removeList = tkn.actor.temporaryEffects.map(e => e.id); | |
await tkn.actor.deleteEmbeddedDocuments("ActiveEffect", removeList) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Organization Essentials** | |
*Compendium Folders* - better organization for compendiums which get messy quick | |
*D&D Beyond Importer* - does what it says, I use it to sync character sheets | |
*Drag Upload* - allows you to drag items into foundry for Upload, the organization is a little messy, but it's useful to have in a pinch. | |
*Forien's Copy Environment* - let's you import/export all your mods configurations so you can move between games (I'll send you mine) | |
*Search Anywhere* - Search Spolight functionality in Foundry basically | |
*Select tool everywhere* - also a select tool option on every layer, don't use it often, but deeply useful when I need it | |
*The Furnace* - bunch of advanced funationality, best to read the docs, but tones of tiny useful things. | |
*TidyUI - Game Settings* - Game settings are kind of a mess, this helps a ton |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
TokenRoller | |
a Roll20 API Script by Tsolval | |
Change, increment or decrement sides on selected rollable tokens. | |
Command - Action | |
!rt+ - Switch to the next side (increment) | |
!rt- - Switch to the previous side (decrement) | |
!rt* - Switch to a random side (randomize) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXPAND ALL SPELLS | |
!setattr --sel --mute --repeating_spell-cantrip_$0_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$1_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$2_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$3_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$4_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$5_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$6_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$7_details-flag|'' | |
!setattr --sel --mute --repeating_spell-cantrip_$8_details-flag|'' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tokenAction = tokenAction || (function() { | |
'use strict'; | |
var version = '0.2.5', | |
sheetVersion = '5th Edition OGL by Roll20 2.0', | |
checkInstall = function() { | |
log('TokenAction v'+version+' is ready! Designed for use with the '+sheetVersion+' character sheet!'); | |
}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BARE MACRO | |
[Snuff](!token-mod --set light_otherplayers|off light_radius|0 light_dimradius|0 light_angle|360) | [Sight](!token-mod --on showname light_hassight light_angle|360) | [Blind](!token-mod --off showname light_hassight light_angle|360) | [Spot](!token-mod --set light_otherplayers|on light_radius|5 light_dimradius|0 light_hassight|on light_angle|360) | [GM](!token-mod --set light_otherplayers|off light_hassight|off light_radius|5 light_dimradius|5 light_angle|360) | |
[Moonlight](!token-mod --set light_otherplayers|on light_radius|15 light_dimradius|=-15 light_angle|360) | [Starlight](!token-mod --set light_otherplayers|on light_radius|7 light_dimradius|=-15 light_angle|360) | [Touch](!token-mod --set light_otherplayers|on light_radius|4 light_dimradius|=-5 light_angle|360) | |
[Candle](!token-mod --set light_otherplayers|on light_radius|5 light_dimradius|0 light_angle|360) | [Lamp](!token-mod --set light_otherplayers|on light_radius|30 light_dimradius|15 light_angle|360) | [Torch](!token-mod --set light_other |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This version was deprecated, but I am leaving the gist to direct people to the new copy, which is here: | |
https://github.com/keithcurtis1/token-actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on('ready',()=>{ | |
const playerCanControl = (obj, playerid='any') => { | |
const playerInControlledByList = (list, playerid) => list.includes('all') || list.includes(playerid) || ('any'===playerid && list.length); | |
let players = obj.get('controlledby') | |
.split(/,/) | |
.filter(s=>s.length); | |
if(playerInControlledByList(players,playerid)){ | |
return true; |