Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

How to Mass Create Multiple Macros?

How can one create a large (arbitrary) number of macros easily?

"Easily" as in without creating each macro individually by clicking "Add Macro" button, clicking inside the "Name" input box, typing the title, clicking inside the "Actions" input box, typing the macro actions, and then clicking "Save Changes."

Context: In my current game, character sheets are managed by the individual players in document files (or Google Doc) and not in Roll20. I've opted to create a small program in Python to take care of my character sheet and auto-generate any macros necessary and output them to a text file, so I end up having a large text file filled with macros (composed of one line for "Name" and the rest for "Actions") and I go through the file manually to copy and paste each value into the appropriate field on Roll20. Due to the custom system we're playing in, this process gets very tedious very quickly as there is a large number of macros to copy and paste.

I wish there was an "Add Many Macros" button that was composed of one text box in which I can copy-paste my huge list of macros and have it automatically parsed (and it would be fine if the parser demanded that the copy-paste block be of a certain format, since I could encode that format in my program).

But failing the existence of something that fulfills that wish, what alternatives do I have?
When you say "macros," do you actually mean Macros (found in the Collections tab of the Sidebar) or Abilities (found in the Attributes and Abilities tab of a Character)? If the latter, you can create a character that contains all the abilities you've written—you'll have to enter them all by hand once—then you can duplicate that character to make a new character containing all the abilities. Delete any abilities that character doesn't need.

If you actually mean macros, or you don't want to enter them all by hand even once, then as far as I know the only way to mass-create them would be to upgrade to a Pro subscription and write a script using the API that does it for you.
May 02 (8 years ago)
Why not create one Macro per PC/monster each of which creates a dropdown list of actions to choose from? Your python code would account for the character -based variables so only the final roll would need to be in the macro.  Could as easily be a menu in chat as a dropdown list of actions I would have thought.

Would limit copy/paste to once per PC per change in levels, etc.  Once per new monster.
May 02 (8 years ago)
The Aaron
Pro
API Scripter
Could also have a single macro that whispers a menu of API Command Buttons (doesn't require API).

Also, I have an API script that imports macros, if you decide to go the Pro route.

The Aaron said:

Could also have a single macro that whispers a menu of API Command Buttons (doesn't require API).

Also, I have an API script that imports macros, if you decide to go the Pro route.

Ok so I am running a game and I want all my player characters to have access to a macro that puts some command buttons in chat. This is what I have so far and it is under the collection area and shown to all players.

&{template:default}{{name=Player Utility Macros}}{{Utility=[W2GM](!#W2GM)[W2P](!#Whisper2Player)[Talk2Myself](!#Talktomyself)[MapChange](!#MapChange)[Calculator](!#Calculator)}}
&{template:default} {{name=RPMenu}} {{Actions=[Speak](!#Speak)[Act](!#Act)[Emote](!#Emote)}}


Do those actions like Speak Act and Emote also have to be collection macros or do they need to be individual abilities under each character sheet?

This is the speak macro under collections.

!power --name|@{selected|token_name} --Says:|**"?{Text}"...**

So when I push the button that summons the chat buttons and click on the Speak chat button it should say whatever the selected token name followed by the text, correct?  Yet nothing happens and I can't figure out why.

May 05 (8 years ago)

Sylverlokk said:

So when I push the button that summons the chat buttons and click on the Speak chat button it should say whatever the selected token name followed by the text, correct?  Yet nothing happens and I can't figure out why.
[Speak](!#Speak)

Reopening a Collections Macro reverts HTML entities; if that Macro is then saved, those reversions are as well. Make sure the HTML entity 
 within [Speak](!
#Speak) is not getting reverted.
May 12 (8 years ago)

Edited May 12 (8 years ago)

The Aaron said:

Could also have a single macro that whispers a menu of API Command Buttons (doesn't require API).

Would you mind elaborating on this? What is an example of such a macro and its output?

Thank you to everyone who has responded ^^