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

Lazy Loading of attributes breaks token actions

1648149206
David
Sheet Author
Lazy loading of attributes breaks token actions if the token action is used before the linked sheet is opened.
Hey David, taking a look at this now -- should have a fix out shortly.
1648151876

Edited 1648152068
Jeff L.
Roll20 Team
OK, there was an issue with targeting `selected` attributes in text macros and token actions -- this should be resolved now. Let me know if this resolves the error!
1648153079
David
Sheet Author
Jeff L. said: OK, there was an issue with targeting `selected` attributes in text macros and token actions -- this should be resolved now. Let me know if this resolves the error! Not if you run straight from the token. If you open the sheet or edit the macro it works.&nbsp;<a href="https://youtu.be/QT4g4L6sM2w" rel="nofollow">https://youtu.be/QT4g4L6sM2w</a>
1648153612
David
Sheet Author
If you open the macro editor it works&nbsp;<a href="https://youtu.be/dP5rVw-ISO4" rel="nofollow">https://youtu.be/dP5rVw-ISO4</a>
1648153959
David
Sheet Author
It is not just "selected"&nbsp; specifically targeting a character doesn't work either e.g.&nbsp;@{Enturisa Bloody Axe (Zack)|curstr}
1648154503
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hm. I'm getting attributes returned with the same testing steps. Testing for "strength". What is "curstr" and where does it come from? (I am testing with a regular character, a character with parentheses in name and "selected". All after a fresh load and without opening the character.)
Ok, I've found this secondary issue, the lazy load wasn't triggering from within unfurled macros.&nbsp; Just deployed a fix for that, as well (and might have done just as you were testing, Keith -- oops!). I'm able to run the same style macro with a single selected attribute from all locations now and get the expected result.&nbsp; Can you confirm?
Still a problem I think. I'm also having intermittent issues with attributes referenced in Powercard scripts/token actions. Sometimes they reference the attribute successfully, other times it says "No attribute was found for @{TARGET:target|Bloodtype}" Not sure if relevant but the error message says @{TARGET:target|Bloodtype} when in the script it is @{target|target|Bloodtype} (Colon vs Pipe)
1648168849
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That might be something that Kurt could shed some light on: How PowerCards sends its calls. I tested with the four scripts I've written that access a lot of character data: Reporter, Supernotes, Survey, and Token Action Maker. They mostly ran OK, and after the tweaks the devs made, seem to run just fine now.
John Carlow said: Still a problem I think. I'm also having intermittent issues with attributes referenced in Powercard scripts/token actions. Sometimes they reference the attribute successfully, other times it says "No attribute was found for @{TARGET:target|Bloodtype}" Not sure if relevant but the error message says @{TARGET:target|Bloodtype} when in the script it is @{target|target|Bloodtype} (Colon vs Pipe) Hey John, thanks for the report.&nbsp; I've verified that the target syntax within a macro was failing to on-the-fly load attributes, and deployed a fix. Macros -- or API scripts that leverage macros -- that need to load attributes for a target-selection should now work as expected. (P.S. If you're curious, the TARGET: syntax is an internal conversion we do for some parsing shenanigans on our side.&nbsp; That bit was working correctly!)