Skip to content

Instantly share code, notes, and snippets.

View palikhov's full-sized avatar
🐉
E5E / SRD 5.1 rus / Excel GM Tools

Anton Palikhov palikhov

🐉
E5E / SRD 5.1 rus / Excel GM Tools
View GitHub Profile
@palikhov
palikhov / tokenVision.js
Last active January 30, 2022 17:39 — forked from tonifisler/tokenVision.js
Foundry VTT macros TOKEN VISION
// I addded :
// - Faerie Fire option
// - Light color option
// - Radiant consumption option (Aasimar)
let applyChanges = false;
new Dialog({
title: `Token Vision Configuration`,
content: `
<form>
@palikhov
palikhov / foundryvtt-token-vision.js
Last active January 30, 2022 17:40 — forked from p4535992/foundryvtt-token-vision.js
Foundry VTT Player Token Vision Macro
//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) => {
@palikhov
palikhov / Foundry - Macros delete temporary effects.js
Created January 29, 2022 12:47
Foundry - Macros delete temporary effects
for (const tkn of canvas.tokens.controlled) {
const removeList = tkn.actor.temporaryEffects.map(e => e.id);
await tkn.actor.deleteEmbeddedDocuments("ActiveEffect", removeList)
}
**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
@palikhov
palikhov / TokenRoller
Created January 4, 2022 06:58 — forked from Tsolval/TokenRoller
Roll20.net Script to change images on a multi-sided token
/*
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)
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|''
@palikhov
palikhov / Token Actions
Created January 4, 2022 06:58 — forked from keithcurtis1/Token Actions
Creates token action buttons for every action on a D&D5e for Roll20 NPC Sheet, or does the same for every attack on a PC sheet. I did not write this (Kevin did), but modified it to reduce less-used buttons. Command is !ta Original source is https://app.roll20.net/forum/post/5608775/script-update-tokenaction-creator-for-5e-ogl-sheet-version-2-dot…
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!');
},
@palikhov
palikhov / Lighting Macro
Created January 4, 2022 06:58 — forked from keithcurtis1/Lighting Macro
This requires the Token-Mod API script to be installed. This creates buttons for controlling common lighting and vision settings, and is intended to be inserted into a roll template for use as a chat menu..
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 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
@palikhov
palikhov / Mass Sight
Created January 4, 2022 06:58 — forked from keithcurtis1/Mass Sight
This Roll20 script sets the has sight setting for mass tokens. Use with caution. Command is: !set-has-sight --[true|false] --[npc|pc|all]
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;