Open kwvanderlinde opened 3 weeks ago
After playing with rendering state images on tokens I had a quandary with how they should show on isometric tokens. Since I was only addressing the resizing of the images for rotated tokens I left it alone, but I was sorely tempted to change it from to
It would probably make life easier if we just drew them square and morphed the result.
Off-topic for this issue, but I'll bite :slightly_smiling_face:
It's an interesting question. I see bar and grid image states as part of a "HUD" that sits over the map, not as part of the map or token itself. So I prefer those it to be left as-is. But other states, like X or Circle states feel like a modification of the token image, and so I would be in favour of those being transformed on iso grids.
Bleh, facing is used as keys in image tables. And there it really matters which number is mapped to which screen direction, otherwise the wrong image is used. So changing the meaning of iso facing would break image tables. Or if we try to pass a modified value during image table lookup, it would break any macros that try to use an image table as a regular table along with getTokenFacing()
.
I think this would be solvable if image tables were a real thing - we could just auto-update the keys to account for the change. But image tables are just regular tables, so messing with them is not a sound option.
Open to suggestions. But for now I don't see a way forward. We may just have to live with iso facing being a little weird.
Off-topic for this issue, but I'll bite 🙂
It's an interesting question. I see bar and grid image states as part of a "HUD" that sits over the map, not as part of the map or token itself. So I prefer those it to be left as-is. But other states, like X or Circle states feel like a modification of the token image, and so I would be in favour of those being transformed on iso grids.
I was thinking the same thing about the states and bar needing to be more like a HUD. They look very odd flattened to the map.
I always thought image tables were a bit of a crapulent hack when the images should instead be stored on the token and load them to the table panel for editing.
I always thought image tables were a bit of a crapulent hack when the images should instead be stored on the token and load them to the table panel for editing.
Problem solving time: all we need to do is leave existing calls to getTokenFacing()
and setTokenFacing()
alone, and leave image table keys alone. Nothing stops us from adding a new way to get the true on-grid facing. E.g., we can just add a parameter to the existing functions:
getTokenFacing(token, map, true)
setTokenFacing(angle, tokenRef, mapname, true)
Describe the Bug
Token facing on all grids - except isometric - measures an angle from the positive x-axis. But on isometric grid, it measures from the line
y = -x
for positive x.IOW, 0° always points to the right of the screen. But on isometric grids, it should point down-right in keeping with x-axis.
To Reproduce
[r: setTokenFacing(-90, getSelected())]
[r: setTokenFacing(-90, getSelected())]
Expected Behaviour
Facing values should correspond to these directions:
Screenshots
This is what I expect to see for different facing values:
-90°
0°
90°
180°
MapTool Info
1.11.5, 1.15.2
Desktop
Linux Mint 22
Additional Context
No response