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

Installing Scripts

So, I'm learning about API, and starting to install some scripts. I have a question about the scripts on GitHub. Many scripts seem to have a .js and a .json file. Do I copy and paste both of these? And just for my own curiosity, what's the difference?
1430580218
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Just the .js The .json is just information about the author of the script.
1430582248
The Aaron
Pro
API Scripter
More information about the package.json file here: <a href="https://github.com/Roll20/roll20-api-scripts/blob/" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/</a>... JSON is a light weight machine readable format that was originally created by Douglas Crockford (author of a great book called Javascript: The Good Parts! =D). You can read more about it at: <a href="http://www.json.org/" rel="nofollow">http://www.json.org/</a> If you're getting into writing scripts, you might be interested in another of Douglas Crockford's contributions to the Javascript ecosystem: <a href="http://www.jslint.com/" rel="nofollow">http://www.jslint.com/</a> And definitely keep asking questions on the API forum!
The Aaron said: And definitely keep asking questions on the API forum! Well, since you said so... I'm seeing that some scripts have dependencies (e.g. "Torch" has dependency "IsGM"). I'm assuming that means I need both scripts installed on my campaign. But, taking "Torch" for an example, I go to the "IsGM" page on GitHub, and I see "IsGM" and "IsGMModule." Which one do I install in order to run "Torch." Or do I need both?
1430591707
Gen Kitty
Forum Champion
Torch and other scripts really should be re-written now that isgm has become an API function. :P :)
1430593090
The Aaron
Pro
API Scripter
Ah, they actually HAVE been re-written. What I really need is to get them retested...
1430593146
The Aaron
Pro
API Scripter
They are the same thing, I changed names at one point. I don't think I realized there are two of them hanging out.