Not signed in (Sign In)
  1.  
    Is there any way to alter Gatherer to show the herb/mining/etc icons around the border of a square minimap as opposed to a round minimap? I'm not using the SquareMinimap addon, which is really nice... except the out-of-range gatherer icons form a circle on my square map. Any way I can change this manually, or any chance of a future update that supports it?
  2.  
    sure, figure out how to compute the varying maximum distance (which is the problem using a square minimap) to the edge of the square instead of computing it according to a circle radius.
  3.  

    [pre]
    -- R: sideLength / 2
    -- a: angle
    -- returns r, distance from center to edge
    function distanceToEdge(sideLength, angle)
        if angle < 0 then
            return distanceToEdge(sideLength, -angle)
        end
        while angle > math.pi / 4 do -- while angle > 45 degrees
            angle = angle - math.pi / 2 -- subtract (rotate) 90 degrees
        end
        return sideLength / 2 / math.cos(angle)
    end
    [/pre]
  4.  
    Posted by: Islorgris on May 30 2006, 10:57 PM
    sure, figure out how to compute the varying maximum distance (which is the problem using a square minimap) to the edge of the square instead of computing it according to a circle radius.


    Thanks for the algorithm, any idea where exactly I'd incorporate that in Gatherer.lua? Heh.
  5.  
    the Gatherer_MiniMapPos function you'll have to double the calculation to compute the maximum edge distance for the border with the angle of the mininote from the player position at the center and calculate the real minimap distance so you know with set of coordinates to use.
  6.  
    Posted by: Islorgris on Jun 2 2006, 05:17 AM
    the Gatherer_MiniMapPos function you'll have to double the calculation to compute the maximum edge distance for the border with the angle of the mininote from the player position at the center and calculate the real minimap distance so you know with set of coordinates to use.


    I'm totally confused :-( not good at this map stuff. Maybe I'll be able to find a guildmate tomorrow that understands what all this means, heh. I added the distanceToEdge function from the post above, just not sure how to incorporate that into Gatherer_MiniMapPos. Been a long time since I was in any math classes, I can't even glance at that Gatherer_MiniMapPos function without getting a headache. I tried just adding:

    mapDist = distanceToEdge(116, angle);

    in there, right after where angle is defined, but after the old mapDist assignment, the icons are still showing up in a circle within my square map though. Ugh, so confused! I'm sure you'll probably think I'm stupid, this is the simple change I made that doesn't work:


    function Gatherer_MiniMapPos(deltaX, deltaY, scaleX, scaleY) -- works out the distance on the minimap
        local mapX = deltaX * scaleX;
        local mapY = deltaY * scaleY;
        local mapDist = 0;

        mapDist = Gatherer_Pythag(mapX, mapY);

        if (mapDist >= 57) then
            -- Remap it to just inside the minimap, by:converting dx,dy to angle,distance
            -- then truncate distance to 58 and convert angle,58 to dx,dy
            local flipAxis = 1;
            if (mapX == 0) then mapX = 0.0000000001;
            elseif (mapX < 0) then flipAxis = -1;
            end
            local angle = math.atan(mapY / mapX);
            mapDist = distanceToEdge(116, angle);
            mapX = math.cos(angle) * 58 * flipAxis;
            mapY = math.sin(angle) * 58 * flipAxis;
        end
        
        return mapX, mapY, mapDist;
    end

    -- R: sideLength / 2
    -- a: angle
    -- returns r, distance from center to edge
    function distanceToEdge(sideLength, angle)
        if angle < 0 then
            return distanceToEdge(sideLength, -angle)
        end
        while angle > math.pi / 4 do -- while angle > 45 degrees
            angle = angle - math.pi / 2 -- subtract (rotate) 90 degrees
        end
        return sideLength / 2 / math.cos(angle)
    end


    Why doesn't this work? it seems like the mapDist variable is the only thing that would control where the icons are placed really, so i'm not sure why they are still showing up in a circle.

    Thanks again, and thanks in advance!

    -mal
  7.  
    Posted by: Malaphus on Jun 3 2006, 12:54 PM
    Why doesn't this work? it seems like the mapDist variable is the only thing that would control where the icons are placed really, so i'm not sure why they are still showing up in a circle.

    You're still comparing the distance to a constant (58), which in polar coordinates describes a circle. I'd try something like:
    [pre]
    function Gatherer_MiniMapPos(deltaX, deltaY, scaleX, scaleY) -- works out the distance on the minimap
        local mapX = deltaX * scaleX;
        local mapY = deltaY * scaleY;
        local pointDist = Gatherer_Pythag(mapX, mapY);

        local flipAxis = 1;
        if (mapX == 0) then mapX = 0.0000000001;
        elseif (mapX < 0) then flipAxis = -1;
        end
        local angle = math.atan(mapY / mapX);
        local mapDist = math.min(pointDist, distanceToEdge(116, angle));
        if pointDist > mapDist then
            mapX = math.cos(angle) * mapDist * flipAxis
            mapY = math.sin(angle) * mapDist * flipAxis
        end
      
        return mapX, mapY, mapDist;
    end
    [/pre]
  8.  
    Posted by: Aradan on Jun 3 2006, 01:16 PM
    You're still comparing the distance to a constant (58), which in polar coordinates describes a circle. I'd try something like:
    [pre]
    function Gatherer_MiniMapPos(deltaX, deltaY, scaleX, scaleY) -- works out the distance on the minimap
        local mapX = deltaX * scaleX;
        local mapY = deltaY * scaleY;
        local pointDist = Gatherer_Pythag(mapX, mapY);

        local flipAxis = 1;
        if (mapX == 0) then mapX = 0.0000000001;
        elseif (mapX < 0) then flipAxis = -1;
        end
        local angle = math.atan(mapY / mapX);
        local mapDist = math.min(pointDist, distanceToEdge(116, angle));
        if pointDist > mapDist then
            mapX = math.cos(angle) * mapDist * flipAxis
            mapY = math.sin(angle) * mapDist * flipAxis
        end
      
        return mapX, mapY, mapDist;
    end
    [/pre]


    Yay, it works! For the most part at least, still some minor little things like the icons changing from the circles to their true icon near the edge, but I can live with that :-) Thanks a ton guys.
  9.  
    Posted by: Aradan on Jun 3 2006, 05:16 PM
    You're still comparing the distance to a constant (58), which in polar coordinates describes a circle. I'd try something like:
    [pre]
    function Gatherer_MiniMapPos(deltaX, deltaY, scaleX, scaleY) -- works out the distance on the minimap
        local mapX = deltaX * scaleX;
        local mapY = deltaY * scaleY;
        local pointDist = Gatherer_Pythag(mapX, mapY);

        local flipAxis = 1;
        if (mapX == 0) then mapX = 0.0000000001;
        elseif (mapX < 0) then flipAxis = -1;
        end
        local angle = math.atan(mapY / mapX);
        local mapDist = math.min(pointDist, distanceToEdge(116, angle));
        if pointDist > mapDist then
            mapX = math.cos(angle) * mapDist * flipAxis
            mapY = math.sin(angle) * mapDist * flipAxis
        end
      
        return mapX, mapY, mapDist;
    end
    [/pre]


    I tired this and I get a " gather.lua:1315 attempt to call global 'distanceToEdge' (a nil value)

    Line 1315 is local mapDist = math.min(pointDist, distanceToEdge(116, angle));

    I have the same UI as the OP
  10.  
    Posted by: Blayloc on Jul 8 2006, 08:22 PM
    I tired this and I get a " gather.lua:1315 attempt to call global 'distanceToEdge' (a nil value)

    Line 1315 is local mapDist = math.min(pointDist, distanceToEdge(116, angle));

    I have the same UI as the OP



    NM forgot to add the function for it from the previous post
  11.  
    Still not lining up correctly...

    UI is scaled to 80%.. and with the above 2 codes inserted the icon on the minimap show up to the right about 100 pixels or so.

    Any thoughts?
  12.  
    Posted by: Blayloc on Jul 8 2006, 09:01 PM
    Still not lining up correctly...

    UI is scaled to 80%.. and with the above 2 codes inserted the icon on the minimap show up to the right about 100 pixels or so.

    Any thoughts?


    Do you have any frame modifiers running to change where the minimap usually goes? I run Discord Frame Modifier to change where my minimap sits and it messes with the locations.

    Does anyone have any ideas on how to fix this issue?
  13.  
    Posted by: Kaeolla on Jul 13 2006, 01:15 AM
    Do you have any frame modifiers running to change where the minimap usually goes? I run Discord Frame Modifier to change where my minimap sits and it messes with the locations.

    Does anyone have any ideas on how to fix this issue?


    No, but I've got a similar problem. Since I moved the minimap with discord frame modifier the Gatherer (and only the gatherer) Tooltips are gone and new herbs aren't noted.

    Does anyone have a fix?
  14.  
    Posted by: Kaeolla on Jul 13 2006, 01:15 AM
    Do you have any frame modifiers running to change where the minimap usually goes? I run Discord Frame Modifier to change where my minimap sits and it messes with the locations.

    Does anyone have any ideas on how to fix this issue?


    shouldn't be an issue anymore, icons have been attached back to the minimap (no need to move the minimap cluster as a side effect), this is commited for next version.
  15.  
    If this is under study for possible implementation, would it not be easier simply to make the Gatherer 'badge' free floating? As in, you can move it wherever you wish, like trinketMenu for example.
    •  
      CommentAuthorIslorgris
    • CommentTimeAug 31st 2006
     
    hm ? you sure you're talking about the same thing that is discussed through this thread ?
  16.  
    :shamed:

    Oops.. perhaps I misinterpreted the original request! My bad :(
    • CommentAuthorPseudopath
    • CommentTimeJun 27th 2007
     
    Has this been updated since the last comment?
    I'm keen to have this as I've just changed my minimap toa square shape...

    - Pseudopath.
    • CommentAuthorEsamynn
    • CommentTimeJan 21st 2008
     
    Added in version 3.0.3
World of Warcraft™ and Blizzard Entertainment™ are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.