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 Update] TokenMod -- An interface to adjusting properties of a token from a macro or the chat area.

1662820548
OK, we've been having a problem since a few weeks ago. I have a druid with the following macro to set up his wildshapes using a multi-sided token that uses side1 for his druid and sides 2+ for his wildshapes. The problem we are having is when dropping wildshape the bar links don't update to the new 'represents' character. This macro (changing into wildshape) works; !token-mod {{ --set ?{Choose Form |Brown Bear,currentside#2 represents#@{Chronk Brown Bear Wildshape|character_id} has_night_vision#no night_vision_distance#0 night_vision_effect#none width#2u height#2u |Crocodile,currentside#3 represents#@{Chronk Crocodile Wildshape|character_id} has_night_vision#no night_vision_distance#0 night_vision_effect#none width#2u height#2u |Dire Wolf,currentside#4 represents#@{Chronk Dire Wolf Wildshape|character_id} has_night_vision#no night_vision_distance#0 night_vision_effect#none width#2u height#2u |Giant Bat,currentside#5 represents#@{Chronk Giant Bat Wildshape|character_id} has_night_vision#yes night_vision_distance#60 night_vision_effect#none width#2u height#2u |Giant Eagle,currentside#6 represents#@{Chronk Giant Eagle Wildshape|character_id} has_night_vision#no night_vision_distance#0 night_vision_effect#nocturnal width#2u height#2u |Giant Octopus,currentside#7 represents#@{Chronk Giant Octopus Wildshape|character_id} has_night_vision#yes night_vision_distance#60 night_vision_effect#nocturnal width#2u height#2u |Giant Spider,currentside#8 represents#@{Chronk Giant Spider Wildshape|character_id} has_night_vision#yes night_vision_distance#60 night_vision_effect#nocturnal width#2u height#2u |Giant Toad,currentside#9 represents#@{Chronk Giant Toad Wildshape|character_id} has_night_vision#yes night_vision_distance#30 night_vision_effect#nocturnal width#2u height#2u } bar1_link|hp bar1_reset| bar2_link|npc_ac bar3_link|npc_speed }} But using this macro to change back to druid form, changes everything but the bar info (the links have changed but the numbers in the bubbles are whatever the previous wildshape's was; !token-mod {{ --set currentside#1 represents#@{Chronk|character_id} has_night_vision|yes night_vision_distance|60 night_vision_effect|nocturnal width|1u height|1u bar1_link|hp bar2_link|ac bar3_link|speed }} This macro was working properly a few weeks ago. Any ideas?
1663598945
So I take it the macro and script are OK but there is a bug in Roll20?
1663599405
The Aaron
Forum Champion
API Scripter
Sorry Doug!&nbsp; I missed this message, probably due to that "every 50th reply" bug on the forum. I'll need to try this out a bit.&nbsp; There are been a few reports of issues with the bars in the last few weeks, I'm not clear if it's a change from Roll20 or something to do with a change I made a little while ago to cause bar value changes to trigger sheet workers for linked attributes.&nbsp; If you could test out version 0.8.74 (<a href="https://github.com/Roll20/roll20-api-scripts/blob/master/TokenMod/0.8.74/TokenMod.js" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/master/TokenMod/0.8.74/TokenMod.js</a>), and see if that works, it would help me track down if my change in 0.8.75 caused this issue.&nbsp; &nbsp;Otherwise, I can try and reproduce this later tonight.
1663645058
Hello!&nbsp; I'm very new to a pro account and the api, and I've been trying to setup the various light sources as token actions for my players.&nbsp; And all is going well, except for with the Bullseye Lantern...&nbsp; It has a a limited field of view of 60 degrees. !token-mod {{ --on &nbsp;&nbsp; &nbsp;emits_bright_light &nbsp;&nbsp; &nbsp;emits_low_light &nbsp;&nbsp; &nbsp;has_directional_bright_light --set &nbsp;&nbsp; &nbsp;directional_bright_light_total|60 &nbsp;&nbsp; &nbsp;bright_light_distance|60 &nbsp;&nbsp; &nbsp;low_light_distance|60 }} That's the macro I'm using.&nbsp; It sets the settings correctly in the token, but it doesn't actually limit the light angle until I go into the token properties and click on save settings.&nbsp; Which makes me think I'm missing a hidden option...&nbsp; Any thoughts?
1663652993
Marcie said: Hello!&nbsp; I'm very new to a pro account and the api, and I've been trying to setup the various light sources as token actions for my players.&nbsp; And all is going well, except for with the Bullseye Lantern...&nbsp; It has a a limited field of view of 60 degrees. That's the macro I'm using.&nbsp; It sets the settings correctly in the token, but it doesn't actually limit the light angle until I go into the token properties and click on save settings.&nbsp; Which makes me think I'm missing a hidden option...&nbsp; Any thoughts? Unfortunately that's a common bug that is known where some token settings do not properly save until the token is manually opened and saved.
1663684147
Thanks Jarred, I kind of assumed that was the case, I just hopped I made a newb error. &nbsp;:)
1664011542
Jarren said: Marcie said: Hello!&nbsp; I'm very new to a pro account and the api, and I've been trying to setup the various light sources as token actions for my players.&nbsp; And all is going well, except for with the Bullseye Lantern...&nbsp; It has a a limited field of view of 60 degrees. That's the macro I'm using.&nbsp; It sets the settings correctly in the token, but it doesn't actually limit the light angle until I go into the token properties and click on save settings.&nbsp; Which makes me think I'm missing a hidden option...&nbsp; Any thoughts? Unfortunately that's a common bug that is known where some token settings do not properly save until the token is manually opened and saved. And unfortunately it is a very old error. So there is not much hope that it is going to be fixed soon. :-(
1664029878
The Aaron said: Sorry Doug!&nbsp; I missed this message, probably due to that "every 50th reply" bug on the forum. I'll need to try this out a bit.&nbsp; There are been a few reports of issues with the bars in the last few weeks, I'm not clear if it's a change from Roll20 or something to do with a change I made a little while ago to cause bar value changes to trigger sheet workers for linked attributes.&nbsp; If you could test out version 0.8.74 ( <a href="https://github.com/Roll20/roll20-api-scripts/blob/master/TokenMod/0.8.74/TokenMod.js" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/master/TokenMod/0.8.74/TokenMod.js</a> ), and see if that works, it would help me track down if my change in 0.8.75 caused this issue.&nbsp; &nbsp;Otherwise, I can try and reproduce this later tonight. Sorry for taking so long. I tried the 0.8.74 script and when dropping wildshape, it does change the bar 1 and 2 links properly but not bar 3. The speed from the last wildshape still sticks. With 0.8.75 version and when dropping wildshape, it changes the token side and size ok, but somewhere along the line it altered the hp, ac and speed of the original character sheet to that of the wildshape.
1664031923
Well that’s sad news Bernd. &nbsp;Sigh.
1664156492
The Aaron
Forum Champion
API Scripter
I've been working with the devs on that issue in the last several weeks, I'm hopeful there will be a solution in the not too distant future.
1664162013
Oh cool! &nbsp;I'll look forward to good news then! &nbsp;Thanks The Aaron!
1664312135
I have a macro that I use to cause a token to emit a dim colored light. The macro has worked flawlessly as recently as 5 weeks ago, but when I tried it today it's not quite working the way that it was. The following is supposed to set the token to emit pale green light in a 5 foot radius: !token-mod {{ --set emits_low_light|on low_light_distance|5 dim_light_opacity|10 light_color|#93c47d }} This works fine except &nbsp;in the case where the token had already been set to emit low light with a different radius. If the selected token is already emitting dim light in, for example, a radius of "10", this macro will still change the color to pale green but instead of changing the radius to "5" it will instead increase the existing radius to "15" (10+5). I tried changing the macro to first set the current radius to "0" then set it to "5": !token-mod {{ --set emits_low_light|on low_light_distance|0 low_light_distance|5 dim_light_opacity|10 light_color|#93c47d }} But that didn't work. Turning emits_low_light off then on again doesn't work either because the token "remembers" the previously set radius when it gets turned back on. How can I "zero out" any existing light emission radius before setting it to what I want?
1664317643
The Aaron
Forum Champion
API Scripter
Hmm.&nbsp; Try this: !token-mod {{ --set emits_low_light|on low_light_distance|=5 dim_light_opacity|=10 light_color|#93c47d }} They changed the way bright and dim radius work from the standpoint of the interface when they released UDL, but kept the same backend, so there is some behind the scenes math going on that might be either hitting a weird edge case (Roll20 bug) or performing the wrong formula (TokenMod bug).&nbsp; &nbsp;Using = will say "force it to be 5", where without it it might be defaulting to addition, so that might bypass the bug if it exists.
I'm not sure if this can be done using TokenMod but I have a multi-sided token, is there a way that I can push a macro button and have a drop down menu with the names each side is labeled in the rollable table in order to flip the token?
1664824357
The Aaron
Forum Champion
API Scripter
With some help from a Meta Script by Tim, I think that might be possible.&nbsp; It would need to be a chat menu instead of a dropdown though.
1664829309
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Master Azroth said: I'm not sure if this can be done using TokenMod but I have a multi-sided token, is there a way that I can push a macro button and have a drop down menu with the names each side is labeled in the rollable table in order to flip the token? Take a look at the Faces script. It creates a graphic chat menu that allows you to change faces on a rollable token. If you use a Rollable table, you don't even need to set up the token. It can pull images, names and token notes from the table:
1664830402
timmaugh
Pro
API Scripter
Keith's Faces script is the best solution, really. Nothing in the Meta-Toolbox addresses tables or table items ... yet. (It's in process, but a script built-to-the-need will always be better.) Besides, the Faces script has such a nice interface.
oooooooo!&nbsp; Want! keithcurtis said: Master Azroth said: I'm not sure if this can be done using TokenMod but I have a multi-sided token, is there a way that I can push a macro button and have a drop down menu with the names each side is labeled in the rollable table in order to flip the token? Take a look at the Faces script. It creates a graphic chat menu that allows you to change faces on a rollable token. If you use a Rollable table, you don't even need to set up the token. It can pull images, names and token notes from the table:
Not sure if this is the right API or not but is there a global command to turn off all nameplates for all monsters from PCs?
1665161965
Default Game setting then apply default setting. Alex said: Not sure if this is the right API or not but is there a global command to turn off all nameplates for all monsters from PCs?
Kilter said: Default Game setting then apply default setting. Alex said: Not sure if this is the right API or not but is there a global command to turn off all nameplates for all monsters from PCs? It was aura API doing it Thanks for the heads up.
1665167024
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wolf Thunderspirit said: oooooooo!&nbsp; Want! keithcurtis said: Master Azroth said: I'm not sure if this can be done using TokenMod but I have a multi-sided token, is there a way that I can push a macro button and have a drop down menu with the names each side is labeled in the rollable table in order to flip the token? Take a look at the Faces script. It creates a graphic chat menu that allows you to change faces on a rollable token. If you use a Rollable table, you don't even need to set up the token. It can pull images, names and token notes from the table: Be sure to check out the newest version .
1665321745

Edited 1665321910
Richard @ Damery
Pro
API Scripter
I am having issues with tokenMod today.&nbsp; I send this command from the Chat window: !token-mod {{ &nbsp;--ignore-selected &nbsp;--ids -NDmTuRLg25JHQOlxk5h &nbsp;--set bar2_value|-1 }}" And in the sandpit Console I get reported: "(node:25) UnhandledPromiseRejectionWarning: TypeError: rollExpression.trim is not a function &nbsp; &nbsp; at isRollValid (eval at messageHandler (evalmachine.&lt;anonymous&gt;:713:6), &lt;anonymous&gt;:32523:37) &nbsp; &nbsp; at Object.eval (eval at messageHandler (evalmachine.&lt;anonymous&gt;:713:6), &lt;anonymous&gt;:32561:21) &nbsp; &nbsp; at _fullfillAttrReq (evalmachine.&lt;anonymous&gt;:688:31) &nbsp; &nbsp; at messageHandler (evalmachine.&lt;anonymous&gt;:721:6) &nbsp; &nbsp; at process.&lt;anonymous&gt; (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55) &nbsp; &nbsp; at process.emit (events.js:314:20) &nbsp; &nbsp; at emit (internal/child_process.js:877:12) &nbsp; &nbsp; at processTicksAndRejections (internal/process/task_queues.js:85:21)" "(node:25) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see <a href="https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode" rel="nofollow">https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode</a>). (rejection id: 1)" "(node:25) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code." Has something changed in TokenMod? The TokenMod call is actually generated by my RPGMaster APIs and has worked fine for many months, but now a change has occurred somewhere - I copied the command to the Chat window to eliminate anything my APIs are doing (as my APIs spawn async processes, but I checked and they all have valid .catch() statements).&nbsp; I know the comand used to work as stated, so what's changed? Do I need to change something?
1665323814
The Aaron
Forum Champion
API Scripter
That ID looks too long, that's the second one like that I've seen today, I wonder if they changed something.&nbsp; That's callstack doesn't look like it's in TokenMod. I'm going to have to investigate further, but I'm traveling right now so will have to look in detail later.&nbsp; Can you try this in another game with no other scripts?
1665789344
RAX
Pro
First thanks for the awesome mod! I have been dabbling a bit deeper with it lately, but Im stuck when trying to set up a macro to make a token bar text overlay visible to everyone and another to make it visible only to editors.&nbsp; Reading the help instructions and previous forums leads me to think it is not possible, but wanted to ask anyway if I missing something or is doing that not currently possible?
1665798091
Is there a way to get tokenmod to allow me to link to a sheet using a text box query? This is what I have tried, but this gives me a dropdown with character_id as the only option. Every other change I have tried has resulted in something like: No character was found for '?{Sheet Name' or TypeError: rt is undefined I suspect the issue is the curly braces or bars being interpreted as ending the query or represent @ early, but also didn't have luck with using the html replacement codes. Thanks! !token-mod {{ --set represent|@{?{Sheet Name|}|character_id} bar1_link|hp bar2_link|npc_ac }}
1665811721
The Aaron
Forum Champion
API Scripter
You can just use the name of a character instead of a character_id, or even a partial name. Check the help for details. Something like: !token-mod {{ --set represent|"?{Sheet Name|}" bar1_link|hp bar2_link|npc_ac }}
I've encountered the API bug when using @{target|...} in my ability/macro.&nbsp; The token is deselected, regardless of the order of the commands.&nbsp; I read in the help that this is known: WARNING: &nbsp;Because of a Roll20 bug with @{target|} and the API, you must specify the tokens you want to change using&nbsp; --ids &nbsp;when using @{target|}. My macro works fine with --ids, but the DM doesn't want to enable the setting that allows players to use the --ids command.&nbsp; It seems that the permission for the --ids command is in the wrong place, to me.&nbsp; I'm wondering if the API script can be modified such that any player can specify a token via --ids, but whose actions will be rejected if the token isn't owned by the player.&nbsp; I think that would involve moving the check from detecting the -ids command to instead at determining that the requester is a player and checking whether he or she owns the token.&nbsp; Is this possible?
1666580557

Edited 1666580683
timmaugh
Pro
API Scripter
You can virtually select the token using SelectManager -- and it's fairly agnostic for a single-token-selected arrangement: {&amp; select @{selected|token_id} } Though Roll20 won't preserve a token AS selected if you use a @{target...} statement, it WILL first return any data you request from the token (at least, from the first token)... like the token id. Beyond a single token, just use commas to separate the tokens to "select" for this message, and populate them as you will. That could be more targeting statements, or it could be a prompt for you to type names: ?{Who should count as selected?|} Then just type the names. I'll have to double check, but I think SelectManager does fuzzy-matches*, so you shouldn't have to type the full name... * - and if it doesn't, I've got the function already written. I can get it added.
1666586090

Edited 1666586162
Thank you for the help.&nbsp; I loaded SelectManager, and put it first in the list of APIs.&nbsp; I checked the smconfig, and got the following response. [ selected ] so I think it installed correctly and the sandbox is running. So what I'm doing is changing the name of the token, using !token-mod --ids @{selected|token_id} --set currentside|3 name|"@{target|Caster?|nickname}'s Fury" This works fine.&nbsp; But the DM of the game I want to use this with won't let me toggle the state to allow players to us the --ids option.&nbsp; When I use the command !token-mod --set currentside|3 name|"Shadow of Fury" this works fine as well, with the --ids option disabled.&nbsp; But as soon as I add the target command !token-mod --set currentside|3 name|"@{target|Caster?|nickname}]'s&nbsp;Fury" I have the @{target|Caster?|} in multiple places in my ability, so I just can't get rid of it.&nbsp; I'm not understanding how to use SelectManager with TokenMod without using the --ids option. Thanks again for your suggestions.
I was trying the "bar1_reset" tokenmod to attempt to help players reset not just their tokens but others (i.e. familiars, companions, etc.) but when I'm using it to reset tokens (making sure to edit only from the sheets and a few times (accidentally) from the token itself) it'll stay at the health I set it at (trying both under max health and above max health). I didn't want to complicate the code or mix this code with another API Script (as I only am using two scripts I've read about which is Group Initiative and this one). But this is the very simple (I only recently got Pro Subscription so I've been testing and learning a lot within the past month or so) macro using only tokenmod, unless is there something I'm missing? !token-mod {{ &nbsp;--set &nbsp; &nbsp; &nbsp; &nbsp;bar1_reset |&nbsp; &nbsp;--id&nbsp; &nbsp; &nbsp; &nbsp;@{target|Whom|token_id}&nbsp; }} I also didn't want to add too much as this is just to make it easier on players to reset their health if they over heal from my healing potion macros. The only reason I have the bar1_reset is this is the current description I have for bar resets. Unless has this section changed? bar1_reset, bar2_reset and bar3_reset are special. Any value set on them will be ignored, instead they will set the _value field for that bar to whatever the matching _max field is set to. This is most useful for resetting hit points or resource counts like spells. (The | is currently still required.)
1666612856
Andrew R.
Pro
Sheet Author
There should be no space between bar1_reset and the vertical bar character.
1666615623
timmaugh
Pro
API Scripter
Andrew K. said: But as soon as I add the target command !token-mod --set currentside|3 name|"@{target|Caster?|nickname}]'s&nbsp;Fury" I have the @{target|Caster?|} in multiple places in my ability, so I just can't get rid of it.&nbsp; I'm not understanding how to use SelectManager with TokenMod without using the --ids option. Thanks again for your suggestions. No worries... try this: !token-mod --set currentside|3 name|"@{target|Caster?|nickname}]'s&nbsp;Fury" {&amp; select @{selected|token_id} } You can pretty much put the metascript constructs anywhere in the line because they get processed out before the recipient script (in this case, TokenMod) gets involved.
timmaugh said: Andrew K. said: But as soon as I add the target command !token-mod --set currentside|3 name|"@{target|Caster?|nickname}]'s&nbsp;Fury" I have the @{target|Caster?|} in multiple places in my ability, so I just can't get rid of it.&nbsp; I'm not understanding how to use SelectManager with TokenMod without using the --ids option. Thanks again for your suggestions. No worries... try this: !token-mod --set currentside|3 name|"@{target|Caster?|nickname}]'s&nbsp;Fury" {&amp; select @{selected|token_id} } You can pretty much put the metascript constructs anywhere in the line because they get processed out before the recipient script (in this case, TokenMod) gets involved. Worked like a charm!&nbsp; Thanks a ton.&nbsp; I can now get back to crashing the API. FYI, I use this for updating a template for the summon spells in Tascha's Guide to Everthing.
Jesster_Li said: I was trying the "bar1_reset" tokenmod to attempt to help players reset not just their tokens but others (i.e. familiars, companions, etc.) but when I'm using it to reset tokens (making sure to edit only from the sheets and a few times (accidentally) from the token itself) it'll stay at the health I set it at (trying both under max health and above max health). I didn't want to complicate the code or mix this code with another API Script (as I only am using two scripts I've read about which is Group Initiative and this one). But this is the very simple (I only recently got Pro Subscription so I've been testing and learning a lot within the past month or so) macro using only tokenmod, unless is there something I'm missing? !token-mod {{ &nbsp;--set &nbsp; &nbsp; &nbsp; &nbsp;bar1_reset |&nbsp; &nbsp;--id&nbsp; &nbsp; &nbsp; &nbsp;@{target|Whom|token_id}&nbsp; }} I also didn't want to add too much as this is just to make it easier on players to reset their health if they over heal from my healing potion macros. The only reason I have the bar1_reset is this is the current description I have for bar resets. Unless has this section changed? bar1_reset, bar2_reset and bar3_reset are special. Any value set on them will be ignored, instead they will set the _value field for that bar to whatever the matching _max field is set to. This is most useful for resetting hit points or resource counts like spells. (The | is currently still required.) Andrew R. said: There should be no space between bar1_reset and the vertical bar character. I had tried with the space and without the space. Unless does this not work with tokens that have set attributes in token settings? I tested this upon also an NPC monster token that didn't have set attributes (i.e. "hp", "ac", etc) and the same thing happened where I had removed hp (which is bar1_max is 7 and the bar1_value was 2 but stayed 2 when I tested the macro).
1666654763

Edited 1666654782
Hello, I don't know what to search for to properly find what I'm looking for so I apologize if this has been answered somewhere already. I run my GM instance of Roll20 in Firefox on my laptop screen while I run a dummy account in Chrome on a TV laid on the table for the players view and all of the players view the player view on one screen. I have just recently started using Dynamic Lighting, and I want to click a player token and upon doing so see as that particular player would on the player screen. One player has 120ft of dark vision, one has 60ft and the other three have none, if its dark I want to be able to click a token and say well THIS is what you see. I hope this makes sense and I thank you in advance for any and all help you can provide, and hopefully&nbsp; I'm posting this question in the right place. &nbsp; &nbsp;
Chris A. said: Hello, I don't know what to search for to properly find what I'm looking for so I apologize if this has been answered somewhere already. I run my GM instance of Roll20 in Firefox on my laptop screen while I run a dummy account in Chrome on a TV laid on the table for the players view and all of the players view the player view on one screen. I have just recently started using Dynamic Lighting, and I want to click a player token and upon doing so see as that particular player would on the player screen. One player has 120ft of dark vision, one has 60ft and the other three have none, if its dark I want to be able to click a token and say well THIS is what you see. I hope this makes sense and I thank you in advance for any and all help you can provide, and hopefully&nbsp; I'm posting this question in the right place. &nbsp; &nbsp; There is a code I got from a player that is helping with that could be adapted possibly. But if a player does not have Darkvision I usually grants 5 ft of vision. This code would also allow that player to use torches if they have torches out to assist with Darkvision. Otherwise the place will be dark to the players unless the area is in daylight mode. /w gm &amp;{template:npcaction} {{rname=Light and Vision}} {{description= [Snuff](!token-mod --off emits_bright_light emits_low_light --set lightColor#transparent) [Candle](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|5 low_light_distance|0 --set lightColor#transparent) [Lamp](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|15 low_light_distance|15 --set lightColor#transparent) [Torch](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 --set lightColor#transparent) [Hooded Lantern](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|30 low_light_distance|30 --set lightColor#transparent) [Light](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 --set lightColor#transparent) [Daylight](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|60 low_light_distance|60 --set lightColor#transparent) ----------------------------------- [Darkvision](!token-mod --on has_night_vision --set night_vision_distance|60) [Darkvision+](!token-mod --on has_night_vision --set night_vision_distance|120) [Remove Darkvision](!token-mod --on has_night_vision --set night_vision_distance|3) [Blizzard](!token-mod --on has_night_vision --set night_vision_distance|30) }} I hope this helps and really helps with spells too.
1666733371
I appreciate the help, but for what I'm looking for this functions essentially like setting "night vision" in the Dynamic Lighting tab for the tokens. My issue is I want to click/activate a token and the players only see what that one token would see, and if I were to click/activate another with different vision settings the players only see what that token would see. My brother uses Foundry VTT and that is a regular function for him on that system, but I'm already paying for Roll20. Jesster_Li said: Chris A. said: Hello, I don't know what to search for to properly find what I'm looking for so I apologize if this has been answered somewhere already. I run my GM instance of Roll20 in Firefox on my laptop screen while I run a dummy account in Chrome on a TV laid on the table for the players view and all of the players view the player view on one screen. I have just recently started using Dynamic Lighting, and I want to click a player token and upon doing so see as that particular player would on the player screen. One player has 120ft of dark vision, one has 60ft and the other three have none, if its dark I want to be able to click a token and say well THIS is what you see. I hope this makes sense and I thank you in advance for any and all help you can provide, and hopefully&nbsp; I'm posting this question in the right place. &nbsp; &nbsp; There is a code I got from a player that is helping with that could be adapted possibly. But if a player does not have Darkvision I usually grants 5 ft of vision. This code would also allow that player to use torches if they have torches out to assist with Darkvision. Otherwise the place will be dark to the players unless the area is in daylight mode. /w gm &amp;{template:npcaction} {{rname=Light and Vision}} {{description= [Snuff](!token-mod --off emits_bright_light emits_low_light --set lightColor#transparent) [Candle](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|5 low_light_distance|0 --set lightColor#transparent) [Lamp](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|15 low_light_distance|15 --set lightColor#transparent) [Torch](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 --set lightColor#transparent) [Hooded Lantern](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|30 low_light_distance|30 --set lightColor#transparent) [Light](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 --set lightColor#transparent) [Daylight](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|60 low_light_distance|60 --set lightColor#transparent) ----------------------------------- [Darkvision](!token-mod --on has_night_vision --set night_vision_distance|60) [Darkvision+](!token-mod --on has_night_vision --set night_vision_distance|120) [Remove Darkvision](!token-mod --on has_night_vision --set night_vision_distance|3) [Blizzard](!token-mod --on has_night_vision --set night_vision_distance|30) }} I hope this helps and really helps with spells too.
Old v New systems, and apples and oranges.&nbsp; One a website, one is an app.&nbsp; features are definitely different, I know (have both till my CoS finishes). Chris A. said: I appreciate the help, but for what I'm looking for this functions essentially like setting "night vision" in the Dynamic Lighting tab for the tokens. My issue is I want to click/activate a token and the players only see what that one token would see, and if I were to click/activate another with different vision settings the players only see what that token would see. My brother uses Foundry VTT and that is a regular function for him on that system, but I'm already paying for Roll20. Jesster_Li said: Chris A. said: Hello, I don't know what to search for to properly find what I'm looking for so I apologize if this has been answered somewhere already. I run my GM instance of Roll20 in Firefox on my laptop screen while I run a dummy account in Chrome on a TV laid on the table for the players view and all of the players view the player view on one screen. I have just recently started using Dynamic Lighting, and I want to click a player token and upon doing so see as that particular player would on the player screen. One player has 120ft of dark vision, one has 60ft and the other three have none, if its dark I want to be able to click a token and say well THIS is what you see. I hope this makes sense and I thank you in advance for any and all help you can provide, and hopefully&nbsp; I'm posting this question in the right place. &nbsp; &nbsp; There is a code I got from a player that is helping with that could be adapted possibly. But if a player does not have Darkvision I usually grants 5 ft of vision. This code would also allow that player to use torches if they have torches out to assist with Darkvision. Otherwise the place will be dark to the players unless the area is in daylight mode. /w gm &amp;{template:npcaction} {{rname=Light and Vision}} {{description= [Snuff](!token-mod --off emits_bright_light emits_low_light --set lightColor#transparent) [Candle](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|5 low_light_distance|0 --set lightColor#transparent) [Lamp](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|15 low_light_distance|15 --set lightColor#transparent) [Torch](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 --set lightColor#transparent) [Hooded Lantern](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|30 low_light_distance|30 --set lightColor#transparent) [Light](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 --set lightColor#transparent) [Daylight](!token-mod --on emits_bright_light emits_low_light --set bright_light_distance|60 low_light_distance|60 --set lightColor#transparent) ----------------------------------- [Darkvision](!token-mod --on has_night_vision --set night_vision_distance|60) [Darkvision+](!token-mod --on has_night_vision --set night_vision_distance|120) [Remove Darkvision](!token-mod --on has_night_vision --set night_vision_distance|3) [Blizzard](!token-mod --on has_night_vision --set night_vision_distance|30) }} I hope this helps and really helps with spells too.
1666986869
timmaugh
Pro
API Scripter
Couldn't you have a dummy account dedicated to the player-facing screen, and then have a TokenMod command that used 2 target statements? The first would be fed to a TM command to remove ownership... So the dummy acct would lose sight... And the 2nd target would be given to a TM command to grant control, effectively giving the dummy acct that token's vision. Haven't actually mocked that up... Just spit balling.
1666990441
Chris A. said: Hello, I don't know what to search for to properly find what I'm looking for so I apologize if this has been answered somewhere already. I run my GM instance of Roll20 in Firefox on my laptop screen while I run a dummy account in Chrome on a TV laid on the table for the players view and all of the players view the player view on one screen. I have just recently started using Dynamic Lighting, and I want to click a player token and upon doing so see as that particular player would on the player screen. One player has 120ft of dark vision, one has 60ft and the other three have none, if its dark I want to be able to click a token and say well THIS is what you see. I hope this makes sense and I thank you in advance for any and all help you can provide, and hopefully&nbsp; I'm posting this question in the right place.&nbsp; &nbsp;&nbsp; timmaugh said: Couldn't you have a dummy account dedicated to the player-facing screen, and then have a TokenMod command that used 2 target statements? The first would be fed to a TM command to remove ownership... So the dummy acct would lose sight... And the 2nd target would be given to a TM command to grant control, effectively giving the dummy acct that token's vision. I think that run will into the same issue that the Observer Script has, where vision settings aren't populated onto the token until it is manually closed.&nbsp; But I haven't tried using Observer for a while, so maybe that bug has been resolved, but that's basically what the Observer script does. Perhaps if you're just using a TokenMod command to only change token control settings, then that bug won't happen (as I believe it is only related to vision settings for UDL).
1666992907
I just tried out Observer again, and it appears that it is working with UDL now.&nbsp; So that could possibly be one option. I also have a TokenMod macro that I use for a player who has a familiar that he can see through its eyes, which could be adapted to do something more 'globally' with all player controlled tokens. !token-mod {{ --ids @{CHARACTERNAME|character_id}&nbsp; @{FAMILIARNAME|character_id} --flip has_bright_light_vision }}
1667152527
Looking for some help with mixing TOkenMod with !get. So I have list of weather conditions for evert day, stored in sheet ability. Another ability macro ouputs the current data into chat and updates the day count by 1. !get\.MuleBoy.WeatherConditions.get.MuleBoy.WeatherConditions.day/get/get{&amp;mule MuleBoy.WeatherConditions}{&amp;simple} set\.MuleBoy.WeatherConditions.day=[\][\]get.MuleBoy.WeatherConditions.day/get + 1\]\].value/set This works fine,. but now I want to add another fuction: A 'Wind Direction' token. The text output should also be palced in the token's tooltop, and the token rotated acording to wind direction. I tried this !token-mod --set tooltip|"!get\.MuleBoy.WeatherConditions.get.MuleBoy.WeatherConditions.day/get/get{&amp;mule MuleBoy.WeatherConditions}{&amp;simple}" Thing is, while it does convert the "!get..." into the corect Weather Info, it prints it out in the chat like this, instead of setting the tooltip: : token-mod --set tooltip|" /em May 17 ⚔ Gentle breeze (3) towards West" Also, where would I put the token rotation instruction without having it also printed out in either chat or the tooltip? I could generate another list, containing just the rotational instructions, and have it also advance by 1 day for every click, but how to turn that line of data into a proper TikenMod command? Many thanks.
1667156424
Actually, I figured it out. Made a secon list containing just TokenMod instructions, and a second macro button to execute just that. 546= !token-mod --set rotation|90--set tooltip|"May 17 ⚔ 12pm-18pm ⚔ Monday ⚔ Gentle breeze (3) with Light Rain (5 km) and Moonset 15.00" It all works now, I just have to press two buttons in a row instead of one. I tried making a new button to active both abilities at the same time: %{selected|ManipulateArrow} %{selected|WeatherCheck} But only the first one gets executed.
1667241868
The Aaron
Forum Champion
API Scripter
You might try putting a carriage return in there: %{selected|ManipulateArrow} &amp;#13; %{selected|WeatherCheck}
1667290353
Is it possible to set the Text Overlay (Hidden, Editors, Everyone options) for each of the bars (1-3) using TokenMod? Thanks in advance!
1667311394
The Aaron
Forum Champion
API Scripter
No, those settings are not exposed to Mod Scripts yet unfortunately.
When you change the size of a token, is there a way to align it to the game grid.&nbsp; I have a token that is going from huge, to medium, to large, etc.&nbsp; I can move it to align it, but I don't know the current size.&nbsp; I was wondering if there is an alignment function which I didn't see in the notes.
1667960337
The Aaron
Forum Champion
API Scripter
There isn't, but how would you see that operating?