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

Spellcasting Macro OGL

I am trying to make a spell casting macro for my acolyte with a drop down box. what am i missing? @{Acolyte|wtype}&{template:npcaction} {{rname= CAST SPELL!}} {{spell=1}} {{name=@{Acolyte|npc_name}}} [[?{which spell?|Light, [Light] |Sacred Flame, [Sacred Flame] |Thaumaturgy, [Thaumaturgy] |Bless, [Bless] |Cure Wounds, [Cure Wounds] |Sanctuary, [Sanctuary] @{Acolyte|charname_output} }}
1469689881

Edited 1469689954
I would remove the line break after the {{name}} property, and replace the [[ with {{ to start. You should also place the @{Acolyte|charname_output} after the final }} instead of before it.
Ok so now i have this and it still doesnt work! @{Acolyte|wtype}&{template:npcaction} {{spell=1}} {{rname= CAST SPELL!}} {{name=@{Acolyte|npc_name}}} {{?{which spell?|Light, [Light] |Sacred Flame, [Sacred Flame] |Thaumaturgy, [Thaumaturgy] |Bless, [Bless] |Cure Wounds, [Cure Wounds] |Sanctuary, [Sanctuary] @{Acolyte|charname_output}}
1469690826

Edited 1469691355
How's this? @{Acolyte|wtype}&{template:npcaction} {{rname=CAST SPELL!}} {{description= ?{which spell?|Light, [Light] |Sacred Flame, [Sacred Flame] |Thaumaturgy, [Thaumaturgy] |Bless, [Bless] |Cure Wounds, [Cure Wounds] |Sanctuary, [Sanctuary] } }}
Ok that works. So now how do i get the actual spell to show up in the chat window. Right now only the name shows up?
1469692100

Edited 1469692145
By spells, are you referring to Ability macros that you created yourself, or entries on the sheet's Spell Page ? In either case, I suggest finding the names of the Ability calls corresponding to each spell , and then using those names within Ability Command Buttons .
So yes i want it to cast those spells that i have defined in my macro to cast from the spell sheet. Which the Acolyte already knows on his spell page. I have 0 macro skills and i know this is advanced macro. I want to use this templete for all my spellcasting players and NPC's!
1469693963

Edited 1469694010
I recommend against attempting this project using Roll Queries. This is because attempting to call an Attribute that does not exist will break Roll Queries. To give an example: ?{Choose a spell| @{selected|repeating_spell-cantrip_$0_spellname}, 1st cantrip | @{selected|repeating_spell-cantrip_$1_spellname}, 2nd cantrip | ... | @{selected|repeating_spell-cantrip_$5_spellname}, if the selected character has less than 6 cantrips the Attribute call on this line will break and so will the Query. | @{selected|repeating_spell-cantrip_$6_spellname}, 7th cantrip } In case you're interested, a macro like this might get you started on the alternative path of creating a 'spell menu' via API Command Buttons: @{selected|wtype}&{template:npcaction} {{rname=Spell List}} {{description= Cantrips: [ @{selected|repeating_spell-cantrip_$0_spellname} ](~selected|repeating_spell-cantrip_$0_spell) [ @{selected|repeating_spell-cantrip_$1_spellname} ](~selected|repeating_spell-cantrip_$1_spell) [ @{selected|repeating_spell-cantrip_$2_spellname} ](~selected|repeating_spell-cantrip_$2_spell) 1st-level Spells: [ @{selected|repeating_spell-1_$0_spellname} ](~selected|repeating_spell-1_$0_spell) [ @{selected|repeating_spell-1_$1_spellname} ](~selected|repeating_spell-1_$1_spell) 2nd-level Spells: [ @{selected|repeating_spell-2_$0_spellname} ](~selected|repeating_spell-2_$0_spell) }} Note that missing spells will cause error messages and not make for very pretty output. This is unfortunately not avoidable.
I'm confused? How do i know from my spell list if it is a cantrip or a regular spell? I don't want to make a spell book with every spell in the macro. I just want the character or npc to cast his known spells on their sheet. In this case the spells are as follows: Light, Sacred Flame, Thaumaturgy, Bless, Cure Wounds & Sanctuary. The spells will be different for another monster,character or npc. I dont mind making seperate macros for this because they all have their own sheet. So how do i make this happen with a drop down menu all in one macro? I wont be going over with the spells because i only want to use the ones on their sheet.
So it looks like the first three spells Light, Sacred Flame and Thaumaturgy are all cantrips and the last three are first level spells?
Brian A. said: I dont mind making seperate macros for this because they all have their own sheet. If you want to go the Roll Query route, that will be necessary. Each creature knows a different amount of spells, and there's no way for the macro to know how many that is. Here's a Roll Query macro for a creature with 3 cantrips and 3 first-level spells: @{selected|wtype}&{template:npcaction} {{rname=CAST SPELL!}} {{description=?{Choose a spell| Cantrips: | @{selected|repeating_ spell-cantrip _$0_spellname}, [ @{selected|repeating_spell-cantrip_$0_spellname} ](~selected|repeating_spell-cantrip_$0_spell) | @{selected|repeating_ spell-cantrip _$1_spellname}, [ @{selected|repeating_spell-cantrip_$1_spellname} ](~selected|repeating_spell-cantrip_$1_spell) | @{selected|repeating_ spell-cantrip _$2_spellname}, [ @{selected|repeating_spell-cantrip_$2_spellname} ](~selected|repeating_spell-cantrip_$2_spell) | 1st-Level Spells: | @{selected|repeating_ spell-1 _$0_spellname}, [ @{selected|repeating_spell-1_$0_spellname} ](~selected|repeating_spell-1_$0_spell) | @{selected|repeating_ spell-1 _$1_spellname}, [ @{selected|repeating_spell-1_$1_spellname} ](~selected|repeating_spell-1_$1_spell) | @{selected|repeating_ spell-1 _$2_spellname}, [ @{selected|repeating_spell-1_$2_spellname} ](~selected|repeating_spell-1_$2_spell) } }} This macro contains HTML entities , so save it an as Ability.