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

Checkbox return true/false instead of 0/1 when called from macro bar/chat

Noticed this today.  I have the following in a repeating section: <input type="checkbox" title="@{$ID_encumbered}" name="attr_encumbered" value="1" readonly><span class="sheet-checkico">a</span> It is used in a roll template as such: It is sent to the roll template as {{encumbered=[[@{encumbered}]]}} {{#rollTotal() encumbered 1}} ... {{/rollTotal() encumbered 1}} This works when the template is used via the roll button on the sheet but if that button is added to the macro bar or I call the attribute itself from chat via @{character name|repeating_professionskills_-ABCDEFG_encumbered} and get either true/false.  If I update the roll template to show the value and run it via the sheet button it shows 0 or 1 instead as I expected. Is this a bug or is there better way to go about this?
1628868147

Edited 1628868167
Matt Carpenter
Pro
Sheet Author
Apparently this was due to the way I was setting the checkbox value via the sheetworker with a boolean instead of an actual 0 or 1.  Updating the sheetworker and ensuring the values we recalculated seems to have fixed this issue.