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.