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

Modifying a referenced Attribute and using said Attribute with a divisor in macros

Hello! I'm setting up a Boot Hill 3rd edition game. I'm trying to use the basic character sheet and create an Ability to represent the three basic types of gun shots: Careful, Steady, and Hipshot. All use the Coordination Attribute which is a number from 2 to 20. Careful shots use full Coordination, Steady shots use Coordination/2, and Hipshots are Coordination/4. A successful shot must roll equal to or less than the computed Coordination Attribute. Also, Coordination can be modified for various reasons.  So I'm struggling with the macro because I can't really modify the Attribute: /em takes a Careful Shot! /roll 1d20<@{Coordination}+?{modifiers|0} I'm not sure where to place "+?{modifiers|0}" or if I'm missing some other syntax for proper order of operations. I've tried a couple other things but still not getting the right result.  I tried something like this: /em takes a Careful Shot! /roll 1d20<{@{Coordination}+?{modifiers|0}} but the results are always "1" and the macro does not parse the success (or not).  My goal is to minimize the amount of time looking up formulas for what is a semi-crunchy game that is pretty fun once you manage the crunch.  Thanks!
1581983372

Edited 1581983655
vÍnce
Pro
Sheet Author
Does this work? /em takes a Careful Shot! /roll 1d20<[[ @{selected|Coordination}*(?{Typeof shot?|careful,1|steady,.5|hipshot,.25})+?{bonus?|0}-?{penalty?|0} ]]
1581983510

Edited 1581983603
Kraynic
Pro
Sheet Author
You weren't far off on your second attempt, but instead of another set of curly brackets, you needed a double set of square brackets to make an inline roll.  That tells it that everything inside those brackets needs resolved together to make a single number when the macro is all performed.  The following seems to work fine for me in a quick test: /em takes a Careful Shot! /roll 1d20<[[@{Coordination}+?{modifiers|0}]] You may find it easiest to set up a macro for each type of shot.  A version for your steady shot would be something like this: /em takes a Steady Shot! /roll 1d20<[[floor(@{Coordination}/2)+?{modifiers|0}]] I am assuming you round down (a 13 coordination becomes a 6).  If you round up, then the "floor" needs to be changed to "ceil".  If you make a 3rd macro for the hip shot, you need to change the 2 to a 4 for the division.  Hope that gets you going. Edit:  You will need the selected bit from Vince's example if you are making a global macro.  What I wrote out works if it is made as an ability on the character sheet.
1581988609

Edited 1581988624
Craig Brasco
KS Backer
Hey thank you both very much! That did the trick Kraynic. I'm sticking to making this part of the basic character sheet for now.