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

Please Help, Edit Attribute with Roll Button

1696785566
Pete
Pro
Marketplace Creator
Sheet Author
I'm working on a custom sheet. I was trying to set up a roll to automatically change an attribute, in this case expend a resource. I'm terrible at coding so can't quite figure it out.  What I was doing was adding this at the end of the roll: {{@{ResourceCur}=-@{abilitycost}}} But that clearly doesn't work. Do I need to use a sheet worker or set up an intermediate attribute or something? Thanks, appreciate the help!
1696796658

Edited 1696796694
GiGs
Pro
Sheet Author
API Scripter
You can't change attributes without a sheet worker. If you want to make a roll AND change an attribute, you must use Custom Roll Parsing (a type of sheet worker). <a href="https://wiki.roll20.net/Custom_Roll_Parsing" rel="nofollow">https://wiki.roll20.net/Custom_Roll_Parsing</a> Also it must be an action button. You can't do this with a roll button.