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 / 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) => {
**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;
!chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=Put non-spell invocations in here}}{{description=CHATMENU}} --separator: | --title:Cantrips — *Save DC @{selected|spell_save_dc}* --repeating_spell-cantrip|spellname|spell|spellsource=Mystic --title:Lvl-1 *(@{selected|class_resource}/@{selected|class_resource|max})* --repeating_spell-1|spellname|spell|spellsource=slot --title:Lvl 2 --repeating_spell-2|spellname|spell|spellsource=slot --title:Lvl 3 --repeating_spell-3|spellname|spell|spellsource=slot --title:Lvl 4 --repeating_spell-4|spellname|spell|spellsource=slot --title:Lvl 5 --repeating_spell-5|spellname|spell|spellsource=slot --title:Invocation-1 --repeating_spell-1|spellname|spell|spellsource=invocation --title:Invocation-2 --repeating_spell-2|spellname|spell|spellsource=invocation --title:Invocation-3 --repeating_spell-3|spellname|spell|spellsource=invocation --title:Invocation-4 --repeating_spell-4|spellname|spell|spellsource=invocation --title:Invoca
@palikhov
palikhov / reporter.js
Created January 4, 2022 06:57 — forked from keithcurtis1/reporter.js
Reporter
// Reporter
// Last Updated: 2021-03-26
// A script to report token and character calls in a list.
// Syntax is !report --[t|token_attribute] [c|character_attribute]... ---macro code for each character
on('ready', () => {
const version = '1.0.1'; //verion number set here
log('-=> Reporter v' + version + ' <=-'); //Logs version number to console
sendChat('Reporter', '/w gm Ready');