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 .
×

Multiple choice damage with kl1 selection

I'm trying to implement a multiple choice damage for a burning light spell in Pathfinder. Rule are the following :   A living creature that takes damage from this wordspell takes 1d6 points of damage per two caster levels (maximum 5d6). An undead creature takes 1d4 points of damage per caster level (maximum 10d4), and an undead creature particularly vulnerable to bright light takes 1d6 points of damage per caster level (maximum 10d6). A construct or inanimate object takes only 1d4 points of damage per two caster levels (maximum 5d4). So I was hoping to make a damage roll based on the query of enemy type. Something like : ?{Enemy type| Normal, [[({5, floor(@{caster1_level}/2)}kl1)]]d6| undead, undead damage...} But this doesn't work. Combo box query is broken. I try : to escape '}', ',' and '|' in the roll calculation and as the order of operation run first some part this also broken.  Use attribute or Ability to comupte the number of dices but I have the some trouble to. It's show me: "Normal, [[{5, 8/2}]]d6" instead of "Normal". May be I'm doing something impossible. Any clue to unlock my situation ?
1586120965
Ziechael
Forum Champion
Sheet Author
API Scripter
The html replacements only need to happen on , | and } unless they are part of an attribute call. In your example this would look like: ?{Enemy type| Normal, [[({5, floor(@{caster1_level}/2)}kl1)]]d6| undead, undead damage...}
That works like a charm. Thanks, I turned around the solution for days without finding it :-(.
1586157550
Ziechael
Forum Champion
Sheet Author
API Scripter
Happy to help :) It's a steep learning curve for sure, always feel free to reach out for help otherwise this stuff will  break you lol.