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
This post has been closed. You can still view previous posts, but you can't post any new replies.

API SendChat can't trigger repeating section abilities

1458386696

Edited 1458387849
Lucian
Pro
API Scripter
%{Bellaluna|repeating_skill_-K9wwmGZykQIFv4yH760_skill} in the chat window triggers the appropriate ability. The same thing from a sendChat results in&nbsp;Bellaluna|repeating_skill_-K9wwmGZykQIFv4yH760_skill being output in the chat window (or coming back as the content in the callback, if used) - so the %{} have just been stripped. It also produces an error in the log: "ERROR: Unable to find ability repeating_skill_skill for character Bellaluna" Which is weird because 'repeating_skill_skill' has no ID and wasn't what I asked for! Is this connected to&nbsp;<a href="https://app.roll20.net/forum/post/3123561/incorrect-change-events-firing-for-sheet-workers" rel="nofollow">https://app.roll20.net/forum/post/3123561/incorrect-change-events-firing-for-sheet-workers</a> (I know that's sheet workers, but those broken repeating section references with missing IDs are suspiciously similar). On the other hand %{Bellaluna|HP} works fine in both the chat window and the API. Particularly now that sheet authors are moving more and more of their functionality into repeating sections - including attacks and skills which are prime candidates for being triggered automatically - this is a very serious limitation.
Can you give the example HTML of the character sheet and the sendChat() command you are using? The way that it works is that %{} abilities inside of repeating sections are assumed to be sheet rolls, which are the same across all repeating sections (the specific variables inside the roll are different obviously depending on the section, but the roll itself is assumed to be static). So that's why it's saying it can't find "repeating_skill_skill", because the ID doesn't actually matter for finding the sheet roll definition (which is parsed at the time that the sheet is initially loaded).
1458672088
Lucian
Pro
API Scripter
Again, the HTML will be that of Kryx's Reshaped sheet - the version in the dropdown list should display this behaviour The command would be sendChat('', '%{Bellaluna|repeating_skill_-K9wwmGZykQIFv4yH760_skill}'); mutatis mutandis for the character name and ID in question.
1458672344
Lucian
Pro
API Scripter
The relevant section is probably most easily viewed here: <a href="https://github.com/mlenser/roll20-character-sheets/blob/master/D%26D_5e_Reshaped/precompiled/components/core/skills.html" rel="nofollow">https://github.com/mlenser/roll20-character-sheets/blob/master/D%26D_5e_Reshaped/precompiled/components/core/skills.html</a>
Okay I think this should be fixed on Main. I'm deploying the fix to Dev as well but might be a few minutes. Let me know. Thanks!
1459015774
Lucian
Pro
API Scripter
I haven't tested exhaustively, but my original test case certainly works now - thanks for the swift turnaround! Happy to close this topic now.