Register

Hook Macros

An Add-on Module for Foundry Virtual Tabletop

Author: ardittristan Project: Source Foundry Versions 0.5.5+ (Verified 13) Last Updated 1 week ago

VTT Hook Macros

Advanced Scripting Module

This module allows you to set macros to run when a particular Hook is sent by Foundry VTT.

Installation

To install, import this Manifest into your module browser.

How to use

 
  1. Open either Settings or Local settings in the module's configuration
    1. Settings will run for every user and can only be configured by a GM
    2. Local settings are saved as local settings, will only run for the respective user, and can be used by any user
  2. Enter data:
    1. Hook name (required): The name of the hook to run the macro for. You can run CONFIG.debug.hooks = true in the Developer Console of your browser to learn about which hooks get triggered by certain interactions
    2. Macro ID (required): The UUID of the macro to run. You can find a macro's UUID by opening the macro editor and clicking on the passport icon in the window's title bar. A message stating "Macro UUID ... copied to clipboard." should pop up.
    3. Macro args (optional): Specify any arguments the macro might consume. The pattern is key1=value1, key2=value2, .... Any surrounding spaces will be stripped, so key1 = value1 is the same as key1=value1.
  3. Press the + button and Save

You can then access the arguments in the macro using the arguments parameter:

Example: Configured argument list is name=John,number=12 and the hook has the arguments [{name: "Hero"}, {action: "create"}, "uABwxqaeHZHpuK6l"]

Things to watch out for

Don't create macros that run from the chat hook and create chat messages that take more than 1 seconds to output to chat.

Known non-functional hooks

Changelog

Check the Changelog


If you acidentally created a macro that locks you out of the game. You can fix it by holding the END key while logging into your world. This makes the module not run any macros.

Categories

Available Versions

  1. Version 3.0.0

    1 week ago
    Foundry Version 13+ (Verified 13) Manifest URL Read Notes
  2. Version 2.1.1

    3 years, 2 months ago
    Foundry Version 0.8.0+ (Verified 12) Manifest URL Read Notes
  3. Version 2.1.0

    Foundry Version 0.8.0+ (Verified 10) Manifest URL Read Notes
  4. Version 2.0.4

    Foundry Version 0.5.5+ (Verified 0.8.9) Manifest URL Read Notes
  5. Version 2.0.3

    Foundry Version 0.5.5+ (Verified 0.8.9) Manifest URL Read Notes
  6. Version 2.0.2

    Foundry Version 0.5.5+ (Verified 0.8.9) Manifest URL Read Notes
  7. Version 2.0.1

    Foundry Version 0.5.5+ (Verified 0.8.9) Manifest URL Read Notes
  8. Version 2.0.0

    Foundry Version 0.5.5+ (Verified 0.8.9) Manifest URL Read Notes
  9. Version 1.3.3

    Foundry Version 0.5.5+ (Verified 0.8.8) Manifest URL Read Notes
  10. Version 1.3.2

    Foundry Version 0.5.5+ (Verified 0.7.9) Manifest URL Read Notes
  11. Version 1.3.1

    Foundry Version 0.5.5+ (Verified 0.7.5) Manifest URL Read Notes
  12. Version 1.2.1

    Foundry Version 0.5.5+ (Verified 0.6.0) Manifest URL Read Notes
  13. Version 1.2.0

    Foundry Version 0.5.5+ (Verified 0.6.0) Manifest URL Read Notes
  14. Version 1.1.0

    Foundry Version 0.5.5+ (Verified 0.6.0) Manifest URL Read Notes