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 .
×

Scriptcards accessing sheet attributes

Hi - I'm helping my GM to convert some PowerCards macros into Scriptcards.  Several items: Current game is a copy of a game that used a standard D&D 5E 2014 character sheet that has had the 2024 sheet added. 5 Player characters have been recreated (mostly) on the new 2024 sheet (Beacon, I think). Scriptcards has been installed from the API. Current API is set to "Experimental".  When running under 'default', the API window throws a bunch of errors that don't occur under Experimental (I think that's a good thing). I have fiddled with a saving throw script in order to change the card title color to match the PC user-defined variables BGColor and TXColor.  When I use @{selected|user.BGColor} it returns the value I was looking for and I can change the appropriate colors. When I use [*S:BGColor] or [*S:user.BGColor] I get undefined. I thought maybe it was my script, so I downloaded the Action Menu Scriptcard code that Kurt Jaeger (bless him always!) wrote, and what I see when it runs is: The Character Name - [*S:character_name] returns the correct value, but all of the bits under the title are showing "undefined". None of the repeating actions are showing, and the bonus actions are not complete. Looking at the code, it looks like it's trying to find a library that doesn't exist.  Is that the problem?  I have added --#beaconsheet|1 to the code just to try something, it did not work. Any help is greatly appreciated.  Thanks! Gary
UPDATE:  It looks like character ID based attributes have no values, and the repeating_actions is not populating hash tables.  I've tried some small targeted scripts that try to just list actions and none of it works. [*S:character_id] is returning an ID.  This is being passed to a subroutine as the first parameter, and that uses [*[%1%]:race] and [*[%1%]:class_display] in the "undefined undefined" bit in the picture.  I have tried returning known attributes and all are saying "undefined". I did create the ActionMenuAddons library and that fixed one error on the API load screen.  It's still throwing an error as below: "Error processing conditional thisContent is not defined, thisTag: ?Attacks and Actions -eq \"Actions\", thisContent: DO_BUILD_BUTTON_LIST line: 1750"
1776889788

Edited 1776889870
Gauss
Forum Champion
Hi Gary S.,&nbsp; In case you don't get answers here I want to make sure you know of the Kurt's Gaming Chat Discord server aka "Scriptcards Discord server":&nbsp; <a href="https://discord.gg/uMaTAbwK8k" rel="nofollow">https://discord.gg/uMaTAbwK8k</a> Where you can go to get SC answers and talk to other Scriptcard users.&nbsp;
Gauss said: Hi Gary S.,&nbsp; In case you don't get answers here I want to make sure you know of the Kurt's Gaming Chat Discord server aka "Scriptcards Discord server":&nbsp; <a href="https://discord.gg/uMaTAbwK8k" rel="nofollow">https://discord.gg/uMaTAbwK8k</a> Where you can go to get SC answers and talk to other Scriptcard users.&nbsp; Hi Gauss - thanks for the recommendation.&nbsp; I'm kinda an old guy and haven't explored too much into Discord, but I'll give it a go!&nbsp; Thanks!
1776905956

Edited 1776906066
Andrew R.
Pro
Sheet Author
The D&amp;D 2024 sheet and all Beacon sheets are a problem for Mods like ScriptCards.