Latest version | 0.2.10 |
---|---|
Minimum Core | 10.200 |
Compatible Core | 10.291 |
File size | 0 B |
Last updated | 2 years ago |
Created | 4 years ago |
Authors | |
Languages |
|
Systems | All systems |
Project source | Project URL |
Read-me | Readme URL |
Allows users to define custom Dynamic Entity Links that call macros. This module makes it possible to convert a single-use macro (e.g. activating a specific scene) into a reusable macro (e.g. activating any scene, given an id), that is still easily referenced using the Dynamic Entity Link system: @MyResuableMacro[id]
.
@ActivateScene[sceneId]
@PlayPlaylist[playlistId]
@PlayOnlyPlaylist[playlistId]
A single use macro that activates a scene might look like this:
// Normal Macro with id 'macroId'
const scene = game.scenes.get('sceneId');
if(scene !== null) {
scene.activate();
}
And get used in a journal entry like this:
// Normal Usage
@Macro['macroId']{Activate Scene with id "sceneId"}
With a small change, this macro becomes callable with Dynamic Macro Links.
// Dynamic Macro Link
const [id] = args; //args is a special environment variable available to macros called by DML
const scene = game.scenes.get(id);
if(scene !== null) {
scene.activate();
}
After we add the above macro to the Dynamic Macro Link settings, we can use it for multiple scenes:
// Dynamic Macro Links with name "ActivateScene"
@ActivateScene['sceneId']{Activate Scene with id "sceneId"}
@ActivateScene['anotherSceneId']{Activate Scene with id "anotherSceneId"}
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: dynamic-macro-links 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.