Spell Filter – for D&D 5e by Roll20 sheet Edit: Added Range to list of filters It occurred to me that the macro this script uses could take roll queries. And by great stroke of fortune, this is true. the following macro will allow you to select a spell caster token, answer some queries and generate a filtered spell list. The default on every query is to ignore the filter for that attribute, so you only need to answer the questions that matter. Filters include: Casting time: Any, 1 action, reaction, bonus action Ritual: Any, Yes, No Concentration: Any, Yes, No Range: Any, ranged, self, touch School, Any, {list of schools} Here are some sample outputs using the Archmage stock NPC from the SRD. Each spell is clickable and castable. It works for both PCs and NPCs, though PCs will only display prepared spells. The filters display in the header, but from left to right they are: Unfiltered Spells requiring no Concentration Evocation Spells only Spells that can be cast as a reaction In cases where the filtered item is a checkbox, "<2" is the value that catches 0-off and 1-on. All of the filters are additive, as per the Script. So searching for Concentration and Divination, will only return spells that are both , not either . Code: !chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=**Filters**
Casting Time = ?{castingtime|any, |Action,1 action|Reaction,reaction|Bonus Action,bonus}
Ritual = ?{ritual|any,<2|no, |yes,1}
Concentration = ?{Concentration|any,<2|no, |yes,1}
Range = ?{range|any,<2|ranged,feet|self,self|touch,touch}
School = ?{School|any, |Abjuration,Abjuration|Conjuration,Conjuration|Divination,Divination|Enchantment,Enchantment|Evocation,Evocation|Illusion,Illusion|Necromancy,Necromancy|Transmutation,Transmutation}}}{{description=CHATMENU}} --separator: | --title:Cantrips — *Save DC @{selected|spell_save_dc}* --repeating_spell-cantrip|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl-1 *(@{selected|lvl1_slots_expended}/@{selected|lvl1_slots_total})* --repeating_spell-1|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 2 *(@{selected|lvl2_slots_expended}/@{selected|lvl2_slots_total})* --repeating_spell-2|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 3 *(@{selected|lvl3_slots_expended}/@{selected|lvl3_slots_total})* --repeating_spell-3|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 4 *(@{selected|lvl4_slots_expended}/@{selected|lvl4_slots_total})* --repeating_spell-4|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 5 *(@{selected|lvl5_slots_expended}/@{selected|lvl5_slots_total})* --repeating_spell-5|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 6 *(@{selected|lvl6_slots_expended}/@{selected|lvl6_slots_total})* --repeating_spell-6|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 7 *(@{selected|lvl7_slots_expended}/@{selected|lvl7_slots_total})* --repeating_spell-7|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 8 *(@{selected|lvl8_slots_expended}/@{selected|lvl8_slots_total})* --repeating_spell-8|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School} --title:Lvl 9 *(@{selected|lvl9_slots_expended}/@{selected|lvl9_slots_total})* --repeating_spell-9|spellname|spell|spellcastingtime=?{castingtime},spellrange=?{range},spellritual=?{ritual},spellconcentration=?{Concentration},spellschool=?{School}