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

Savage Worlds Macro Question

I am trying to set up a macro that handles exploding dice, modifiers and then compares it against a target number. In this case 4. The macro works fine but doesn't return the number of success. It simply gives the results. Anyone have any insight. /r {1d?{TraitDie|4}!, 1d6!}kh1 + ?{Modifier|0} - @{Wounds} -@{Fatigue} > 4
1399257514
Gauss
Forum Champion
You need to put the entire left side of the inequality in {} braces.
Maybe I am not understanding correctly but I have tried that with this: /r {{1d?{TraitDie|4}!, 1d6!}kh1 + ?{Modifier|0} - @{Wounds} -@{Fatigue}} >4 and am getting the same result as before. It is returning the correct number but ignoring the success check.
1399259862
Gauss
Forum Champion
You have a space between the final bracket and the inequality. Delete the space.
Unfortunately setting it up like this results in an error. /r {{1d?{TraitDie|4}!, 1d6!}kh1 + ?{Modifier|0} - @{Wounds} -@{Fatigue}}>4 G expression is not supported in a single sub-roll expression success check Might simply be what I am trying to do isn't supported?
Try this I was playing around with it for you. /r ({1d?{TraitDie|4}!, 1d6!}kh1 + ?{Modifier|0} - @{selected|Wounds} -@{selected|Fatigue})>4 I used selected attributes because that is what I am used to so that each token has a wounds and fatigue attribute. But you might like this one as it does the math for you and just tells you how many successes you get 1 is a success and say 3 is a success and 2 raises in savage worlds. /r ceil(({1d?{Trait Die|4}!, 1d6!}kh1 + ?{Modifier|0} - @{selected|Wounds} -@{selected|Fatigue})/4) Here is same macro as an inline roll. [[ceil(({1d?{Trait Die|4}!, 1d6!}kh1 + ?{Modifier|0} - @{selected|Wounds} -@{selected|Fatigue})/4)]] It will just show you how many successes you get. If the box is red hover over it and it means one of the dice rolled a '1' so for things like full auto sprays and magic backlash it can show you.
The first one still didn't do what I was expecting. But those other 2 certainly are going to do the job. Thanks for the help!
1399266577

Edited 1399267001
Gauss
Forum Champion
Ok, I see the problem, it does not like the {1d?{traitdie|4}!, 1d6!}kh1 element. That can be fixed: /r { [[{1d?{TraitDie|4}!, 1d6!}kh1]] +1d1-1 + ?{Modifier|0} - @{Wounds} -@{Fatigue}}>4 The inline brackets get rid of that element as far as the inequality is concerned. However, a Roll20 inequality requires a dice roll and 1d1-1 solves that.
Great that one worked! Thanks for your help.
Looking at this formula, I believe it needs a -4 at the end in order to take care of a rounding up issue. /r ceil(({1d?{Trait Die|4}!, 1d6!}kh1 + ?{Modifier|0} - @{selected|Wounds} -@{selected|Fatigue})/4) would be /r ceil(({1d?{Trait Die|4}!, 1d6!}kh1 + ?{Modifier|0} - @{selected|Wounds} -@{selected|Fatigue} - 4)/4) in order to be accurate with the number of successes.
The Savage Worlds wiki page ( <a href="https://wiki.roll20.net/Savage_Worlds" rel="nofollow">https://wiki.roll20.net/Savage_Worlds</a>) has it like this: /r floor({{1d8!!,1d6!!}k1 - 4 + ?{Modifier|0}}/4)