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

Passing an AutoCalculated attr to Roll Template

I have an attr named "physical_current" that I'm passing to the roll template.  The attr is the sum of three other fields with a value="@{onething}+@{anotherthing}+@{yetanotherthing}". I'm passing it to the roll template thusly: "{{skillvalue=[@{physical_current}]}}". In the roll results I'm seeing something like "[42+2+1]" where onething=42, anotherthing = 2, and yetanotherthing = 1.  I've tried "{{skillvalue=[parseInt(@{physical_current})]}}" and a few other things, none of which seem to be turning this auto-calculated value into an integer.  If this just another case of "don't use auto-calculated attributes?"  Or am I missing something?
1515363884

Edited 1515364000
vÍnce
Pro
Sheet Author
What do you get when you try posting @{selected|physical_current} ? Try adding parentheses around the physical_current attribute's value value=" ( @{onething}+@{anotherthing}+@{yetanotherthing} ) " Also, try an inline roll in the macro {{skillvalue= [[  @{physical_current}  ]] }}
Your last suggestion worked.  Thanks!  I guess the "inline roll" syntax just "does the math"?
1515365472
Jakob
Sheet Author
API Scripter
Justin C. said: Your last suggestion worked.  Thanks!  I guess the "inline roll" syntax just "does the math"? Yup. Without the inline roll, it's just text (=the addition formula) that is being sent to the roll template.