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 .
×
May your rolls be merry + bright! 🎄
Create a free account

simple but I am lost

Hi, I am making a macro for the necklace of fireballs. It looks loke this (I've set-up another class with the number of beads) : !setattr --sel --silent -- ?{How many beads do you want to use ?|1|2|3|4|5|6} &{template:default} {{name=Fireball from the necklace !}} {{DC 15 to half the damage}} {{Damage= [[8d6]]}} !setattr --modb --sel --silent --other_resource|-1 {{There are [[@(other_resource)-1]] beads left on the necklace}} I need to  1) modify the damage according to the choice made 2) announce (in name=fireball..) the number of beads thrown 3) the last line does not work thanks in advance, and sorry for being so bad at it...it will come...and btw, I am unsure I need the first line...
1643389830

Edited 1643389957
Ziechael
Forum Champion
Sheet Author
API Scripter
There is always a bit of a learning curve with these things... you've made a great start though! Something like this should work: &{template:default} {{name=Fireball from the necklace! (?{How many beads do you want to use|1|2|3|4|5|6} beads used)}} {{DC 15 to half the damage}} {{Damage= [[ [[7 + ?{How many beads do you want to use}]]d6]]}} {{There are [[@{selected|other_resource}-?{How many beads do you want to use}]] beads left on the necklace}} !setattr --modb --sel --silent --other_resource|-1 The line beak in the 'name' field is intentional and should work as written, and yeah... you didn't need the first line and since you only have the one query you could comfortably nest it within the macro itself. For the damage, I set it to 7+beads used since you have to use at least one to get the standard 8d6 and it only increases by 1 d6 for each additional... that might have been obvious but never hurts to point out the reasoning behind potentially confusing mechanics fudging. Hope it helps :)
It's perfect. Great help. And if I wanted to use in the chat the name of the selected character, would I use @{character_selected|character_name} ?
soorry, (meaning so sorry :)) @{selected|character_name}
1643569375
Ziechael
Forum Champion
Sheet Author
API Scripter
@{selected|character_name} Spot on :)