Describe the bug
I'm using ArmsReach v2.1.12 and Stairways v0.8.5 on Foundry v9.238 (yes foundry is not up to date, but the modules are). I found out that the stairways are accessable only from half of the sides (up, down, left, right, 4x diagonaly) and started a little debugging myself.
As far as i've found out, the StairwaysReach.getStairwaysCenter(stairways) function returns the coordinates of the grid-cell instead of the actual coordinates. (Found out via placing some walls and comparing coordinates from function with wall coordinates). I've drawn a red mark on my screenshot on the returned coordinates.
I've also got the debug output of dist filled by computeDistanceBetweenCoordinates(...). When standing in Position 1 (green values) dist is set to 165. As it's comparing with the setting of game.settings.get(ARMS_REACH_MODULE_NAME, 'globalInteractionMeasurement'), in my case 1.0 meters, i assume the distance should also be measured in meters, therefore a distance of 165 meters is definetly wrong. 165 is the grid size in pixels, not meters.
If i stand in Position 2 (purple values) it gets strange but the distance is by far correcter, as dist is now 0.5 (meters?). I don't know how it got 0.5 as the grid size is 1.5m and its a diagonally a half grid (pythagoras says 1.06m) away. Nevertheless from where it starts measuring, 0.5m seems incorrect for Position 2.
I'cant say if my debugging is correct or not, if i understand your functions correctly or not, but maybe they help you to identify or reproduce my problem. Maybe there are two issues, the center of stairs and a mix up of meters, grids and pixels.
To Reproduce
Steps to reproduce the behavior:
Set global distance in tiles to 0 (disable)
Set global distance in measurement to 1
Set grid scale to 1.5 m
place a stairways anywhere on your scene, but in the center of a grid cell
move your character to any of the 8 adjacent grid cells (up, down, left, right, 4x diagonaly) and in the same grid cell as the stairways
half of the adjacent grid cells will say out of reach (the 4 on the lower right side as far as possible away from the red mark in screenshot)
Expected behavior
All adjacent grids should be in same reach to actual center of stairways
Screenshots
Browser:
Firefox
Foundry Version:
v9.238
Additional context
All values and debugging was done with console.log() output.
Module Version: v2.1.12
Describe the bug I'm using ArmsReach v2.1.12 and Stairways v0.8.5 on Foundry v9.238 (yes foundry is not up to date, but the modules are). I found out that the stairways are accessable only from half of the sides (up, down, left, right, 4x diagonaly) and started a little debugging myself.
As far as i've found out, the
StairwaysReach.getStairwaysCenter(stairways)
function returns the coordinates of the grid-cell instead of the actual coordinates. (Found out via placing some walls and comparing coordinates from function with wall coordinates). I've drawn a red mark on my screenshot on the returned coordinates.I've also got the debug output of
dist
filled bycomputeDistanceBetweenCoordinates(...)
. When standing in Position 1 (green values)dist
is set to 165. As it's comparing with the setting ofgame.settings.get(ARMS_REACH_MODULE_NAME, 'globalInteractionMeasurement')
, in my case 1.0 meters, i assume the distance should also be measured in meters, therefore a distance of 165 meters is definetly wrong. 165 is the grid size in pixels, not meters.If i stand in Position 2 (purple values) it gets strange but the distance is by far correcter, as
dist
is now 0.5 (meters?). I don't know how it got 0.5 as the grid size is 1.5m and its a diagonally a half grid (pythagoras says 1.06m) away. Nevertheless from where it starts measuring, 0.5m seems incorrect for Position 2.I'cant say if my debugging is correct or not, if i understand your functions correctly or not, but maybe they help you to identify or reproduce my problem. Maybe there are two issues, the center of stairs and a mix up of meters, grids and pixels.
To Reproduce Steps to reproduce the behavior:
Expected behavior All adjacent grids should be in same reach to actual center of stairways
Screenshots
Browser: Firefox
Foundry Version: v9.238
Additional context All values and debugging was done with console.log() output.