This is a FoundryVTT module for the **5e, SFRPG, SWADE, Old-School Essentials, Dungeon World, and Simple Worldbuilding (as of now) systems. It allow macros to be saved inside of an item and for various different ways to execute macros.
You can execute the macro from the "item" class using the executeMacro(...args) function, from the character sheet (if the settings are satisfied to do so), from the hotbar using the default rollItemMacro function for your system (if the settings are satisfied to do so), or from token-action-hud.
- Inside Foundry's Configuration and Setup screen, go to Add-on Modules
- Click "Install Module"
- Seach for the Module, install in the Module Manager.
- In the Manifest URL field paste:
https://github.com/Kekilla0/Item-Macro/releases/download/v1.5.3/module.json
Once activated, open an Item Sheet, click on the Item Macro button to open the Macro window.
Various different settings will change the way Item Macro interacts with the game server.
With no settings enabled, you can still execute the macro that is saved in the item, perfect for macros!
Added context menu support allowing GM users to mass update item-macros on like named items throughout the game! (the context menu is on items in the game directory, will update all item-macros in the item-directory, actor items, and token items)
- Item.hasMacro() => returns boolean on if the item has a macro command
- Item.getMacro() => returns Macro instance, if the item has a macro command
- Item.setMacro(Macro) => overwrites and saves given Macro to the Item
- Item.executeMacro(...args) => executes Macro command, giving
item
,speaker
,actor
,token
,character
, andevent
constants. This is recognized as the macro itself. Pass an event as the first argument.
- Item names on actor sheets have been converted to rollable links that will execute the macro attached to the item when the "Enable Character Sheet Hook" is enabled.
- Item names will now highlight on hover to indicate this added functionality.
- Dragging an item to the hotbar will create a macro utilizing an added system helper
game.worldbuilding.rollItemMacro(itemNameString)
. - Dropping formula-type item attributes will continue to create the default
new Roll
system macro.
For questions, feature requests, or bug reports, feel free to contact me on the Foundry Discord (honeybadger#2614) or open an issue here directly.
This Foundry VTT module, writen by Kekilla, is licensed under a MIT License.
This work is licensed under Foundry Virtual Tabletop EULA - Limited License Agreement for module development.