This FoundryVTT module allows macros to be saved inside of an item and for various different ways to execute them.
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.
List of supported systems
Please note that if your system is not on this list, you can still save and run macros on the item and you can use all API functions to access and execute those macros programatically!
- DND 5e (for 2.4 support, install Item Macro v1.10.5),
- SFRPG,
- SWADE,
- Old-School Essentials,
- Dungeon World,
- Simple Worldbuilding
- WFRP 4e
Usage
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)
Added Item Functionality
Item.hasMacro()
=> returns boolean on if the item has a macro commandItem.getMacro()
=> returns Macro instance, if the item has a macro commandItem.setMacro(Macro)
=> overwrites and saves given Macro to the ItemItem.executeMacro(...args)
=> executes Macro command, givingitem
,speaker
,actor
,token
,character
, andevent
constants. This is recognized as the macro itself. Pass an event as the first argument.
Contact
For questions, feature requests, or bug reports, feel free to contact me on the Foundry Discord (forien
) or open an issue here directly.
You are also welcome to join my Discord where you can talk about this and other Foundry modules.
Support
If you wish to support module's development, please consider becoming my Patreon or donating through Paypal or Ko-Fi. Thanks!
Acknowledgements
- Big shoutout to Kekilla, the original author, for making this module!
- Thanks to Honeybadger for contributions and keeping module functional