Trying to make a spell query and I wanted to cap the caster level of the user to 5, the max CL the spell has. This is my current macro, still a WIP. &{template:default} {{name=?{Spell book| | Fire I, Fire I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + {5 , @{class-0-level} }kl1 + @{WIS-mod}[Wis] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{Reflex DC= [[10 + 1[Spell Level] + @{WIS-mod}[Wis] ]] }} {{Failed Save= Burning }} {{Duration= [[1d4]] rounds }} | Water I, Water I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + @{class-0-level}[CL] + @{WIS-mod}[Wis] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{Fort DC= [[10 + 1[Spell Level] + @{WIS-mod}[Wis] ]] }} {{Failed Save= Drenched }} {{Duration= [[1d4]] rounds }} | Stone I, Stone I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + @{class-0-level}[CL] + @{INT-mod}[Int] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{Fort DC= [[10 + 1[Spell Level] + @{INT-mod}[Int] ]] }} {{Failed Save= Weighted }} {{Duration= [[1d4]] rounds }} | Aero I, Aero I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + @{class-0-level}[CL] + @{WIS-mod}[Wis] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{Reflex DC= [[10 + 1[Spell Level] + @{WIS-mod}[Wis] ]] }} {{Failed Save= Squalled }} {{Duration= [[1d4]] rounds }} | Blizzard I, Blizzard I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + @{class-0-level}[CL] + @{WIS-mod}[Wis] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{Fort DC= [[10 + 1[Spell Level] + @{WIS-mod}[Wis] ]] }} {{Failed Save= Frozen }} {{Duration= [[1d4]] rounds }} | Stone I, Stone I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + @{class-0-level}[CL] + @{INT-mod}[Int] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{ Reflex DC= [[10 + 1[Spell Level] + @{INT-mod}[Int] ]] }} {{Failed Save= Weighted }} {{Duration= [[1d4]] rounds }} | Stone I, Stone I }&#125:{{Touch= [[1d20 + @{Ranged-total}[Ranged] ]] }} {{Damage= [[1d6 + @{class-0-level}[CL] + @{INT-mod}[Int] ]] }} {{Range= [[25+floor((@{class-0-level}/2)*5) ]]ft }} {{Reflex DC= [[10 + 1[Spell Level] + @{INT-mod}[Int] ]] }} {{Failed Save= Weighted }} {{Duration= [[1d4]] rounds }} } When the KL is not within the query it works perfectly fine, but if my CL is over 5(which is the limit for the spell) I would like to cap it at 5. I've tried putting within brackets, using the html commas and etc, putting within its own set of square brackets " [[1d6]] + [[{5 , @{class-0-level} }kl1 ]] ", and nothing seems to work. This is for the FFd20 system(Final Fantasy) I would really like to find a way to solve this, while keeping it a querry, since I planned on using the same KL for capping my higher level spells that scale in dice with level