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] Live Handouts/GMNotes - Final Version


Edited 1623719542
UPDATE: Minor bug fix, where players weren't able to properly call the !sethandout command. Now fixed. Hey gang. I made a lame version of this a while back. But here's a fairly robust version that's a lot more user friendly. Code here:&nbsp; <a href="" rel="nofollow"></a> You use the command " !sethandout --[HANDOUT NAME] --[TAG] " or " !sethandoutid --[HANDOUT ID] --[TAG] " to copy whatever text is stored in the handout, and it will move it to the GMNotes and Tag it appropriately for later. This won't show up graphically in the GMNotes unless you go to edit that note. You don't need to do that for the code to function, but incase you're worried it's not worked, just edit the handout and you'll see it's fine. You can then use the command " !livehandout --[HANDOUT NAME] --[TAG]" or "!livehandoutid --[HANDOUT ID] --[TAG]" to have the tagged text you've previously stored in the GMNotes to be set as the current handout text. This will work dynamically, so no need to worry about editing the handout. It'll just work. Finally, you can use the command "!replacehandout --[HANDOUT NAME] --[TAG]" or "!replacehandoutid -[HANDOUT ID] --[TAG]" it will override the previous text saved to a particular tag. This is in case you're doing a large handout, and you need to change a particular tag several times because it's linking to many things.&nbsp; By default, players can call all the different Tags, unless you have the tag include&nbsp; "-GM" at the end of it. So you can set up buttons in a handout for players to navigate the different tags if you wish, and then for anything you want them not to be able to access, you can just set it as GM only and they'll not be able to access it.&nbsp; The use of this script as I see it is to be able to create Dynamic handouts for a mini Wiki-esque handout providing alot of information in a better way, and also for things such as Magic Items, where you can drip feed information to your players. I'll link an example of both below. If you have any questions, lmk.
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nice to see others working on some api driven guis! Nice work Joshua.
Hi Joshua, really interesting API you've created here! I'm struggling to create the clickable buttons in the handout to reveal certain text, like Identify, Cursed etc. Could you please explain how you set that up?
API Scripter
You can cause the GMnotes to update immediately by "updating" the standard notes. It doesn't have to be a change, just a set and that causes the GMnotes to update.
Hey Sam, this is a little complicated, as it requires mucking around with the page's HTML code. Noon posted a good&nbsp; walkthrough &nbsp;here. Funnily enough, its just above the post that prompted me making this script, since they never released the script themselves.

Edited 1623319652
If you want that button though - copy and paste this.&nbsp; Cursed Kinda finnicky to change around but yeah. To get the command working within the hyperlink/button, remember to use a ` at the start. Like so: `!livehandout --The Sword of the Ex-Ample --curse-GM
Thanks Joshua, I appreciate the reply. I’ll take a look at the walkthrough and mess around with the example command for the button :)
No sweat - It takes a bit of doing but I think the results are often worth it.

Edited 1627051058
This is great! Would love if it were possible to use this with character bios... :)