Latest version | 1.0.1 |
---|---|
Minimum Core | |
Compatible Core | |
Last updated | 2 years ago |
Created | 2 years ago |
Authors |
|
Languages |
English |
Systems | All systems |
Project source | Project URL |
Report bugs | Bug tracker URL |
Read-me | Readme URL |
Changelog | Changelog URL |
This module will offer the ability to add arguments to chat and inline macros. The arguments will be passed to the macro in the form of an array of string or number in a parameter named args.
Note: Macros called with this module are still subject to user permissions.
You can add arguments simply by separating them with a space while using the macro chat command.
Macros can be called using a number representing the slot in the hotbar, using the macro id or using the macro name. If the macro name or any argument contains spaces, you need to enclose them with double-quotes.
/macro "Macro Name" arg1 arg2 "arg 3"
In the macro, you can access those arguments by using args[0], args[1] and args[2].
You can create an inline macro with arguments in any place that use TextEditor.enrichHTML (could also be used in the chat directly). A different icon will be used to highlight inline macros that contain arguments. Inline macros are fully draggable and will carry over their arguments.
Note: Inline macros cannot use a slot number, only macro id or name.
@Macro[Macro Name](arg1 arg2 "arg 3")
Just like a regular inline macro link, you can also set a label for it.
@Macro[Macro Name]("Hello World!!" 42){Macro Label}
Note: This module only recognize the @Macro[] format and not the @UUID[]
A new executeMacro function has been added to be used with extra arguments, this is useful if you want to call a macro with arguments from within another macro.
/**
* @param {number | string} id can be a hotbar slot, a macro id or a macro name
* @param {Array<string | number>} args passed to the macro
* @returns {Promise<unknow>} macros are async and can return anything
*/
game.macros.executeMacro(id, args)
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: mc-ro 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.