Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Diagonals Pathfinder anything but scale 1 is calculated wrong

1464983363

Edited 1464996484
So I've played around with this thing and it's just messed up, maybe somebody can show me a trick how to get this to work or the devs could kindly fix the diagonal calculation. If Grid 1 & Scale 5 everything works. 1 diagonal is 5 second one is 10 third 5 fourth 10 etc. perfect. But if I set the Grid to 2 & Scale to 2.5 first diagonal is suddenly 7.5, what? straight lines are still calculated correctly in 5ft intervals, but diagonal become fucked up. If Grid 0.5 & Scale 10 it records the first diagonal as 5ft (so far so good), but the second one is just 10, and that continuous. So it just jumps the pathfinder second diagonal double cost. Idk what's going on there, I feel like it was hard coded to only work with grid 1 scale 5 and everything else uses some dynamic range that just doesn't work with pathfinder. 70x70 pixel grids are just too small for me, I enjoy larger grids so the figures appear larger with more details, but it's annoying to do if roll20 can't handle pathfinder diagonals in anything but 70x70. I've seen multiple reports of this issue on this forum, from as long as 2 years ago, what's going on? I need this to work.
1465245902

Edited 1465245911
Phil B.
Forum Champion
Sheet Author
Hey Sihhur, thanks for pointing this out. There is definitely some math wrong somewhere that we will need to fix. I've created a bug report for this and one of us will take a look at it as soon as we get a chance!
While you’re at it, please fix Euclidean distances for Hexes.
I don't know if it supposed to be fixed by now, but it's not working for me still.
1467043955
Phil B.
Forum Champion
Sheet Author
I'm sorry, I haven't had time to work on bugs recently. It's on the list and will get fixed whenever I have time to start bug-smashing again. Hopefully soon.
1467310514
Phil B.
Forum Champion
Sheet Author
This should be fixed on dev, now.
1467315430

Edited 1467315554
TL;DR: Multiples of 70 seem to work, everything else still doesn't. Hello Phil, it does look better, but it's still not perfect I'm afraid. Diagonal jumps work correctly at Scale 5 and Grid Size 1: 0 -> 5 -> 15 -> 20 -> 30 -> 35 -> 45 -> 50 -> 60   +5   +10   +5    +10     +5    +10    +5    +10 If I want to double the pixels in a squres side length from 70 to 140, I'll have to set Scale to 2.5 and Grid Size to 2 which also works now: 0 -> 5 -> 15 -> 20 -> 30 -> 35 -> 45 -> 50 -> 60   +5   +10    +5   +10    +5     +10     +5   +10 It also works at triple the size 210pixels, which would have a Scale of 1.6666° and a Grid Size of 3. But if I want a grid the size of 100 pixels, I'd have to set Scale to 3.5 and Grid Size to 1.428571429 which gives me this: 0 -> 5 -> 10 -> 20 -> 30 -> 35 -> 40 -> 50 -> 60  +5    +5    +10    +10    +5     +5   +10    +10 So I still get to 60 ft with the same amounts of squares(8), but the numbers in between are incorrect.  My formula for calculating Scale and Grid Size: Scale= 70/Pixels*5 Grid Size= Pixels/70 As a side note, I'm sure there was a reason why 70x70 was chosen as the default grid size at some point, but it would be easier if I could just set the Pixel Grid Size myself. I wouldn't have to calc and enter these long ass numbers if I go away from the default.
1468877685
Phil B.
Forum Champion
Sheet Author
It took a while, but I finally had some time to take another look at this. The problem you were having was due to some rounding issues, since as you said the base dpi is 70 and you were having to use some pretty "creative" numbers to get around that. I've added some additional rounding that at least covers the specific case you listed, and should cover other cases as well. The fix should go live tomorrow morning, if after that you find any more issues please let me know. There are a lot of things that are expecting the 70 pixel grid. Changing the grid size, or allowing users to change the grid, would be a huge undertaking and I don't think it would be worth development time when you can pretty easily work around it.