View Single Post
05/24/14, 04:44 PM   #11
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 655
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:
  1. local multiplier = 5.0
  2.         if mapContentType == MAP_CONTENT_NONE then
  3.                 if mapType == MAPTYPE_SUBZONE then
  4.                 elseif mapType == MAPTYPE_ZONE then
  5.                 end
  6.         elseif mapContentType == MAP_CONTENT_AVA then
  7.                 if mapType == MAPTYPE_SUBZONE then
  8.                 elseif mapType == MAPTYPE_ZONE then
  9.                     multiplier = 12.0
  10.                 end
  11.         elseif mapContentType == MAP_CONTENT_DUNGEON then
  12.                 if mapType == MAPTYPE_SUBZONE then
  13.                     dimensionsX, dimensionsY = ZO_WorldMapContainer1:GetDimensions()
  14.                     multiplier = 1.0
  15.                 elseif mapType == MAPTYPE_ZONE then
  16.                 end
  17.         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:
  1. local mapType = GetMapType()
  2.     local mapContentType = GetMapContentType()
  3.     if (mapType == MAPTYPE_SUBZONE) or (mapContentType == MAP_CONTENT_DUNGEON) then
  4.         Harvest.minDist = 0.00005  -- Larger value for minDist since map is smaller
  5.     elseif (mapContentType == MAP_CONTENT_AVA) then
  6.         Harvest.minDist = 0.00001 -- Smaller value for minDist since map is larger
  7.     else
  8.         Harvest.minDist = 0.000025 -- This is the default value for minDist
  9.     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.

Last edited by Sharlikran : 05/24/14 at 04:53 PM.
  Reply With Quote