Custom Token Sizes?

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

Custom Token Sizes?

Post by goldensword52 »

Hi all, I would like to have more control over the sizes of token when using maptools. For example, I would like to have a token that is 8 by 8 squares. Using free size tokens doesn't really work for this, because moving the token to a map with a different grid size will cause the token to not match the new grid. I see there is a setSize() function in the RPTools wiki, but this seems to have the same restriction of only allying the "normal" sizes. Is there any way to make a token of a larger size, while still letting it conform to the grid size of the map? Thanks in advance for your help.

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Custom Token Sizes?

Post by MandyRae »

Wouldn't a map with a different grid size also have a different scale? I mean, if your "dungeon map is set to 100px/cell, and your overland map set to 200px/cell then the token would logically occupy half the space when switching from the dungeon map to the overland map. So if you had it free sized then it would technically match the scale change.

If your issue is using maps at different resolutions/sizes, there's a great tool created by someone on the d20pro boards. It's an excel spreadsheet that calculates all the math allowing you to resize the map using a standardized of/cell scale . . . you can download it here:

https://www.davebeauvais.com/mapscaletool/
It will standarize the scale for all the maps created from images, thus eliminating the issue to vary the px/cell on different maps.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Custom Token Sizes?

Post by aliasmask »

If you used free size, then scaling would be an issue. For an 8x8 I recommend doing this. Make the token size 4x4 (gargantuan) and go to the config tab of token. Click the image in the box and then scroll up 10 clicks. This will double the size of the image. Or if you're using 3.5/PF framework and need it to read as colossal, then set the size to that and increase the size by 3 clicks.

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Custom Token Sizes?

Post by MandyRae »

But doesn't free size simply make the token the actual image size before you adjust it? I.e. if the token image is 200px^2 then it'll show up as a 200px^2 image on the map before you adjust it's size.

So if you were to create the token as, say an 800px^2 image and free size it on a 100px/cell map then it'll be 8×8 cells. When moved to a map that's 200px/cell it'll show up as a 4×4 cell image . . . so as long as you create the token at the size you need it to be (scaled for the px/cell setting used) it'll always be the same scale no matter what px/cell setting used for the current map . . .

This is what I have done with my 5,500+ pathfinder token library: made each image the correct multiple of 100px so when set to free size it has the proper dimensions on the map

User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

Re: Custom Token Sizes?

Post by goldensword52 »

If you used free size, then scaling would be an issue. For an 8x8 I recommend doing this. Make the token size 4x4 (gargantuan) and go to the config tab of token. Click the image in the box and then scroll up 10 clicks. This will double the size of the image. Or if you're using 3.5/PF framework and need it to read as colossal, then set the size to that and increase the size by 3 clicks.
This works for what I want to do very well! Thanks for the tip, I didn't know that this was a feature of MapTool. My one question is, what is the name of the property of the token that I change when I resize an image this way? Is this something a macro can get access to and change with a function?
MandyRae wrote:But doesn't free size simply make the token the actual image size before you adjust it? I.e. if the token image is 200px^2 then it'll show up as a 200px^2 image on the map before you adjust it's size.

So if you were to create the token as, say an 800px^2 image and free size it on a 100px/cell map then it'll be 8×8 cells. When moved to a map that's 200px/cell it'll show up as a 4×4 cell image . . . so as long as you create the token at the size you need it to be (scaled for the px/cell setting used) it'll always be the same scale no matter what px/cell setting used for the current map . . .

This is what I have done with my 5,500+ pathfinder token library: made each image the correct multiple of 100px so when set to free size it has the proper dimensions on the map
Yes, that's how it works, and that's a problem for me when not all maps are the same size. Compare that to making a token "Medium" sized, where it will automatically scale itself to the same relative size of the grid. If your solution works for you that's great, but I would prefer not to have to resize a token every time I move it to a new map.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Custom Token Sizes?

Post by aliasmask »

The token image is actually two things. There is the image and then there is the foot print which all the calculations and MT functions revolve around. Before there was no way to change the image other than changing the footprint and having the image match the footprint with macros. But I think there are some new functions that will change just the image stamp. After a quick look you may want to play with Wiki: setTokenHeight(), Wiki: setTokenWidth() and Wiki: setTokenShape(). Also, the actual token size (footprint) matter for how things are centered. For an odd numbered grid like 5x5, the footprint works best as medium for the even numbered then use a large footprint.

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Custom Token Sizes?

Post by MandyRae »

goldensword52 wrote: Yes, that's how it works, and that's a problem for me when not all maps are the same size. Compare that to making a token "Medium" sized, where it will automatically scale itself to the same relative size of the grid. If your solution works for you that's great, but I would prefer not to have to resize a token every time I move it to a new map.
I'm sorry, maybe I'm just being obtuse, but I'm not following what you mean by different map sizes. I assume you're referring to the map scale and not the actual physical size of the map . . . ?

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Custom Token Sizes?

Post by wolph42 »

in the first post he mentions 'gridSize'. A bit peculiar to have different gridsizes on different maps but ok. The only way to solve that pickle is either:
1. resize it manually
2. use a macro. You can get the current gridSize of the map and adjust the token accordingly

now the latter again can be done in different ways:
1. a single click macro
2. onTokenMove event (so when the token is placed on the new map AND you move it, then it resizes
3. onMouseOverEvent (dito ontokenmove but now when you go over it with the mouse, tricky to setup though(
4. event driven: that is IF you use a macro to swap the tokens from map to map (for example the teleports in the BoT, but you can also write your own) then you can add a simple macro to resize the token when the map switch takes place.

my advice: use the latter!

User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

Re: Custom Token Sizes?

Post by goldensword52 »

Thank you all for your help. You've given me enough info that I should be able to write a macro that does exactly what I'm looking for. I have to say though I'm surprised by your responses to the idea of changing the grid size between different maps. This is the only time it has been a problem for me, and I would say it's saved me lots of time when making maps. Is it really that unusual to change the grid size? Are there other issues I might encounter down the road with varying grid sizes? Thanks again for all your help.

MandyRae
Cave Troll
Posts: 53
Joined: Sat Mar 12, 2016 11:39 am

Re: Custom Token Sizes?

Post by MandyRae »

It think the biggest issue you're going to encounter, at least visually, is that a combination of low resolution tokens (say tokens created at 50px^2, and a grid size that doesn't match, when you start enlarging the tokens, you're going to get a lot of pixilation. . . I think the standard practice of finding a set grid size, and sticking with it has a lot to do with both that, and the use of the various tile sets floating around.

My dungeon tiles set was created with the grid scale of 100px/cell in mind, so each "10 ft^2" tile is 200px^2. I find that this gives a decent enough resolution when zoomed in, while still allowing details when zoomed out (given that it's not a huge map, and I'm not zoomed out to show it all).

The only reason I could see to have varying grid sizes would be if you're using a background image for the map, or you want to differentiate between overland and "tactical" scale. If the reason you're using the varying grid size is related to the grid size on a backround map image, then I suggest using the mapscale resize to I linked to earlier. It takes a little more work than just dropping the image in and eyeballing the grid scale, but it does make things a little more uniform, and simmer in the long run.

But, to each their own. If the varying grid size works for you, and you've eliminated the issues you were having, then go with what you prefer . . .

Just remember: when token scale is a lot smaller than grid scale, you will loose resolution and the tokens will begin to get pixilated

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Custom Token Sizes?

Post by JamzTheMan »

Just to note, it's not any help but I do feel your pain. There needs to be a user configurable section for token sizes (vs hard coded med/large/huge) as well as custom sizes like 2x4 and such, but the later probably requires some major changes (or at least testing).

It has been discussed but it's probably farther down the schedule than you would like.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Post Reply

Return to “MapTool 1.4”