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

Global Damage Modifier Activated by ChatSetAttr API Not Affecting Rolls

Hi, I'm having a little trouble activating the Global Damage Modifier for Rage using the ChatSetAttr and I'd be delighted if one of you fine folk could help me out. It appears to work perfectly, ticking the GDM and reducing the class_resource by 1, but rage damage doesn't appear on the damage rolls. And at the other end, if I manually tick the GDM and then use my macro to untick it, the damage rolls still show the rage damage but without the label Here's a gif to show the GDM working when manually ticked, not working when ticked by Macro, and then the issue with using the macro to untick it And here are the macros Does anyone have any ideas what I'm doing wrong? Cheers
1555259701
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Have you run the ChatSetAttr config to make sure that use sheetworkers is on? I swear I just looked into this very issue a few days ago, but can't find the thread...
Thanks for the swift response fella. Just checked and I'm afraid  use sheetworkers  is already on I tried toggling it just in case but no change in the behaviour. My macros tick the box but it doesn't affect the roll.
1555367084
Jakob
Sheet Author
API Scripter
I did a bit of digging, and it looks like the sheet worker for this particular event is crashing when it is being called from the API. This is the error message: "GLOBALDAMAGE" "ReferenceError: update_attacks is not defined" "ReferenceError: update_attacks is not defined\n at Object.eval [as -LcY3Gj_eveqSdhNFnNf//repeating_damagemod_-LcY3bPUU4GzEMcGqZwZ//0.06484943159589673] (eval at messageHandler (evalmachine.<anonymous>:284:6), <anonymous>:4169:25)\n at _fullfillAttrReq (evalmachine.<anonymous>:259:31)\n at messageHandler (evalmachine.<anonymous>:296:6)\n at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:60:55)\n at emitTwo (events.js:106:13)\n at process.emit (events.js:194:7)\n at process.nextTick (internal/child_process.js:766:12)\n at _combinedTickCallback (internal/process/next_tick.js:73:7)\n at process._tickCallback (internal/process/next_tick.js:104:9)" This is probably some kind of bug in the API-Sheet-worker code that lets the workers lose the context in which they are defined? Not sure what could cause this.
1555701911

Edited 1555701928
Thanks for looking into it for me Jakob. It's much appreciated. I'm happy to announce that a fine fellow named AManImmortal has solved my problem.  Linking to character name rather than selected token sorted it.  Cheers guys
Urgh, I spoke too soon. I could swear that when I altered the code to character name and tested it yesterday, it worked as expected. But I've returned to it today and it's still not working.  Frustratingly AManImmortal tested his version for me to make sure his was functioning as it should and sent screenshots of it working correctly, but I've actually copied his code into my game and the errant behaviour persists.
1556661804

Edited 1556661824
Jakob, Keith, Rotimer. - This looks like what I was trying to achieve a few months ago, but I kept running into a problem... <a href="https://app.roll20.net/forum/permalink/7110361/" rel="nofollow">https://app.roll20.net/forum/permalink/7110361/</a> It looks like you're not suffering from the same issue I had.... - I'm not sure whether this was due to the 5e sheet being tweaked, or Jakob adjusted some of the api? Anyone got any ideas?
1558995988

Edited 1558996035
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is likely caused by the current bug with sheetworkers not being fired by API scripts. You can follow the bugs progress in the stickied thread . The devs are aware of the issue and are working on it.
1558996437

Edited 1558996479
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That bug was reported a few weeks ago. This issue seems to go back months. Unless it was only discovered a few weeks ago.