Hiya, I recently published a sheet to the community, which was accepted (yay!). While it is mostly working as intended, I had created a few sheetworkers to calculate some results (how many companions do you have, how much damage to the leg have you taken etc.). Everything was working in the Sheet Sandbox I set up to help build the charactersheet, but now the sheet is out in the wild, none of the calculations are being run. It's not critical to the running of the sheet, but it's a nice thing to have. As an example of one of the sheet workers: ////////////////////////////////////////////////////////////////////////////
//Catching and calculating all of the Left Leg hitboxes into a single value
//
on("change:lleg1 change:lleg2 change:lleg3 change:lleg4 change:lleg5 change:lleg6 change:lleg7 change:lleg8 change:lleg9 change:lleg10", function() {
const stats = ["lleg1", "lleg2", "lleg3", "lleg4", "lleg5", "lleg6", "lleg7", "lleg8", "lleg9", "lleg10"];
getAttrs(stats, function(values) {
let stunTotal = 0;
stunTotal = calcStun(stats, values);
//console.log("stunTotal: "+stunTotal);
let killTotal = 0;
killTotal = calcKill(stats, values);
//console.log("killTotal: "+killTotal);
setAttrs({
lLegStun: stunTotal,
lLegKill: killTotal
});
});
}); The code here calculates the amount of stun or kill damage taken to the left leg and posts the result to an attribute. However, now the attribute is not updating. I have noticed that the charactersheet is not generating all of the attributes on the sheet. It will only generate them as they are used (the damage boxes only have their attribute created if you click on them for example), perhaps this is the cause of the issue. But even when I generate all of the attributes necessary for the code to work, it is still coming up blank. Any insight into this would be appreciated. Maybe there is a fundamental issue with sheetworkers or charactersheets that I don't know about. I am still new to this. Thanks for any help you can provide.