Latest version | 11.0.1 |
---|---|
Minimum Core | 10 |
Compatible Core | |
Last updated | 6 months ago |
Created | 1 year ago |
Authors |
|
Languages |
English |
Systems |
Dnd5e |
Project source | Project URL |
You can use this module to trigger macros on certain events related to Measured Templates. The events include:
You can create macros in two ways:
Any template macro has four declared helper variables: template
(the MeasuredTemplateDocument itself), scene
(the parent of the template), token
(the token moving, if relevant), and this
, which contains a lot of other useful data, most notably any parameters passed through associated hooks.
The module contains some functions found in game.modules.get("templatemacro").api
.
findContainers(tokenDoc)
returns the MeasuredTemplateDocument ids that contain a TokenDocument.findContained(templateDoc)
returns the TokenDocument ids that are contained within a MeasuredTemplateDocument.findGrids(A, B, templateDoc)
returns the grid cells between the two coordinates that are within a MeasuredTemplateDocument.Additionally, the MeasuredTemplateDocument
now has the function callMacro(type="never", options={})
, which executes the appropriate embedded script, if it exists. The types are: "whenCreated", "whenDeleted", "whenMoved", "whenHidden", "whenRevealed", "whenEntered", "whenLeft", "whenThrough", "whenStaying", "whenTurnStart", "whenTurnEnd", "never", the last being a placeholder script meant for manual execution only.
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: templatemacro or copy its manifest URL:
And paste it to the input box at the bottom of your window.
You can install this package directly to your Forge account.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.