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 .
×

I'm having trouble with a macro that call other macros

1587760488

Edited 1587761068
I'm probably making some dumb mistake, I'm new at creating macros and everything; so here's the deal. I'm playing dnd 5e as a Wizard Lore Master, and one of the features of this subclass is being able to change the dmg type at will. So everybody put their gifs on the attacks and I had the Fireball gif, but i didn't want to use the fireball gif and deal ice dmg, so I did individual macros that only changed the gif and dmg type with the original fireball template. I did this by casting fireball, pressing arrow up, getting the code and only changing the description and dmg type. One example of this change: @{Edward Strongfence|wtype}&amp;{template:dmg} {{rname=Fireball}} 0 {{range=150 feet}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[8d6]]}} {{dmg1type=Acid}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{save=1}} {{saveattr=Dexterity}} {{savedesc=}} {{savedc=[[[[(@{Edward Strongfence|spell_save_dc})]][SAVE]]]}} {{desc=[acid]( <a href="https://media.tenor.com/images/22807da68b5477918be819a0f06c8cdf/tenor.gif" rel="nofollow">https://media.tenor.com/images/22807da68b5477918be819a0f06c8cdf/tenor.gif</a> )}} {{hldmg=[[(1*?{Cast at what level?|Level 3,0|Level 4,1|Level 5,2|Level 6,3|Level 7,4|Level 8,5|Level 9,6})d6]]}} {{spelllevel=3}} {{innate=}} {{globaldamage=[[0]]}} {{globaldamagetype=@{Edward Strongfence|global_damage_mod_type}}} ammo= @{Edward Strongfence|charname_output} But then I thought to myself, "If i'm going to create a macro for every change I make and use it on the fast macro bar, its gonna be full of stuff and messy" So I started my quest for doing one thing that at the time seemed simple: Create a macro that called out the other macros that i made that worked perfectly on their own. I kept trying and trying, for 2h this macro couldn't work (something like this): ?{Which fireball are we casting today, mlad?|Acidball,#Acidball |Energyball,#Energyball |Iceball,#Iceball |Lightningball,#Lightningball |Soundball,#Energyball} It either only showed the text, like #Acidball and didn't run the macro or on the options, said something like "Acidball,{&amp;template " and didn't gave me any of the options that I put to choose. This seemed pretty simple, i feel defeated right now and I gave up. Could someone explain what went wrong? (Oh, and actually, the chat bugged on this game that i was testing this macro, i still can't see any messages i think)
1587764488

Edited 1587764778
Hey There! Welcome to the wonderful world of macros on roll20. Since this is kind of complicated i will try and walk you through it. The first step is you need to have all of your spells set up on your characters sheet like you would have for your weapons. Don't have any spaces in the names! This is extremely important. There is probably alot but that is ok spells take up alot of room. Next after you add all the spells and have them set up the way you want them you need to make your macro or spellbook to call all those macros. I have one here that i use in my game for characters and NPC's. What is useful about it is it is easy to add spells to the list just make sure you add the actual spell to your character sheet first. Here is the code. /w @{selected|character_name} [Image](<a href="https://s3.amazonaws.com/files.d20.io/images/46884830/y2F10zDmHUn3LaMwTnBXkw/med.jpg" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/46884830/y2F10zDmHUn3LaMwTnBXkw/med.jpg</a>)}} /w @{selected|character_name} &amp;{template:default} {{Name:= **Celewinn's Spellbook** **Cleric of Lathander Spells** ***Spell Save DC: 14 Wisdom*** **Cleric Ability** [Turn Undead](~Selected|TurnUndead}) **Cantrips** [Guidance](~Selected|Guidance}) [Light](~Selected|Light}) [Mending](~Selected|Mending}) [Resistance](~Selected|Resistance}) [Spare The Dying](~Selected|SpareTheDying}) [Thaumaturgy](~Selected|Thaumaturgy}) **1st Level** [Bless](~Selected|Bless}) [Cure Wounds](~Selected|CureWounds}) [GuidingBolt](~Selected|GuidingBolt}) [Healing Word](~Selected|HealingWord}) **2nd Level** [Hold Person](~Selected|HoldPerson}) [Prayer of Healing](~Selected|PrayerofHealing}) [Spiritual Weapon](~Selected|SpiritualWeapon}) **3rd Level** [Daylight](~Selected|Daylight}) [Mass Healing Word](~Selected|MassHealingWord}) [Revivify](~Selected|Revivify}) **4th Level** [Guardian of Faith](~Selected|GuardianofFaith}) }} This is the spellbook for a cleric NPC i made named Celewinn. At the top of the macro i use a picture. If you don't want that just delete it. I also have it set up so once your token is selected and this only works if it is, it will whisper the spellbook to chat so only that player can see it. So you will need to select the spell in the chat window which i made into api buttons. If you notice in the code i provided The first part of the macro is the name of the spell.&nbsp; [Guidance]&nbsp; It is ok to have spaces here as this is the name you will see for the spell button. The second part is the actual code that calls from your spell that you made on the sheet&nbsp; (~Selected|Guidance}) If you notice that some of the other spells with longer names have no spaces here. This should look just like the name of the spell macro on your sheet. You can name this master macro spell book it can have spaces in the name since you aren't calling this macro with another one. I hope this explains what you need. I know when i learned how to do this it made spells a happy experience instead of a frustrating one. You can also use this same method for weapons too I also have that in my game as well. Happy Gaming!
Oh if you check the box for set as token action it will show up in the top left corner when the token is selected. That way you won't see all the other spells at the top cluttering the screen.
This wasn't exactly what I was asking, but I found the idea of this pretty interesting and I'm going to try this for my spellcasters.&nbsp; Thank you very much for your response!&nbsp;
Sorry I see what you mean however this method could work for that too. So instead of having just fireball you could have the different types of damages listed under the main macro fireball which is just one spell on your master spell list. You could do the same thing here like the spell book just for one spell. Alot of work but it should work like a charm.
I just encountered this problem myself. From the look of your example code, you might be missing the html character replacements within your spell macros (the level dropdown). Try replacing them where necessary as per the link below. Don't forget about the "amp;" when nesting more than 1 query! That was where I erred. <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a>
Feathers said: I just encountered this problem myself. From the look of your example code, you might be missing the html character replacements within your spell macros (the level dropdown). Try replacing them where necessary as per the link below. Don't forget about the "amp;" when nesting more than 1 query! That was where I erred. <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> Oh yeah, I tried replacing the others but I forgot the "amp". Dropped the ball here, thank u very much! I'm gonna see if it works later and edit here.