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

D&D 3.5 Macro assist - divide CL for damage dice with cap

1686061986

Edited 1686076101
Hello Roll20 peeps, I'm trying to build a spell macro for Chain Missile. It strikes a primary target with x1 missile (1d4+1 dmg) for every 2 caster levels, up to a maximum of x10 missiles before breaking off to secondary targets (not worried about this part at the moment). I'm sure it's simple but I'm confusing myself of how to divide casterlevel by 2 and include the max. CL of 10 on the damage roll. I've done this for each individually but not in combination. Any help would be greatly appreciated!  Edit: Most recent attempt was  [[ [[{{@{casterlevel}/2},10}kl1]]d4+1 ]] but get an error "cannot mix sum and M rolls". I believe it's due to the additional {} I threw in around {{@casterlevel},10} in an attempt to divide the CL before keeping the low of the two values, but that's because it didn't work without it either. Hmmm...
1686083986
Gauss
Forum Champion
Here you go: [[[[floor(({@{casterlevel},20}kl1)/2)]]d4 +[[floor(({@{casterlevel},20}kl1)/2)]]]] For simplicity I moved the casterlevel maximum limit inside the calculation for number of missiles but it does the same thing even though it doesn't look quite the same. (level 20 divided by 2 = 10) I also fixed the +1 bonus per missile.  Finally, I added the floor calculation so there are no #.5 rolls (Roll20 doesn't like that). IIRC 3.5 rounds down, but if you need it to round up just change "floor" to "ceil" or "round". 
Thanks very much, Gauss!! Took me some time to wrap my head around what you did but it finally clicked. Additionally, the floor/ceiling explanation helped me clean up a lot of the other macros I've been rocking for awhile so it's all appreciated. Peace and love to you, my friend!