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
This post has been closed. You can still view previous posts, but you can't post any new replies.

API: Combining Multiple Scripts?

So I'm no programmer, but I know some of the basic concepts. I don't, however, know nearly enough to be confident poking around at API scripts. I've got a collection of some I've found here in this forum, that seemed useful enough to be worth manually copying every time I make a new game. I don't know how they work, but they do what I want them to do, and that's enough. So, my question is, is it easily possible to compile several different scripts into a single, longer script, so I don't have to copy each one over individually? Right now I have about five different ones I like, including HoneyBadger's Powercards, a couple from The Aaron, and one I forget who made it. If I could just somehow cut-and-paste these together into one big file that'd save a lot of time every time I need a new campaign, which is getting to be quite frequent! Thoughts? -Phnord
1448328683
The Aaron
Pro
API Scripter
Totally fine. Behind the scenes, the API concatenates active scripts. Simply put them all in the same tab (put a single ; on a line between each for complete safety) and you're good. 
1448358223
Ziechael
Forum Champion
Sheet Author
API Scripter
I would also highly recommend adding a commented out line between each one detailing the exact name of the script (some authors don't add this as a header), that way when a new version is released you can easily use ctrl+f (cmd+f on mac) to find that section in a single script to update each script... for example: ; // The Aaron's CharMod (should it ever arrive) <script would go here...>
Excellent advice, thanks to both of you!
1448446954
Ziechael
Forum Champion
Sheet Author
API Scripter
Always happy to help, since you are now armed with all of the information needed to achieve your aim I'll go ahead and close this thread :)