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
| // FoundryVTT Macro: Set Discord Usernames for Users | |
| // This macro allows the GM to map Foundry usernames to Discord usernames | |
| (async () => { | |
| // Check if user is GM | |
| if (!game.user.isGM) { | |
| ui.notifications.warn("Only the GM can set Discord usernames"); | |
| return; | |
| } |
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
| // FoundryVTT Macro: Export Selected Tokens to TSV | |
| // This macro exports selected token data to a tab-separated value format | |
| (async () => { | |
| // Check if any tokens are selected | |
| let selectedTokens = canvas.tokens.controlled; | |
| if (selectedTokens.length === 0) { | |
| ui.notifications.warn("Please select at least one token"); | |
| return; | |
| } |
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
| // FoundryVTT Macro: Export Current Scene to Map File | |
| // This macro exports the current scene data to a map file format | |
| (async () => { | |
| // Get the current scene (not necessarily the active one) | |
| const scene = canvas.scene; | |
| if (!scene) { | |
| ui.notifications.warn("No scene is currently loaded"); | |
| return; | |
| } |
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 FoundryVTT macro will calculate the challenge points for | |
| // a pathfinder society game. | |
| // It pops up a dialog asking how many players (2-6), and | |
| // the lowest allowed level for the adventure. | |
| // Based on those answers, it will ask for the level for each | |
| // character. | |
| // it will then output a chat card with the number of pre-generated | |
| // NPCs needed, the level for the pre-gens and how many | |
| // Challenge points. |