Advertisement Create a free account

Global Damage Modifier Activated by ChatSetAttr API Not Affecting Rolls

1555249060
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
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...
1555272519
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
Pro
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
1555749144
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.