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

New Game Script Loading

I've been creating quite a few games lately and I have a feeling I already know the answer to this, is there an easy way to load scripts into a new game from an old one that is already setup. I have a feeling the answer is that there isn't a way to do this. I have a OneNote file with all my scripts notes and settings in it and it's not too bad to go through each one when setting up a new game. Anyone have other ways that work for them that eases the work of creating new games and loading their favorite API scripts?
1564613564
The Aaron
Roll20 Production Team
API Scripter
I have a javascript bookmarklet that will compress all your custom scripts into one big one for easy copy/pasting, but it's a pain if you ever need to update one of them. Beyond that, not really.
1564613853
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Drop downs aren't too hard to assemble in a new game. A quick way to get all of the custom scripts from an older game into a newer one is to use the bookmarklets below from the Aaron ( more here ). It will concatenate all scripts into one uber script. I prefer to do them manually myself, to keep them separate. Note that however you assemble your new scripts, you will need to set whatever config they require. Last time I did this, I took careful note of what config macros needed to be run, and put them into a setup macro. That makes config of the next game a bit simpler. Copy ALL API Scripts ref.( <a href="https://app.roll20.net/forum/permalink/2995136/" rel="nofollow">https://app.roll20.net/forum/permalink/2995136/</a> ) You can use this Javascript Bookmarklet to build a text area with all the scripts concatenated: javascript:$('&lt;textarea&gt;&lt;/textarea&gt;').attr({id: 'TheAaronAllScripts'}).css({width:'100%',height: '30em'}).text($('.script .editor').map(function(idx,e){return e.env.editor.getValue();}).toArray().join("\n/* ############################### */;\n\n")).appendTo('body'); The above you can copy and put in a bookmark in Chrome. For Firefox, you need a link to right click and add bookmark, so far as I know. This might work to copy in Firefox:&nbsp; <a href="http://javascript:$(' Bookmarklet Copy Only ACTIVE API Scripts ref.( https://app.roll20.net/forum/permalink/5019380/ ) javascript: (function(){let disabledScripts=$('ul.nav.nav-tabs li a.disabled').map((idx,e)=&gt;$(e).attr('href').substr(1));$('&lt;textarea&gt;&lt;/textarea&gt;').attr({id: 'TheAaronAllScripts'}).css({width:'100%',height: '30em'}).text($('.script.tab-pane').filter((idx,e)=&gt;!_.contains(disabledScripts,$(e).attr('id'))).map((i,e)=&gt;$('.editor',e)[0]).map(function(idx,e){return e.env.editor.getValue();}).toArray().join("\n/* ############################### */;\n\n")).appendTo('body'); }());
1564613877
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sniped!
I have all my settings so that I can copy and paste them into the new game, the macro idea would be very useful, great idea. I like having the scripts separate just so I can quickly see what I have loaded and I can Disable them for the occasional troubleshooting. Thanks for the links and ideas, going to keep them handy just in case.
I open up the API page on an old game, and on the new one, and simply copy and paste across them.&nbsp;&nbsp; Hope one day to see this suggestion in production.&nbsp; I took part of a script from Stephen and modded it to create all of my macros for me. It has worked rather well in 40+ games but one.&nbsp;
1564645925
GiGs
Pro
Sheet Author
API Scripter
I find it handy to use aaron's script for copying then to a new campaign. In the single enormous script it creates, it separates each script with ' ###############################' so you can easily then cut the scripts out of that and into new script tabs. It's still a chore, but its quicker than copying them one by one, having to switch between browser tabs, and remember which ones you've done.