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

!torch problems

This is my macro: !torch [40 [20 [All Players [@{target | Target 1 | token_id} | 360...]]]] This is the result of that: No character was found for 'target ' SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "o" found. Anybody care to hazard a guess where I am messed up?
1484959311

Edited 1484959370
Silvyre
Forum Champion
You should refrain from using spaces within your targeted Attribute call, else Bad Stuff happens! Also, you'll want to remove all of those square brackets; those are used to define possible syntax, not as an example of a chat command.
1484959536

Edited 1484960548
Awesome!  Thank you!  ummmm, could you show me which of those items is a "targeted attribute call"?  @{target|Target1|token_id}  all that? Wait, so what separates all the 4020AllPlayers stuff?  No brackets so then what would I use? !torch 40 20 All Players @{target|Target1|token_id}|360      So this lets me choose a target, but then nothing. !torch 40,20,AllPlayers@{target|Target1|token_id}|360    This gets me the help menu !torch<40><20><All Players>@{target|Target1|token_id}|360  This also selects a target and then nothing.
1484960621
The Aaron
Pro
API Scripter
The command you want is: !torch 40 20 yes @{target|Target1|token_id} The target attribute call is the @{target|Target1|token_id}
1484960677

Edited 1484962486
YES!!!!  It worked!!!!  WE HAVE LIGHT!!!! you're awesome So if I want to turn on torches for multiple people or wall sconces at the same time I would put multiples of @{target|Target1|token_id} @{target|Target2|token_id} @{target|Target3|token_id}       like that in my macro?  worked it out, you have to have a space before each @.
1484961269
The Aaron
Pro
API Scripter
No worries. =D  The syntax is a bit arcane.. it's one of my older scripts.  Note that players can use this on tokens they can select.  Here's a few commands that would be useful: Kill the lights on selected token(s): !snuff Kill the lights on a specific token: !snuff @{target|token_id} 60ft darkvision on selected token: !torch 60 -5 no 120ft/60ft dim 60º bullseye light on selected token: !torch 120 60 yes --60 Happy Rolling!
OMG!  That is freakin' awesome!  You have no idea how much I hate turning torches on and off manually.
1484962969
The Aaron
Pro
API Scripter
Well... if you like that... You should checkout TokenMod.  You can do just about everything with it that you can with Torch, torch is just easier. For example, this is the Light-Options macro I have in all my games (Thanks Ziechael for the original version!): !token-mod --set ?{Vision|Torch, light_radius#40 light_dimradius#20 light_hassight#yes light_angle#360 light_otherplayers#yes|Hooded Lantern, light_radius#60 light_dimradius#30 light_hassight#yes light_angle#360 light_otherplayers#yes|Bullseye Lantern, light_radius#120 light_dimradius#60 light_angle#60 light_hassight#yes light_otherplayers#yes|Lamp, light_radius#30 light_dimradius#15 light_hassight#yes light_angle#360 light_otherplayers#yes|Candle, light_radius#5 light_dimradius#=0 light_hassight#yes light_angle#360 light_otherplayers#yes|Darkvision, light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Darkvision (90'), light_radius#90 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Warlock Devil's Sight, light_radius#120 light_dimradius#=120 light_hassight#yes light_angle#360 light_otherplayers#no|No light source(Dusk), light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Fog, light_radius#200 light_dimradius#=5 light_hassight#yes light_angle#360 light_otherplayers#no|No light source, light_radius#5 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Blinded, light_hassight#no light_angle#360 light_otherplayers#no} The formatting is a but ugly ^^^ because it's a roll query, but here's what it looks like: And this is how I setup my PC's tokens: !token-mod {{   --on showname      light_hassight      showplayers_name      showplayers_bar1      showplayers_bar2      showplayers_bar3      showplayers_aura1      showplayers_aura2   --off isdrawing    --set represents|"?{Character Name}"      bar1_link|AC     bar2_link|Speed     bar3_link|HP     light_radius|5      light_dimradius|=-5  }} A fix for if the token is looking down but I want the bullseye light to come out of the front: !token-mod --on fliph flipv --set rotation|180 How I setup Monsters: !token-mod {{   --on showname light_hassight showname    --off isdrawing    --set     name|"@{selected|character_name} %%NUMBERED%%"     bar1_link|AC     bar3_value|@{selected|HP}     bar3_max|@{selected|HP|max}     light_radius|?{Light|60}      light_dimradius|=?{Dim at|-5}   ?{Player Visible?|No,--off|Yes --on} light_otherplayers }}
okay, so a couple of questions.  How can I get token_mod?  Will it work with my other scripts or is it a this-or-that choice? Also, do these scripts work if I am using the Pathfinder sheet?
1484964454
The Aaron
Pro
API Scripter
TokenMod should be in the 1-Click install list, just search for it and install it like you did for Torch (assuming you did that for Torch).
The Aaron said: %%NUMBERED%% Is this a built in function of !token-mod or roll20?
1485066725
The Aaron
Pro
API Scripter
Neither, It's TokenNameNumber, another script I use for numbering tokens:&nbsp; <a href="https://app.roll20.net/forum/post/1273423/script-t" rel="nofollow">https://app.roll20.net/forum/post/1273423/script-t</a>...
I'm sorry, where can i find the 1-click install list? I'm kinda new to roll20
1485205783
The Aaron
Pro
API Scripter
In a game created by a pro subscriber, you go to the API Scripts link under the Settings menu on the Game Management page: &nbsp; <a href="https://wiki.roll20.net/Game_Management#API_Script" rel="nofollow">https://wiki.roll20.net/Game_Management#API_Script</a>... If you just want to see a list of scripts that are in the 1-click, that's slightly harder without access to the page.
This post is amazing! The Aaron your setup just saved me so much time. I'm just trialing Pro but I don't know how i can live without it anymore. Bookmarked.
1487543723
The Aaron
Pro
API Scripter
Cool. :) definitely post back it you have more questions.&nbsp; Happy Rolling!
1487568429

Edited 1487568550
So re: setup of PC and Monsters. &nbsp;Do I select the token and then Run that command in the chat box? &nbsp;Once I do that, do I have to run it again in the future or does it remain everytime I enter the game? Also, If I select all the PCs at once, can I then run the command in chat and it will set them all up at the same time? In a related post I was told NOT to link HP to the bar for my monsters so that way I could adjust their HP independently when I drag numbered monsters onto the table. &nbsp;It looks like your script assigns HP to the bar. &nbsp;Could you explain that? &nbsp;Using that script can I still independently adjust HP during a fight if my monsters all have their bar assigned to HP?
Not to hijack this thread, but i'm also having issues with Torch. Not sure how it works on the back-end, but it creates a light source that does not follow the character when i use&nbsp;!flicker-on ?{Radius|40} ?{Dim Start|20} on @{target|token_id}
1487572216
PaprikaCC
Pro
API Scripter
Hey there. @Omegaman -&nbsp; TokenMod only needs to be run when you want to make changes to a token. Roll20 will keep the changes you make to a token until the next time you use TokenMod or make changes manually. In regards to your concern with linking monster HP to a bar, The Aaron only does that with his PC macro. His monster macro is set up so that only the current and max values on the bar are set, there is no permanent link to a character sheet attribute. @FeltZ - Can you reproduce this error with multiple different tokens? I just tried your macro myself and it seems to be working.
1487602077
The Aaron
Pro
API Scripter
What PaprikaCC said. You still need to assign it as a default token, which you can do in the current version with the keyword defaulttoken (see the help). I can give you a full example when I'm not traveling.&nbsp; Regarding flicker, I'll have to try and reproduce the issue. Try turning the flicker off for the token or delegating the hidden token with the light source, then run the command again. &nbsp;Also, be sure the API didn't crash.&nbsp;