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

Multi-sided tokens with different size dimensions

Hey all, I'm trying to create a multi-sided token for one of my players. He's able to change into an Air Elemental which is a Large creature, but his normal size is Medium. Is this possible?
1567731466
The Aaron
Roll20 Production Team
API Scripter
You would need to use something like TokenMod to adjust the size.  If all the images are in a User Library, you can use TokenMod to change the face and resize the token, then just make a menu: !token-mod {{ --set ?{Side|Regular,currentside#1 size#70|Air Elemental,currentside#2 size#140} }}
Would that be able to just change one of the sizes?   
1567731822
The Aaron
Roll20 Production Team
API Scripter
sure.  just use width#140 or height#140 or whatever
Thank you so much Aaron!
Hey Aaron, I'm trying to change the token, but this is what I'm getting: What am I doing wrong? The token gets stretched out, also when I enter the command into chat, it changes the token to the 2nd side which is the Air Elemental, but doesn't increase it to the 140 Height/Width.
1567751818
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You're missing a { after the ?
Thank you Keithcurtis, that worked beautifully. One more question, with TokenMod, is there a way to set the HP for the Air Elemental side of the token as well in the same script?
1567771409
The Aaron
Roll20 Production Team
API Scripter
Yes, probably. You can definitely set the value of the bar. If the bar is linked, you'll be updating the character's hit points as well though. You could link the bar to a different attribute which is the air element's hp, or store the current hp in another unused bar and restore it later. 
Ok, I'm thinking to set a new Attribute for the Air Elemental's HP. How would that look with the rest of the code? Im not sure I completely understand how to link the different parts of the --set attribute.   And would I need to set the HP for both sides?
1567778791

Edited 1567778829
The Aaron
Roll20 Production Team
API Scripter
Yeah. Assuming you create an attribute "ae_hp" for the Air Elemental and you use bar1 for the hp display, something like this: !token-mod {{ --set ?{Side|Regular,currentside#1 size#70 bar1_link#hp|Air Elemental,currentside#2 size#140 bar1_link#ae_hp} }} You might need something to reset the Air Elemental to max hp. 
@Aaron - I made a few adjustments, but it works perfect. With only a little hiccup. The HP for both sides of the token are what they're supposed to be, but when you modify it for the first time, you can't see the change until you click off the token. Not a big problem for how well it works. Thank you for your help. In case you're wondering, the modified code is below: !token-mod {{ --set ?{side|Franis Khass, currentside#1 height#70 width#70 bar1_link#HP|Air Elemental, currentside#2 height#140 width#140 bar1_link#ae_hp} }}
1567822429
The Aaron
Roll20 Production Team
API Scripter
cool!