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

5e OGL Character Sheet - Recalculate?

1522585481
Robin
API Scripter
Hey, I'm working on a script of my own, but I was wondering if it was possible to let the 5eOGL character sheet recalculate it's auto-calculating values through a script? For example, my script will change the strength ability score, is it possible to let the sheet recalculate the modifier and skill values? Another example, I let my script change the class, is it possible to let the sheet change the save proficiencies according to the new class? Thanks.
1522585845

Edited 1522585859
Jakob
Sheet Author
API Scripter
What you're looking for is the setWithWorker() method of attribute objects (instead of set()), or the new  setAttrs function. Both of these will let sheet workers scripts be triggered by attribute changes via APi.
1522599927
Robin
API Scripter
Thank you very much! This worked indeed. Is it also possible to add an attack to a sheet through the API?