
This is my collection of useful functions to use in other commands/functions. I will keep this top post updated with the list of included functions as I add more. Library includes: removePlus. Takes string or array of strings and returns the integer after the symbol "+". Useful for getting an integer from a string that represents a bonus like +2. Will also convert any numbers in the string/array of strings to integers. getAttributeObjects: takes a character object and an array of attribute names, checks the names against the character for existing attributes, error checks them for empty values or existence at all, and returns an array of the attributes' objects. getCharacterObj: takes a graphic, attribute, ability, or character object and returns the associated character object. <a href="https://gist.github.com/sturtus/8352577" rel="nofollow">https://gist.github.com/sturtus/8352577</a>