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

Using token-mod to add multiple tokens based on user input

I have created a fly macro for my Aarokocra. !token-mod {{ --set     statusmarkers|fluffy-wing?{One is 5ft} }} It adds the fluffy wings and a number that indicates how many squares up I am flying (1 sq = 5 feet). What I would like to add to this is a second token in the case that I fly higher that 45 feet.  is there a way to do math inside the macro to determine what indexed token to add.  Something like this. !token-mod {{ --set     statusmarkers|fluffy-wing[ceiling?{One is 5ft}/45]:?{One is 5ft} }}
1592851154
The Aaron
Roll20 Production Team
API Scripter
Not yet.  That's on my list...  (Unrelated, check your PMs.  =D)
Thanks!  I have modified my macro (for now) to get around this.  Makes me do more work with math (which is ok), but it helps for now.  Too bad you can't put higher numbers on tokens.  It prompts for the token number and how many squares up.  Then it calculates the actual height and displays that is chat. !token-mod {{ --set     statusmarkers|fluffy-wing[?{Token Number (45ft per token)}]:?{One is 5ft} }} &{template:desc} {{desc= is Flying [[ (?{Token Number (45ft per token)} - 1) *45 + ?{One is 5ft}*5]] ft up }}
And I have a related "landing" macro to remove all tokens (not sure if there is an easier way to do this, but this works) !token-mod --set statusmarkers|-fluffy-wing:[0] !token-mod --set statusmarkers|-fluffy-wing:[1] !token-mod --set statusmarkers|-fluffy-wing:[2] !token-mod --set statusmarkers|-fluffy-wing:[3] &{template:desc} {{desc= has landed }}
1592852202
The Aaron
Roll20 Production Team
API Scripter
You can do that as: !token-mod --set statusmarkers|-fluffy-wing:[3]|-fluffy-wing:[2]|-fluffy-wing:[1]|-fluffy-wing:[0]
Thanks!