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] Dungeon Mapper - Auto Dynamic Lighting That Move With The Tiles, Texture Pack Approach, User Interface.

1427057818

Edited 1427333709
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Available on the Market! Auto Dynamic Lighting that Moves with the Tiles, Texture Pack approach, User Interface and Door/Torch Controls. The idea is: Leverage the new hyperlink API chat buttons (using an image of the tile as a preview.) Leverage the "object.remove()" so dynamic lighting can move with the tiles. Present a basic approach to "texture packs" for tiles (so you can switch out tiles as you build the map.) Steps to install/use: Add the "DungeonMapper" script. Add the "DungeonMapperTextures" script. Add the "DungeonMapperDoors" script. Enter the command "!DungeonMapper." Place a "check" in the "in bar" option for the macro named "♦1-Dungeon-Mapper." Click that macro once it shows up and use the chat pane User Interface. Click it any time in the future to bring up the chat pane User Interface. (Image Zoom) Note: Script edits the map with the "player bookmark." Found on the Market here. Scripts found on GIST here . <a href="https://www.youtube.com/watch?v=SpY9jVlguoM" rel="nofollow">https://www.youtube.com/watch?v=SpY9jVlguoM</a> Removing the watermarks: This process is painful. You can help improve this by voting here. Download the pack from the Market. Upload to your library. Copy the URL for each one and update the "urlValue" in the texture array. You only need the characters after "...images/" Exmaple: '8399411/qgAfMfPQnaU5eQVPEncqYQ/thumb.jpg?1427051990' If you are using the Dev Server will need to update the leadingURL variable. Read more on the Wiki .
1427058686
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Still working on the door control for this.... but all the piece parts are there (i.e. open and closed dynamic lines, and needed information to relate door to dynamic lighting lines.) On novelty here worth kicking around is relating a path to a tile. Paths don't have a lot of properties field to place information in ( Wiki Path Object ) But..... the "controlby" property will accept the tile graphic "_id." I am taking advantage of that with this script... down side is it won't survive the Transmogrifier (which I am a big fan of.)
1427059852

Edited 1427060841
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Please give it a try, looking for feedback... the main concern as always is: "Is this Vince compatible?" or does this reach the high standard required to achieve the "Vince Seal of approval."
1427083235
vÍnce
Pro
Sheet Author
Now I see what you've been up to Stephen... This looks very cool. I'll have to give this a go. I can always find something to break. Work has been very busy lately, so don't expect a timely "Seal of Approval". :-) I might need to steal your my seal BTW.
1427207471
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Door controls complete.... <a href="http://i.imgur.com/ABWvftB.gif" rel="nofollow">http://i.imgur.com/ABWvftB.gif</a> Dynamic Lighting matches the swing of the door (so bad guys can hide behind them.) This code is really close, should work as is.
1427209360
Alicia
Sheet Author
Wow.. You're script has really come a long way. Can't wait to try this version!
1427209602
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Alicia G said: Wow.. You're script has really come a long way. Can't wait to try this version! Its help from others and the "Update of Holding" that has moved this along. obj.remove() and API command hyperlinks are great. Next we need this: [API - Tags] API Access to Image Tags. So VOTE! (Please)
1427285503
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Updated the lead post.
1427313402

Edited 1427313471
Nicely done! I can't wait for this to be fully finished and released! Any chance you'll update this function to work with the DungeonReady pack?
1427333653

Edited 1427333770
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="https://marketplace.roll20.net/browse/set/522/dungeon-mapper" rel="nofollow">https://marketplace.roll20.net/browse/set/522/dungeon-mapper</a> Lead post updated! Pack is on the market! However... if you don't mind watermarks script istalls preview pack.
I downloaded the pack and the scripts, do I need to change every image to get rid of the watermarks? If so how. I'm kind of lost here. I can get the image data for the downloaded pack but how do you tell if the data your changing in the script is in the proper place, meaning I'm changing out the watermarked image with the same unmarked image?
1427579928

Edited 1427580438
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
What I have found the works best. 1) Open the API editor in one tab (you will be changing the DungeonMapperTextures script.) 2) Open the campaign in another tab 3) Use the in game image tool to get to your library. 4) Search for the "path key" you want Example of looking for "000" <a href="http://imgur.com/EOYndaR" rel="nofollow">http://imgur.com/EOYndaR</a> 5) Right click the one you want and copy the URL. 6) paste it in NotePad or some other text editor. 7) copy the part you need (after .../image/") 8) Edit the script. 9) Save... script 10) In the game reload that texture pack and see if it looks right. 11) repeat for each key Its painful and I am sorry for that hopefully we can get access to image tags. You looking to update the underlined parts to the images in your library (bold pathKey to know which is which): textures['Old School'] = [ {urlValue: ' 8355708/yoreY6YINK-fhkWS-MU5EA/thumb.jpg?1426884849 ', height: 140, width: 140, tileNumber: 0, pathKey: '000' , menu: 1}, {urlValue: ' 8355707/NUz90vH7UiMp_hfLF61pEQ/thumb.jpg?1426884849 ', height: 140, width: 140, tileNumber: 1, pathKey: '001' , menu: 1}, {urlValue: ' 8355722/lCJpKaiLHI29mCdKaC9YzA/thumb.jpg?1426884854 ', height: 140, width: 140, tileNumber: 2, pathKey: '002 ', menu: 1}, {urlValue: ' 8355713/yMCYHzb9UUtlByvNoJLQcw/thumb.jpg?1426884852 ', height: 140, width: 140, tileNumber: 3, pathKey: '003' , menu: 1}, ....code continues
OK, thanks man. I was on the right path but thought I might be wrong. Thanks for the help. It will be painful but it'll be cool when I'm done! Thanks again!
1427582518
vÍnce
Pro
Sheet Author
It's too bad the API can't access tags. Someone should make a suggestion :-)
1427585496
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Vince said: It's too bad the API can't access tags. Someone should make a suggestion :-) I think it would help market sales and increase mentor membership. And then I could just buy this stuff rather than make it.
Well bud, I got all the changes done but I get this- I checked the script against the unchanged one and it looks ok. The image urls I pulled right from my library. I click on the image and nothing happens. Any ideas?
1427592980

Edited 1427593012
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Are you on the Dev server? Because if you are its an easy fix.
1427593326
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
In the "DungeonMapperMain.js" script there is: leadingURL ='<a href="https://s3.amazonaws.com/files.d20.io/images/" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/</a>', At line 8 and the same thing in the "DungeonMapperDoors.js" at line 7 Should be: leadingURL ='<a href="https://s3.amazonaws.com/files.staging.d20.io/images/" rel="nofollow">https://s3.amazonaws.com/files.staging.d20.io/images/</a>', If you are on the Dev server.
1427593538
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
You might be a few digits short on that front part... on you last on it starts with 5 digits "67122." I think i normally see 7 digits at the start... (This is the worst part which is why we need this: VOTE for TAG ACCESS!! )
1427595648
vÍnce
Pro
Sheet Author
Stephen S. said: ... (This is the worst part which is why we need this: VOTE for TAG ACCESS!! ) Shameless. Absolutelty, shameless.
1427596469
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Vince said: Stephen S. said: ... (This is the worst part which is why we need this: VOTE for TAG ACCESS!! ) Shameless. Absolutelty, shameless. My squeaky API bicycle wheel needs some grease!
Nah, I'm on live server. Is it the same there?
1427602276
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Copy one of the URLs for your images and PM it to me when you get time.
Finally got it working good. Much thanks to StephenS.!!! Really appreciate how far you guys who write these scripts go to help us non-coders out! Keep up the good work!
1427653685
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Jeremiah C. said: Finally got it working good. Much thanks to StephenS.!!! Really appreciate how far you guys who write these scripts go to help us non-coders out! Keep up the good work! Its not a problem, hope you have some good adventures with them.
1427728223

Edited 1427738790
I am about to purchase this set, but if I do, I have to change a bunch of link pointers to get the un-watermarked images in the script? I tried the scripts and see that it works for the watermarked images (thanks for the trial :) ). If I change the pointers, can I just add the text for that part of the script here and people can use it? Edit: The scripts keep generating random errors, after I bought the pack. I'm not sure if this had anything to do with the purchase or not though. The macro's also stop working after a while too (is there a timeout for the test?). I am going to have to figure out the process of switching out the images.
1427741583
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="https://app.roll20.net/forum/post/1746279/#post-17" rel="nofollow">https://app.roll20.net/forum/post/1746279/#post-17</a>... See that post for help or send me a PM. I would suggest you do not post any scripts that bypass the market. It would just create issues I think everyone wants to avoid.
1427741884

Edited 1427741997
I got it. Didn't realize that I had to upload the file directly to my account. So much for reading huh? Sorry about that. I'm moving everything as we speak. I was doing it all in the script window, but decided to move to Sublime. I have it set up the way I like, so it's easier, and my working window is larger. Have you had any issues with the scripts not responding?
1427742150
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
It's a painful process (hard coding the URLs) sorry for that. I have not had any issues reported yet, however it's entirely possible there are issues with the script. If you have issues send me a note and I will work to get it corrected.
1427742808

Edited 1427743046
Will do.. And no need to apologize. There are so many things that we want as community, that its impossible to satisfy all of them at once. If and when the Devs make the images accessible via tags, it'll make this process better. I really do think that what you have created is one of the most handy tools (note, there are many useful scripts out there, and they are most appreciated). Time savings like this are the things I personally look for, so thanks for this. The images are great, but I really purchased the script ;). You could apply this to so many things.
1428288071

Edited 1428288616
Heya, Purchased the pack but having a bit of an issue. I can get the main menu up and everything, but dragging the images to the tabletop doesn't do anything. It doesn't matter which layer, they just refuse to go. Clicking on them (like in the video) doesn't work, either. Any idea what would be causing this? Okay, I figured out the above. It sends everything to the page the players are on, even if that's not the page you have active. I'm not sure how or why, but you might want to mention that in the OP. Cheers. Also, if I were to PM you proof of purchase, could you send me the correct listing for the items so I don't have to do all the links manually, or is that not possible? It's a pretty monumental time sink. I did vote for the API image tags accessible suggestion, so hopefully we'll see it at some point. Thanks, really excited to use this.
1428316173
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
It does send everything the "player bookmark"; that is how you control which map you wish to edit. Sharing API code with URLs that link to market assets is frowned on... so the API has to be edited by the user. Aaron gave a great suggestion on improving this process, I just have not had time to code it.
1428334147

Edited 1428334772
I tweaked your doors script to toggle multiple token features (All selected tokens) at once (Useful for toggling on / off multiple lights): 31,32c31,32 &lt; &lt; obj = _.first(msg.selected); --- &gt; for(var i=0;i&lt;msg.selected.length;i++) { &gt; obj = msg.selected[i]; 34c34 &lt; if ( objCheck == false) {return; } --- &gt; if ( objCheck == false) {continue; } 77c77 &lt; return; --- &gt; continue; 89c89 &lt; return; --- &gt; continue; 101c101 &lt; return; --- &gt; continue; 113c113 &lt; return; --- &gt; continue; 141a142 &gt; } Thanks for the script, it's definitely the best of it's kind to date. I'd love to see this sort of feature-set expanded to / integrated with one of your geomorphic map scripts :).
Stephen S. said: Aaron gave a great suggestion on improving this process, I just have not had time to code it. With no intentions of rushing or pressuring you, any ETA on when this might happen? Trying to decide if I should take the time to do this all, or if I should wait for the improvement. I totally respect that you're doing this in your free time out of the goodness of your heart, so please don't think I'm rushing you. Your work is super appreciated!
1428682653
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Chris S. said: I tweaked your doors script to toggle multiple token features (All selected tokens) at once (Useful for toggling on / off multiple lights): 31,32c31,32 &lt; &lt; obj = _.first(msg.selected); --- &gt; for(var i=0;i&lt;msg.selected.length;i++) { &gt; obj = msg.selected[i]; 34c34 &lt; if ( objCheck == false) {return; } --- &gt; if ( objCheck == false) {continue; } 77c77 &lt; return; --- &gt; continue; 89c89 &lt; return; --- &gt; continue; 101c101 &lt; return; --- &gt; continue; 113c113 &lt; return; --- &gt; continue; 141a142 &gt; } Thanks for the script, it's definitely the best of it's kind to date. I'd love to see this sort of feature-set expanded to / integrated with one of your geomorphic map scripts :). Good stuff.
1428682707
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Rathlord said: Stephen S. said: Aaron gave a great suggestion on improving this process, I just have not had time to code it. With no intentions of rushing or pressuring you, any ETA on when this might happen? Trying to decide if I should take the time to do this all, or if I should wait for the improvement. I totally respect that you're doing this in your free time out of the goodness of your heart, so please don't think I'm rushing you. Your work is super appreciated! This weekend is the plan.
I sent you a pull request, if you're interested in merging any of the features I've added to my local build to upstream. Feel free to ignore them if you like :P. Changed the "Toggle" feature to work on multiple tokens simultaneously. Modified the "addTile" routine to support duplicating any number of tokens simultaneously (Preserving orientation). Added a feature to control new and mass token placement location. Added a new pair of tiles (Gas lamp). I am running an underground dwarven steampunk-esque campaign, and these fit in pretty well. Added variable menu width (View more columns simultaneously).
1428687995
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
By all means! Open to any and all suggestions!
Thanks for the update Stephen. Really appreciate what you're doing here!
1428974360

Edited 1428974387
Hi Guys I'm really new to roll20 and have just purchased dungeon mapper. I also don't have much knowledge on Java scripts. I followed the instructions and copied the 3 scripts to my campaign but I can't get the menu up by typing !DungeonMapper. Should I be typing that on the chat box to enable it? I'm not really sure what to do. Thanks for the help.
Jasper M. said: Hi Guys I'm really new to roll20 and have just purchased dungeon mapper. I also don't have much knowledge on Java scripts. I followed the instructions and copied the 3 scripts to my campaign but I can't get the menu up by typing !DungeonMapper. Should I be typing that on the chat box to enable it? I'm not really sure what to do. Thanks for the help. NVM got it to work. Awesome Job. :)
1428976018
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Jasper M. said: Jasper M. said: Hi Guys I'm really new to roll20 and have just purchased dungeon mapper. I also don't have much knowledge on Java scripts. I followed the instructions and copied the 3 scripts to my campaign but I can't get the menu up by typing !DungeonMapper. Should I be typing that on the chat box to enable it? I'm not really sure what to do. Thanks for the help. NVM got it to work. Awesome Job. :) Enjoy!
I guess I'm the only one with this problem. I'm pretty new to this stuff, but I created a fresh campaign and pasted the main script in, but got this error: /home/symbly/www/d20-api-server/node_modules/firebase/lib/firebase-node.js:1 orts, require, module, __filename, __dirname) { function g(a){throw a;}var j=v ^ ReferenceError: DungeonMapperTextures is not defined at checkInstall (evalmachine. :660:27) at Object.registerEventHandlers (evalmachine. :672:9) at Sandbox. (evalmachine. :683:19) at eval ( Help?
1429146965

Edited 1429147123
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
You need all the scripts. There is a total of four three at the moment.
Any chance of this working with hexes? Long shot, probably nigh-impossible, but it would be basically the best thing in the whole world. Thanks!
1429723880
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Ian L. said: Any chance of this working with hexes? Long shot, probably nigh-impossible, but it would be basically the best thing in the whole world. Thanks! I have looked at hex... and played around with. Looking at the WIKI i did run across this: <a href="https://wiki.roll20.net/Image_Best_Practices_for_R" rel="nofollow">https://wiki.roll20.net/Image_Best_Practices_for_R</a>... * The hex grid is mathematically drawn, so the pixel height and width for a single hex unit is an approximation I didn't notice in problems with it, but not sure how consisentent the "snapping" is and that could be an issue.
Fair enough. I don't want to ask too much of you, so perhaps I'll dig into your code and see how everything is working. Maybe I can get it to work! Do you have the code you were using to play around with hexes on hand at all? If you're willing, I'd love to take a look. This tool would easily reduce map making time by hours if it worked with hexes. I'll obviously share if I figure something out!
1429744327
Ziechael
Forum Champion
Sheet Author
API Scripter
I'm toying with the idea of setting up a movable labyrinth style dungeon (essentially using multi-sided tiles with pre-determined entry/exit points which i can then flip at will as the players move about, basically to mess with their heads. My biggest issue is having to keep the DL up to date which brings me to my actual question. As your script allows DL to move with a tile does that mean i could throw the img urls into the script (good old hard coding fun... don't worry, i long since voted on your suggestion) and then throw the images into a rollable table, then drag a bunch of table tokens onto the map, set them up how i want and have the DL automatically drawn for me... and, this is the real question... would that DL then update automatically when the token image changes or am i hoping for way too much? Love your work!
1429747655
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Ziechael said: I'm toying with the idea of setting up a movable labyrinth style dungeon (essentially using multi-sided tiles with pre-determined entry/exit points which i can then flip at will as the players move about, basically to mess with their heads. My biggest issue is having to keep the DL up to date which brings me to my actual question. As your script allows DL to move with a tile does that mean i could throw the img urls into the script (good old hard coding fun... don't worry, i long since voted on your suggestion) and then throw the images into a rollable table, then drag a bunch of table tokens onto the map, set them up how i want and have the DL automatically drawn for me... and, this is the real question... would that DL then update automatically when the token image changes or am i hoping for way too much? Love your work! Key thing to keep in mind.... on("change:graphic", function(obj, prev) { //Do something with "obj" here. "prev" is a list of previous values. }); That event gets triggered if you add or change a graphic (even though is says "change" it triggers on add as well.) When that happens you want to create your DL pathing... if you add a graphic, give it path. Now... when you create the paths... the trick is the "controlledby" property in the path. You can put the "_id" value or the graphic in the path. Now they are linked. Next time you get on("change:graphic",{});.... you obj.remove() any paths with that graphics "_id" in their controlled by property... and draw them again based on the changed features of the graphic. So.... on("change:graphic",{}); 1) Remove any paths who's controlby = graphic "_id" 2) Draw new paths based on graphics current properties (top, left, rotation) with a the controllby= graphic "_id." Paths are forever linked and always current.
1429779580
Ziechael
Forum Champion
Sheet Author
API Scripter
So... it is possible? You'll have to excuse my naivety, i've only just started dipping my toe in the javascript ocean. I get what you are saying in essence but just to clarify: to do what i want to do... install script as per the instructions hardcode non-watermarked graphics while sighing repeatedly about not being able to access the library via API add all the 'tiles' i want to use to my rollable table have these tiles update their DL based on the side shown I'll need to tweak the script as is to incorporate an event that triggers when a graphic is 'changed' which would remove existing paths and then redraw them according to the new graphic displayed? I know i've pretty much just repeated what you kindly outlined but i want to make sure i'm right in my understanding before ruthlessly tearing into your beautiful script and ultimately breaking EVERYTHING lol. Thanks for your patience.
1429780953
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Look at this one..... <a href="https://app.roll20.net/forum/post/1408589/script-c" rel="nofollow">https://app.roll20.net/forum/post/1408589/script-c</a>... That one uses geomorphic tiles. I wrote that one before we had obj.remove(). But that one is nearly exactly what you are looking for... the only update it would need would be to make the DL update after tile change.