Advanced Macros

Latest versionv1.14.3
Minimum Core9
Compatible Core9
Last updated1 week ago
Created1 year ago
Languages English
Français (French)
中文 (Chinese)
Systems All systems
Project source Project URL

With Advanced Macros, a "Run Macro" button will appear in macro configuration windows to allow you to quickly test your macro and see its results. Do note that if you use an asynchronous macro which never resolves, you may end up with a macro in an invalid state if you end up cancelling the changes.


Check out the Macros compendium for some useful macros that showcase the advanced macros system as well as provide additional features.


In the case of chat macros, you can now use handlebars templating to render your chat text using common helpers, or use it along with the macro helper to call other macros, like for example {{macro "name of my macro" actor 3 "a text argument"}}


In the case of script macros, you can now use a return statement for the early return paradigm, but also to retun a string which can then be used in chat macros. You will also be able to receive arguments via an array named args, and you can use the await keyword to make your script asynchronous. Do note however that if you create an async macro, it cannot be used to return text in a chat macro when using the {{macro}} helper. It will still be executed if used, but will be considered to have returned an empty string. If you want to use an async macro that prints its results to chat, read further for the use of recursive async chat commands.


Besides those two enhancements to macros, you can now also create a temporary chat macro with handlebars templating directly from the chat entry, by entering text in the chat that includes the handlebars mustache characters {{ }}. You will also be able to call your macro directly from chat with the / prefix. As an example, you can send in the chat /my-macro-name argument1 argument2 argument3. If your macro name has spaces in it, you can call it with /"My macro name" "argument one" 100 for example. You can also call multiple macros by writing them one per line.


In addition, you can now recursively call macros, so you could call a script or chat macro which returns a /macro-name text for it to call the macros recursively.


Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x