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

Custom spell damage coding/macros

July 02 (4 years ago)

Edited July 03 (4 years ago)

I am playing a crossblooded draconic/orcish sorcerer which gives +1/die and +1/die on acid, and I also have blood havoc which is +1/die on bloodline spells, and I also have a 1 level dip in oracle.

how would I make it for a spell that does 1d6 per caster level max 5 and +1 per die(aka per caster level max 5)   so (5d6)+(1x5)

I have tried this: [[ [[ [[ {5, [[@{casterlevel}]] }kl1 ]]d6 ]] + ( { 5 , [[@{casterlevel}]] }kl1) ]]      keeps saying no caster level for my character

also, for later, 1d6 per caster level max 10 +3 per die(aka per caster level max 10)         so (10d6)+(3x10)

Edit:

so I think I got it now ((([[{(1*@{caster1_level}),5}kl1]]d6)+[[{(1*@{caster1_level}),5}kl1]]))  for 5d6+5

((([[{(1*@{caster1_level}),10}kl1]]d6)+[[{(3*@{caster1_level}),30}kl1]]))    for 10d6+30

YAY! It's working! :)

July 03 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

Congratulations.

It seems like you could remove one, two, or three of the outer ( ) brackets. (Remember to remove the same number from both sides.)

This should work

[[{(1*@{caster1_level}),10}kl1]]d6+[[{(3*@{caster1_level}),30}kl1]]

If caster1_level is  simple number, the inner bracket around that shouldn't be needed either:

[[{1*@{caster1_level},10}kl1]]d6+[[{3*@{caster1_level},30}kl1]]

Also you can add spaces to make it more readable

[[ {1* @{caster1_level},10}kl1 ]]d6 + [[ {3* @{caster1_level},30}kl1 ]]

I'm wondering if you need that 1* multiple at the first caster level. So it could be

[[ {@{caster1_level},10}kl1 ]]d6 + [[ 3* {@{caster1_level},10}kl1 ]]

I haven't tested any of these, but maybe they'll help make your macros more readable.

That did help de-clutter it quite a bit, all the curved brackets were redundant as was the 1* before caster level

[[{@{caster1_level},5}kl1]]d6+[[{@{caster1_level},5}kl1]] is much easier to read :)