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

Method to Force Sheet Update?

Heya. I wrote a small script for the Starfinder HUD sheet, and thought it was working, but it turns out, it wasn't causing an update in the sheet. The script changed the name of the person in the gunner seat on a starship, for ease of use with multiple gunners. However, unlike typing in a name, and hitting enter, this didn't update the bonuses for the sheet. Is there a way to trigger that update? Alternatively, I could just have it also update the associated bonuses field, but I'm just curious for situations other than this particular one.
1531712866
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You'll need to use setWithWorker or setAttrs (the API version) to trigger the sheetworker.
I wasn't sure how to do that in an API script, so I just had it mod the gunner_roll attribute directly.&nbsp; If anyone is interested:&nbsp;<a href="https://gist.github.com/Bastlifa/c7166a9d20e803bc5b97e0ab9be4d822" rel="nofollow">https://gist.github.com/Bastlifa/c7166a9d20e803bc5b97e0ab9be4d822</a>