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

Import Macros into Collections (not Abilities!)?

I have been searching around for a way to do this and I have found lots of ways to import data into the Journal and even into Rollable Tables, but I can't seem to find any script that will allow me to import a bunch of macros all at once. Again, just to be clear, I want to import these into the Macro section of the Collections tab in the Sidebar. The closest thing I can find is The Aaron's TableExport script which will automatically create a new Rollable Table based on the output from another campaign that had that Rollable Table. If only this could be modified so that it worked with the Macro section of Collections instead of the Rollable Tables section... [Hey The Aaron, Hint! Hint!] If I am missing an existing way to do this then please let me know. Thanks! -John
1492780245
The Aaron
Pro
API Scripter
You mean like this? <a href="https://app.roll20.net/forum/permalink/4607824/" rel="nofollow">https://app.roll20.net/forum/permalink/4607824/</a> =D
Well, I was thinking that I would start with output from a spreadsheet that would give me the data that I want to import. However, if I run this on a test campaign and export a macro that is similar to what I want to import then I am guessing it will give me a "template" that I can use for the syntax of the output from the spreadsheet. If I then output a bunch of macros into a file in the same format will I be able to import those all in one shot using the "unpack-macros" command? BTW, what I am trying to do is import a bunch of D&D 2nd Edition spells as macros. They are going to be formatted similar to this: <a href="https://wiki.roll20.net/AD%26D_2Espell_Macros" rel="nofollow">https://wiki.roll20.net/AD%26D_2Espell_Macros</a> Do you see any parsing problems based on how those macros have been formatted? As usual, THANK YOU FOR ALL OF YOUR HELP!!! -John
1492801397
The Aaron
Pro
API Scripter
This script base64 encodes a json object with all the details of a player's macros in it. &nbsp;The JSON object is an array of macro creation objects, so if you look at:&nbsp; <a href="https://wiki.roll20.net/API:Objects#Macro" rel="nofollow">https://wiki.roll20.net/API:Objects#Macro</a> and build your format from that, then base64 encode it and put it in a handout named "Macros: &lt;display name&gt;", it will be able to import it. &nbsp;The big caveats being: 1) you need to have the display name and 2) you need to have the playerid of the player for whom to load the macros. If you run it in a test campaign and base64 decode the text of the handout it creates, it should be pretty easy to edit into what you want.
Cool. I'll try it out this weekend and let you (and everyone else) know how it goes.
Aaron could this be used to transfer macros easily between characters in the same campaign with different names?&nbsp;
1493068194
The Aaron
Pro
API Scripter
No, this is for transferring Macros, which are attached to Players. &nbsp; However, if you want to transfer Abilities from Characters, check out CharUtils:&nbsp;<a href="https://app.roll20.net/forum/post/1067109/script-charutils-a-collection-of-utilities-for-manipulating-character-data" rel="nofollow">https://app.roll20.net/forum/post/1067109/script-charutils-a-collection-of-utilities-for-manipulating-character-data</a>
1493068878
The Aaron
Pro
API Scripter
This thread has more:&nbsp; <a href="https://app.roll20.net/forum/post/1953496/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/1953496/slug%7D</a>
Thanks