
Back at it again, feel like I'm figuring stuff out and maybe somebody will actually answer my question this time instead of saying "just fudge it manually until it is close enough". Background For Those Who Don't Know In case anyone reading this doesn't know, roll20's hexes don't respect the number of cells you pick. Hex (H) (which correctly picks horizontally oriented hexes, that is, each hex's largest dimension spans horizontally), if it were correctly implemented would given you as many hexes vertically as you specify in the Height on a page. It does not. It has been promised that this would be fixed for over 7 years but it hasn't been. It is also the case that the math that specifies the hexes for Roll20 does not draw regular hexagons (or at least, whatever hexagons that are standard for hexmaps and hexmapping software). More on that later. What I've been able to figure out to align a hexmap image in roll20, but using math instead of fiddling with it by eye. Thanks to various hex-related APIs from the community, I've found measurements for roll20's hex, I'm not sure how these numbers were arrived by the people using them, but here they ar const UNIT_PIXELS_SIDE_H_DIST = 79.688789983504; const UNIT_PIXELS_DIAG_H_DIST = 80.185196764184; const UNIT_PIXELS_DIAG_H_DX = 69.585127490377; const UNIT_PIXELS_DIAG_H_DY = 39.844394991752; const UNIT_PIXELS_H_START_X = 94/2; const UNIT_PIXELS_H_START_Y = 81/2; Doing 70 (the standard roll20 cell height) divided by UNIT_PIXELS_SIDE_H_DIST, I get 0.87841715270730512222684903731446. Roll20 only allows so much precision, so in the Cell Height spot in my page it becomes 0.8784171527073051. Precise enough for our purposes. Doing this now means that whatever number I put in the Page Height, the resultant grid used by Roll20 lines up with my grid of that many hexes tall. Halfway there! Well, sort of. The map I'm measuring is 90 tall. I am measuring 89 edge to edge, snapped. The last cell row isn't quite made... but it's close enough, maybe I need a more accurate or precise Cell Height value to get it? In any case, it is very close enough for me, as it's one cell height I can use regardless of map size. Where I'm Stuck Now I'm very happy to have gotten the height squared away, but unfortunately, it's not the end. This is how I learned the Roll20 hexes, in addition to having arcane math GMs don't get to see and have to reverse engineer to actually get them to obey "Page Height", also aren't drawn dimensionally correct, at least they use different ratios than every other map maker that all seem to line up with each other and old hex maps. My hexmap is square shaped, so I have set my page to be the same height as width, since the map is. Unfortunately, there is some distortion horizontally, and there isn't a "cell width" setting for us to mess with... so the only option is to mess with page width by, in my case, finding a multiplier to multiply the height by to find the width I need to set. (and then I would need to set the image width to match by doing a manual resize matching the page dimensions, just using the same numbers). So far in my messing around with ratios, I've determined it should be between 1.0062293175838503611720443434753 and 1.0111111111111111111111111111111 I clearly don't know what I'm doing at this point, because the numbers I care about seem to still be obscured or my decade-unused geometry knowledge isn't helping me. So, any idea what ratio I should be multiplying my page (and map image) widths by?