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

Trouble with Token Action API (spells)

1587926558

Edited 1587961553
Hi. I've encountered a problem with the token action API. Whenever one of my players click on the "spells" macro created by the TA, it makes my API output console (or what it's called) crash. Afterwards i need to restart it, which has caused my games to slow down quite a bit. The crash happens right after the token macro "spells" is clicked. The spell choices does show up in chat and seems to work however. Im using this version of Token Action ( <a href="https://gist.github.com/keithcurtis1/cdf8d1a711eaed7f8311e81c48c0ee2b" rel="nofollow">https://gist.github.com/keithcurtis1/cdf8d1a711eaed7f8311e81c48c0ee2b</a> ) Does anyone els have this problem too, and is there a way to fix it? I've linked the error code i get, in hope that one of you smarter people can help me out!
1587965816

Edited 1587965877
I've been noodeling around with my API's, and it seems that the problem was caused by my HD Helper API. I can't really figure out how they are affecting eachother, since one is directed towards spell list and the other towards HD rolls. Anyway. The error stopped showing after i deleted the other script.
1587971390
GiGs
Pro
Sheet Author
API Scripter
Have you disabled all other scripts but those two, and confirmed the error only happens when those two scripts - and only those two scripts - are running? I dont know what the hd helper script is so cant guess what conflict they may have.
1587972672

Edited 1587972785
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's an old copy of that script. The latest version is here . I deleted the gist and replaced it with a link to the new script.
GiGs: Yeah, i tried disabling all other scripts, and the error only came when Token Mod and HD helper were active. The HD helper script automaticly removes a HD resource from the character sheet and adds a given value to the HP resource. So i can't really see why they interact. keithcurtis: Thanks man. I just tried it again with the new script, but it seems it still makes the error. I guess i will just be playing wihtout the HD helper, since it's more of a minor bonus feature.
I was thinking about something kiethcurtis. Would it be possible to make it so, that the script only included the list of spells that were "checked" as prepared in the character sheet? I have no idear how one would do it, but I'm curious to if it's possible.
1587995939
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Probably not immediately. NPCs dropped from the compendium come in as all unprepared, so I'd need to run it as a toggle, so you could have it both ways. Besides, I spent last night dreaming how to sort the buttons, so I have to get that out of my head, first. It would be really useful, of course.
1588006748

Edited 1588006849
GiGs
Pro
Sheet Author
API Scripter
René R. said: GiGs: Yeah, i tried disabling all other scripts, and the error only came when Token Mod and HD helper were active. The HD helper script automaticly removes a HD resource from the character sheet and adds a given value to the HP resource. So i can't really see why they interact. Looking at the HD Helper script (or at least one called Hitdice Helper I found from googling, if that's the one), that is running and studying whenever anything is sent to chat, so it doesnt matter they do different things, HD Helper is interacting with every chat message so I dont understand what's causing this crash offhand, but i can see why HD helper would be the culprit.
GiGs: Ah. Yeah that must be the problem. Well i confirmed it with a friends who were having the same problem. It was solved by deleting hitdice helper. Oh well. Guess my lazy players just have to put in their own healing and register their used hitedice the old fasioned way.
keithcurtis said: Probably not immediately. NPCs dropped from the compendium come in as all unprepared, so I'd need to run it as a toggle, so you could have it both ways. Besides, I spent last night dreaming how to sort the buttons, so I have to get that out of my head, first. It would be really useful, of course. Ah i see. Well i wouldn't want to overburden you with my requests. I just thought it would be a neat feature for wizards, druids and clerics since their "spellbook" is pretty stuffed with unprepared spells, which renders the feature somewhat inert, due to having to check up if the spell is prepared anyway. However my warlock and bard players are loving it! And thanks for the time you put in to create this awesome script. It really made my work as a GM easier and our combats faster.
1588089949
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
FYI, keeping unessential spells on a sheet is generally bad for performance. It's much better for players of clerics and others who don't have "known spells" to add and delete spells as needed. Having dozens of spells on a sheet is one of the practices that Roll20 advises is a good cause of lag.