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

[5E OGL] Access to the Spell Level a spell is cast at.

I would like to use the spell level a PC selects when they cast a spell in a calculation.  This is for a Life Domain Cleric that adds 2+Spell Level cast to the healing.  I have tried the @{spelllevel} but that seems to only return a value of 1 no matter what level is selected to have the spell cast at.  Is it possible to get access to that value when the PC chooses it? Thanks!
Use the query ?{Cast at what level?} to get the value that the user selected.
When you cast the spell, the cast at level query is already prompted for.  I was hoping not to have to prompt a second time and just use that first prompt.
1512159707
Silvyre
Forum Champion
The Harv said: When you cast the spell, the cast at level query is already prompted for.  I was hoping not to have to prompt a second time and just use that first prompt. When you Submit a Roll Query (i.e. assign it a value), every following Roll Query that shares the same name is parsed to the value of the first. e.g. If you Submit the default value of ?{Cast at what level?|1}, all future Roll Queries named 'Cast at what level?' will be parsed to '1'.
That's good to know but they seem to be two different prompts.  The original spell prompts as a drop down list.  When I add the ?{Cast at what level?|1} to the healing calculation for the Cure Wounds spell (ie 1d8+2+ ?{Cast at what level?|1}) works BUT...  the higher level healing portion does not.  There is something on the OGL spell that adjusts the higher level additional healing to be one level less than the value selected in the dropdown. Does that make sense?
That makes sense and the problem that you are running in to is that the query you have added comes before the higher level query built in to the character sheet. So the value you enter here, in your example 1, will also be the value used in the higher level query (and inadvertently casting the spell at a higher level than intended due to the nature of the query). You could get around this by changing the above query to [[1+?{Cast at what level?|Level 1,0|Level 2,1|Level 3,2|Level 4,3|Level 5,4|Level 6,5|Level 7,6|Level 8,7|Level 9,8}]][Spell Level]. This is the same query that is used for 1st level spells cast at higher levels.
That tweak is fantastic.  Thanks so much for the help!