Skip to content

shemetz/shemetz-macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shemetz Macros - a custom FoundryVTT module for my play group

This module includes a lot of random stuff. I constantly add (and sometimes edit or remove) stuff here, so don't expect it to be stable, not that you should, because it's made for my own use. You can probably find some good source code for some things here, though! And if you ask me I could export some of the things here into their own modules.

New keybindings

Press H to toggle hidden on all selected tokens/tiles/drawings

New UI controls

close wall gaps screenshot

A button in the Walls controls allows you to automatically find and fix all "wall gaps" - places where two walls have their endpoints almost at the same place, off by a small number of pixels. This will show you a preview and a count of how many gaps are about to be closed.

end turn button screenshot

An extra button to end your turn, shown on the bottom of the chat tab during combat.

Startup macro

You can set a "startup macro" in the module settings with an ID of any non-compendium macro. That macro will be run each time you load the game (on the 'ready' hook).

This is useful in case you want to make some minor config macro. for example, here's a Foundry V10 macro that changes ping animations to be slower, which you can use as a startup macro to permanently change the look of pings:

// increases duration of local ping animations to be less flashing
// (default durations for three of these are 900 ms)
CONFIG.Canvas.pings.styles.pulse.duration = 2000
CONFIG.Canvas.pings.styles.alert.duration = 2000
CONFIG.Canvas.pings.styles.arrow.duration = 2000
console.log('Startup macro | increased ping animation durations')

Everything Else

  • A lot of code, used by my macros and other macros in my group's campaigns
  • A lot of macros in the compendium which already use much of this code
  • A critical hits tables compendium, used by the Critical Hit Tables macro (for D&D 5e)

Previously many of these macros were meant to be called from other macros, via the Furnace or Advanced Macros modules. However, this is now mostly unnecessary, as the important code is moved into the module itself. Many of the functions can be directly called by typing ShemetzMacros.nameOfFunction().

Detailed List of Macros

Token Configuration

Changes a selected token's image to the next one in a custom sequence. Hold Ctrl to set up the sequence. Also works for tiles. Also allows changing token size.

Will open two dialogs, for the user to set light and vision for the selected token.

For all selected tokens, names will be shown/hidden and bars will be shown/hidden, depending on user choice. Helpful for GMs who want to show health bars only during combat, or quickly reveal many NPC names.

Flips the selected token image along the X axis.

Swap two selected tokens' positions.

Creates a condition (aka overlay, status effect) on the selected token, with the image of the targeted token (or another token in the scene).

Clear all conditions from all selected tokens. Will also clear PF2e conditions,

Show artwork of selected/hovered token to yourself, like a journal entry (GM can also show to all players).

Post a chat message with the artwork of the selected token for all players to see.

Causes all selected tokens to rotate towards the cursor. Unnecessary if you have Alternative Rotation

Select one or more tokens to be the turners. Target one token to be the target. Whenever the turner or the target move, the turner will rotate to face the target.

(does not persist if you reload)

Helpful for GM prep

Posts a private chat message with the ID of the currently selected token or tile.

Boosts the brightness of the scene to make it less dark, but only for the GM's eyes, and only temporarily.

Helpful for GMing mid-session

For all transparent tokens on the map, lights and visible names will be shown/hidden.

Sets darkness level to a specific number, with a checkbox to choose whether or not it's animated.

Toggles a combat encounter. When there is no combat, it will do the following things, most of which configurable through parameters:

  • Create a new combat
  • Add all selected NPCs to the combat, except those with 0 HP and those controlled by a player
  • Add all PCs to the combat (even those not selected)
  • Change the HP visibility settings of all PC tokens in combat to "Always Visible"
  • Roll initiative for all NPCs
  • Hide enemies from combat display, so that players can't see them or their rolls

You can change some of these individual settings by importing the macro and editing the function to e.g.:

ShemetzMacros.toggleCombatMode({
  ROLL_PC_INITIATIVE_IMMEDIATELY: true
})

Macros

Filters macro directory to only show macros from a certain author (edit this macro with author name). Activate this with macro directory open.

Assigns a macro of your choice to the macro bar of other player(s).

Chat Messages

/i

Allows using /i to type italics text.

/b

Allows using /b to type bold text.

Character

This will spend your highest remaining hit die, rolling it and showing the result in the chat (not adding Constitution).

Audio

Plays one of the sounds predefined in this macro, or defined in any macro created by you and named "EXTRA_SOUND_COLLECTION".

TriggerHappy automation logic units

With TriggerHappy automation - when a player moves a token "into" a treasure chest: the chest will be opened, a sound will be heard, its art will change to show it open, and the item description will be shown in chat.

With TriggerHappy automation - when a player clicks a lever: the lever will be change its artwork, a sound will be heard, several walls will open/close and tiles will hide/unhide or change their image.

Opens/closes doors (walls).

Toggle hide/unhide for a token or tile.

Prints the name, image, and description of an item in the Items Directory to the chat.

Various other helper functions

Will open a dialog for the user to select an option, and call a callback when it's complete.

...and several more!

Wacky stuff

Rolls a crit from one of the homebrew expanded critical tables (or the fumble table). Also works if you type in chat /crit fire, /crit cold, /crit major, /crit fail, /crit psy, etc.

A macro created for my character, Shent, who casts random spells as a modified UA invention/chaos wizard.

Removed (but used to be here)

Eyedropper / color picker

Moved to my other module, Precise Drawing Tools.

Animefy Next Attack

(stopped working in v11 or v12, was only used for a character I played in one campaign)

Pushable blocks

(I removed this because it required a bit too much effort to maintain and I only used it once for one puzzle)

About

Macrofull module for Foundry VTT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published