Benjamin Quekers said: Hey guys I'm trying to write a query macro where spells can be chosen and casted but it doesn't work. Currently what I've written looks like this: ?{SELECT CANTRIP | Sacred Flame, %{selected|repeating_spell-cantrip_$0_spell}| Resistance, %{selected|repeating_spell-cantrip_$1_spell} } Does anybody know what's wrong with it? So the problem with this is due to the order of operations . Abilities (%{}) are processed before queries so if the ability has characters that need to be encoded (as defined in Advanced Usage for Roll Queries ), these character will break the query unless they are encoded within the ability. The simplest way to get around this is to use Ability Command Buttons rather than queries. While this takes up more room in the chat, it will only clutter your chat window if you whisper the button to yourself. Benjamin Quekers said: Also, is there a way to call the spell name so that I don't have to manually key in each one for each NPC? Ie. Something like %{selected|repeating_spell-cantrip_$0_NAME}, %{selected|repeating_spell-cantrip_$0_spell} There is and you are extremely close to figuring it out on your own. Main difference here is that you are wanting to access a single attribute of the spell rather than a roll. So you need to use an attribute call (@{}) instead of an ability call (%{}) @{selected|repeating_spell-cantrip_$0_spellname} will get you the name of the first cantrip in the character sheet. Something that I do for my NPCs with spells is to create a spellbook ability like this, then all I have to do is add/remove rows when necessary. @{wtype} &{template:default}{{name=@{character_name} Spellcasting}}{{Spell Save DC @{spell_save_dc}=@{spell_attack_bonus} to hit with spell attacks}}{{• Cantrips (at will)
=[@{repeating_spell-cantrip_$0_spellname}](~selected|repeating_spell-cantrip_$0_spell)
[@{repeating_spell-cantrip_$1_spellname}](~selected|repeating_spell-cantrip_$1_spell)
[@{repeating_spell-cantrip_$2_spellname}](~selected|repeating_spell-cantrip_$2_spell)
}}{{• 1st level (4 slots)
=[@{repeating_spell-1_$0_spellname}](~selected|repeating_spell-1_$0_spell)
[@{repeating_spell-1_$1_spellname}](~selected|repeating_spell-1_$1_spell)
[@{repeating_spell-1_$2_spellname}](~selected|repeating_spell-1_$2_spell)
[@{repeating_spell-1_$3_spellname}](~selected|repeating_spell-1_$3_spell)
}}{{• 2nd level (3 slots)
=[@{repeating_spell-2_$0_spellname}](~selected|repeating_spell-2_$0_spell)
[@{repeating_spell-2_$1_spellname}](~selected|repeating_spell-2_$1_spell)
}}