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

[Macro Help] Using TokenMod to announce change in vision status

Hi folks, I'm putting together a vision macro for UDL using TokenMod. The code appears below. What I'd also like to do, though, is have TokenMod announce the pop-up choice for the selected token after the operation, i.e. "Vision changed to Torch for Rick the Barbarian." I tried using --report all (see below), but when I run the macro, it returns bright_vision as the value instead of the name of the pop-up choice (Torch, Candle, etc.). What am I missing? It's probably something very simple, because it's me. :) !token-mod --set ?{Vision|Blinded, bright_vision#no emits_bright#no emits_low#no night_vision#no|Bullseye Lantern, bright_vision#yes emits_bright#yes bright_distance#60 emits_low#yes low_distance#60 has_directional_bright_light#yes directional_bright_light_total#90 night_vision#no|Candle (Object), bright_vision#no night_vision#no emits_bright#yes bright_distance#5 emits_low#yes low_distance#5|Candle (Player), bright_vision#yes night_vision#no emits_bright#yes bright_distance#5 emits_low#yes low_distance#5|Darkvision, bright_vision#yes night_vision#yes night_distance#60 emits_bright#no emits_low#no|Daylight Spell (Object), bright_vision#no night_vision#no emits_bright#yes bright_distance#60 emits_low#yes low_distance#60|Daylight Spell (Player), bright_vision#yes night_vision#no emits_bright#yes bright_distance#60 emits_low#yes low_distance#60|Hooded Lantern, bright_vision#yes night_vision#no emits_bright#yes bright_distance#30 emits_low#yes low_distance#30|Hooded Lantern (hood lowered), bright_vision#yes night_vision#no emits_bright#yes bright_distance#5 emits_low#yes low_distance#5|Lamp, bright_vision#no emits_bright#yes bright_distance#15 emits_low#yes low_distance#30 night_vision#no|Light Spell, bright_vision#yes emits_bright#yes bright_distance#20 emits_low#yes low_distance#20 night_vision#no|No Light Source, bright_vision#yes emits_bright#no emits_low#no night_vision#no|Produce Flame Spell, bright_vision#yes emits_bright#yes bright_distance#10 emits_low#yes low_distance#10 night_vision#no|Torch (Object), bright_vision#no night_vision#no emits_bright#yes bright_distance#20 emits_low#yes low_distance#10|Torch (Player), bright_vision#yes night_vision#no emits_bright#yes bright_distance#20 emits_low#yes low_distance#10} --report all|"Vision set to ?{Vision} for @{selected|token_name}."
1597007596
The Aaron
Roll20 Production Team
API Scripter
Roll Queries are replaced with their value, not their label.  You'll probably need to use a construct like: ?{Vision|Blinded, --set blah#val blah2#val2 --report all#"[name] has been blinded."|...}
The Aaron said: Roll Queries are replaced with their value, not their label.  You'll probably need to use a construct like: ?{Vision|Blinded, --set blah#val blah2#val2 --report all#"[name] has been blinded."|...} Thanks, will try!
So, that construct isn't working for me. It just spits out all the tokenmod arguments into one line in the box without menu options. Hmm. I might just go the Chat menu route instead.