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

June 29 (4 years ago)

Edited June 29 (4 years ago)
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.

June 29 (4 years ago)
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?

June 30 (4 years ago)

Edited June 30 (4 years ago)
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!

July 10 (4 years ago)

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.

July 10 (4 years ago)
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. 

August 16 (3 years ago)

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 :<

August 17 (3 years ago)

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
}}

August 17 (3 years ago)
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?

August 20 (3 years ago)

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?

August 20 (3 years ago)

Edited August 20 (3 years ago)
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. 

August 20 (3 years ago)


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.

August 23 (3 years ago)

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 :) 
October 21 (3 years ago)
Lyel
Pro

(From Radar): Error: Character "RadarPing" must be in the journal with a default token: how to fix this? help!



October 21 (3 years ago)

Edited October 21 (3 years ago)
David M.
Pro
API Scripter

Setup is in the (long) first post in this thread :)

Setup: 

  1. Create a character named "RadarPing"
  2. Set the default token to a 1x1 unit transparent png, with a 0 ft aura NOT visible to all players.
  3.             (a) Leave the "represents" property of the token blank.
  4.             (b) Leave "edited & controlled by" property blank. This will be assigned dynamically to the player calling the script 
  5. Create a macro or ability using the commands & arguments described below.
  6. 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


October 26 (3 years ago)

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                                   https://gyazo.com/f505d90a95c45f7f0c447b6300a6622d     https://gyazo.com/1de336a7026ba39e16d9c0beac80097a

October 26 (3 years ago)

it works in my other dnd but for some reason I cant get it to work in others, or Im just dumb ;~;


October 26 (3 years ago)
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. 

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.


October 26 (3 years ago)

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?

October 26 (3 years ago)
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.

October 29 (3 years ago)


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