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

5th Edition OGL by Roll20 Companion script version 1.4.5

1699459700

Edited 1699459730
StéphaneD
Pro
Sheet Author
API Scripter
Hi all I am using the companion script in all my D&D 5e games I recently found an issue with spell slots tracking when using spells that can be upcast. The chat message was saying "All slots expanded" and there was also a 'NaN' (not a numeric) javascript error in the message. Looks like this is due to some changes to the roll buttons in the character sheet resulting in the script not able to parse the correct slot from the roll results Since the last 1.4.4 version was 3 years old, I decided to fix the issue and submit a new version 1.4.5 to Roll20 So there you have it : you can now use upcast-able spells and the used slot is correctly counted If the original authors are lurking on the forums and want to know what was changed : Line 288 should now read as : 288 var hlinline = (msg.content.split("{{hldmg=$[[")[1]||"").split("]]")[0]; And line 289 should be commented out Happy gaming all :)
1699563083
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi StéphaneD! Thanks for the fix! Did you submit a Pull Request in the Github Repo?
1699565284
StéphaneD
Pro
Sheet Author
API Scripter
Hi Keith I did and the PR was merged by the Roll20 folks a few days ago. Just thought I’d inform the other users of this script that there was a new patched version resolving a recent bug, thus my post.
1699570634
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I salute you! :) That script has not been touched in years.
1699618767

Edited 1699618836
StéphaneD
Pro
Sheet Author
API Scripter
Thx Keith Actually I had to deep dive into it because I was having 2 problems : the one with upcastable spells slots tracking, and another one with ammo tracking not working although everything was correctly setup To try and figure out the latter, I copied-pasted the script from Github into my game, put some log() statement here and there, and found out that it was unable to find the character object from the name in the roll template. I resolved it by deleting the name in the sheet, then re-entering it. Strange issue, but I was in the Roll20 app working on these sheets when the 1-hour panic occured a week ago or so - an absolute mess where the attribute values were not filling the sheets anymore for everyone and for all games and was hotfixed by the Roll20 folks. So maybe some sh*t got inserted in the name and prevented the findObjs() function to find the character... Go figure... Hower, the name trick did not fix the upcastable spells issue, so since I was already immersed into the code, I tried to figure out the bug and to fix it ;-)