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] !Radar: an animated Token Sensor / Tremorsense / Blindsense / Divine Sense, etc. solution with optional Dynamic Lighting interaction

1624964450

Edited 1624964940
David M.
Pro
API Scripter
Gridless maps should be ok, but you can't use --units|u, because there is no such thing as a unit square for a map with no grid (the page has no conversion factor associated with it). Either use --units|m or leave that line out. Also, you can just use one of the parameters false/no/0 for the --visible command, like --visible|0 or --visible|no.  EDIT - Ugh, double checking and it looks like a bug *has* popped up for gridless maps. Apologies, I'll try to get a fix out soon.
1624972365
David M.
Pro
API Scripter
Version 0.10 - bug fix for gridless map support ( github link ) This should re-enable script functionality for gridless maps. Gridless folks, let me know if you run into any issues!  
Sorry if I missed this, but is there a way to have the graph and text output be visible to everyone in chat and not just the GM and/or the player?
1625054305

Edited 1625054415
David M.
Pro
API Scripter
Version 0.11 - added optional --public output command ( github link ) Syntax --public| < yes/true/1> or <no/false/0 >     //Default=false (whisper to player). If true, will display output to chat publicly Examples --public|true    //results not whispered, posted publicly --public|1       //results not whispered, posted publicly --public|no      //results whispered to player (the default behavior. Same as if this command was omitted)  
Awesome, thank you so much!
1625941793
Is it possible to use both tokfilter & charfilter in the same macro? Was trying to add the consecrated & desecrated items to the list for the divine sense but it only picks up what every is listed last between the tokfilet and charfilter.
1625952059
David M.
Pro
API Scripter
Currently it only supports one or the other. If using charfilter for divine sense, you would make two quick npc "characters" and populate npc_type for consecrated/desecrated items and link the source tokens to those. 
Going to put this here just incase :> If I wanted to make it so a creature has blind sight / tremmor sense how would I go about it? It really does suck that roll 20 has no option in dramatic lighting for these 2 :<
Currently I have this !radar {{   --range|60ft   --wavetype|circle   --wavespacing|35   --wavedelay|50   --wavelife|200   --pinglife|3000   --layers|gm, token   --charfilter|npc_xp: >0Npc#red, <0Pc#blue   --LoS|yes   --title|Blindsight or tremorsense   --units|ft   --output|graph, table   --graphoptions|grid, circles }}
1629198418
David M.
Pro
API Scripter
Jessica, it looks like what you posted works for me (assuming you are using the 5e OGL sheet and manually add the npc_xp attribute to PC sheets with a negative value). There are various output options you could play with (e.g. I tend to leave off the table nowadays because of chat spam), but is there something else you want the Blindsense to do?
1629473754
Jessica, I've got a PC who's using blind sight / tremor sense actually. So, that's a huge help! Question for you though, just to pick your brain, how did you setup the token? If I say that the token has "Vision" in the dynamic lighting settings, then they see everything. If I turn that off, then they can't even see themselves on the map. Almost seems like the macro is kind of pointless for tremor sense (outside of doing it for fun / flavor) as the PC will be able to just see everything on the map anyway...unless it's used almost exclusively to detect invisible / underground creatures?
1629481545

Edited 1629481556
David M.
Pro
API Scripter
The idea is that the PC's with blindsight/tremorsense are able to "see" tokens on the GM layer (invisible/burrowing/etc.), or if they are blinded (vision turned off or within darkness) they can still "see" creatures on both the token & GM layers by pinging and looking in the chat. 
William V said: Jessica, I've got a PC who's using blind sight / tremor sense actually. So, that's a huge help! Question for you though, just to pick your brain, how did you setup the token? If I say that the token has "Vision" in the dynamic lighting settings, then they see everything. If I turn that off, then they can't even see themselves on the map. Almost seems like the macro is kind of pointless for tremor sense (outside of doing it for fun / flavor) as the PC will be able to just see everything on the map anyway...unless it's used almost exclusively to detect invisible / underground creatures? I gave them 360 and 10ft just as a base, so when they are walking around normally they have that, when they then want to see more they can sort of "focus on their hearing" and use the radar as much as necessary.
1629760132
This is what I use for Blind Sight !radar {{ --range|        [[?{Range|10,2|15,3|20,4|25,5|30,6|60,12}]]u --pinglife|     3000 --layers|       gmlayer, objects --LoS|          yes --title|        Blind Sight --silent|       no, gm --units|        u --visible|   no --charFilter|npc:0, 1 --output|graph }} I use the graph so they will know the direction and general distance, but I don't distinguish between NPC or PC because in a darkness spell, you "might" hit the wrong person :) 
1634828476
Lyel
Pro
(From Radar):  Error: Character "RadarPing" must be in the journal with a default token: how to fix this? help!
1634844825

Edited 1634844855
David M.
Pro
API Scripter
Setup is in the (long) first post in this thread :) Setup:   Create a character named " RadarPing " Set the default token to a 1x1 unit  transparent png , with a  0 ft aura NOT visible to all players .             (a) Leave the " represents " property of the token blank.             (b) Leave " edited & controlled by " property blank. This will be assigned dynamically to the player calling the script  Create a macro or ability using the commands & arguments described below. Select a token as the source of the radar prior to activating the macro     Here is a transparent square image, if you don't already have one. It's below, I swear! Click below, then right click and save as, then upload to your art library before starting step 2. Note you must save it as a png file to preserve the transparency
hello its me again, Im having a bit of trouble getting my Macro to work :( I took some gifs of what was happening for help &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://gyazo.com/f505d90a95c45f7f0c447b6300a6622d" rel="nofollow">https://gyazo.com/f505d90a95c45f7f0c447b6300a6622d</a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://gyazo.com/1de336a7026ba39e16d9c0beac80097a" rel="nofollow">https://gyazo.com/1de336a7026ba39e16d9c0beac80097a</a>
it works in my other dnd but for some reason I cant get it to work in others, or Im just dumb ;~;
1635246914
David M.
Pro
API Scripter
Hmm Jessica, I'm a little unclear exactly what I'm looking at. In the first gif, looks like there is no chat output. Has your sandbox crashed? Did any other api scripts work during that session after you noticed problems with Radar? You mentioned it's a different game: Radar is definitely installed in the new game? Apologies if you've already checked all the basics.&nbsp; In the second gif, it looks like you correctly have a transparent png as the default token for the RadarPing character. If you provide a little more detail we can hopefully get to the bottom of it.
Hey David, got a question for ya... is there a way to have the radar only show in front of the player like at 90 degree front only?
1635287341
David M.
Pro
API Scripter
Arcisius: yep! There is optional input for the --wavetype command. Check out this post for a description and some examples. Examples 2, 3, and 4 show a couple of different ways to determine the angle of the "cone" other than hardcoding.
David M. said: Arcisius: yep! There is optional input for the --wavetype command. Check out this post for a description and some examples. Examples 2, 3, and 4 show a couple of different ways to determine the angle of the "cone" other than hardcoding. Dont worry im just a big old dummy who forgot that I needed to instal the Api hehe