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 .
×
Advertisement Create a free account

[Script] UniversalVTTImporter -- Import .dd2vtt files to create Dynamic Lighting Lines and Lights!

1607133960
Andan said: ...and of course, after onemore  !uvtt, the new settings showed up. Thanks for the help  The Aaron !
Worked like a charm! I love the RPG community, thanks a bunch for making this public.
1608047763
The Aaron
Forum Champion
API Scripter
No problem!  Glad it's working for you!
I'm very new to game mastering on roll20. I'm confused by the instructions. How do I install this software? Is there a different tool that generates the .dd2vtt file? Sorry, just confused by the instructions and the universal VTT tool doesn't have a readme in the GitHub.
1608125661
The Aaron
Forum Champion
API Scripter
API scripts require a pro subscription. .dd2vtt fires are the export format of Dungeon Draw. 
1611992273
I have a question does the Script support updated Dynamic Lightning?
1612013142
The Aaron
Forum Champion
API Scripter
Yes, such as it is. It will detect which is in use on the page and set the lighting appropriately for it. 
1614563993

Edited 1614564015
Hello, this looks cool! However, I am also getting the issue that Malik H. had, the "Error: Universal VTT Data is missing or corrupt" error. I have the graphic selected, used the Universal VTT Import Sanitizer from the Universal VTT file (from Dungeondraft), and pasted the output into GM notes of the graphic selected. I shut off all other API scripts like he did, but still am getting the error. The output is below in the codeblock: {"format":0.2,"resolution":{"map_origin":{"x":0,"y":0},"map_size":{"x":35,"y":30},"pixels_per_grid":70},"line_of_sight":[[{"x":19,"y":23},{"x":23,"y":23},{"x":23,"y":24},{"x":22,"y":24},{"x":22,"y":26},{"x":11,"y":26},{"x":11,"y":25},{"x":12,"y":25},{"x":12,"y":23},{"x":13,"y":23},{"x":13,"y":24},{"x":19,"y":24},{"x":19,"y":23}],[{"x":18,"y":18},{"x":20,"y":18},{"x":20,"y":19},{"x":24,"y":19},{"x":24,"y":18},{"x":25,"y":18},{"x":25,"y":22},{"x":19,"y":22},{"x":19,"y":20},{"x":18,"y":20},{"x":18,"y":18}],[{"x":24,"y":17},{"x":24,"y":12},{"x":28,"y":12},{"x":28,"y":15},{"x":30,"y":15},{"x":30,"y":21},{"x":29,"y":21},{"x":29,"y":22},{"x":26,"y":22},{"x":26,"y":17},{"x":24,"y":17}],[{"x":19,"y":8},{"x":21,"y":8},{"x":21,"y":10},{"x":20,"y":10},{"x":20,"y":17},{"x":17,"y":17},{"x":17,"y":20},{"x":13,"y":20},{"x":13,"y":22},{"x":12,"y":22},{"x":12,"y":21},{"x":7,"y":21},{"x":7,"y":20},{"x":11,"y":20},{"x":11,"y":13},{"x":10,"y":13},{"x":10,"y":9},{"x":11,"y":9},{"x":11,"y":8},{"x":15,"y":8},{"x":15,"y":9},{"x":19,"y":9},{"x":19,"y":8}],[{"x":11,"y":4},{"x":16,"y":4},{"x":16,"y":5},{"x":15,"y":5},{"x":15,"y":6},{"x":11,"y":6},{"x":11,"y":4}],[{"x":30.992188,"y":0},{"x":31,"y":0},{"x":31,"y":2},{"x":33,"y":2},{"x":33,"y":15},{"x":31,"y":15},{"x":31,"y":21},{"x":34,"y":21},{"x":34,"y":25},{"x":29,"y":25},{"x":29,"y":23},{"x":26,"y":23},{"x":26,"y":28},{"x":22,"y":28},{"x":22,"y":27},{"x":10,"y":27},{"x":10,"y":25},{"x":5,"y":25},{"x":5,"y":21},{"x":6,"y":21},{"x":6,"y":20},{"x":2,"y":20},{"x":2,"y":18.027344},{"x":-0.800781,"y":18.027344},{"x":-0.800781,"y":14.984375},{"x":2,"y":14.984375},{"x":2,"y":13},{"x":9,"y":13},{"x":9,"y":9},{"x":6,"y":9},{"x":6,"y":1},{"x":11,"y":1},{"x":11,"y":3},{"x":16,"y":3},{"x":16,"y":1},{"x":22,"y":1},{"x":22,"y":5},{"x":19,"y":5},{"x":19,"y":7},{"x":22,"y":7},{"x":22,"y":10},{"x":24,"y":10},{"x":24,"y":11},{"x":28,"y":11},{"x":28,"y":10},{"x":27,"y":10},{"x":27,"y":2},{"x":29,"y":2},{"x":29,"y":0.957031},{"x":28.992188,"y":0.957031},{"x":28.992188,"y":-1.320313},{"x":30.992188,"y":-1.320313},{"x":30.992188,"y":0}]],"portals":[],"environment":{"baked_lighting":true,"ambient_light":"ffffffff"},"lights":[]} What am I doing wrong, if anything? Thanks.
1614657638
I am also getting the " (From ): Error: Universal VTT Data is missing or corrupt." Error...
1614663087
The Aaron
Forum Champion
API Scripter
Hmm. Sorry I didn't get back to you today, it's a super busy week for me. I'll try and take a look tomorrow. 
1614745833
It worked this time. Not sure why it didn't before, but I was able to get it to go. Once again -- ty for your hard work!!
1614752688
The Aaron
Forum Champion
API Scripter
That's great to hear!  I still need to investigate Caymon's issue, maybe it's working for them now too. 
1614799817

Edited 1614800411
I'm not understanding how to run the !uvtt. I've tried "/run !uvtt", "/run!uvtt", and just "!uvtt". nothing seems to work.I keep getting "Unrecognized Command". I just started using Dungeondraft and I would love to be able to import them easily. I do have a Pro subscription to Roll20.
1614800112
The Aaron
Forum Champion
API Scripter
Have you installed UniversalVTTImporter from the Script Library on the API Scripts page of your game?
1614801304
Not that I know of. How do I go about doing that?
1614801579
Nevermind. I figured it out. Thanks for everything, this makes map making so much easier.
1614801732
The Aaron
Forum Champion
API Scripter
Great!  Let me know if you run into any issues or think of anything that could be added to this.
oh, so we need a Pro account to use this? I bought the plus in order to unlock dynamic light. But I can't because even with dynamic light, if I can't use API script, I can't use it? Did I miss something?
1615387994
The Aaron
Forum Champion
API Scripter
That's correct, sorry for the delay in responding.  The API is a Pro Subscriber Perk.  You can draw Dynamic Lighting lines with a Plus subscription, but you need a Pro subscription to use API scripts.
Hi Aaron the wonderful API!. I think this is likely my lack of understanding but after I run the script my maps end up with circles everywhere? I have attached some screenshots. Happy to provide any further clarification as necessary.
1619367742
The Aaron
Forum Champion
API Scripter
Those are likely the light sources for the map.  If you go to the DL layer, you'll see some green spots where each light source is centered. That said, that highlighted a bug in the way bright and dim light are specified for UDL, which I've now fixed and pushed up.  it should be available in the 1-click Tuesday.  You'll have to select your map and run: !uvtt --clear !uvtt to fix the light sources, or manually edit them, sorry about that.
1619367793
The Aaron
Forum Champion
API Scripter
Update v0.1.7 -- Fixed Bright and Dim Light calculations on UDL. (Thanks  iamonlv426 )
Thanks, Aaron that's brilliant really appreciate your prompt reply. 
Hey Aaron I still haven't seen it appear in the 1-click as yet - how long does it normally take?
1620052804
The Aaron
Forum Champion
API Scripter
Hmm..  Looks like the API pull requests weren't pulled in last week.  I'd expect it to show up tomorrow evening.
Thanks Aaron.
This API script is awesome.  Such a time saver. I'm trying to use it to set the lighting for a multi-level building, and am running into some usability speed bumps.  Since it's using the GM notes to get the coordinate info, I can only store the lighting geometry for one level of the building, and need to save the JSON for the other floors elsewhere.  Clearing the lighting, swapping the JSON out manually, and rerunning the `uvtt` command is workable, but definitely breaks the flow of gameplay. To aid in scripting, could optional arguments be added to the `uvtt` command to specify the lighting geometry and target token object manually? That or a way for it to index into a list of geometries in the GM notes based on the current index in the selected token's rollable table.
1622770884
The Aaron
Forum Champion
API Scripter
hmm.  I'm having a hard time understanding why the GMNotes wouldn't hold all the light info, or alternately why you'd need to overwrite the GMNotes for different graphics?  Can you lay it out lay it out in more detail for me, or perhaps PM me a link to your assets so I can try and duplicate the issue?
1623774117
I can't get any maps to work with this anymore. In the past, the standard instructions have worked just fine, but even with the API up to date, nothing happens when I run the !uvtt command. Is there anything new that I'm missing?
1623774186
The Aaron
Forum Champion
API Scripter
You have the graphic selected, and you've put the json data in the gm notes on it?
1623774407
I did. No idea what happened, but I deleted and reinstalled the API again, and it worked this time. Unsure why, but at least it works!
1623774465
The Aaron
Forum Champion
API Scripter
Hmm.  Tuesday is when they do API updates, it may have been that the API sandbox in your game was in a weird state.  Glad you got it working and let me know if you have any more issues. 
1626883688
Hi @aaron,  first off, I love your scripts.  I installed this one and was able to successfully import all the dynamic lighting for a map in minutes. the instructions were spot on. But. now I tried a second map on a second page and it keeps complaining about missing or corrupt vtt data. I did everything the same... I even tried re-importing the vtt data that worked the first time and it still complains about bad data. Any Ideas? I already tried downgrading to 1.6 and deleted and reinstalled. I restarted the sandbox several times and reuploaded the image too. 
1626884036
The Aaron
Forum Champion
API Scripter
Hmm. That's peculiar. If you want to pm me the file contents, or invite me to your game and GM me, I can take a look. 
1626906369
Never mind. I figured it out in the end. I've been installing too many extensions! got a bit carried away. After diasbling the conflicting code it all worked as expected. 
1626909046
The Aaron
Forum Champion
API Scripter
Great!