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:Token Mod

1711768084

Edited 1711770149
I am trying to combine two scripts.&nbsp; I have one that changes the token.&nbsp; The character is a vampire, so I want her to be able to transform the token into vampire, bat, mist and wolf forms.&nbsp; Which works great: !token-mod {{--set imgsrc|?{Choose Form |Vampire, <a href="https://s3.amazonaws.com/files.d20.io/images/365969197/29eaUaIA2DoChTvHHoFpSg/med.png?1698966180" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/365969197/29eaUaIA2DoChTvHHoFpSg/med.png?1698966180</a> |Bat, <a href="https://s3.amazonaws.com/files.d20.io/images/386536191/WHo_ghOlWFa3LlFSHR6M4Q/med.png?1711690679" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/386536191/WHo_ghOlWFa3LlFSHR6M4Q/med.png?1711690679</a> |Mist, <a href="https://s3.amazonaws.com/files.d20.io/images/386536190/MNK7WOCnWdeL9-kOG4J0vA/med.png?1711690679" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/386536190/MNK7WOCnWdeL9-kOG4J0vA/med.png?1711690679</a> |Wolf, <a href="https://s3.amazonaws.com/files.d20.io/images/386537518/QG2_zeKryStQlbkGj2GBFg/med.png?1711692102" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/386537518/QG2_zeKryStQlbkGj2GBFg/med.png?1711692102</a> } }} Then I have a script that allows characters to change their token size when casting Enlarge /Reduce.&nbsp; Which also works great: !token-mod {{--set scale|?{Choose Size|Tiny,.5g|Small,1g|Medium,1g|Large,2g|Huge,3g|Gargantuan,4g } }} But what I'm trying to do is add the scaling part to the changing part so that when she selects Bat, it changes the token and the size to Tiny: !token-mod {{--set scale|.5g }} I hope that makes sense.
1711769271
Andrew R.
Pro
Sheet Author
You'll need a bit more than just TokenMod and Roll Query to do that. You should be able to use the Meta Tool Box to get a conditional that includes the imgsrc and scale together in the one TokenMod call.&nbsp;
You can add the --set scale# part into the roll query after the url !token-mod {{--set imgsrc|?{Choose Form |Vampire,<a href="https://s3.amazonaws.com/files.d20.io/images/365969197/29eaUaIA2DoChTvHHoFpSg/med.png?1698966180" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/365969197/29eaUaIA2DoChTvHHoFpSg/med.png?1698966180</a> --set scale#1g |Bat,<a href="https://s3.amazonaws.com/files.d20.io/images/386536191/WHo_ghOlWFa3LlFSHR6M4Q/med.png?1711690679" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/386536191/WHo_ghOlWFa3LlFSHR6M4Q/med.png?1711690679</a> --set scale#.5g |Mist,<a href="https://s3.amazonaws.com/files.d20.io/images/386536190/MNK7WOCnWdeL9-kOG4J0vA/med.png?1711690679" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/386536190/MNK7WOCnWdeL9-kOG4J0vA/med.png?1711690679</a> --set scale#1g |Wolf,<a href="https://s3.amazonaws.com/files.d20.io/images/386537518/QG2_zeKryStQlbkGj2GBFg/med.png?1711692102" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/386537518/QG2_zeKryStQlbkGj2GBFg/med.png?1711692102</a> --set scale#1g }}}
Thank you Joshua!&nbsp; That's perfect!&nbsp; I'm new to macros and didn't know about the # use.&nbsp; I was trying&nbsp;&nbsp;--set scale|.5g