manuelVo / foundryvtt-drag-ruler

A Foundry VTT module that shows a ruler when dragging tokens so you can see how far you've dragged them
MIT License
40 stars 52 forks source link

[D&D 5th] Drag Ruler doesn't highlight squares on Euclidean diagonal movement rules #208

Closed LtDerek closed 1 year ago

LtDerek commented 2 years ago

In the Dnd5e System settings, there is a setting called "Diagonal movement rule", which determines how diagonals are measured. When set to: 'PHB' or 'DMG', the ruler behaves as normal.

However, when the 'diagonal movement rule' is set to 'Euclidean' the ruler behaves as if there wasn't a grid. It still snaps to the squares, but it doesn't highlight tiles and the ruler itself changes colour.

I prefer when the ruler stays the same colour and highlights the tiles, but I also like using Euclidean setting for measuring diagonals.

Is there a way I can have both?

(I'm almost certain that it was working previously. I recently updated from 8.9 to v9 and I think that that's when it changed)

manuelVo commented 2 years ago

Highlighting squares with the distance colors isn't possible in a consistent manner on Euclidean. There would be edge cases, where the same square might switch between two different colors, depending on what location precisely you drag your token to. This will lead to a somewhat bad user experience, where Drag Ruler might tell you that you cannot reach a particular square and if you actually try dragging your token there, Drag Ruler will suddenly change its mind and tell you that it's indeed possible. This behavior unfortunately isn't fixable, since the concept of a grid and euclidean measurement don't fit together really well. Instead, I opted to disable grid highlighting for Euclidean. As a result, Drag Ruler will now not give any information about which squares are reachable at all to the user, but I feel like it's better to give no information than to give wrong information.

LtDerek commented 2 years ago

Would it be possible for me to go into the module folder and re enable it?

manuelVo commented 2 years ago

This is the change that updated the behavior. By undoing it, you should get the old behavior. Please keep in mind that this will also remove the ability to measure difficult terrain on Euclidean scenes using Terrain Ruler. If any bugs occur in a modified version of Drag Ruler, I'll not be able to help with that, so please proceed with caution :)