Originally Posted by Ayantir
Warning for all addons with map coordinates :
somes changes :
Craglorn :
You'll need to add ~0.005 to X axis
You'll need to add ~0.005 to Y axis
Alik'r :
You'll need to add ~ 0.0445 to X axis
You'll need to substract ~0.01 to Y axis
|
In Craglorn both X and Y axis were shifted by +0.00465837121010, so it will be easy to fix.
Alik'r Desert will be a bit more complicated. I don't have exact coordinates to compare, so here it will be much less accurate. However it seems that map was scaled down to cca 87% of previous size.
Dungeons:
(name) - (new coordinates) / (old coordinates)
Aldunz - 0.6412, 0.6435 / 0.659, 0.665
Coldrock Diggings - 0.6482, 0.3484 / 0.667, 0.326
Divad's Chagrin Mine - 0.4054, 0.5892 / 0.382, 0.596
Sandblown Mine - 0.8312, 0.5806 / 0.877, 0.592
Santaki - 0.2224, 0.5678 / 0.178, 0.578
Yldzuun - 0.9008, 0.5207 / 0.957, 0.524
Lost City of the Na-Totambu - 0.7050, 0.3890 / 0.732, 0.373
Originally Posted by merlight
Take the left-most and the right-most shard (to minimize error), compute distance in X coordinate (old_dx be their distance in old add-on data, new_dx be their current distance).
scale_x = new_dx / old_dx
offset_x = new_x - old_x * scale_x
Similarly for Y.
function translate_old_coords(x, y)
return x * scale_x + offset_x, y * scale_y + offset_y
end
Or better update the data with translated values, it would get really messy when coords change again.
|
You have to count with distance from the center, not from the top / left side.
scale_x = (new_dx - 0.5) / (old_dx - 0.5)
scale_y = (new_dy - 0.5) / (old_dy - 0.5)
function translate_old_coords(x, y)
return 0.5 + ((x - 0.5) * scale_x), 0.5 + ((y - 0.5) * scale_y)
end