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 Draw! Map Making Breakthrough (or I figured out how to select the canvas and Aaron taught me to be a "Bit Wiser")

1429055617

Edited 1429056463
I have a question regarding this script. I noticed that when I am running this script, it will override any existing background images with a white screen where you use to draw the dungeons. I am interested in implementing the toggle part of your torches and doors and use the rest of the tiles as a quick add-on to the current map that I am using. Is there a way to make this co-exist with other map images or is there something that I am missing? Disregard that, it is now working fine with the latest version.
Stephen S. said: Updated! New tool added: <a href="http://i.imgur.com/hDUBlN0.gif" rel="nofollow">http://i.imgur.com/hDUBlN0.gif</a> Additional script file for this latest update. Very classy!
Stephen S. said: Updated! New tool added: <a href="http://i.imgur.com/hDUBlN0.gif" rel="nofollow">http://i.imgur.com/hDUBlN0.gif</a> Additional script file for this latest update. Awesome, any updates on the Door's script that will put back a DL Layer for the doors once its been transmod'd to an Active Campaign?
1429112285
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Greg B. said: Stephen S. said: Updated! New tool added: <a href="http://i.imgur.com/hDUBlN0.gif" rel="nofollow">http://i.imgur.com/hDUBlN0.gif</a> Additional script file for this latest update. Awesome, any updates on the Door's script that will put back a DL Layer for the doors once its been transmod'd to an Active Campaign? Likely sometime tomorrow.
Cool, also with version 0.4 I seem to be unable to create large dungeons it will just "hang" when I click the DungeonDraw button. I've experamented a bit with drawing as I go and normally by the 3rd time I "draw something" it will hang, I reset the api's and then I can begin drawing again. Wanted to make you aware. Its in a campaign all by itself with the latest scripts.
1429117359
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
How large is large? Keep in mind with the "flatten tool" you can draw dungeons in sections, you don't need to do an entire dungeon in one pass.
Same issue. Sent you a campaign invite.
Large is/was a about 3/4 of a 50/50 map. The second/third attempt I I used like 2 hallways, draw, then 3 rooms draw, then another room and it hung. restart scripts. Similar behavior again on the third attempt. I can send you a campaign invite as well if you'd like. Let me know.
1429119414
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I couldn't get it to reproduce with Chris.... it might be sending a new draw request before the last one has comepleted.
i had the same symptom with only a 5X5 room. It seems to block other scripts too (in this case powercard). I must save a script to relaunch the API sandbox.
Here is a sample screenshot of Level 1 of my Dwarves Ruins dungeon, I've clicked Dungeon draw about 5 minutes ago. Just these scripts running. If I force a reset of the API.. it will come back to functional and I can create a small object but it totally ignores the previous "stuff" Hopefully this helps.
1429127052

Edited 1429127186
Here is another example of something I tried. I created then first section, and then trying to expand and nothing is happening. After I click DungeonDraw, the menu is completely unresponsive except "Clear Map" It will prompt me to be sure I want to clear it, but it won't do anything. If I go to the API and reset it and come back in, it will let me clear but it won't let me draw anything already on the screen.
1429144179
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Looking into this.
1429148811
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Update v0.5
Found the issue I take it
1429150165
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Greg B. said: Found the issue I take it Not sure, but I am making sure no two request for the chat event go through. var dungeonDrawProcessing = false, //Do Stuff handleInput = function(msg) { //Do More Stuff if( true === dungeonDrawProcessing ){ return; } dungeonDrawProcessing = true; //Do More Stuff dungeonDrawProcessing = false; ),
Seems a bit more stable, but the big map is still freezing on "draw"
In my campaign the scripts hangs everytime. I tried a little caveman debug on this script and it seems that the culprit is here : in the function : findFill = function(path) { in the lines in bold: check = filterObjs(function(mapobj) { ... ... if( (mapobj.get('layer') === 'map') && (mapobj.get('pageid') === Campaign().get('playerpageid')) && (mapobj.get('type') === 'graphic') && (mapobj.get('left') === CheckLeft) && (mapobj.get('top') === checkTop) ) return true; else return false; }); Method used : commenting the code, launching the !DungeonDrawMap with a correct path, placing a log to verify that the code execute and seeing if the code hangs and using dichotomy to repeat the process. To be clear : with only the bold lines commented, the code execute and the script doesn't hang, when i uncomment these lines, the script hangs. I hope this helps
1429199611
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
So this part is for interior wall wrapping. <a href="http://i.imgur.com/XtZGa2s.gif" rel="nofollow">http://i.imgur.com/XtZGa2s.gif</a> I should be tracking what I put in as I go... rather than pulling it everytime.
Even with these lines commented, i still have a problem when trying to create a large room (more than 15X15) : the script hangs and doesn't return. Same problem when i try to create two small room with a corridor.
1429202594
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Laurent said: Even with these lines commented, i still have a problem when trying to create a large room (more than 15X15) : the script hangs and doesn't return. Same problem when i try to create two small room with a corridor. What you pointed out is still not a good thing that I am doing.... working on an update where I am tracking what is placed rather than going back the server to ask.
Good to hear that you are working on a solution. ;)
1429225933
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Have the folks having issues been working on multiple pages?
1429227750
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Update v0.6 -- "DungeonDraw.js" script. Better multiple page handling. I think this may have been the problem (script not working but not throwing errors.) Be mindful of this... found myself making this mistake:
Hmm. Can confirm that I was having the issue on a fresh campaign with only one page. Haven't had time to test your new release just yet.
1429231791

Edited 1429271796
Stephen S. said: Have the folks having issues been working on multiple pages? I can say for sure that there have been times where I've had multiple maps open, there were also times where it was the only page in the campaign. Nevertheless, I was able to complete a Medium sized dungeon without issue. I'll keep testing but probably won't have much more time until tomorrow. Thanks for sticking with this Stephen!
1429248453

Edited 1429250595
I work only in the page with the player bookmark. But my campaign has multiple page with several generated with the dungeondraw script. The new script version works a lot better, but it still hangs when i draw too many paths before hitting the dungeon draw button for example this works : but this doesn't : Hope this helps.
1429276108
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Wokring to optimize this based on a suggestion by Aaron.
Incredible, this should really be a default tool for the roll20 engine.
Hey everyone, This might sound like a silly question but I'm having some trouble installing the Scripts. I have never tried to install/run an API script before so I might(most likely) will be doing something wrong. I have done a fresh install of Java and I have JavaScript enabled in my browser (chrome). <a href="http://puu.sh/hhMU2/8e34df713e.jpg" rel="nofollow">http://puu.sh/hhMU2/8e34df713e.jpg</a> This is the error.
1429331056
The Aaron
Pro
API Scripter
The API scripts need to be installed in the campaign. Here's instructions: <a href="https://wiki.roll20.net/API:Use_Guide" rel="nofollow">https://wiki.roll20.net/API:Use_Guide</a>
1429392220
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Hope to have a major improvement to this script out tomorrow. Aaron solved my timing out issue! Here is a 100x100 map way overloaded at one time. <a href="http://i.imgur.com/8eVybwW.gif" rel="nofollow">http://i.imgur.com/8eVybwW.gif</a>
1429442973

Edited 1429443382
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Update v1.0 -- Major changes to the script "DungeonDraw.js" complete rewrite with image creation queue that prevents hanging (big thanks to Aaron for that.) Added flatten and raise tools. "DungeonDrawConnections.js" &lt;-Deprecated please remove if you have it installed. Only scripts needed as of update v1.0: "DungeonDraw.js" "DungeonDrawDoors.js" "DungeonDrawTiles.js" &lt;-no changes to this file if you have already updated your URLs (keep what you have DO NOT replace.
It works like a charm ! Very good work. Thank you
Nice work Stephen, testing and Greg APPROVED! Love it. Do you have a new ETA on when the DungeonDrawDoors script will be ready to use from the Transmog?
This is really awesome and should be integrated into roll20. Can you do diagonals?
This is brilliant! If you ever plan to expand and need artistic help I would be happy to lay a hand.
1429577776
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Peter H. said: This is really awesome and should be integrated into roll20. Can you do diagonals? <a href="http://i.imgur.com/k3ROhoN.gif" rel="nofollow">http://i.imgur.com/k3ROhoN.gif</a> Any shape .... soon..... (notice the arrows so I will know if the tile faces out or in.)
1429577853
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Bevie said: This is brilliant! If you ever plan to expand and need artistic help I would be happy to lay a hand. I have sent a pack over... should show up soon.
1429649849
Alicia
Sheet Author
Is there any way to change the light settings for the objects? As far as I've noticed it reverts back when I've tried to change the light radius.
1429654448
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Alicia G said: Is there any way to change the light settings for the objects? As far as I've noticed it reverts back when I've tried to change the light radius. I can make it adjustable when I update the door script... However if you want to change it now: Find and change lines 294 and 295 in the door script. case 'DD_021': case 'DD_023': //light sources ON obj.set({ width: 140, height: 140, light_radius: 60, light_dimradius: 20, light_otherplayers: true, layer: 'objects', represents: findObjs({ _type: 'character', name: 'Door-And-Torch-Control'})[0].get('_id') });
Absolutely awesome Stephen, as always. Keep up the good work! I can't wait for the eluded to sewer pack. I could use that in my current campaign.
1429720340

Edited 1429720384
So I have to say that this script and associated packs are amazing. Thank you very much Stephen, really awesome! One idea came to mind that I don't know how feasible it is. I was stacking map tiles to help with secret doors, would be really cool if there was a way to handle secret doors in the doors script (like replace tile X with tile Y) when the secret door is opened. Anyway, absolutely love the innovation (because this script is probably the most innovative thing I have seen as far as Roll20 scripts) and look forward to seeing where it goes as well as looking forward to purchasing additional packages that take advantage of the script.
1429721441
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Kevin said: So I have to say that this script and associated packs are amazing. Thank you very much Stephen, really awesome! One idea came to mind that I don't know how feasible it is. I was stacking map tiles to help with secret doors, would be really cool if there was a way to handle secret doors in the doors script (like replace tile X with tile Y) when the secret door is opened. Anyway, absolutely love the innovation (because this script is probably the most innovative thing I have seen as far as Roll20 scripts) and look forward to seeing where it goes as well as looking forward to purchasing additional packages that take advantage of the script. I had fun making them. Secret doors are an excellent idea! Its a just a varaition of the "left and replace" function of flatten or raise (for placing them.) I am going to handle, doors, lights, chests... etc through state once they are placed (basic idea is here: <a href="https://app.roll20.net/forum/post/1796679/great-ye" rel="nofollow">https://app.roll20.net/forum/post/1796679/great-ye</a>... ) So... once you place a door (secret or other) state will track any change request to it from the any script that wants to interact with it (Transmogrifier wont matter.) Re-writing the main script to support polygon shapes (45 hallways and caves!)
1429737127
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="http://i.imgur.com/LT71UI9.gif" rel="nofollow">http://i.imgur.com/LT71UI9.gif</a> Getting closer! Have to think through the tile set required to transform some of the "L" shapes to 45 degrees. This is placing tiles where the "player" is "inside" the polygon.... need to create a set of tiles for when the player is "outside" the "polygon (as if the structure was a impassable section of a cave.)
Stephen S. said: <a href="http://i.imgur.com/LT71UI9.gif" rel="nofollow">http://i.imgur.com/LT71UI9.gif</a> Getting closer! Have to think through the tile set required to transform some of the "L" shapes to 45 degrees. This is placing tiles where the "player" is "inside" the polygon.... need to create a set of tiles for when the player is "outside" the "polygon (as if the structure was a impassable section of a cave.) Awesome!! Go Stephen go!!!
1429755529

Edited 1429782365
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="http://i.imgur.com/zap66QQ.gif" rel="nofollow">http://i.imgur.com/zap66QQ.gif</a> CAVES! (basic test tiles hope to randomize the tles a bit more.) <a href="http://i.imgur.com/AJxoGBe.gif" rel="nofollow">http://i.imgur.com/AJxoGBe.gif</a>
1429793776

Edited 1429793893
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
So.. I am noticing have to go back and tweak a few tiles for 45 degree support. If you haven't voted, please vote for this suggestion it would only make this process easier for everone. <a href="https://app.roll20.net/forum/post/1749220/api-tags" rel="nofollow">https://app.roll20.net/forum/post/1749220/api-tags</a>...
Chanting!!!! CAVES, CAVES, CAVES!!
How are the caves coming Stephen? I fully expected to be creating my own caves this weekend :)