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

Need help using a KL inside of a query

1550444870

Edited 1550445213
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
1550445156
GiGs
Pro
Sheet Author
API Scripter
You might need an extra level of nesting on the }, which IIRC (and I may not) involves putting & before the html entity. I avoid using html replacements, so i dont know exactly which characters you'd need to add nesting.
I'm not entirely sure what you mean? I'm pretty new at all this macroing and not that good at it. But I was having even more trouble trying to make this without the html replacements for whatever reason {5 , @{class-0-level} }kl1
1550447261
GiGs
Pro
Sheet Author
API Scripter
I'm not the best person to give advice here, since htm entities are too complicated for me. This is the section that describes their use:&nbsp; <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> &nbsp;but I warn you, it is not really very helpful.&nbsp;
1550447324
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You are running into problems associated with advanced roll queries . You may find the spreadsheet I designed useful, it can automated a lot of this.