While you guys were posting your suggestions I was playing with things. I reset the database so I had no data in it. Then I stood in the middle, or what I thought was the middle, and then moved my reticle onto the node to record it. I made it imposible to record another one so I won't have duplicates.
Then I tried to get as far away as I could from it and the range is just the x,y coordinates. I am approximately 0.0002638 distance from that fishing node. The modified function from RangeReticle says I am about 66 meters away from it. Now, Garkin mentioned something I was aware of in that the maps are just 0,0 and 1,1 basically. The current idea you guys have is to get the scale of the map somehow and use that to define the range. So I like that idea.
Since there is no definition in meters I'll take your advice Garkin and try not to use meters. Just for the sake of argument, if there was a way to define it in meters then 66 meters away is too far in my opinion. A user should be much closer before the node is recorded.
Lua Code:
local multiplier = 5.0
if mapContentType == MAP_CONTENT_NONE then
if mapType == MAPTYPE_SUBZONE then
elseif mapType == MAPTYPE_ZONE then
end
elseif mapContentType == MAP_CONTENT_AVA then
if mapType == MAPTYPE_SUBZONE then
elseif mapType == MAPTYPE_ZONE then
multiplier = 12.0
end
elseif mapContentType == MAP_CONTENT_DUNGEON then
if mapType == MAPTYPE_SUBZONE then
dimensionsX, dimensionsY = ZO_WorldMapContainer1:GetDimensions()
multiplier = 1.0
elseif mapType == MAPTYPE_ZONE then
end
end
That code is taken from RangeReticle also and it does what you guys are suggesting. Depending on the map type there is a modifier for the range. I am going to play with Garkin's code, and this code to see which map types I can use and try to multiply the minDistance by the multiplier based on the map type.
Lua Code:
local mapType = GetMapType()
local mapContentType = GetMapContentType()
if (mapType == MAPTYPE_SUBZONE) or (mapContentType == MAP_CONTENT_DUNGEON) then
Harvest.minDist = 0.00005 -- Larger value for minDist since map is smaller
elseif (mapContentType == MAP_CONTENT_AVA) then
Harvest.minDist = 0.00001 -- Smaller value for minDist since map is larger
else
Harvest.minDist = 0.000025 -- This is the default value for minDist
end
Wmrojer suggest this code. Hopefully there is some way to help make small maps and large maps require you to be about the same distance from the object you are interacting with before it's recorded. I wonder if there are like, 10 different map types, but only three different sizes.