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
39 stars 52 forks source link

Remove/Reduce Squeeze Control #264

Closed tjlanza closed 1 year ago

tjlanza commented 1 year ago

Foundry VTT v10.291, Drag Ruler 1.13.1, RoutingLib 1.0.6

I'm not sure if this belongs here or on RoutingLib, but I would like the ability to disable (or reduce) the squeezing mechanic when using pathfinding. The concept and implementation of squeezing is very specific to a certain style of game. For games with less rigid movement mechanics, it is not as appropriate and certainly not as a hard limit. Personally, my only concern is for its behavior on gridless scenes.

I can see a few options here:

  1. Add a hotkey to remove squeeze control while dragging. (ALT suppresses pathfinding completely.)
  2. Add a setting to disable squeeze control completely.
  3. Add a setting to influence the ratio of squeeze control to token size. Admittedly, I'd like to be able to have paths that are too small for some characters to move through (while others can), but I don't want to be bound to a specific games' interpretation of what "enough space" is.
manuelVo commented 1 year ago

This belongs in the routinglib repository. I'd like to mention, that no explicit squeezing logic is implemented in routinglib. On gridless scenes, the pathfinder encourages tokens to keep a certain distance from walls to generate a more reasonable path than the ideal path, which would be moving the token center along the very edge of the wall. As a side effect, this mechanic can also prevent tokens from moving through narrow gaps. Though there is no gurantee that this will happen, since it's only a side effect of a different mechanic.

That being said, there is no way to "disable the squeezing mechanic" because there is none. To achieve such a feature, a whole new piece of code that detects narrow openings and prevents tokens from going through them. Feel free to open a bug repot in routinglib requesting that feature. However, implementing such a feature is a surprisingly difficult task, so I cannot guarantee when (if ever) I'm going to implement that feature into routinglib.

manuelVo commented 1 year ago

I think it's also worth mentioning that you can work around this issue like this: