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

ChatSetAttr updating attribute on sheet, but not being "honored" in play. (includedesc to on, but not posting)

Using 5E OGL Char sheet and latest version of ChatSetAttr from script library. I'm using this type of command: !setattr {{ --mute --sel --repeating_spell-cantrip_$0_includedesc|on --repeating_spell-cantrip_$1_includedesc|on --repeating_spell-cantrip_$2_includedesc|on --repeating_spell-cantrip_$3_includedesc|on --repeating_spell-cantrip_$4_includedesc|on --repeating_spell-cantrip_$5_includedesc|on --repeating_spell-cantrip_$6_includedesc|on }} The char sheet is showing the flip to "on" but the post to chat is still not showing: If I flip it manually to "Off" then "On" it will work. It's only when !setattr sets it to off that it doesn't seem to honor the choice. I'm not sure if this is related, but I'm also seeing this in the API console: "ReferenceError: update_attack_from_spell is not defined" "ReferenceError: update_attack_from_spell is not defined\n at Object.getAttrs [as -LzbnkF_ooyb854jr8qr//repeating_spell-cantrip_-LzdM2g0vvFwvL9EIlYG//0.7816016362025888] (dnd5e.js:1091:17)\n at _fullfillAttrReq (evalmachine.<anonymous>:259:31)\n at messageHandler (evalmachine.<anonymous>:290:6)\n at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65: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)"
1583771141
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yup. There are a number of attributes on the sheet like this. It and others have been reported, but it doesn't look like anything will change on this soon. Another example is the Global Damage Modifier. You can flip it on via the API, but it doesn't register. Global Save modifier works, IIRC. It's maddening.
Ah, thanks for letting me know. So this is basically an API bug, not an issue with the script or how I'm using. Disappointing but at least I know I'm not going insane. 
1583809795

Edited 1583809886
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nah, I went insane for you, trying to find workarounds. Here are some macros that do  work , using ChatSetAttr. These Collapse/Expand, or Prepare/Unprepare all spells on a sheet. I'm also not entirely certain this is an API bug, anyway, since nearly identical features of the OGL sheet respond differently. It could be a sheet coding issue. Many people have had their fingers on that one over the years.
The weird thing is, it USED to work just fine. When I originally posted this, it was 100% functional:&nbsp; <a href="https://app.roll20.net/forum/post/6062742/5e-ogl-include-spell-description-in-attack-set-this-as-default/" rel="nofollow">https://app.roll20.net/forum/post/6062742/5e-ogl-include-spell-description-in-attack-set-this-as-default/</a>
1583968932
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I can't say for certain if the Global Damage Modifier used to work. I believe it did, but I have no way of testing.