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

Help Needed with Shadowrun Macro

I have no idea if this is the proper place to post this, so I apologize in advance if it's not. I've been working on a Roll Template macro for Shadowrun 5e and seem to have hit a snag. As far as I can see, the macro looks like it should be working fine, but it's giving me problems. I'm wondering if I just need a different set of eyes to take a look at it, or if there's just some caveat of writing up macros that I'm unaware of. Either way, any help at all would be greatly appreciated. Here's the problem portion of the macro: {{Hits= [[ (@{selected|AGI}+?{Weapon Skill Rating|1}-floor(@{selected|bar1}/@{selected|Pain})-floor(@{selected|bar2}/@{selected|Pain}) )d6>5kh?{Accuracy|99}s]] }} Currently set as a Token Action. This macro is supposed to determine the dice pool for an Attack Test, and then roll the dice and report the result in the Roll Template output. Here's the step-by-step breakdown of what it's supposed to do: 1. Take the user's AGI attribute 2. Add their weapon skill 3. Subtract Wound Penalties (here's where the problem is) Bar 1 and Bar 2 are set as the Physical and Stun damage tracks, respectively. To determine the Wound Penalties, the amount of damage you have in each track is divided by the Pain Threshold (usually 3, but can vary depending on the user's Qualities, which is why I have Pain set as an attribute instead of simply dividing the numbers in the bars by 3), rounded down. So this part of the macro takes each of the two bars individually, and divides them by Pain. 4. The resulting total is used as a dice pool to determine the number of Hits on the Attack Test. Now, the macro worked fine until I added in the two floor formulas to calculate Wound Penalties. Oddly enough, that formula layout has been used in other macros fine enough, but seems to be buggering out here. Am I missing something?
Floor and Ceiling don't mix well in most templates. calculated Dice rolls (something + something)d6 already round for you, actually.
Hmmm, that's unfortunate. It seems like the calculated dice roll will only round to the nearest whole integer, where in this instance I specifically need it to always round down. Do you think there's some possible work-around, or am I just SOL in this instance?
You might want to take a look at this thread as there has been some discussion regarding Wound Penalties and templates for SR5E. <a href="https://app.roll20.net/forum/post/1712624/auto-calculated-fields-referenced-in-inline-die-rolls-using-roll-templates#post-1754922" rel="nofollow">https://app.roll20.net/forum/post/1712624/auto-calculated-fields-referenced-in-inline-die-rolls-using-roll-templates#post-1754922</a>
Oh, awesome, thanks Larry!