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

[Script] WildHelpers - general utilty functions for scripters

When i was writing the WildShape  script i decided to put all utility functions into a separate file in case i wanted to create more scripts, but i never posted about it in the forum... I am thinking that other people might find this useful so here is  WildHelpers , it's already in the one click as well if you wanna use it as a dependency or feel free to copy/modify the code as you need (i am dropping my pro sub on roll20 so i won't be able to support this moving forward). I've only used/tested it on 5e OGL sheets. As of this post the script contains two classes, you can refer to the WildShape script to see how i use them. One class, WildMenu, has functions to create/handle menus (make label/buttons/etc.). Another class, WildUtils, has functions for: centralize log/chat/error messages comparing versions find data in folders/subfolders get/set/copy attributes/repeated/resources on and between characters duplicate characters get default token data/img/size for a character get a list of all characters in your game and/or just their names, can be filtered by folder / having a specific attribute (and/or with a specific value) checking proficiencies (5e)
@Angelo - Just ran across this post and reviewed your code library and associated WildShape script.  I myself am just getting into JavaScript and Roll20 and based on my quick review, this will definitely shorten my learning curve.  Your code is very readable which makes it easy to learn from and utilize.  I appreciate the way you standardized it in a class library, makes all of your functions reusable in other projects.
Will M. said: @Angelo - Just ran across this post and reviewed your code library and associated WildShape script.  I myself am just getting into JavaScript and Roll20 and based on my quick review, this will definitely shorten my learning curve.  Your code is very readable which makes it easy to learn from and utilize.  I appreciate the way you standardized it in a class library, makes all of your functions reusable in other projects. thanks Will, I had to put a bunch of time in it when i wrote WildShape trying to figure out how to do those basic things, create a library etc. so i am glad it can help others now! I work in c/c++ but it was the first time for me writing something in js so keep that in mind as there might be better/different ways of achieving the stuff i am doing in there.