Thread Tools Display Modes
09/04/15, 09:54 PM   #61
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Ayantir View Post
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 View Post
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
  Reply With Quote
09/05/15, 01:59 AM   #62
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Hey!
Using my house hunter addon I see following maps changed:
- Mournhold,
- Windhelm,

There are probably more - these are only the ones I visited (EP and DC) and some I visited before I created house hunter.
  Reply With Quote
09/05/15, 06:12 AM   #63
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Garkin View Post
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
No. new_dx and old_dx are X-distances between two POIs. Map center is not involved in my formula, precisely because the whole map might be shifted, in which case rescaling is not enough.
  Reply With Quote
09/05/15, 11:57 AM   #64
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by merlight View Post
No. new_dx and old_dx are X-distances between two POIs. Map center is not involved in my formula, precisely because the whole map might be shifted, in which case rescaling is not enough.
Ah, ok. I have misunderstand what were values in formula.

So for Alik'r Desert it will be (3 decimal places, I don't have more for old coordinates):

scale_x = (0.9008 - 0.2224) / (0.957 - 0.178) = 0.871
scale_y = (0.6435 - 0.3484) / (0.665 - 0.326) = 0.871

offset_x = 0.9008 - 0.957 * 0.871 = 0.067
offsey_y = 0.6435 - 0.665 * 0.871 = 0.064

Code:
function translate_old_coords(x, y)
    return x * scale_x + offset_x, y * scale_y + offset_y
end
Sandblown Mine:
new_x = 0.877 * 0.871 + 0.067 = 0.831 (expected 0.8312)
new_y = 0.592 * 0.871 + 0.064 = 0.580 (expected 0.5806)


Lost City of the Na-Totambu:
new_x = 0.732 * 0.871 + 0.067 = 0.705 (expected 0.7050)
new_y = 0.373 * 0.871 + 0.064 = 0.389 (expected 0.3890)

Last edited by Garkin : 09/05/15 at 12:06 PM.
  Reply With Quote
09/11/15, 02:13 AM   #65
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Ayantir View Post
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 :

See under


Exemples :


Treasure Map Crag I : [17:15] Raidelorn: 28,62×62,07 (craglorn/craglorn_base) : Lost Treasure Addon : {0.2816, 0.6162, [[Craglorn Treasure Map I]]
Treasure Map Crag III : [16:57] Raidelorn: 70,44×55,92 (craglorn/craglorn_base) : Lost Treasure Addon : {0.7004, 0.5541, [[Craglorn Treasure Map III]]
Treasure Map Crag IV : [16:52] Raidelorn: 65,54×67,08 (craglorn/craglorn_base) : Lost Treasure Addon : {0.6505, 0.6662, [[Craglorn Treasure Map IV]]


[17:36] le désert d'Alik'r: 22,23×56,78 (alikr/alikr_base) <--- LIVE position of Santaki's delve in Alik'r
{ 0.178, 0.578, 556, 14, 2 } <-- Skyshard reference

I've checked all map, seems only thoses 2 were modified.
Maybe you should consider switching to global coordinates sometime.
  Reply With Quote
09/16/15, 12:04 AM   #66
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
2.1.6 update
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » 2.1 update

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off