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] AreaMapper

A couple instructional videos are up (they're linked at the top post)... I'll be adding more soon.
1437933084
Lucian
Pro
API Scripter
Hi Rand, First off, many thanks for an astonishingly sophisticated script - a really fantastic piece of work. I think I've basically got the idea of it, but I'm struggling with some of the details at the moment. I've drawn a simple rectangular area, and I now want to put a door in the bottom side of it. As I understand it, the first step is to cut a hole in the rectangle. So I click "edge walls" twice to get the removal mode, and then draw a rectangle over the area of wall that I want to remove. Nothing happens. What's odd, is that if I do the exact same thing on either of the side walls of the area,  it does exactly what I'm expecting it to - cuts a hole in the wall the size of the rectangle I drew over the top. I've also tried with  the polygon tool, and I get the same results. For some reason I can only cut a hole in the vertical walls, not the horizontal ones. If I draw a big enough rectangle to encompass the whole of the bottom wall, it does remove it entirely; it just won't remove a part of it for some reason. Am I doing something wrong here, or is this a bug? I installed it today, so I'm guessing I'm using the latest version. Cheers, Lucian
1437933608
Lucian
Pro
API Scripter
A little further experimentation suggests that the problem manifests itself with trying to cut into any perfectly horizontal line, whether it is draw with the polygon tool or the shape tool. I've tried creating a new page and I still get the same behaviour...
It sounds like a bug with polygon intersections. I'll take a look. That clue about perfectly horizontal lines will be a huge help. 
1437986268
Lucian
Pro
API Scripter
Ok, another interesting thing to note about this behaviour: if you look closely you can see that it has actually cut the wall line where it was supposed to, but: It doesn't delete/hide the section within the cut area, so it looks like the wall remains continuous It doesn't cut the shape on the dynamic lighting layer at all. I think this  happens consistently (I didn't notice it before because it's hard to spot visually). Lucian
1437998804

Edited 1438173752
Lucian H. said: Ok, another interesting thing to note about this behaviour: if you look closely you can see that it has actually cut the wall line where it was supposed to, but: It doesn't delete/hide the section within the cut area, so it looks like the wall remains continuous It doesn't cut the shape on the dynamic lighting layer at all. I think this  happens consistently (I didn't notice it before because it's hard to spot visually). Lucian Yeah - you definitely stumbled onto something. It has odd behavior with vertical walls too - if you cut a hole in one vertical wall on a rectangle, then cut a hole on the other, you lose the first hole. I'm in the middle of a heavier feature implementation, but your bug is next on the list. As a temporary workaround, just draw your rectangle with the polygon tool, so that the imperfections protect you from this bug.
1438369118

Edited 1438369200
Version 1.1 has just been released. I'm particularly excited about this one, as it features.... Attached Objects! You can now take any token that you created (even character tokens), select them and click 'Run Script', and then "attach" or "detach" them from an area. Once this has been done, the object is completely managed by the area. It will be hidden/drawn along with other graphics in an instance, and it will be kept in sync across all of the area's instances. You can reposition it, change its values, and all of this is recorded in the area. A purple band around the object on the GM layer indicates that it's attached to the area. There's one limitation to Roll20's API in this (which is also a limitation in Token Mod ). Roll20's character sheets don't play nicely with tokens that are managed by the API. You can continue to have tokens represent characters, but any "linked bars" (i.e. having the red bar represent the HP on a character sheet) won't work. When you attach an object to an area, the bars are disconnected from character sheets, and a warning appears in the log. Enjoy this one - I've had it in the backlog for 3 months and finally had the script far enough along to handle it!
I found a bug.  I was trying to delete a archived area.  However I wasn't able to do anything via the refreshed menu, but the menu that proceeded it was still active.  Anyway here is a bug error that crashed the script: /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 ^ TypeError: Cannot read property 'length' of undefined at area.load (evalmachine.<anonymous>:2593:37) at new area (evalmachine.<anonymous>:2416:18) at handleAreaDelete (evalmachine.<anonymous>:7444:17) at processUserInput (evalmachine.<anonymous>:8706:38) at handleUserInput (evalmachine.<anonymous>:8814:13) at eval (
Actually since I upgraded to 1.1 I can't draw anything. 
Kunguru said: Actually since I upgraded to 1.1 I can't draw anything.  Sorry - I was on vacation for the last week and didn't have any internet. Let me catch my bearings and I'll try to fix things up.
You had a vacation!?! Unacceptably get back to work!  No worries, take your time :)
Kunguru said: You had a vacation!?! Unacceptably get back to work!  No worries, take your time :) Okay - I'm back in the swing of things. I did a bit of testing on my end, and wasn't able to recreate it, but I think that somehow you found a bug where your state got corrupted during an attempt to delete (maybe a partial delete or something). Would you mind giving me temporary GM privs on your campaign, so that I can take a look?
There's a new instructional video up on  area drawing .
1441659100
vÍnce
Pro
Sheet Author
So many scripts and so little time.  Thanks for the work Rand.  Top-notch.
1443213329

Edited 1443214322
Hi Rand, I'm trying to create doors with this script but I keep getting the message "At least one of the images that was selected is not in a Roll20 Art Library. If the image was purchased off the Roll20 Marketplace, it must be downloaded and uploaded into your Art Library." I have uploaded all the pics I'm using to my library and I'm still getting this response. Can you please help with this?
1443228467

Edited 1443228488
Arthur B. said: Hi Rand, I'm trying to create doors with this script but I keep getting the message "At least one of the images that was selected is not in a Roll20 Art Library. If the image was purchased off the Roll20 Marketplace, it must be downloaded and uploaded into your Art Library." I have uploaded all the pics I'm using to my library and I'm still getting this response. Can you please help with this? This error happens when the script attempts to create an image, but Roll20's API fails to do so. Roll20 only creates images that are in your (or somebody else's) library, and not ones that were purchased off the marketplace and "favorited" - those actually have to be downloaded and re-uploaded as if they came off your PC in the first place. The out-of-the box images are in my library, which is why they're able to work. If all of this checks out for you, it would probably be easiest if I jumped on with you and took a look at what you are doing... it's possible that there's some other bug at play, but I haven't seen any problems with this yet. I still have to make a tutorial video on managing custom assets (images), but that hasn't happened yet.
Rand said: Arthur B. said: Hi Rand, I'm trying to create doors with this script but I keep getting the message "At least one of the images that was selected is not in a Roll20 Art Library. If the image was purchased off the Roll20 Marketplace, it must be downloaded and uploaded into your Art Library." I have uploaded all the pics I'm using to my library and I'm still getting this response. Can you please help with this? This error happens when the script attempts to create an image, but Roll20's API fails to do so. Roll20 only creates images that are in your (or somebody else's) library, and not ones that were purchased off the marketplace and "favorited" - those actually have to be downloaded and re-uploaded as if they came off your PC in the first place. The out-of-the box images are in my library, which is why they're able to work. If all of this checks out for you, it would probably be easiest if I jumped on with you and took a look at what you are doing... it's possible that there's some other bug at play, but I haven't seen any problems with this yet. I still have to make a tutorial video on managing custom assets (images), but that hasn't happened yet. As I stated earlier, I have uploaded all the pics I'm trying to use, and I'm still getting that message.
Arthur B. said: Rand said: Arthur B. said: Hi Rand, I'm trying to create doors with this script but I keep getting the message "At least one of the images that was selected is not in a Roll20 Art Library. If the image was purchased off the Roll20 Marketplace, it must be downloaded and uploaded into your Art Library." I have uploaded all the pics I'm using to my library and I'm still getting this response. Can you please help with this? This error happens when the script attempts to create an image, but Roll20's API fails to do so. Roll20 only creates images that are in your (or somebody else's) library, and not ones that were purchased off the marketplace and "favorited" - those actually have to be downloaded and re-uploaded as if they came off your PC in the first place. The out-of-the box images are in my library, which is why they're able to work. If all of this checks out for you, it would probably be easiest if I jumped on with you and took a look at what you are doing... it's possible that there's some other bug at play, but I haven't seen any problems with this yet. I still have to make a tutorial video on managing custom assets (images), but that hasn't happened yet. As I stated earlier, I have uploaded all the pics I'm trying to use, and I'm still getting that message. I'll have to take a direct look. Send me an invite to your campaign and we'll coordinate over PM to see when we can both get on together this weekend.
Okay - I worked with  Arthur B. on this. We put together some work arounds, but it looks like adding assets is broken... I created a  ticket in github for this issue if anyone wants to comment or follow the progress.
Rand said: Okay - I worked with  Arthur B. on this. We put together some work arounds, but it looks like adding assets is broken... I created a  ticket in github for this issue if anyone wants to comment or follow the progress. This issue is fixed. Also, while I was at it, I fixed another bug where interactive objects were only toggling if the area was active.
1443299150

Edited 1443299825
Rand said: Rand said: Okay - I worked with  Arthur B. on this. We put together some work arounds, but it looks like adding assets is broken... I created a  ticket in github for this issue if anyone wants to comment or follow the progress. This issue is fixed. Also, while I was at it, I fixed another bug where interactive objects were only toggling if the area was active. Thanks for the fix Rand!
Hey Rand, does this script allow for adjusting the floor to the grid, or some way to align the grid so it looks like the players are actually walking on the grid path?
Arthur B. said: Hey Rand, does this script allow for adjusting the floor to the grid, or some way to align the grid so it looks like the players are actually walking on the grid path? No - all scaling / positioning is entirely based on your use of the drawing tool... you can let the grid appear, but the script has no knowledge of it.
1443331940
Alex C.
Plus
Marketplace Creator
Hi Rand ... thanks for all of your hard work on this. The script looks great! I can't get it to work, though :/ The code saved just fine by the looks of it. Created scripts for both areamapper and visualalert, and I'm not getting any errors in the Output Console. Once I'm in-game, I can see and use the extra fire button thing (Burm, Explode, Dragon's Breath, Fireball ... I assume that's all part of yours since it only appeared after I included your scripts). But typing " !api-area" into the chat does nothing - no menus or buttons or anything at all appears in the chat window. The console shows the message ""msg.content: !api-area"". Am I missing something simple? I'm also running scripts for trackerjacker, bloodied and dead, torch, npc and spell importer, isGM, and groupinitiative. They all appear to be running normally.
Alex C. said: Hi Rand ... thanks for all of your hard work on this. The script looks great! I can't get it to work, though :/ The code saved just fine by the looks of it. Created scripts for both areamapper and visualalert, and I'm not getting any errors in the Output Console. Once I'm in-game, I can see and use the extra fire button thing (Burm, Explode, Dragon's Breath, Fireball ... I assume that's all part of yours since it only appeared after I included your scripts). But typing " !api-area" into the chat does nothing - no menus or buttons or anything at all appears in the chat window. The console shows the message ""msg.content: !api-area"". Am I missing something simple? I'm also running scripts for trackerjacker, bloodied and dead, torch, npc and spell importer, isGM, and groupinitiative. They all appear to be running normally. "Burn", "Explode", etc. are part of vanilla Roll20 - they aren't my doing unfortunately. I haven't tested AreaMapper with those other scripts running, but as far as I know, those are all very well-built scripts, so they should all behave nicely together. Would you mind inviting me to your campaign and GMing me, so that I can take a look?
1443400390
Alex C.
Plus
Marketplace Creator
Sent you a PM!
Alex C. said: Sent you a PM! Alex's issue was just that he accidentally pasted the VisualAlert code into his campaign twice... there was no AreaMapper code to run.