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

SmartAOE - Damage Formula (6d6, replace 1s with 2s)

I am creating a Wand of Fireballs for a 1st Edition game and in 1e, a Wand of Fireballs does 6d6 damage, but you replace 1s with 2s. I am trying to figure out how to do it within SmartAOE's damage formula My first task was figuring out how to even do that roll within Roll20 and I found someone that had the following:  {6d6+6d2r<1}kh6  which does work on its own. Now I have been trying various ways to plug that into the Damage Formula of SmartAOE but have so far been unsuccessful.   I can get   --damageFormula1|[[(6d6+6d2)]] to work, but as soon as I try to add in the r<1 it kills it.  I can get the kh6 to work, the only part I can not get to work is replacing the 1s Any thoughts would be appreciated.
1758044211
Gauss
Forum Champion
Hi Tilt,  Here you go: {1d6, 1d6, 1d6, 1d6, 1d6, 1d6, 0d6+2, 0d6+2, 0d6+2, 0d6+2, 0d6+2, 0d6+2}kh6 (note: 0d6 can be 0d1 or whatever...I just kept with the theme of d6s)
1758045721

Edited 1758045814
Tilt
Pro
Good thought, breaking them out like that.. however it does not like {}s, so I tried () instead, but then it does not like the commas.  I tried to use +'s instead, but that just ruins it all.   Any thoughts how to get around the comma issue?  Thanks again
1758046051

Edited 1758046124
Tilt
Pro
To show a bit more what happens. If I do the following:   --damageFormula1|[[{1d6, 1d6, 1d6, 1d6, 1d6, 1d6, 0d6+2, 0d6+2, 0d6+2, 0d6+2, 0d6+2, 0d6+2}kh6]] It will run the script, but then I get the following when it goes to roll damage:   SmartAoE: Something went wrong when processing rolls. The error message generated by Roll20 is: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "&" found. If I do the following by changing to ():   --damageFormula1|[[(1d6, 1d6, 1d6, 1d6, 1d6, 1d6, 0d6+2, 0d6+2, 0d6+2, 0d6+2, 0d6+2, 0d6+2)kh6]] It will not even run the script, I immediately get: SyntaxError: Expected "!!", "!", ")", "[", "cf", "cs", "d", "k", "m", "mt", "r", "ro", "s", [ |\t], [+|\-|*|\/|%], [0-9] or [>|<|=] but "," found.
1758046123
Gauss
Forum Champion
Alas, I don't use SmartAoE, so we are at the limit of what I can do. I'll see if I can grab the author. 
1758073598
David M.
Pro
API Scripter
That's a tricky one. Will have to think about this and get back to you. I used another (subordinate) script to parse inline rolls, so it's not super straightforward tracking the problem down.
David, please do not spend much (if any) time on this.. if there was an easy way to do it, I am fine with it.  However, it is not that big of a deal for me to either manually change 1s to 2s or to just let it roll with a straight 6d6.     Thank you
1758127597
Gauss
Forum Champion
Tilt, the thing is that if SmartAoE cannot handle calculations like that then it probably needs to be fixed. David is the author, so he might want to see it work properly. :)
1758156377
timmaugh
Forum Champion
API Scripter
And I'm the author of the underlying roll managing script library David used in SmartAoE, so if it traces back to that library (which a lot more scripts use), I'd like to know so I can fix it, too!