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

TokenMod Help a noob to start (torch and aura)

Hi! I'd like to use tokenmod to make it easier to toggle on/off auras, vision/darkvision, and light for my PC token. What I understood: 1: you have something called an API or a script that allow you to do that (here it's TokenMod). I installed it from Roll20 library 2: You can write commands into your game chat. But it's useless as it's longer to write the command than to actually turn on the light myself. 3: But I can create little buttons called "macros" in which I can write those commands. But I have no clue how to write them and I swear I spent the afternoon trying to read the forum, I understand nothing, and nothing works and I wanna cry. So if any of you could be kind enough to show me the right spelling, maybe it'll help me understand how it's suppose to work, thanks so much. I just wanted to play DnD, not learn how to code.... xD
Oh and how can be sure that I'm not gonna lit up every tokens? Can it target a specific player from the journal? Do I have to rewrite everything every time for every player? 
1682978047
The Aaron
Roll20 Production Team
API Scripter
Hi!&nbsp; You can use TokenMod for many, if not all of these things.&nbsp; You can access the help, which lots of examples and descriptions of all the options either by finding the Help: TokenMod handout in your Journal, or by running this command: !token-mod --help The layout is not 100% intuitive, as it's broken down by data type, not grouped by similar settings.&nbsp; Unfortunately, that means the lighting settings are spread across multiple settings depending on if you are turning it off and on (Boolean), or setting a numeric value like radius (Numbers or Blank), or setting the arc size (Circle Segment).&nbsp; You can pop out the handout, then use browser search to find "Updated Dynamic Lighting" to see all the settings for UDL.&nbsp; I really need to rewrite the help soon... That said, you are in luck when it comes to lighting because Keith Curtis has written the very excellent DLTool:&nbsp; <a href="https://app.roll20.net/forum/permalink/11316788/" rel="nofollow">https://app.roll20.net/forum/permalink/11316788/</a> It provides a very intuitive and useful interface to doing all the things you want with lighting and vision. To answer your second question, most API scripts target the tokens that are currently selected.&nbsp; Depending on what you are doing, you may want to update the default token stored on the character, so the next time you pull them out, they have the same settings.&nbsp; DLTool has a button for that, but you can also do it with TokenMod via: !token-mod --set defaulttoken
Thanks a lot for the fast answer. I found the Help section and spend 2h looking at it but I absolutely understood nothing xD I just want to turn lights on/off, there is not a world where I'm competent to understand how to "code" anything (and I'm french, which makes it twice harder to understand TT) I was hoping someone would post his personal macro to toggle a parameter on/off so I could copy the correct syntax. Because I see some -- } {{ / # and @ and I have absolutely no clue about what it means. I don't even know what is the vertical bar and how to type it. I'll look for Keith DLTool, hope it'll make things easier...
The DLTool is awesome. I just have to figure out the aura now and how to make my token wild shape and enlarge/reduce, and I'll have everything I need!
So I ended up with those solutions: toggle lights on/off:&nbsp;!token-mod --flip emits_bright_light emits_low_light --set light_radius|!40 light_dimradius|!20 toggle aura on/off:&nbsp;!token-mod --set aura1_radius|!30
1682995031
The Aaron
Roll20 Production Team
API Scripter
For enlarge reduce, you can either set a specific size, or adjust by relative amounts: Specific sizes: Size 1x1: !token-mod --set scale|1u Size 2x2: !token-mod --set scale|2u Size 3x3: !token-mod --set scale|3u Relative sizes: Twice as big !token-mod --set scale|*2 Half as big !token-mod --set scale|*.5
Oh it's my chance to thank my specifically Aaron :) I see your hundreds of answers, if not more in the forum. I think it's you who did the teleport API too, so handy and so well explained. So a huge thanks for everything you're doing! The enlarge/reduce works perfectly. For wildshape I saw a LOT of threads talking about it, so I'll go dig by myself cause I think I'm starting to understand the logic and the syntax of simple commands.
Oh Aaron! Is there a way to create a macro with multiple choices? Instead of having a Enlarge button, and a Reduce button, how can I write a Enlarge/Reduce/normal ? So with the !token-mod --set scale|1u !token-mod --set scale|.5u !token-mod --set scale|2u And be able to have a multi selection macro.
Try this: !token-mod --set scale|?{Size?|Small/Medium,1| Tiny,.5| Large,2}u&nbsp;
It work perfectly, I'll try to understand how you write it to reproduce if needed :) What does the "?" add to the syntax?
1683029958
The Aaron
Roll20 Production Team
API Scripter
Thanks, and &nbsp;you're welcome! =D That ?{} construct is called a Roll Query:&nbsp; <a href="https://wiki.roll20.net/Roll_Query" rel="nofollow">https://wiki.roll20.net/Roll_Query</a>