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] Director — A Roll20 Mod to Handle Theater of the Mind Play

1757799161
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Some techniques I've picked up for setup: If you want to duplicate one image to another scene. (Ex. you have a scene for every watch house in the city, but they all use the same city jail) Set scene A that has the image. Switch to Scene B, but don't set it. Select the shared feature image from the left hand backdrop area and press "+ Add Image" That image will be added to the Scene B, already named. If you have brought in an image, but you don't like the aspect ratio. This can often happen with a careless drag from library to VTT, and especially happens when you don't have a selected graphic while adding an image but instead use the "Import from URL" dialog. Set the scene Select the  improperly-proportioned feature image from the left hand backdrop area and drag the height slider until it looks right Put the director interface in edit mode Press the recatpture button Set the scene again. This image has had its aspect ratio updated.
Thanks for all your work on this, Keith. This is a great addition and I commend your demo videos and walkthroughs.
1757885755

Edited 1758321186
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
v1.0.5 Improvements Improved Backdrop user interface, Report Function, Improvements to Help Mode, fixed set bug on search and repor t, uncluttered interface Changes are documented below. There are no breaking changes. Improved Backdrop user interface The backdrop/highlight buttons on each image are fiddle to press, and realistically superfluous. The top image is always the backdrop image. Now to set the backdrop, just click anywhere in the image, and it will become the backdrop. Report Function There is a "Report" button under settings that sends a list of all Acts, scenes and images. Scene names are appended by the count of Items attached to that scene. Might be useful for recording a list. Notably, each name line is a link that sets either the scene or highlights the image. Advanced use: Note that this link is actually a chain of commands that can be copied and pasted into a handout link (with some editing.) If you press the button in the report, then press the up arrow in chat, you will get the commands given: !director --expand-act-only|Meta !director --set-active-scene|Meta|Homes !director --set-backdrop|1757836173258_6858 Roll20 need those commands to all be one single line and have html line feeds (
) inserted between each command. Also for a journal button, the whole thing needs to be preceded by a back tick, for reasons. So editing those three commands into: !director --expand-act-only|Meta
!director --set-active-scene|Meta|Homes
!director --set-backdrop|1757836173258_6858 and pasting them into the url link of a selected word in a handout will cause those commands to issue. In this way, a chain of acts and scenes can be embedded into a handout of game notes, for example, so that the scene can be quickly accessed in the course of play. If you actually wish to fully set the scene, you will still need to either press the button in the interface (again, for reasons), or issue the command: !director --set-scene in a macro, or typed into chat. Improvements to Help Mode Cleanup and addition of some undocumented interface controls Fixed set bug on search and report, uncluttered interface When using search, a spurious image with zero height was sometimes created. This no longer happens. I also uncluttered the interface a bit by moving the superfluous search buttons from the column heads into a single search button in the main header. Easier to find.
This is fantastic! Bravo Keith! And I find it's running into some things, that don't work quite as well as  scenes I had set up in the game I'm running. I'd like to have the images full screen, so there is no margin outside of the image. Is that possible, or at least to have the image automatically justified to the bottom of the screen? Basically, my issue, is I have images of NPCs that I want to crop the bottom off of. This is a scene (map) I set up before I started using Director. The players can't see that the dwarf NPC's image extends below the screen. But with director an inch or so of her legs would be visible below the map. I realize I can drag the map to bottom of the screen, or resize it. But then the process is not as seamless. Also, I wonder if there would be an way to set up for location labels like I have here. Unfortunately the names here are text so I would have to type the name of the location each time. I'm thinking my best bet is to photoshop the location name onto a scroll for each individual location. When the scene loads I still have to move them to the foreground layer, and move them into their proper place. Basically, what would be awesome, is a function where you can preset a scene, so several images show up where you want on the layer you want them, when you set the scene. Rather than just one image with the other images off to the side ready to be dragged into place. I have a sneaking suspicion,  that would be very hard to code, if it's even possible, but figured it's worth asking. Regardless, of whether you can address any of these issues, this is quite a thing you've created here.
1757898631
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think your first request could be done easily with a manual code change, and a bit more difficultly with a in-program setting. I can look up the easiest way to remove the margin.  I had originally included a margin due to the personal preference of including the player tokens around the edg eof the image (so that players would have access to token actions, and such). Hmm. Actually, ensuring that there is no border would also require resizing the page to fit the graphic. It might be more of a lift than I first thought. Still, I will investigate. In the meantime, you can simulate what you want by putting a black bar (rectangle) at the bottom of the page, on the Foreground Layer. Just don't put any transparency on it, and it will cut off Token layer graphics. As for the other issue, have you experimented with Grid Mode? That lays up to 9(?) images in a grid on the screen and separates them with Dynamic Lighting barriers. Instead of changing the scene, you can drag the tokens from scene to scene.
1757898872
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Oh, and regarding the label, you're the second person to ask for that, so yes, I will consider it. I need to think of the best way to handle it. I am unlikely to implement a "banner graphic" of any sort, as I think it might be problematic to work out the spacing and letter size needed from user to user. But two features I am still pondering the best way to implement are causing a title to optionally appear, and a way to tag Images with notes that display in the Director handout. The latter would need to be easy to edit and maintain, and be safe against accidental erasure. I am waiting upon the introduction of map pins, which may have some technologies I can leverage for this.
1758321535
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
v1.0.5 is now available in One-click [ changelog ] Upcoming minor improvements include adding scene count to acts in the Report, plus enhanced control for .webm display. I discovered that Roll20 Handouts won't display a .webm animation, but it can set them just fine on the VTT. You can use the current version for setting animated backdrops, but until 1.0.6 drops, the preview in the control panel will be blank. The update will use a filmstrip image to indicate an animation. I am also still working out the best way to handle labels and previews without over-complicating the interface. I am open to hearing thoughts on this.
1758436734
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here is what I am working on for Captions. This will be in the next version (1.0.6) of Director, but I am soliciting feedback while I work out the bugs. There is a new set of buttons under the Settings menu Captions [set] [on] [off] Director will default to Captions: off. You can toggle this at any time, but it is a campaign-wide toggle. Once captions are turned on, you can create a text object anywhere on a theater page (i.e.anywhere Director works). You can style this and position it wherever you want it to be. You can also put it on any layer you want. However you create the object, that's how it will display. So for instance, if you want to be the only one to see it, set it on the GM layer. If you don't want it obscured by whatever ad hoc graphics you drag around the page, but it on the Foreground layer. Before you press the button to set the definition of caption, you can include Keywords (without quotes): "[Act]" will be replaced by the name of the act being set. "[Scene]" will be replaced by the name of the active scene. "[Image]" will be replaced by the name of the backdrop image. If there is no backdrop image, no caption will display. All other text (punctuation, etc.) will remain as-is. Examples, assuming you are displaying the Image called "Yawning Portal" in the Scene "Castle Ward" in the Act "Waterdeep": Template: "Scene: [Scene], Location: [Image]" Caption:  "Scene: Castle Ward, Location:  Yawning Portal" or Template: "You are here -> [Image]" Caption:  "Y ou are here -> Yawning Portal" Each page can define its own caption style which will be used exclusively for that page. Behavior: If you manually tweak a caption after it has been created (move it or change the color), it will last until you re-define it or change scenes. Then it will revert to your regular definition. Captions are always brought to front after creation. So if you want to have a constant graphic like a scroll or name plate appear behind the caption, just place it manually. Be aware that any such manually-placed graphic is not recognized by Directory and will persist until manually deleted. Captions only work in Scene Mode, not Grid Mode. That way lies insanity... Roll20 Text Objects have their x and y positions center set by center, and the width is impossible to predict. Therefore, you will get the most consistent results setting it to center.
The caption idea sounds great. I'm excited to see how it works. Now, if only roll20 had more/better fonts to choose from. In the meantime, you can simulate what you want by putting a black bar (rectangle) at the bottom of the page, on the Foreground Layer. Just don't put any transparency on it, and it will cut off Token layer graphics. Thanks for the tip about a black bar in the foreground layer, it works fairly well. I do need to adjust the bar regularly because my background images have different aspect ratios, so the width of the margin is always increasing or decreasing.  ensuring that there is no border would also require resizing the page to fit the graphic. It might be more of a lift than I first thought. Still, I will investigate. I figured there might be a challenge with resizing the page for every image. I imagine it would be easier to just get rid of top and bottom margins, which wouldn't necessitate resizing the page. I personally don't care about there being a margin on the sides. Really appreciate all you do!
1758572982
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The issue with removing the margins is that it still won't solve your problem. A very long narrow scene would still come out to the edge left and right, but not hit top and bottom. The opposite would be true for a tall, skinny image. It might also become tedious if players are continually having to re-adjust their zoom to fit the new page bounds comfortably. Also, the new caption system kind of depends on a consistent page size. So given these design issues, I have opted to go for captioning and view consistency, over page re-sizing.
1758573023
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Speaking of captioning, I am pretty happy with the current performance and will likely send a Pull Request tonight.
1758650577
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Director now has a wiki page .
I'm stumped by the captions feature. I selected the text, hit [set], and got the first response. (great!) But then when I hit [on], I got the second message. When I entered:  !director --captions|define  (because I didn't know what else to do) I got the third [error} message What am I missing?
1758770212
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hard to say without sitting over your shoulder. I can say that I obviously missed the text for that error message. The correct command is  !director --define-caption Thanks for finding that. The set button however, should be issuing the correct command. It's just the error message has the wrong text. Now, to the error message. The trigger for that message is "if(!st.captions.template)", or rather, "Send this message if there is no caption template for this page. I have created a brand new campaign from scratch, and I can confirm it is not working there. I just have to figure out the difference between that and my development campaign.
1758771962

Edited 1758773019
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ok, I found the issue, and I'll submit a PR for it. Technical explanation: I had originally had one caption definition for the campaign, and later expanded it to a per-page definition. The "captions-on" feature looks for that global defnition before turning captions on. I later switched to per-page, but the original existence of a global caption in the state object (the bit of a mod that persiss between games) meant that it never failed that test. I had no problem in my test campaign. The new block of code that turns on captions now tests correctly. TL;DR: It was performing an outdated test. I fixed the issue. Thank you for finding it! If you don't want to wait for the next PR you can get the corrected code (plus a another minor bug fix), you can install manually from here .
1758823345
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Pull request has been sent. I'll update here when it is merged into the One Click Repo.
1759863129
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The PR just merged today. Captions are operative. I hope. :)
1760487077
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Director v1.0.8 Live on One-Click Added search-again button on search results Just click on the title bar in the chat tab search results to call a new search. Improved backup handout selection If you only have one backup, int will format the drop down query correctly Added move up/down/rename/redefine item buttons in edit mode In Edit mode, all items buttons now have move up and down buttons to match behavior of Act and Scene buttons. There is a pencil icon to allow you to rename the display name of an item, and a redefine button, similar to the image redefine button that allows you to redefine where that button points to. For Handouts, Rollable Tables, Macros , and Characters, you can choose from a drop down. For Audio Tracks, replace the current button with the track that is playing. For Variants, replace the button with a button the points to the currently selected variant token. Improved table rolling Table results are formated better with more naturalistic results. If the table entry contains a graphic, it will display in the chat output. Supernotes integration If you have Supernotes installed, all Character and Variant for the currently set Scene will have an info button next to the star. Press this to use Supernotes to send the token notes to chat. Coming in next update: Optional alphabetical sorting of item buttons. Improved Supernotes integration with new view that supplies art if none is specified.
1760506934
GiGs
Pro
Sheet Author
API Scripter
wow, comparing this to the first version, it has really grown.