Skip to content

Instantly share code, notes, and snippets.

View thejoester's full-sized avatar
🎲
Gaming

Joseph Thomas thejoester

🎲
Gaming
View GitHub Profile
@thejoester
thejoester / pf2e-award-xp.js
Last active September 28, 2025 05:22
FoundryVTT: PF2e - Award XP
/* ***************************************************************************
Macro Title: PF2e v13 — Award Encounter XP from Selected Tokens (RAW + Journal)
Author: TheJoester (https://github.com/thejoester)
Last updated: 27-Sep-2025
License: MIT License
Description:
- Select your PARTY (PC tokens) and the ENEMIES (NPC/Hazard tokens).
- Party Level = average of selected PCs (round .5 up).
- Ignores minions/familiars/companions (minion trait or type=familiar).
@thejoester
thejoester / set-scene.js
Last active August 29, 2025 07:34
FoundryVTT - Configure Scene for TotM
/*
***************************************************************************
Macro Title: Configure Scene for TotM
Author: TheJoester (https://github.com/thejoester)
Last updated: 23-Aug-2025
License: MIT License
Description:
Macro will display list of scenes in world, select which scenes you want
to adjust settings for, then which settings you want changed to the
@thejoester
thejoester / token-to-item-pile.js
Last active September 9, 2025 05:07
FoundryVTT + pf2e macro - Make Item Pile from Selected Tokens
/*
***************************************************************************
Macro Title: Make Loot Pile (PF2e, no Item Piles)
Author: TheJoester (https://github.com/thejoester)
Last updated: 08-Sep-2025
License: MIT License
Description:
Select multiple non-character tokens and run the macro;
- moves inventories (and coins) into a single Loot actor/token
@thejoester
thejoester / sort-roll-table.js
Last active August 6, 2025 09:30
FoundryVTT - Show cleaned up and sorted Roll Table list
const LINK_REMOVER = /@\w+\[([^\]]+)\]\{([^}]+)\}/g;
// Sort entries alphabetically ignoring numbers by name (or text), then description
function compareLabels(a, b) {
const clean = str => (str || "")
.replaceAll(LINK_REMOVER, "$2") // Strip Foundry links
.replace(/^\d+\s*/, "") // Remove leading numbers + optional space
.trim()
.toLowerCase(); // Optional: ignore case
@thejoester
thejoester / list-modules.js
Last active August 24, 2025 05:06
FoundryVTT macro - list enabled modules in a world
/*
***************************************************************************
Macro Title: List enabled modules in a world (with versions + links)
Author: TheJoester (https://github.com/thejoester)
Last updated: 23-Aug-2025
License: MIT License
Description:
Displays dialog with list of enabled and disabled modules, showing
title, version, ID, and website link if available.
@thejoester
thejoester / group-recall-knowledge.js
Last active August 6, 2025 10:57
Group Recall Knowledge Macro for FoundryVTT PF2e
/*
***************************************************************************
Macro Title: Group Recall Knowledge (Party-Based)
Author: TheJoester (https://github.com/thejoester)
Last updated: 1-Aug-2025
License: MIT License
Description:
GM macro for FoundryVTT PF2e that rolls Recall Knowledge across all
party members. One d20 roll is used per actor, and skill-specific
@thejoester
thejoester / group-roll.js
Last active July 31, 2025 05:46
Group Roll Macro for Foundry VTT PF2e
/*
***************************************************************************
Macro Title: Group Roll Macro for Foundry VTT PF2e
Author: TheJoester (https://github.com/thejoester)
Last updated 30-July-2025
License: MIT License
Description:
Allows the GM to select one check (save, skill, or perception)
and rolls it blindly for all selected tokens (PC or NPC).
@thejoester
thejoester / csv-to-rolltable.js
Last active July 31, 2025 06:06
FoundryVTT: Import .csv into roll table for v12 or v13
/*
******************************************************************
Macro Title: CSV-to-RollTable CSV Importer for Foundry VTT
Author: TheJoester (https://github.com/thejoester)
Last updated 30-July-2025
License: MIT License
Description:
Promts to select a .csv file, choose a result column, and
auto-generate a RollTable from its contents.
@thejoester
thejoester / AwardHeroPoints.js
Last active October 4, 2025 08:50
PF2e Hero Point macro
/* ***************************************************************************
Macro Title: Award Hero Points
Author: TheJoester (https://github.com/thejoester)
Last updated 04-OCT-2025
License: MIT License
Foundry Version: v12+ / v13
System: PF2e
Description:
Award all actors in party hero points.
@thejoester
thejoester / FoundryVTT Macro: display world data
Last active July 2, 2025 10:10
FoundryVTT Macro: display world data
/*
====================================================================================
World Data Usage Snapshot Macro (Manual Tabs Version)
------------------------------------------------------------------------------------
This macro scans all world-level documents in Foundry VTT (v12.x), including:
- Actors
- Items
- Scenes
- Journals