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

Token-mod, rollable table, resizing token and aligning to grid

Hi all,  I'm using a rollable table for multisided token and token mod to set the currentside.  One of these sides is twice the size of the other (2u). When i switch size with token mod, then the new sized token isn't aligning automatically to the grid, but instead is using the center of the token as a reference for the new token's size.  Is there a way to do that automatically or do we have to fiddle with the token until it aligns correctly (and redo it, when switching backto 1u size...) I precise that my items in the rollable table are not "is drawing" when the size is switched. Thanks.
I just let my players move the token to a free space such that the token will snap to it. You could try adding the relative position commands in the macro using Tokenmod, something like; --set top|-35 left|-35
You’ll have to add --move to the TokenMod command when switching from an odd numbered size to an even numbered size and vice versa. Unfortunately there’s no way with a simple TokenMod command to reference the current size to know if you need to make the move adjustment when resizing. I typically just adjust the token size then quickly move it to realign it to the grid, but if this is truly bothersome you might be able to use another script such as SpawnFX that would automatically align tokens when they are placed. 
1673805577
timmaugh
Pro
API Scripter
You can brute force this a bit by adding Fetch to your TokenMod command line. Fetch can retrieve the current left and top properties of the token (which would reference the corner). If the previous incarnation of the token was aligned and you're on a square-gridded map, then that top-left corner would match a square. Since Fetch would resolve at meta-speed, it would already be a number by the time Token-Mod saw the command line... so you can just put the top & left retrievals where you need them in the TM command line to indicate the position for the "new" token position. @(selected.top) @(selected.left)