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

[API] List and Toggle Equipment (5e OGL) #2 [HELP]

1588146492

Edited 1588146601
Hello, Here is the API link I found for don and doff items roll20 forum page: <a href="https://app.roll20.net/forum/post/5447629/api-list-and-toggle-equipment-5e-ogl/?pageforid=5449180#post-5449180" rel="nofollow">https://app.roll20.net/forum/post/5447629/api-list-and-toggle-equipment-5e-ogl/?pageforid=5449180#post-5449180</a> Kyle G. &nbsp;(BTW Thanks Kyle for the Link) Did you run either of the two commands? !equipShow &nbsp;with a selected token !equipToggle --charid|@{selected|character_id} --item|&lt;ITEM_NAME&gt; Both of these command work sorta, they toggle the items on an off but the MODS do not change: if I manually check and uncheck the equipped box the mods change accordingly The api does not update mods: Here are some snippets of what is shown on my screen The Crown of the False King - A tin crown that increases the confidence and self image of those who wear it. Made for a shy human boy who had trouble talking to people. Grants +2 to Charisma.(#23 from 100 strange magic items ) Please advise Thanks, Tye
1588181106
GiGs
Pro
Sheet Author
API Scripter
The following might be pretty technical. TLDR: its very likely an issue with the 5e sheet by roll20 and there's nothing you can do about it. Technical details: The mods are probably calculated by sheet worker: when an attribute changes, the sheet worker runs and updates the mod. By default, API scripts do not trigger sheet workers. But the script is using the setWithWorker command so it should be working. So that's not the issue. However there's a bug in the way sheet worker code works. There are two ways sheet designers can use to detect the value of a changing attribute: getAttrs or eventInfo. There's a very long-standing bug in the eventInfo method that roll20 cant be bothered to fix, and that method wont work. I tried to find the D&amp;D 5e by Roll20 sheet code on the github, but either my eyesight is failing or its not there. This is weird. But my best guess is your sheet is using eventInfo and there's nothing you can do about it.&nbsp; An alternative would be to use chatSetAttr, and set the stat and the new modifier both at the same time. But you'll need to calculate the modifier, so that's not easy.
1588181557
The Aaron
Roll20 Production Team
API Scripter
(The 5e sheet code is not in GitHub currently because of the contractual need to develop unannounced features.&nbsp; They're working on how they want to get the source back into the public repo at appropriate points.)
1588181694
GiGs
Pro
Sheet Author
API Scripter
Thanks, Aaron. It was weird to not see it. but the other by roll20 sheets were there.
1588185104
Kraynic
Pro
Sheet Author
There is an older version of the sheet still available on github labeled something like DD5thEditionLegacy.&nbsp; How different it is from the current, I have no idea.