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

Centre-Aligned Small Tokens on the Square Grid

Score + 162
I'm proposing the suggestion that the smaller tokens center on the middle when snapping to the grid (like they do on the hex grid) - The current way just doesn't look aesthetically pleasing to the eye on a square grid. Currently any token smaller than 1 unit (70x70 pixel) snaps to the top right of the square. I realise that we can set tokens to 'Is Drawing' and have them move around free-form - But when they're creature tokens, the ease and uniformity of them snapping-to-grid makes things much smoother during game-time. I've had a look around with my best keywords for a suggestions & ideas post on the subject but I cannot find any regarding this (if there is such a thread, please let me know).
OMG, yes! This would be fantastic. It's very annoying having to hold down ALT to get the token where I want it.  Every token should align to grid center. +1 indeed!
1440506111

Edited 1440592105
The Aaron
Pro
API Scripter
It won't help everyone, but in the interim if you have a Pro Subscription, you can do this with the API pretty easily: on('ready', function(){     "use strict";     on('change:graphic',function(obj,prev){         if( ( _.contains(['gmlayer','objects'],obj.get('layer')) ) &&             ( !obj.get('isdrawing') ) &&             ( obj.get('left') !== prev.left || obj.get('top') !== prev.top) &&             ( obj.get('width') < 70 || obj.get('height') < 70) ){             obj.set( {                 left: obj.get('left')+35-(obj.get('width')/2),                 top:  obj.get('top')+35-(obj.get('height')/2)             });         }     }); }); Edit: changed to ignore drawings.
+1 I play as a tiny beast (cat) and having a cat scaled to a 5ft grid ruins a lot of fun and creates confusion when moving through another creatures tile (as DM has to remember I am tiny, not Medium)  So having it so we can scale the cat icon to a tiny scale, but center on the grid, would be extremely useful.
1485692286
Zym
Sheet Author
The API script that Aaron provides is fine. As long as you keep the maps to the default scale of 5ft for 1 unit square. If you change the maps grid size. i.e.  10ft for 0.5 unit square, then unfortunately the tokens will snap to the centre of a grid axis and not the centre of the squares. Its really annoying because I thought I had found a fix ! !
1485725172

Edited 1485725191
Ziechael
Forum Champion
Sheet Author
API Scripter
Another note from my last session using Aaron's snippet (thin windy caves) the centring of a token can cause it to cross dynamic lighting lines... oops. Poor halfling rogue was constantly peeking behind the curtain lol.
1485788943
The Aaron
Pro
API Scripter
Good points!  I can probably fix both of those issues in a couple days. What would be the best way to handle the "through the wall" issue? Have it stop at the wall or push up against it?
1485793638
Ziechael
Forum Champion
Sheet Author
API Scripter
'Stop at' would probably be best to prevent token bleed. Not really an issue for player tokens but for those little monsters behind the cave walls it would prevent premature exposure?
1494878726
Zym
Sheet Author
Any luck Aaron on these fixes? :-)
1494972648

Edited 1494972806
Zym
Sheet Author
Hmmm. Seems like this is simply thinking around the box. Aaron does the hard part and all I had to do was fiddle with mathematics. Half a scale, so half the numbers in the script. Simple! on('ready', function(){     "use strict";     on('change:graphic',function(obj,prev){         if( ( _.contains(['gmlayer','objects'],obj.get('layer')) ) &&             ( !obj.get('isdrawing') ) &&             ( obj.get('left') !== prev.left || obj.get('top') !== prev.top) &&             ( obj.get('width') < 35 || obj.get('height') < 35 ) ){             obj.set( {                 left: obj.get('left')+ 17.5 -(obj.get('width')/2),                 top:  obj.get('top')+ 17.5 -(obj.get('height')/2)             });         }     }); }); As long as my Grid is always the same I should be okay. The grid is usually the same so no problem!
Kissker said: +1 I play as a tiny beast (cat) and having a cat scaled to a 5ft grid ruins a lot of fun and creates confusion when moving through another creatures tile (as DM has to remember I am tiny, not Medium)  So having it so we can scale the cat icon to a tiny scale, but center on the grid, would be extremely useful. Just fyi, you could pad the cat token to medium size (1 square) with empty space all around in GIMP or photoshop.
1494975910

Edited 1494975992
Zym
Sheet Author
Ha... yeah really. Although that would work for some, I can make tokens fairly quickly and know that padding my tokens could become a little complicated (I have a bunch of tokens already which would require repadding) This API is pretty much doing the trick, so why set up tokens for padding? :-)  Thanks for the suggestion though, I appreciate the help.
This has stopped working for me. Anyone have an alternative? Thanks.
Heyo! +1 for this not working. Has there been an update to the API related to this?
1570470584
N Robaina
Pro
Marketplace Creator
+1 GREAT IDEA!
+1, Not sure why this wasn't a thing when the platform launched.
I make my tokens using tokenstamp 2 and for small tokens I make the size be .5 so when I put them on the table and set the size to 70x70 it has a transparent area around it and it sits in the center.
what i did to circumvent this, is i brought the token i made into GIMP (or photoshop, whatever photo editing program you use) and i scaled the token down and centered it, so there is a wide border around it. then when i upload it, its already centered and the size that i want. 
1592641225

Edited 1592658257
Bo
Plus
I started this thread many years ago to get Roll20 to do the work...
Jumping on board this very necro'd thread to agree. Having to resize tokens based off of map is pretty aggravating, especially when we're talking about something like the 5E Monster Manual where I really should just be able to drag and drop, and not have to copy the token into an external editing program because I'm trying to make a Tiny Orc or I'm operating at a 10' grid.
Bumping this thread. As for me I'd like my slightly larger token to be centered. My Half-orc's swords are extended so that makes his body look tiny when confined to a single square. I'd like him slightly larger to keep his body to scale, without putting him in a 2x2 square. Pictures below:
+1 to this thread for centering small tokens to the middle of a square/hex. it would be lovely if it were a toggle in the token settings, and that it ignored drawings.
1597101278
Lee Pruitt
Marketplace Creator
This would be really great. All the different sizes of tokens really throws off the look of the scenes. I've got these huge bandits with shoulders 5ft wide and a half-orc barbarian who only takes up half the square. Then you scale them down and they bloop up into the corner. I +1 this.
that script posted by Aaron 5 years ago works for me. the small token shifts to center grid when moved. thanks!
Is this up and running yet?  Shall I put in the API script mentioned above?  Does it still warp pieces through the edges sometimes?
Is this newer script working for all scales now, or just a 10' one? Alex said: Hmmm. Seems like this is simply thinking around the box. Aaron does the hard part and all I had to do was fiddle with mathematics. Half a scale, so half the numbers in the script. Simple! on('ready', function(){     "use strict";     on('change:graphic',function(obj,prev){         if( ( _.contains(['gmlayer','objects'],obj.get('layer')) ) &&             ( !obj.get('isdrawing') ) &&             ( obj.get('left') !== prev.left || obj.get('top') !== prev.top) &&             ( obj.get('width') < 35 || obj.get('height') < 35 ) ){             obj.set( {                 left: obj.get('left')+ 17.5 -(obj.get('width')/2),                 top:  obj.get('top')+ 17.5 -(obj.get('height')/2)             });         }     }); }); As long as my Grid is always the same I should be okay. The grid is usually the same so no problem!
+1 Signed I'm surprised after coming back how many simple things like this are still not part of the base experience.  I saw one forum on this topic that went back 6 years ago
+1 signed.  Roll20 this is a really simple thing to implement and would save me a huge amount of time.
1619674166

Edited 1619674197
Grand Maître Chat
Marketplace Creator
Translator
There's an easy fix for this center-aligned problem of yours.  What I do is I create a 400x400px canvas in Photoshop,  drag and drop your token Align it in the center (the way it looks in that canvas will be the way it looks in a grid on Roll20)  Make sure your background is invisible Save your token as a png Profit
1619718910

Edited 1619718969
Bo
Plus
Grand Maître Chat said: There's an easy fix for this center-aligned problem of yours.  What I do is I create a 400x400px canvas in Photoshop,  drag and drop your token Align it in the center (the way it looks in that canvas will be the way it looks in a grid on Roll20)  Make sure your background is invisible Save your token as a png Profit No, Roll 20 needs to start building respect, and do the work.
+1 Also, why can't we vote up more than 3 suggestions? And you can't post a suggestion if you've voted up 3 suggestions!
+1 to this. The token snaps/aligns to top left of the square but aesthetically, the token makes more sense to be center aligned to the square.
+1 Please! When making creatures for my druid, this would be sooooo helpful.
I can't seem to get that script to work. I copy pasted the text to a new script and saved it. Do I need to do anything to get the script to run or should that happen automatically when I load the game?
+1
Why isn't centered the default in the first place? Big upvote from me!
Because not everyone wants it as default.  Setting a default or opion other than as a drawing would be helpful. Gneech said: Why isn't centered the default in the first place? Big upvote from me!
+1
+1
+1
+1
Assuming we're talking about custom token here, mine I Tokenize as Tiny size before poting them in Roll20. That way they scale perfectly at 1:1. Content bought from Roll20 is usually scaled properly.
+1 - I'm anal retentive about tokens. I want centered small tokens.
+1
+1 if this is still an open suggestion.
+1 I just did this search, I think for the 4th time in a couple years and still no traction. I've started looking elsewhere vtt wise because roll20 is so darn slow to do anything. You guys do realize that not having things as simple as this, or responding in a viable manner to your consumers is what keeps some of us from buying any content with you, because why invest if you're not showing us there's reason to?
+1
I've been using Roll20 for over two years, but only recently thought to change token size to reflect the size of a creature. Imagine my dismay to learn that users have been asking for this for over 7 years.  :(