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

Tokens - Selective Dynamic Lighting Barrier Restriction

I have set-up spell areas of effect as tokens associated to character sheets, so that players can have control of those that their characters can cast - which allows them to place their own areas of effect. However, the maps are set-up with "Dynamic Lighting Barriers Restrict Movement". Does anyone know of any way to allow some tokens to disregard this setting while maintaining it for most tokens?
1649630941
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
To be clear, the problem is that the players cannot place the token in a place across from a barrier that blocks line of sight?
1649631215
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It could be done with the API. A token-mod macro can move the token 1 square in any desired direction. I'm not sure how the players can cast a spell to a point they do not have a line of sight to, but that's a rules issue, not a Roll20 technical question.
1649669669

Edited 1649670068
The specific problem is slightly different, I agree that players should likely only be able to place the token somewhere they can see, the issue arises in then moving / nudging the token a little to be more precise on the area to be affected. In the specific instance the token is fairly large and once placed has walls / dynamic lighting barriers within it. To Ilustrate an example: Player perspective DM Perspective The player has been able to place the token with the centre somewhere they can see and wants to nudge it 10 feet over the west / left, however as it overlaps the ruin walls is unable to move it. Good spot on the token-mod macro idea! Assuming that allows tokens to ignore the light barriers I can set one of those up to nudge it via a simple inline menu, thankyou (going to test now)!
1649674353

Edited 1649674538
Thanks keith, that worked a treat. Unfortunately I had to use HTML Entity replacement (replacing the | with a |) to run it inline as follows: !token-mod --move ?{Direction|Up,=0|1g|Right,=90|1g|Down,=180|1g|Left,=279|1g} This is not particularly elegant and breaks the macro if ever I open it (as the entity replacement is lost) but alas that's the only way I know how to present it with a choice of direction to a player with a couple of clicks. Thanks for the help!
1649681166
The Aaron
Roll20 Production Team
API Scripter
You can replace | characters in TokenMod arguments with #: !token-mod --move =0#1g I added that for exactly this reason. =D
1649681925
Oosh
Sheet Author
API Scripter
You could give them a little menu. This one uses a 5e template: &{template:npcaction} {{rname=Nudge}} {{description=[ ](!" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none; margin: auto;)[{](!token-mod --move =0|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;) [8](!token-mod --move =270|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;)[}](!token-mod --move =180|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;)[7](!token-mod --move =90|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;)}} Or just the default: &{template:default} {{name=Nudge}} {{=[ ](!" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none; margin: auto;)[{](!token-mod --move =0|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;) [8](!token-mod --move =270|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;)[}](!token-mod --move =180|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;)[7](!token-mod --move =90|1g" style="font-family: pictos; text-align: center; display:inline-block; color: blue; width: 1.5em; height: 1.5em; background: none;) }}
1649682900
Kraynic
Pro
Sheet Author
If you set this up as a chat menu system instead of a query, then the menu will be on the screen with a button for all 4 directions.  They can then tap any of the 4 as many times as needed, and in whatever order, to get it positioned as they desire without needing to run the macro again.  No need for any html replacements with that method either.
1649688780

Edited 1649705545
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can even use emojis in the button names: &{template:npcaction} {{rname=Nudge}} {{description=[➡️ ](!token-mod --move =0|1g)[⬇️](!token-mod --move =270|1g) [⬅️](!token-mod --move =180|1g)[⬆️](!token-mod --move =90|1g)}} Assuming I've read the degree marks correctly... EDIT: I have not . See Jarren's corrections below.
Wow! Lots of ideas, options and solutions! Sometimes I love this place :-) Thanks everyone,
keithcurtis said: You can even use emojis in the button names: &{template:npcaction} {{rname=Nudge}} {{description=[➡️ ](!token-mod --move =0|1g)[⬇️](!token-mod --move =270|1g) [⬅️](!token-mod --move =180|1g)[⬆️](!token-mod --move =90|1g)}} Assuming I've read the degree marks correctly... Quick fix (0º is up, 90º is right, etc.). Also added some spaces to make the chat menu match visually: &{template:npcaction} {{rname=Nudge}} {{description=     [⬆️](!token-mod --move =0|1g)  [⬅️](!token-mod --move =270|1g)     [➡️](!token-mod --move =90|1g)       [⬇️](!token-mod --move =180|1g)}}
1649700617
David M.
Pro
API Scripter
Neat! Here's another with diagonals included. Also, spacing below is adjusted for my display settings, as I don't use the stylus extension (so my chat buttons always have the pink borders). &{template:npcaction} {{rname=Nudge}} {{description= [↖️](!token-mod --move =315|1.414213g) [⬆️](!token-mod --move =0|1g) [↗️](!token-mod --move =45|1.414213g) [⬅️](!token-mod --move =270|1g)          [➡️](!token-mod --move =90|1g) [↙️](!token-mod --move =225|1.414213g) [⬇️](!token-mod --move =180|1g) [↘️](!token-mod --move =135|1.414213g)}} If diagonal placement accuracy is important, something like !token-mod =0|1g =270|1g (for diagonal left) would be better, but it will actually move the token twice with waypoints (up, then left in this example). 
1649705510
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Jarren said: Quick fix (0º is up, 90º is right, etc.). Thanks! I wasn't able to quickly check when I wrote that, and I assumed protractor angles.
1649705662
The Aaron
Roll20 Production Team
API Scripter
--move is really designed for chains of movement, like following a path, or moving at angles a grid wouldn't support.  If you just want to move in a grid, you can also use the top and left properties: !token-mod --set left|-1g top|-1g That won't generate 2 waypoints as the move operation will happen in one update without updating the last move list for each point.
1649705739
The Aaron
Roll20 Production Team
API Scripter
keithcurtis said: Jarren said: Quick fix (0º is up, 90º is right, etc.). Thanks! I wasn't able to quickly check when I wrote that, and I assumed protractor angles. It makes it easier to assume the rotation handle is the zero point for the rotation, like the hands of a clock. =D  It's otherwise completely arbitrary.
1649707871

Edited 1649708226
David M.
Pro
API Scripter
Ah, perfect! I had tried 315|1 and it used pythagorean theorem so shorted the movement. Confirmed your example works, thanks! EDIT - here's the updated macro using left & top &{template:npcaction} {{rname=Nudge}} {{description= [↖️](!token-mod --set left|-1g top|-1g) [⬆️](!token-mod --set top|-1g) [↗️](!token-mod --set left|+1g top|-1g) [⬅️](!token-mod --set left|-1g)          [➡️](!token-mod --set left|+1g) [↙️](!token-mod --set left|-1g top|+1g) [⬇️](!token-mod --set top|+1g) [↘️](!token-mod --set left|+1g top|+1g)}} The Aaron said: --move is really designed for chains of movement, like following a path, or moving at angles a grid wouldn't support.  If you just want to move in a grid, you can also use the top and left properties: !token-mod --set left|-1g top|-1g That won't generate 2 waypoints as the move operation will happen in one update without updating the last move list for each point.
1649716565
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
David M. said: That won't generate 2 waypoints as the move operation will happen in one update without updating the last move list for each point. Would you  want  it to generate two waypoints for diagonal movement?
1649720230
David M.
Pro
API Scripter
Nope, Aaron's tip is perfect for me. I'm not the OP, though. Sorry, just jumped in the conversation because I found it useful for a particular situation of mine and wanted to share my update of the chat menu macro that you & Jarren posted :)
From my perspective either of the approaches works (i.e. top/left or 0/270), but I like the flexibility of the diagonal arrow one topo so will go ahead and use that one. Thanks everyone, great solutions!