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

Spell Selection Macro

Greetings friends of roll20. First of all, I apologize if this post was already open, I am relatively new to this page (a couple of years) and my level of English is questionable. I can't find a "simple" way to do what I want. I've spent hours with it and I can't get it. Since currently in Roll 20 you can't create a custom compendium, I've made a character sheet to store my homebrew spells. I'd like to create a macro so my players can access homebrew spells in a similar way to the healing potion macros out there. So that clicking on the macro allows them to choose which list of spells they want to access, according to the level, and then the macro rolls the spell from the character sheet where it are stored. I give you an example through a montage of images. The problem is that I can't get past here: I can't get the spell macro to appear when selecting Dragon Claws, or both appear at the same time or the last line written appears. Also, I get the name of the spell as if I had written it in the chat. I hope you can help me, thank you very much.

Edited 1674556548
Forum Champion
If I am understanding correctly, you are nesting a calling one macro via a query in another macro. That won't work well without HTML entities, and even then it is a royal pain. The reason is when you put macro2 inside macro1 then the contents of macro2 are unpacked into macro1 when macro1 is ran. As a result, it breaks it.  I suggest using chat menus instead.  Have the player call the chat menu, it whispers the list of Dragon Claws spells to the player, then the player pushes the spell button they want.  I use a similar one for regular use, but it could be easily adapted to your setup if you want it. 

Edited 1674573027
So it is not possible to do it? It's a pity... I wish roll20 would add the customized compendium...
Forum Champion
It assumes I understood you correctly. You seem to be trying to nest macros into a query. That is possible, as I said it would require HTML entities , but the level of difficulty involved is significant.   Chat menus are simpler, cleaner, and very easy to implement. 
Forum Champion
Marketplace Creator
API Scripter
Hi Eido! If all you need is for the ability to add custom spells to a character sheet, I would suggest looking at ChatSetAttr. It should allow you to add all of the attributes that make up a spell. If you use a spreadsheet to parse the command, you can somewhat automate the process. Then create a  Chat Menu  to displays those macros so that they can add spells to a specific sheet. There are some simpler examples of that for inventory items  here .
Thanks very much both for your help. In the end I have done what Gauss has suggested, since I did not understand the other solution well. The problem is that the macro bar is going to be very long now hahaha.

Edited 1674605728
Forum Champion
Eido, if you describe the problem with the macro bar being long we could offer suggestions. The way I have spells set up the macro bar only has a single button.  This is how I have them set up:  Macro button creates the first output, chat menu buttons to push to select which spells are displayed.  Note: this step is only for spellcasters who can have a lot of spells...for spellcasters such as Rangers and Paladins I skip that step.  Then it displays the desired spells, the second output. Click on the desired spell name and it casts that spell.  The macro I am using also ignores any spell line that does not have a red dot on it.  Note: the color and appearance is just how I have them set up, you can change the color and appearance in a variety of ways (and have to if using Dark mode as those colors don't show up well in Dark mode).
As you say it looks great!  Could you copy me the code that you use for that macro? I was referring to this list: In the chat with the command it looks like this:

Edited 1674609502
Forum Champion
The main macro takes 23 pages of a word document, I tried to post it here but the webpage fought back. I can invite you to grab my Macro Mule instead.  Regarding your macros...generally it is best not to put them in the Collection tab, use the Attributes and Abilities tab on a character sheet.   The reasons for that are numerous but here are some of them:  1) Character sheet macros are portable (can be moved from game to game with the character sheet), thus you can create Macro Mules which greatly simplifies macro creation. 2) HTML entities work in Abilities but not Collection tab macros.  3) Writing for Ability macros is a bit simpler than Collection tab macros.  4) less clutter on the Collection tab. The macros are where they belong, on the character using them or the macro mule. 

Edited 1674609550
yes, please... I tried but it didn't work like that for some reason
Forum Champion
Eido D. said: yes, please... I tried but it didn't work like that for some reason Invite sent
I'm In! Which is the mule?