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

Problem with card-based scripts after recent update

I've been using  The Aaron's SummonCard script  for the last several years in order to run setup commands in my deckbuilding games. (Hi Aaron, I hope you see this!) I have been running into a few major problems this week (I believe it may be due to recent updates to deck/card functionality in roll20) and I'm wondering if anybody can help. The issue: Almost every time I run the script, the API crashes. Typically (today) the appropriate cards are not summoned. And even if they are, the summoned cards no longer appear as cards—each of them presents the characteristics of a rollable table: Multi-sided, etc, but no option to pick up, flip, remove the card. It's as though the !summon-card script has begun summoning rollable table tokens instead. (Except sometimes they do function as cards. It's difficult to tell what's happening) I'm not sure if this is an issue with the new deck functionality, the script, or something else. I noticed the most recent deck engine changelog involves infinite decks being changed, but my issue seems to persist whether the deck in question is infinite or not. I'm also not sure if I'm posting this in the right place, so if this turns out to be more of a roll20 support issue and less with the script, please let me know!
1629372614
The Aaron
Roll20 Production Team
API Scripter
Hiya Robert! =D Does the script still work for the built in Playing Cards deck?  I'd forgotten all about this script, I'll have to try and duplicate the issue. My guess is something Roll20 changed broke this. It uses a different method to play cards from the Marketplace/R oll20 than it does to play uploaded user cards. Knowing if only user cards are broken or all cards will help expose the underlying issue. 
What I've found is that the script works with the regular playing card deck. But when I combine cards from the playing card deck and the other deck into the same command, the problem persists (and the standard Playing Cards lose their "cards" properties.) I'd assume user cards are broken because all of the objects I use for my deckbuilders are uploaded. Thank you!
Were you still planning on looking into this or should I maybe post it as a bug?
1630459787
The Aaron
Roll20 Production Team
API Scripter
Sorry for the delay, it's been busy! (Moved 3 states, started a new job, my car got totalled... the usual. =D) I dug into this, the issue is that playCardToTable() doesn't work for custom card decks.  I noticed this note I left on that post: Update v0.1.1 -- Wrote my own playCardToTable() which can create pseudo cards for User Library image decks.  It can't create card objects, merely multisided tokens that behave like cards.  There are some differences, but it should work for most use cases until the real playCardToTable() function is fixed. So, this hasn't really changed.  I did poke the devs about it again, so maybe it can get a priority.  There does seem to be some weirdness with some marketplace decks showing up as custom decks, which leads to them being created as Rollable Table Tokens via the fake playCardToTable() code I wrote.  That's affecting the playing cards deck, so that's why it has weird results.
Goodness, I had no idea! Just wanted to make sure it wasn't lost. I hope you're all right now. Just to clarify, does the  playCardToTable()  issue seem to explain the crashes as well? And does this mean it will work for some User Library decks but not others until fixed? Thanks for getting the devs' attention about it—I've got a lot of elaborate card games on my account and I'm looking forward to using them again. I'll keep an eye out!
1633680885

Edited 1633681350
Just a heads-up, I tested this script for the first time in over a month and it seems to be working exactly as intended. I don't think I've changed anything about the game itself. Are you aware of an update that may have permanently fixed this? Edit: Nevermind, it's still pretty inconsistent. I'll be troubleshooting.